100k, 1mhz clock divider to 60.0000hz? - Page 1
Forum section: electronics / projects

author: Old Goat
author_rank: Contributor
timestamp: December 29, 2021, 05:02:07 pm
content: Well, search as I might, I've not run into a clock divider which seems suitable for a purpose I have in mind. What I want is a gadget to divide my GPS receiver's output (I have a choice of 100k, 1mhz, 5 mhz, 10mhz, etc) to 60.000hz. The purpose being to provide a clock signal to a free-running display which I have on my bench. Just for local time of day, nothing more important than that. Any suggestions here about a hardware solution which might be "plug in and go", or (second choice) perhaps a circuit which I could put together in an afternoon? I'm quite sure that there are software solutions, but that would probably be far more complex than I want to mess with. Ideas? Thanks, all, in advance.Edit: Thank you all for your ideas and suggestions. Some I'd not considered.So, let me correct my original statement slightly - the clock display is a single IC clock chip driven by the 60hz main supply here in the US, but does indeed drift as compared to my two GPS receivers. One is a TrueTime (which has the jumper selectable output clocks frequencies), and the other is a Trimble which I placed in a rackmount chassis also. I use these as master clocks for frequency counters, etc. Now, I've not actually checked carefully the apparent drift over a period of days, I just notice that it's off by several seconds to maybe a minute or so when I do check occasionally (every few days, or a week or so).The real nuisance part of this story is that TrueTime makes a display which is driven from IRIG-B, which my TrueTime receiver outputs as well as the selectable 100k, 1m, clocks etc. I had one a few years before I purchased the TrueTime GPS receiver, but I sold it because I didn't think I'd ever use it.So there is where I am, and it's just a matter of curiosity, not necessity that I would like a display on the bench that remains "on time", day to day.So, again, thank you, and keep the ideas coming.

author: Kim Christensen
author_rank: Super Contributor
timestamp: December 29, 2021, 05:24:04 pm
content: QuoteSince it is running on the bench in the USA, why not power it from AC and use the line frequency as your reference?Or, if you really want to use the GPS, you can periodically sync it with the GPS by reading the NEMA sentence if your GPS outputs one. (This requires a microcontroller of some kind.)

author: Alex Eisenhut
author_rank: Super Contributor
timestamp: December 29, 2021, 05:25:45 pm
content: That's a pretty specific requirement.https://www.eevblog.com/forum/projects/is-there-a-60hz-oscillator/

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: December 29, 2021, 05:33:04 pm
content: Use a PIC16 or PIC18, drive it directly from 10MHz and every 20833 instruction cycles toggle an output pin.After every three toggles add another instruction as a delay.10MHz / 4 = 2.5MIPS = 20833.3 half-cycles of 60HzLeo

author: MarkF
author_rank: Super Contributor
timestamp: December 29, 2021, 05:35:29 pm
content: you could use a combination of binary and decade counters to do the division plus a few logic gates set the proper count (i.e. do a count reset). Will take at least 4 counters for your lowest 100K GPS output.SN54LS160A THRU SN54LS163A SYNCHRONOUS 4-BIT COUNTERS

author: jpanhalt
author_rank: Super Contributor
timestamp: December 29, 2021, 05:54:50 pm
content: Quote from: Old Goat on December 29, 2021, 05:02:07 pmCode is available that will give "0%" error, if you clock an MCU with it. See here:https://www.golovchenko.org/home/delay_loopsVery little complexity.EDIT: I am getting a 404 with that link, but from his home page it works. Maybe something at my ISP.EDIT2: Thanks for the clue. I didn't check what the post here interpreted from a cut and paste. Fixed.

author: Benta
author_rank: Super Contributor
timestamp: December 29, 2021, 07:50:17 pm
content: 60 Hz is problematic, as there is no integer relationship to 100 kHz or 1 MHz.You need a "Dual Modulo" counter, meaning it will divide by N and N+1. On each output cycle you'll have a period that's slightly low or high, but over a few cycles (in this case three) will be 100% correct.The question is how much jitter you can tolerate on your 60 Hz output?Examples:100 kHz input:Divide ratios: 1667, 1667, 1666, 1667, 1667, 1666, 1667 ... 10 us jitter on the 60 Hz output.1 MHz input:Divide ratios: 16667, 16667, 16666, 16667, 16667, 16666 ... 1 us jitter.A normal programmable counter chain (eg, 74HC161) will do the trick.Let the output of the counter clock a 0...2 counter (two FFs and a few gates suffice) that controls N or N+1 behaviour of the main counter. This is done by setting the LSB of the main counter programming input high or low.

author: I wanted a rude username
author_rank: Frequent Contributor
timestamp: December 29, 2021, 10:15:31 pm
content: Quote from: jpanhalt on December 29, 2021, 05:54:50 pmSimpe Machines Forum included the period in its automatic wrapping of the URL into a hyperlink. It works without the period:https://www.golovchenko.org/home/delay_loopsThis is a good resource for common cases, but would need to be modified to perform the one-in-three correction that Leo suggested. Generated code:Code:; Delay = 0.00833333 seconds; Clock frequency = 1 MHz; Actual delay = 0.008332 seconds = 2083 cycles; Error = 0.016 %cblockd1d2endc;2083 cyclesmovlw0xA0movwfd1movlw0x02movwfd2Delay_0decfszd1, fgoto$+2decfszd2, fgotoDelay_0

author: edavid
author_rank: Super Contributor
timestamp: December 29, 2021, 10:52:06 pm
content: If you don't want to do any programming, it would be easy to multiply 100KHz by 3 with a CD4046 or 74HC4046 + 74HC163, then divide by 5000 with 2 74HC390s.

author: ve7xen
author_rank: Super Contributor
timestamp: December 29, 2021, 10:54:04 pm
content: Why 60Hz? Is this a hard requirement of the existing 'free-running display', or are you free to modify this device as well? If the 'free-running display' supports 50Hz 'mains' as well, this would be much easier as it has an integer relationship to your available clock frequencies, so the divider would be trivial and low jitter. Choose the lowest available clock frequency (100khz) and divide by 2000 using 74 series logic (e.g. 74HC4040).Or for a single-chip solution, use the PWM peripheral or cycle-counted delay loops in any typical microcontroller to do the same.You may also consider using a u-blox GPS (or maybe others that have this feature), then you can just configure your desired output frequency directly from the receiver, and it will be fairly low jitter even if it's a non-integer fraction, because it will be clocked directly from the receiver's timebase. You can get a NEO-6M module (or clone) for < $5 on eBay that can do this. Just make sure the board includes an EEPROM (most do), so you can store the nonstandard timepulse configuration.

author: amyk
author_rank: Super Contributor
timestamp: December 29, 2021, 11:27:28 pm
content: Perhaps a PLL might be usable?

author: bingo600
author_rank: Super Contributor
timestamp: December 31, 2021, 07:05:35 am
content: A cheap - STM32F030F4P6 board might do it , using the built in PLLhttps://www.ebay.com/itm/254239322313If you feed the HSE clock w. 10MHz , and set the PLL clock parms to Divide by 5 , and MUL by 12 , you'll get a 24MHz PLL Clock.If you then set the timer prescaler to ie. 1000 , then you'd match on 400 (200 for a 60Hz clock gen) , keeping it nicely within a 16bit timer.You might have a bit of jitter , but if it's for clock ticks .. I don't think it would matter.I'm not a stm32 guru yet , but that's prob. the i'd give a try.Well i'd prob get a F401 "Black pill" , and use a 96MHz PLL clock (matches on 1600/800) ...Just because it is easier to use the stm32duino firmware , and load the firmware directly via usb , It also has 32bit timershttps://www.ebay.com/itm/184549449179But the F030 Xtal is easier to removeA "BluePill" at 84MHz would also do it (1400/700) , if you have one "in the drawer"

author: BrianHG
author_rank: Super Contributor
timestamp: December 31, 2021, 12:14:32 pm
content: Quote from: Old Goat on December 29, 2021, 05:02:07 pmHe does not need jitter free, just a perfect dividing 10mhz into 60hz.I would just make a PIC program which took in the 10MHz. Internally generate a perfect 10Hz interrupt using the internal own capture compare counter set to divide the system clock by 1000000/4/250000=10hz.I would then just loop-toggle an IO close to 60hz with nothing more than a software delay loop while the PWM interrupt will be used to reset that generator of 6 pulses. At then end of every 6th output cycle, the next cycle will begin early or late by a few 100s of nanoseconds as it waits for that PWM interrupt timer to begin again.Perfect for a 60hz compatible clock for display.Also any cheap bottom end CPLD/FPGA can also do this with ease.

author: Old Goat
author_rank: Contributor
timestamp: December 31, 2021, 10:59:33 pm
content: Quote from: edavid on December 29, 2021, 10:52:06 pmI like this idea, and I'll pursue it. I like it as it appears to be relatively "quick and easy" to implement.It was also mentioned that if the clock were able to utilize 50 hz, that might make the solution even easier. I had not considered this possibility, so will take a look at the clock IC and see if that's an option.Thank all of you, keep 'em coming!

author: EPAIII
author_rank: Super Contributor
timestamp: January 01, 2022, 02:58:05 am
content: There are dedicated counter chips that can be hard wired to count to any number and then reset. But 60 has the factor of 3 in it and none of the available numbers you list are evenly divisible by 3 so no single count is going to do it. For instance, for your 10 MHz source you would need to divide by 166,666.6666666...What you do need to do is use software to count to one number two time and then to a second number the third time. This will be off by a very small factor on each count, but will average out to exact every three counts. For a time of day clock it should be just fine.For 10 MHz you would count to 166,667 two times and then to 166,666 once. And then repeat that cycle.But there is another, easier way to get the correct time of day. At Walmart I purchased a Westclock, "Atomic Clock" which synchronizes with the WWV transmissions. These transmissions are used by serious users such as labs and others who want the correct time. You can even get correction figures they publish when extreme accuracy is needed for corrections to observations after the fact. So they are traceable to the US standard time as maintained by THE actual atomic clocks by NIST.https://en.wikipedia.org/wiki/WWV_(radio_station)This is the widely used standard for time of day in the US and other countries as well. I looked and Walmart no longer has that exact clock, but there are at least two others on their web site that are labeled "atomic clock". I believe I only paid about $25 at the time and I see others that are available for less today.The beauty of these "atomic clocks" is they will automatically synchronize with the nearest WWV station within a few minutes, certainly at the top of the hour, after a power loss or battery change. So they are self setting. Mine is battery powered, just sits behind my desk and always has the correct time. I really need to buy more for around the house.

author: MarkF
author_rank: Super Contributor
timestamp: January 01, 2022, 01:19:24 pm
content: Can no one count in this topic?Here's a quick circuit that may not be exactly correct.Basically, you reset the counter when it reaches 60.A MCU with a 32.768MHz oscillator would be the best way to go. It would save many chips.

author: Benta
author_rank: Super Contributor
timestamp: January 01, 2022, 08:12:53 pm
content: Quote from: MarkF on January 01, 2022, 01:19:24 pmCongratulations on misunderstanding the issue 100%. Dividing by 60 is no problem, everyone knows how to do that.And by the way, your design is not good. The purpose of the 74161 is programming it. Using the /MR is amateurish.

author: Benta
author_rank: Super Contributor
timestamp: January 01, 2022, 11:14:52 pm
content: This circuit will do a 1666.66666.... division.Meaning 100 kHz -> 60 Hz (but with 10 us jitter).But with the ridiculous prices of 74HC nowadays, I don't know. In normal times it would cost less than 50 cents.

author: Old Goat
author_rank: Contributor
timestamp: January 02, 2022, 02:06:58 pm
content: Quote from: Benta on January 01, 2022, 11:14:52 pmThis is quite what I had in mind, what I thought was possible, but didn't know how to go about it myself.I have two questions though. 1) why are the J/K outputs of IC5B tied together? and 2) are the inputs to the 74HC161 counters tied "hi" and "low" via maybe 10k resistors? Is that what is meant by the "1" and "0" annotations?Thank you for this.And to the reply which suggested an "atomic" clock, I had considered this, but my purpose isn't serious enough to warrant another clock in the shop, this is mostly an issue of 'can I do it', and if so, how? Thank you again to all who responded.The Old Goat

author: Terry Bites
author_rank: Super Contributor
timestamp: January 02, 2022, 04:29:51 pm
content: Keep it simpleA standard 18.432 MHz div1024 div5or much more fun:An ELM440 with an NTSC Xtal. $10 should cover it.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2022, 07:27:30 pm
content: Quote from: Terry Bites on January 02, 2022, 04:29:51 pmBut the OP explicitely wanted to use the clock reference from a GPS receiver.

author: Benta
author_rank: Super Contributor
timestamp: January 02, 2022, 08:01:12 pm
content: Quote from: Old Goat on January 02, 2022, 02:06:58 pm1: J/K are inputs. And you're right, there's an error in the schematic there. The K input of IC5B should be tied to '1', which leads to your next question.2: '0' and '1' are VDD and VEE. With 74HC logic you can safely tie inputs directly to the supply rails, no need for resistors.Just to explain the circuit better: the HC161/163 counter chain is a normal 12-bit programmable counter.Computing the programming pattern from the division ratio N is done by using 2^12 - N or 4096 - N.In this case 4096 - 1666 and 4096 - 1667, giving2430and2429. The counter is hardwired to a divide ratio of 2428, the two LSBs are added by the FFs (01 and 10).The two JK FFs are a divide-by-three counter, programming the main counter with 2430, 2429 and 2429 (not necessarily in that order).Hope this is clear.EDIT: I've modified the schematic in Reply #17. It should be OK now. The /R inputs to U5 should be tied high, of course. I was too lazy to add that I'll admit.

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 02, 2022, 08:25:34 pm
content: Does the GPS receiver have a "PPS" output? I'm thinking the easiest solution might be a RC oscillator set to run at about 70Hz (not critical, just has be be above 60Hz) gated by a flip flop that starts it when a PPS pulse is received and stops it when it detects the second tick over from the clock. Could possibly be done with a single CMOS logic chip or a 556.

author: Benta
author_rank: Super Contributor
timestamp: January 02, 2022, 08:37:59 pm
content: Quote from: NiHaoMike on January 02, 2022, 08:25:34 pmIt's an idea. But I would worry a bit about "hit and miss" situations where the cut off from the FF would create pulses so narrow that a decision between 0 and 1 gets difficult.

author: spostma
author_rank: Regular Contributor
timestamp: January 02, 2022, 08:47:52 pm
content: I would use a 6-pin or 8-pin PIC with 20-bit NCO like the PIC16F15313-I/PThe NCO FOVERFLOW= NCO_Clock_Frequency * IncrementValue / 220which allows rougly a one per million divisor resolution.The NCO output signal can be output immediately to a pin,or used in the 4-macrocell CLC if needed.The only firmware needed is to set up the NCO unit, the rest is done in hardware.I think that the easiest compiler for this would be GreatCowBasic,:https://sourceforge.net/projects/gcbasic/

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 02, 2022, 10:23:27 pm
content: Another option if you don't want to use any specific IC and want to reduce jitter (if it matters) would be to first multiply the frequency by 3, and then divide by 5000, 50000, ... depending on which output you use.You don't necessarily need a PLL for this. Since square waves are made of odd harmonics, you can just band-pass filter the input signal around 3 times the frequency, without requiring a high-order filter at all, and then feed the output to some comparator. Then you can divide by an integer. Now due to the filter and comparator, I wonder if you'd really get lower jitter in the end, than with one of the purely digital solutions suggested above. It would need some calculation. =)

author: EPAIII
author_rank: Super Contributor
timestamp: January 03, 2022, 01:56:02 am
content: Just so that you know, the atomic clock that I have measures 2.25" x 4" x 4". And a lot of that is due to style; it could be just the size of the display and a PCB behind it.You seem to want a hard wired, logic circuit and not even a PIC or Arduino like device. I will try to design one. But, are you willing to live with a slight time jitter in the order of micro seconds? Something like this over a group of three seconds: 0.0 ns, +33.33... ns, and -33.33... ns with the pattern repeating. You did say it was just for a "time of day" clock. I don't think there is any way that you could notice that slight jitter without some very sophisticated apparatus.I really think you should answer this question about the allowable jitter as it could make the answer either simpler of more complicated.Quote from: Old Goat on January 02, 2022, 02:06:58 pm

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 03, 2022, 03:58:23 am
content: Quote from: Benta on January 02, 2022, 08:37:59 pmThe odds of getting the flip flop into a metastable state with a 1 PPS signal and having it stay there for long enough to be a concern would be orders of magnitude less likely than winning the lottery.It could also work to frequency shift the clock rather than starting/stopping it, something like slow it down to a few Hz when waiting for the next pulse and speed up to 100Hz to catch up to it when it arrives. Interesting thing to try would be to use a signal generator to see how high the frequency can go and still have the counters work properly, I would expect that it would work well into the kHz or more.In any case, the frequencies involved are low enough to easily breadboard with, so have some fun!

author: Old Goat
author_rank: Contributor
timestamp: January 03, 2022, 05:28:17 am
content: "... But, are you willing to live with a slight time jitter in the order of micro seconds? ...I really think you should answer this question about the allowable jitter as it could make the answer either simpler or more complicated. "That slight of jitter is of no consequence. I'm just looking for a clock which over days keeps time, sync'd with the GPS receiver.I'm quite interested in what you may come up with.

author: Benta
author_rank: Super Contributor
timestamp: January 03, 2022, 11:50:22 am
content: Quote from: NiHaoMike on January 03, 2022, 03:58:23 amI'm not talking metastability but missing/additional pulses.

author: NiHaoMike
author_rank: Super Contributor
timestamp: January 03, 2022, 01:09:16 pm
content: Quote from: Benta on January 03, 2022, 11:50:22 amIf it "skids past" by a cycle or two, it will be automatically compensated for the next time around.

author: David Hess
author_rank: Super Contributor
timestamp: January 03, 2022, 04:23:02 pm
content: Quote from: edavid on December 29, 2021, 10:52:06 pmThe PLL could be skipped by injection locking a free running 300 kHz oscillator to 100 kHz, or 3 MHz to 1 MHz, etc. Then do the division down to 60 Hz.Or the source could be tripled (turn it into a square wave) and filtered to extract the third harmonic, but this almost amounts to the same thing since the filter is usually resonant. This is more suitable for much higher frequencies. At low frequencies injection locking is easy.

author: Terry Bites
author_rank: Super Contributor
timestamp: January 03, 2022, 05:41:34 pm
content: Luckily BCD Rate multipliers still exist and are easily available in small quantities. You can multiply the 1MHz GPS by 0.6 (0110 in BCD) in the '4527 and then crunch through the 4 decades with a couple of '390s to get 60Hz. Rate multipliers output a frequency which is "on average" the input multiplied by the BCD divisor. But as you trickle down through the decades the errors tend towards zero.I expect some one out there is bored enough to run the maths for on it.

author: Wolfgang
author_rank: Super Contributor
timestamp: January 03, 2022, 05:54:31 pm
content: What about a rather overengineered solution like this one:https://electronicprojectsforfun.wordpress.com/an-noninteger-frequency-divider-with-sinewave-output/

author: Benta
author_rank: Super Contributor
timestamp: January 03, 2022, 07:26:04 pm
content: Quote from: Terry Bites on January 03, 2022, 05:41:34 pmInteresting. First time I've ever heard of that device. Thanks.PS: nasty counter design with your 'LS390s, though. Ripple counters are just so 80s

author: BrianHG
author_rank: Super Contributor
timestamp: January 03, 2022, 08:32:56 pm
content: I don't get why this is so difficult. If you have a 10Mhz source. Just feed it through a 3rd harmonic filter, basically a low value caricap tied to an inductor (or tunable inductor with fixed 2-5pf cap) and an NPN transistor amplifier to get your 30MHz reference. You may want 2 stages to filter and cleanly isolate that 30MHz.Now, if you cannot divide 30MHz into 60Hz with low end CMOS logic, then I do not know what to say.This would be my Non-MCU method. Otherwise my PIC solution on page one on this thread is basically doing the same thing digitally at the low end 60hz side.Obviously, this can be done done with changing 1MHz to 3MHz. 100KHz may require a larger inductor value and more difficult to tune.

author: Benta
author_rank: Super Contributor
timestamp: January 03, 2022, 08:46:18 pm
content: Quote from: BrianHG on January 03, 2022, 08:32:56 pmEveryone has a hobby horse. Yours is RF design, my approach is digital, others promote PLLs etc.The OP will select a preferred solution in the end.

author: BrianHG
author_rank: Super Contributor
timestamp: January 03, 2022, 09:04:37 pm
content: Quote from: Benta on January 03, 2022, 08:46:18 pmNope, mine is digital. This is why I have my mcu 'PIC' solution on page one of this thread. The only reason I know about the 3rd overtone trick is in the old days, for some crystals above 20MHz, we used 3rd overtone oscillators which we used to engineer with 74HCU04 ICs and the whole difference was the tuned inductor.My pic solution just counts 6 cycles with a rough to 60Hz output, being reset 10 times a second. The reset gate was divided down from the 10MHz oscillator using the MCU's built in timer. A 1 8 pin IC solution which can operate with a supply voltage from 1.8v to 5v receiving the 1MHz to the MCU's CLK input. At 1$ an MCU, minimal components. It is the best solution for the bottom end software engineering effort. I'm sure the exact same solution can be achieved with AVR, or any other brand of MCU which can run at 1MHz.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 03, 2022, 09:08:37 pm
content: Quote from: BrianHG on January 03, 2022, 09:04:37 pmThe principle is similar to what Benta suggested, or even to the CD4527 IC. Just with different parts.And yes, different views, different solutions, and the OP can select whatever they want. No need to fight over which solution is the best. =)

author: Benta
author_rank: Super Contributor
timestamp: January 03, 2022, 09:39:16 pm
content: This thread has been really interesting (at least I think so).I hope the OP comes back with some results/solutions/experiences.

author: BrianHG
author_rank: Super Contributor
timestamp: January 03, 2022, 10:41:32 pm
content: Even a CD4046/74HC4046 with a divide by 3, then 2 for a 50/50 duty cycle divide by 6 on its VCO output back into it's phase comparator with the 100KHz reference fed into it's input will produce a perfect 600KHz. No inductors. All digital except for the 4046's internal VCO.Readily available parts, no programming and only a few divide by 100s/10s on the 4046's output to make that perfect 60Hz.Only need 3-4 resistors and 2 caps for the CD4046.Well with bread-boarding frequency range.

author: Benta
author_rank: Super Contributor
timestamp: January 03, 2022, 11:13:38 pm
content: Quote from: BrianHG on January 03, 2022, 10:41:32 pmFirst, you're far more complex than my suggestion using four 14/16-pin parts plus one transistor and two resistors (Reply #17).Second, the '4046 is not that easy to tame. The data sheet is miserable and lightly skips over the fact that an active loop filter is necessary if using PFD2.In this case, PFD1 would suffice, though. But it still needs tuning (the datasheet formulas can be stuffed into the trash bin immediately).And you'll still need to divide by 10000 after that.By my count: 4046, divide-by-three, divide by-two you are already at 3 ICs. Plus passives. And I haven't even counted the 10000 divider ICs yet.And as the OP said: the 10 us jitter doesn't matter, it's stability over time.

author: Terry Bites
author_rank: Super Contributor
timestamp: January 04, 2022, 12:04:50 pm
content: Who cares what era its from - it works, its foolproof and its cheap. You dont have to tune it up or write code or wind a coil or fear losing lock. Zero fiddle!Just for haters of the 80's. See (untested) PCB in 80's sparts using 80's CAD60hzpcb.pdf(109.51 kB - downloaded 100 times.)Yes, sparts!

author: Old Goat
author_rank: Contributor
timestamp: January 04, 2022, 05:43:09 pm
content: Quote from: Benta on January 03, 2022, 09:39:16 pmI intend to do just that.Thank you for all the ideas.

author: David Hess
author_rank: Super Contributor
timestamp: January 04, 2022, 07:26:31 pm
content: Quote from: BrianHG on January 03, 2022, 10:41:32 pmFor the 3rd harmonic filter, I might use a gyrator, so it does not require an inductor either. In the old days, someone might repurpose a 455 kHz IF transformer.The injection locking method of frequency multiplication requires no filters or trims at all.Another method which was not mentioned involves a blocking oscillator to triple the frequency, but it requires a tuned transformer.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 04, 2022, 07:40:11 pm
content: But why would using an inductor be a problem?

author: voltsandjolts
author_rank: Unknown
timestamp: January 04, 2022, 07:46:23 pm
content: Buy a clock from europe.

author: Joop
author_rank: Newbie
timestamp: January 05, 2022, 03:26:03 pm
content: Have a look here:http://www.leapsecond.com/pic/src/pd60.asm

author: David Hess
author_rank: Super Contributor
timestamp: January 05, 2022, 05:32:38 pm
content: Quote from: SiliconWizard on January 04, 2022, 07:40:11 pmInductors are more difficult to source than capacitors. I have whole assortments of capacitors, but not inductors.Inductors are needed where higher Q or a larger trimming range than a variable capacitor will support is required.

author: BrianHG
author_rank: Super Contributor
timestamp: January 05, 2022, 09:01:35 pm
content: Quote from: Joop on January 05, 2022, 03:26:03 pmOk, that one looks simple stupid functional.Including that without using any HW timers, it can function with any PIC.Most likely, you can mod it for a 1MHz source as well.

author: Benta
author_rank: Super Contributor
timestamp: January 05, 2022, 09:13:48 pm
content: Same principle as earlier solutions: switching between N and N+1 when dividing, aka "Dual Modulo" or "2-Modulus" counter. Always works, the problem is finding the divisors.Doing it with a PIC by inserting 20833 or 20834 "nops" in a program loop seems brainless, but that's just me, I suppose.

author: EPAIII
author_rank: Super Contributor
timestamp: January 07, 2022, 10:53:37 am
content: You want a 60 Hertz signal to drive an existing time of day clock. And you want to derive that 60 Hz from a GPS receiver.At first I thought that would be easy. But times have changed and chips that were once easy to get are discontinued with no functional replacements available. Why, you ask. Because a PIC or micro controller (Arduino, etc.) is both cheaper and easier to implement. And the makers only need to make one chip that takes the place of thousands. Likewise for the distributors.So, in the present world if you want to divide your GPS signal down to 60 Hz, you can either learn to program or you will need to use a bucket of chips to implement what those chips of a by-gone day did in one package. And with propagation delays in the circuit you will probably be a long time ironing out the bugs.I suggested using a WWV receiver several days ago and I still think that is your best choice instead of the GPS. WWV transmits a variety of signals in their transmissions. One of those signals is a one second "tick" which consists of five cycles of 1000 Hz tone at the start of each second. A simple filter could separate that and you could run your clock on it instead of the 60 Hz you seem to want. A bit of surgery on your clock would be needed to inject that 1 Hz signal at the appropriate place in the circuit. But then, if it is a commercial clock, you probably do not have access to that point.BTW, GPS clocks were NOT designed to provide accurate time of day. They were for calculation of geographic position from the time differences in the signals from different GPS satellites. They do keep in step with each other, but not necessarily with the time of day. I understand that the drift has amounted to about a 17 second error by now. And I can only assume that they can continue to drift. It isn't that you can't compensate, but the error continues to increase and we have people here talking about nano second errors/jitter.WWV was and is there for the purpose of providing accurate time of day.

author: Old Goat
author_rank: Contributor
timestamp: January 07, 2022, 06:44:30 pm
content: Quote from: EPAIII on January 07, 2022, 10:53:37 amYes, that is my intended project. And it is not of necessity, but of curiosity. I'll have have time over the winter to....tinker, or whatever, and this is one thing I'm curious about.Quote from: EPAIII on January 07, 2022, 10:53:37 amYou offer some good points here. However, what I like about the clock display that I have is that it has large red LEDs. I prefer red LED over LCD. Just a personal preference, so *IF* it can (relatively) easily be done, that's my preference.Quote from: EPAIII on January 07, 2022, 10:53:37 amThis is true. It is a single clock IC, and is supplied 60hz from the power supply transformer.Quote from: EPAIII on January 07, 2022, 10:53:37 amNow this is an aspect that I may have known, but had forgotten.Which means that I'll have to compare my GPS display to WWV from shortwave receiver to see if what I'm wanting to use for my baseline time reference is valid. Good point, and a good place to start. I'll be able to get into this next week, and I'll update here.Thanks again ALL, for the ideas/opinions.

author: Benta
author_rank: Super Contributor
timestamp: January 07, 2022, 08:24:21 pm
content: Quote from: EPAIII on January 07, 2022, 10:53:37 amAbsolutely true. The GPS clocks have their own atomic clock reference. So does UTC, but UTC is corrected according to Earth rotation. The discrepancy is actually 18 seconds at this point.But that's just an offset, nothing else. It can be corrected by setting the clock again every couple of years. No one is talking about ns timing here.As I understand it, @Old Goat is annoyed by the clock being off by several minutes.A few decades ago, the power plants were committed (or required, I don't know) to supply a certain number of 60 Hz cycles every 24 hours. This was to keep clocks running correctly (plus other infrastructure). That's no longer the case, and utilities today deliver whatever they want. Resulting in clocks no longer running to time.Using the GPS clock signal instead makes a lot of sense. 18 seconds off or not.

author: edavid
author_rank: Super Contributor
timestamp: January 07, 2022, 08:32:20 pm
content: Quote from: Benta on January 07, 2022, 08:24:21 pmHe said the maximum he has observed is "maybe a minute", but that seems abnormal. Unless he lives in Texas, I would expect the deviation to be less than 15 seconds.

author: ve7xen
author_rank: Super Contributor
timestamp: January 07, 2022, 09:45:19 pm
content: Quote from: EPAIII on January 07, 2022, 10:53:37 amI find this suggestion frankly kind of hilarious. WWVB isn't going to provide 60Hz either, so you not only have the same problem of generating it from the 60KHz carrier or modulated time pulses or whatever you decide to do, but now you also need to build an AM radio receiver and antenna system yourself too.QuoteI wasn't paying attention when GPS was designed, but if it wasn't designed to provide accurate TOD when it was created, it certainly is now. USNO 'guarantees' it is steered to within 1 microsecond of UTC(USNO), and they provide full traceability information back to UTC.QuoteThis is not 'drift', and will always be exactly an integer number of seconds offset (said integer is also transmitted by GPS, so you need no outside information to correct for it, and most GPS receivers can provide UTC directly if you ask them to - NMEA is UTC). It is because UTC occasionally adds (or removes) integral seconds to keep it roughly in sync with solar time, which is not nearly as precise as the atomic time these timescales are based on. GPS doesn't bother trying to synchronize its timescale with the vagaries of solar time, so if you want UTC, you need to apply that correction later.QuoteI suspect for not too much longer. GPS has more or less completely supplanted it and its relevance outside of amateur radio is effectively nil. NIST has threatened at least once recently (2019 budget) to defund it and shut it down.

author: Old Goat
author_rank: Contributor
timestamp: January 30, 2022, 05:26:44 pm
content: So to answer all the suggestions: I found and bought a TrueTime display, which does exactly what I was wanting to accomplish. Now I have a workbench clock that is constantly the same as my TrueTime GPS receiver. Whether or not it is "exactly accurate" or correct, I don't know, but it is now a constant, which is what I'm interested in.This now leaves me time to experiment with the various methods of doing this as suggested by many here now that the old time wandering clock display.