"Keep Alive" Circuit

135 views
Skip to first unread message

Jim KO5V

unread,
Sep 5, 2018, 10:50:55 AM9/5/18
to neonixie-l
Hi everyone,

I have several nixie clocks, including two clocks that I built about 12 years ago that use the mains frequency for timing. I live in a semi-rural area, and during this time of year, I lose power quite frequently due to lightning strikes. This can be just a "blip", or it may last several hours. Either way, I have to reset each clock. Both clocks run off of 9VAC wall-warts.

All I want to do is to keep the logic alive during an outage. My guess is that this is more than just adding in a circuit with a battery - a frequency source may also be needed. Looking at the schematic for the kit, the 9VAC is split - one branch goes to a pin on the processor, and the other to the rectifier and 5V regulator. I'm thinking there might be a way to use some kind of an or-gate to select either the wall-wart, or the "keep alive" circuit. Here is an example of where my lack of electronics experience really shows, but I can build from and sometimes even understand a schematic.

So, if anybody has ideas or experience, please let me know. I've looked at several circuits on the web, and have a vague idea of what can be done.

Any suggestions will be greatly appreciated! Thanks in advance,

Jim

blkadder

unread,
Sep 5, 2018, 12:34:41 PM9/5/18
to neonixie-l

Hey Jim,
My response might not be what you are looking for, but what I did to keep my clocks alive is I have them plugged into a small UPS.  Here in Florida, during this time of year we get storms all the time.  I was actually able to pick up used UPS units for next to nothing at yard sales, etc.  I have replaced the batteries and have not had to set my clocks since last years hurricane that took out power for about a week.

I do look forward to see what our designers have come up with.
Ron

William RUTLAND

unread,
Sep 5, 2018, 1:32:59 PM9/5/18
to neoni...@googlegroups.com
Jim,

I, too, keep my clocks plugged into a UPS unit.  But my clocks are all in one room!  Might get a tad expensive to pair a UPS unit with each clock.

William

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/a8ff1966-e1d6-497b-9bc2-18310a6c31bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

H. Carl Ott

unread,
Sep 5, 2018, 2:10:53 PM9/5/18
to neoni...@googlegroups.com
They make mini UPSs. You sometimes see them cheap on clearance. 

Quick and dirty.
No idea how your time keeping would suffer running on that.

But a back up battery circuit and a diode to 'OR" the power to just your clock's logic and an xtal time source would be the preferred solution. 

Don't know if you can still get MM5369s any more. 
 May be easier to program yet another MCU (atmel or pic) to generate  the 60/50/30/25 hz or whatever you need for your clock.     



carl
--------------------------------------------------------
Henry Carl Ott   N2RVQ    hcar...@gmail.com


jf...@my-deja.com

unread,
Sep 5, 2018, 2:47:21 PM9/5/18
to neonixie-l
On Wednesday, September 5, 2018 at 7:50:55 AM UTC-7, Jim KO5V wrote:
>... My guess is that this is more than just adding in a circuit with a battery - a frequency source may also be needed.

If you want an integrated solution instead of adding an outboard UPS, consider this:

All my ideas are stolen from the Cal-Tex CT7001 clock/calendar chip.  They recommend using a battery to keep the logic alive.

Their clever idea was to use the MUX oscillator to help keep time when the mains were out.  You could emulate this idea by building a 60 Hz source that was phase-locked to the line frequency (and very close to 60 Hz free-running), possibly based on a NE565 or NE555.  This could also improve the time keeping in normal operation, since the clock would be more immune to the noise spikes on the power line (my clocks based on MM5531x chips, TTL logic, and CMOS logic all ran slightly fast and I blame that on counting excess noise pulses). 

Jim KO5V

unread,
Sep 5, 2018, 2:49:31 PM9/5/18
to neonixie-l
Ron, William and Carl,

Thanks! I didn't even think about a UPS (KIS,S!). That might be the easiest solution, and the little UPS that Carl suggested looks like it would work. I guess I would like to try a circuit first - maybe I could learn something. I found a couple of designs that give a 1pps output. I figured I could switch on a transistor with the clock's 5V supply that would conduct the 9VAC to the PIC, then switch another transistor that would open the ground connection to the battery powered circuit. When the 9V goes away, the 1pps signal would then turn on, and be sent to the PIC through a diode. Is this a crazy idea? There are details to work out...

Thanks again, Jim

Jim KO5V

unread,
Sep 5, 2018, 3:48:54 PM9/5/18
to neonixie-l
Thanks! I looked up that chip and found a lot of useful info.

Jim

gregebert

unread,
Sep 5, 2018, 5:02:24 PM9/5/18
to neonixie-l
Lessons-learned for future clock designs......I've converged on using a RasPi + DS3231 for all current and future designs, so I never need to set the time for power-failure, daylight savings, etc.

alb.001 alb.001

unread,
Sep 5, 2018, 10:40:58 PM9/5/18
to neonixie-l

Back in the late 1970's I built a clock with 12 volt AC input power supply. I installed a small 12 volt rechargeable battery on the clock after the rectifier bridge and smoothing capacitors ( I used tantalum capacitors)  for backup of the clock IC.  I built a small circuit using a reed relay powered by the AC input set up so that when AC was lost the relay opened and turned off the clock display. Then I built the 1 CPS circuit with a MM5369 IC and a color burstt crystal at 3.579 MHz ( a large size crystal common in all color televisions at the time but still commonly available) .  The IC divides this down to 1 CPS. With a high quality air variable capacitor as the trimmer capacitor, I adjusted the clock against short wave radio receiving WWV and over a few years I was able to adjust the time accuracy to less than a second off per month  !  It just got to be too long a wait to adjust the time as it became more accurate.  The complete circuit is easily found using Google.

Phil 

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.

jf...@my-deja.com

unread,
Sep 6, 2018, 12:43:42 AM9/6/18
to neonixie-l
The MM5369 produces a 60Hz signal from a 3.579545 MHz crystal, not 1 pps.  I vaguely  recall that there was a version that produced 50 Hz from a PAL crystal.

The MM5369 can be found on ebay for about US$1 in medium quantities.  These may be Chinese counterfeits, but it is not a technologically demanding application, so it should work fine.

If you cannot find an old NTSC TV to cannibalize, the crystals are available new for about US$1 from the usual hobbyist surplus stores ( e.g., https://anchor-electronics.com/price-list.pdf ).

One additional thought is that the backup battery should physically mounted in a low location , preferably in a container that keeps it separated from the electronic circuitry.  I once made the mistake of mounting it in the case above the circuit board, and the electrolyte leakage damaged some components (including some IC chips).

Jim KO5V

unread,
Sep 6, 2018, 12:31:52 PM9/6/18
to neonixie-l
Thanks to everyone who took the time to reply. I've got some great information, and may be back with more questions. I've also got a back-up plan if I'm not successful - a UPS!

Best regards,

Jim

On Wednesday, September 5, 2018 at 8:50:55 AM UTC-6, Jim KO5V wrote:

gregebert

unread,
Sep 7, 2018, 1:50:56 PM9/7/18
to neonixie-l
If you havn't already done so, surge-protection is a must if your rural electric-service is above-ground.


Jim Faulkner

unread,
Sep 7, 2018, 2:16:56 PM9/7/18
to neoni...@googlegroups.com
Thanks. I run everything I value through powerstrip-type surge protectors, and so far, one has given its life for my audio/video equipment. I want to add a proper system to the whole house, but unfortunately that's a bit further down the list of "to-dos".

Jim

--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/oSYhJoL67l8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.

To post to this group, send email to neoni...@googlegroups.com.

Mark Moulding

unread,
Sep 7, 2018, 4:36:27 PM9/7/18
to neonixie-l

My designs, which use an AC wall-wart for timekeeping (backed up by a DS1302 for power outages) all ran fast until I put in code to ignore all transitions for 16.5 mSec after seeing one (a full AC cycle is 16.67 mSec, at least in the US).  This seemed to completely cure my running fast problem.  Until I did this, the clock would run as much as 10 minutes per hour fast, due to the noisy line.

Jim Faulkner

unread,
Sep 7, 2018, 4:55:52 PM9/7/18
to neoni...@googlegroups.com
Mark,

My clocks seem to keep decent time; I regularly compare them to my "WWV" watch, and I think they average out to be fairly accurate.

How did you implement the DS1302 back-up?

Thanks. Jim

-----Original Message-----
From: Mark Moulding
Sent: Sep 7, 2018 2:36 PM
To: neonixie-l
Subject: [neonixie-l] Re: "Keep Alive" Circuit

My designs, which use an AC wall-wart for timekeeping (backed up by a DS1302 for power outages) all ran fast until I put in code to ignore all transitions for 16.5 mSec after seeing one (a full AC cycle is 16.67 mSec, at least in the US).  This seemed to completely cure my running fast problem.  Until I did this, the clock would run as much as 10 minutes per hour fast, due to the noisy line.

On Wednesday, September 5, 2018 at 11:47:21 AM UTC-7, jf...@my-deja.com wrote:
(my clocks based on MM5531x chips, TTL logic, and CMOS logic all ran slightly fast and I blame that on counting excess noise pulses). 

--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/oSYhJoL67l8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.

Jim Faulkner

unread,
Sep 7, 2018, 5:39:38 PM9/7/18
to neoni...@googlegroups.com
OK, I looked up the DS1302, and DS3231 and then found this at Adafruit:


This may be a good solution to my problem. I think I'll order one.

gregebert

unread,
Sep 7, 2018, 5:54:24 PM9/7/18
to neonixie-l
Be sure that you get a genuine  DS3231; there are a lot of very cheap RTC boards out there with counterfeit/out-of-spec units.
I think adafruit is a reputable seller.

When I buy the $1 modules from overseas, I remove the RTC chip and install a real one I purchased from a reliable source. I had a few laughs about the inaccuracy of the fake/defective IC.

These are very accurate timekeepers; I have one that's been running for over 3 years with less than 1 minute of drift. I've never reset the time so it's better than 1PPM long-term accuracy. Even if yours does drift a few PPM, there are compensation settings to solve it.

John Smout

unread,
Sep 8, 2018, 3:24:06 AM9/8/18
to neoni...@googlegroups.com
I must have been lucky, as I have bought cheap Chinese DS3231 modules and so far not observed any inaccuracies or problems.

Tomasz Kowalczyk

unread,
Sep 8, 2018, 4:20:01 AM9/8/18
to neonixie-l
Suprisingly, my clock uses a counterfeit module and after modding it (removing charger circuit) it provides accurate time. Of course, this is not guaranteed with counterfeit chips. But as long as I am building clocks for myself, I'm going to stick to the cheapo modules from Aliexpress.
Currently I'm learning to program STM32s, which have on-board RTC unit with battery backup (+ few backup registers, so you don't have to burn tour flash with settings). If they will provide acceptably accurate RTC, I'll switch to that - I'm a fan of all-in-one-chip solutions. Does anyone have experience with STM32 RTC?

Vlad Shmit

unread,
Sep 8, 2018, 4:26:43 AM9/8/18
to neoni...@googlegroups.com
Hey Tomasz!
I do have experience with STM32 RTC build-in module and if you will shose accurate crystal with good  capacitors it will pay off. And follow the data sheet instructions regarding RTC calibration. 

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.

To post to this group, send email to neoni...@googlegroups.com.

H. Carl Ott

unread,
Sep 8, 2018, 7:58:16 AM9/8/18
to neoni...@googlegroups.com
I've been curious about those cheap DS3231 chips on ebay for a while.
Ordered some in to test, but never got around to it.

This fellow does an interesting write up for anyone interested. 


carl
--------------------------------------------------------
Henry Carl Ott   N2RVQ    hcar...@gmail.com

--
You received this message because you are subscribed to the Google Groups "neonixie-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send an email to neoni...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/A1FBCAE6-1F22-482E-AD96-420583014709%40jsdesign.co.uk.

gregebert

unread,
Sep 8, 2018, 11:08:50 AM9/8/18
to neonixie-l
Carl - Excellent article; thanks for posting.

Another possibility is that these chips are salvaged and re-assembled; If they are overheated during removal/reassembly the crystal could get damaged.

I'm testing one right now for my NIMO clock, and it was manufactured in 2008.  I'm certain it's a used device because it's 10 years old. This particular one seems OK so far; no drift since last night. I've had another DS3231 that drifted about 10 minutes overnight, so it was either defective or a counterfeit. $1.25 for an RTC module with 64KBytes of EEPROM is too good to pass up, and is easy to test.

I dont need an accurate RTC for this project because I will be using network time; the RTC is for backup if my internet goes down.
Reply all
Reply to author
Forward
0 new messages