LePaute Masterclock using MSP430G2553 - Page 1
Forum section: electronics / projects

author: melka
author_rank: Newbie
timestamp: May 21, 2018, 07:00:29 pm
content: Hello everyone,I'd like to submit to you one of my only projects that is advanced enough to not be qualified as totally newbie-ish, especially since I'm absolutely not an electric or electronic engineer, not even a certified engineer in any fieldSome time ago, I was able to put my hands on a LePaute slave clock, one of those old clocks used in train stations, hospitals etc... Slaves clocks are the dials you see, but they contain almost nothing, just the needles and some kind of motor, but have the one I got has absolutely no way of keeping time. It needs to be connected to a master clock. Master clocks are massive, expensive, and way harder to find that slave clocks, and I'm not that big of an horology fan to dedicate that much space to a clock.So, the slave clock without the master clock is kind of useless. It's a pretty object, but useless. I didn't want to buy a ready-made master clock replacement, I wanted it to be battery powered, and I *ABSOLUTELY* didn't want to replace the weird motor with one of those craft store quartz mechanisms.I decided to try my hand at doing a low-power master-clock, just big enough to fit on a PCB a tiny bit bigger than a single AA battery. My goal is to have this circuit running for 1+ year using a single AA. It's not quite there yet : been running for 3 months now, still ticking, seems to be ticking 1.5 second earlier than before (checking agains computer time, NTP synchronized), but I have no idea how long it'll keep running.So how does it work ?The LePaute clock needs a pulse every 30 seconds, alternating the polarity each time. Each pulse, the seconds needles advances a step (1/2 minute step, weird, I know). Testing with a simple battery, 1.5V is enough to make it go.The battery voltage is boosted to 3.3V using a TPS60313, timekeeping is done by a DS3231SN, pulses are generated by a DRV8838 brushed motor driver, and everything is tied together with a MSP430G2553.The DS3231SN is a high accuracy RTC : at 2 ppm/year, if my calculations are correct, the drift should be no more than ~1 minute / year, so the 1.5 s in 3 months is well within specs. At boot, the MSP430G2553 sets two alarms on the DS3231 : one every time the time goes past HH:MM:00s, the other every time the time goes past HH:MM:30sand then goes to sleep in LPM4. When the DS3231 sends the interrupts, the MSP430 sends a pulse, clear the alarm flags and back to sleep again for another 30 seconds.First version ran for a mere 3 weeks. Most problems were on the firmware side, I did my best to measure current consumption in the various states but I can't quite figure out how to reliably work the uCurrent Gold. I have some weird things happening when I try to measure the 1.5V side of things.I might do another PCB run to correct a couple things, especially adding a pushbutton to help synching the clock when powered one, however I don't think I can find the courage to tackle soldering another one of those PCBs without first getting a bit more soldering equipment. Doing 0402 and 2x2mm WSON with a cheap chinese hot air + soldering iron station took it's toll on meAll the informations are available on github here, and I'd really appreciate your input :https://github.com/melka/masterclockOf course, I'll have a couple questions about measuring current consumption accurately (especially since the pulses to the motor are unknown and most certainly the biggest impact on battery life), but I'll dig around a bit more on the forum for help about using the uCurrent on an oscilloscope, etc...Cheers.

author: bson
author_rank: Unknown
timestamp: May 22, 2018, 02:02:14 am
content: That's a great little project... First, if it were me I'd make sure it runs a little fast rather than ever being slow. It's almost always better for a clock to be fast than slow. Then, when adding a button, make it stop the movement until released; this makes it easy to synchronize to a reference - simply hold the button until the reference catches up. (This is a "hack", and a movement that stops when the crown is pulled out or a button pushed is a "hack movement". In a mechanical watch movement it's accomplished by applying a brake.) When released just start a new second. If clicked, stop for exactly one second, to allow easily backing up a small number of seconds.