# 32MHz Crystal

Discussion in 'General Electronics Chat' started by marioo1182, May 30, 2015.

1. ### marioo1182 Thread Starter New Member

Apr 20, 2015
4
0
So I am in the design stages of making a 24 hour clock.
It looks like the best and most accurate clock source that I can use is a crystal. I have found many and one that I have been looking at is a 32MHz crystal (FOX Korea). However I need to have a 1 Hz source for my 24 hour clock. Would the best way of going from 32MHz to 1Hz just be with JK Flip-Flops?

Jul 18, 2013
10,860
2,525
Are you sure you don't mean 32.768Khz clock xtal?
This is often used with a processor such as a Picmicro to make a 1 sec period based clock.
Max.

3. ### JohnInTX Moderator

Jun 26, 2012
2,394
1,051
I think you are looking for a 32.768 KHz watch crystal. This frequency will divide to exactly 1 second (assuming its accurate in the first place) when divided by 15.

If you are going for long term accuracy in a time of day clock, consider using the AC line frequency - over time, its regulated to be exact, at least in the US.

EDIT: Max beat me to it.
You also could use something like this.

4. ### takao21203 Distinguished Member

Apr 28, 2012
3,578
463
the best way to go - use a cheap quartz watch + IR reflective sensor just above the blinking dots.

you dont need the flipflops and you dont need to buy a crystal.

5. ### marioo1182 Thread Starter New Member

Apr 20, 2015
4
0
I think that may be what I am looking for then. I was actually looking at this http://www.rpelectronics.com/s-xtal-58.html
So if I div the crystal you mentioned by 15 I will get an exact 1Hz waveform?

6. ### marioo1182 Thread Starter New Member

Apr 20, 2015
4
0
nvm. 32768/(2^15) = 1. I figured it out. Thanks everyone!~

7. ### JohnInTX Moderator

Jun 26, 2012
2,394
1,051
Yes. If you 1) build an oscillator using the crystal and 2) tune it to exactly the 32.768KHz and 3) divide it by 15, you'll indeed get 1 sec intervals.

8. ### LDC3 Active Member

Apr 27, 2013
920
160
Actually, there's a chip that will do that. It takes a 32.768 KHz crystal and provides a 1 Hz pulse, or even the correct time (if preset).

9. ### MikeML AAC Fanatic!

Oct 2, 2009
5,451
1,066
That should be 2^15 (15 bit binary counter), which divides by 32768

JohnInTX likes this.
10. ### Lestraveled Well-Known Member

May 19, 2014
1,957
1,218
I have used a Maxim DS2417. It is a micro power clock chip with a programmable interrupt. It has a lot of cool features also.

11. ### JohnInTX Moderator

Jun 26, 2012
2,394
1,051
Whoops. Yeah.. I meant 15 stages which would be 2^15. Thanks.

Jul 31, 2013
196
25
cd4060 has provision for 32.***khzoscillator built in and goes to 2Hz. add a 4013 divide by 2 and you're there.
cd4521 with 4.194304Mhz crystal goes all the way.
Or take out the tiny pcb from a cheap wall clock and you get 1pps alternating polarity from the 32Khz crystal that's on it.
Or get a GPS reciever module and get very accurate 1pps directly.
I'm building a clock myself so have been googling.

Last edited: May 31, 2015
13. ### ericgibbs AAC Fanatic!

Jan 29, 2010
2,602
396

Jul 18, 2013
10,860
2,525
With a Pic you just attach the Xtal, the T1 timer has a 16bit register, set the MSB and let the timer interrupt indicate 1sec intervals when it rolls over.
Max.

15. ### atferrari AAC Fanatic!

Jan 6, 2004
2,672
785
Look around at home or ask friends for alarm clocks out of use. I got about 20 of them and most seem to use the same IC to give a 1 Hz output. Otherwise a 2 x 4017 circuit, sensing the mains could give that 1 Hz pulse you need.

Sensor could be a very short "antenna" at the clock input of the first stage or, guessing here, just leaving it floating if mains wiring runs close.

16. ### ian field Distinguished Member

Oct 27, 2012
4,459
792
As someone else pointed out - the crystal is actually 32.768, there are/were off the shelf chips that have the right number of divide 2 flip-flops for 1Hz output.

IIRC: the 4060 CMOS counter has an oscillator front end that suits RC or crystal, but you may need a couple of extra JK flip flops on the end to get down to 1Hz.

There are various other length counters that may or may not have more than enough stages, but you have to build your own oscillator circuit for the crystal.

Those watch crystals are very tiny and can't handle much power, so you have to design the oscillator carefully.