Live data from Hacker News

Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

github.com

81–90 of 202 posts

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#81

This is cool but it seems like it would be liable to drift. I.e. it "knows" the correct time but doesn't have any way to figure out that it's been driving the movement fast or slow by some number of milliseconds. Eventually, that will pile up to the point that it's not any better than running the thing off of batteries. As the author points out, the cheap quartz mechanism has no way of reporting the position of the h…

The pulsetime is just to advance the clockwork one step, and is kept fixed, the advancement driven by the mechanism is discrete. As long as you keep track of the count, you wont accumulate drift. The adjustment is to get that stepping working, if it doesnt miss a step, youre good.

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#82

What I really want is one of these powered by gps. The time already comes for free in the signal, and from your location you can derive the time zone. That way DST is accounted for automatically, but you don't have to set up and rely on wifi. This would be truly zero-config and always correct.

You would still need some kind of configuration because the start of DST can change year to year, and this is not accounted for in the time signal from GPS

Good point that DST dates can technically change -- but in practice it doesn't really change on a year-to-year basis. The current law establishing the start and end dates in the US has been in effect unchanged for the last ~20 years.

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#83

This is cool but it seems like it would be liable to drift. I.e. it "knows" the correct time but doesn't have any way to figure out that it's been driving the movement fast or slow by some number of milliseconds. Eventually, that will pile up to the point that it's not any better than running the thing off of batteries. As the author points out, the cheap quartz mechanism has no way of reporting the position of the h…

The escapement is "synchronous" in that the motion is controlled by the number of pulses applied to the motor over time rather than the duration/width of each pulse. The pulsetime constant is only to accommodate mechanical/analog differences with the driving circuitry, from what I understand. https://en.wikipedia.org/wiki/Lavet-type_stepping_motor

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#84
post #50

Sorry if this is a dumb question, but do you guys not have radio controlled clocks outside of Europe? If I got it right, the only purpose of this project is to always display the correct time. Radio controlled clocks do exactly that. They are cheaper than the one ESP board, and run years on a single AA battery. No WiFi, tinkering, setup, or cables necessary

We do, but I've never had a WWVB clock work for me in North Carolina. I've tried a few of them. The US is a big place and for whatever reason, there aren't that many clock signal transmission towers (AFAIK, the only one in the US is in Colorado).

I'm in WV, but could only get my clock to set itself when put on the correct SW-facing wall.

Obviously it defeats the purpose a bit if I need to move my clock to a different wall and wait 12-24 hours for it to set itself.

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#85

This is cool but it seems like it would be liable to drift. I.e. it "knows" the correct time but doesn't have any way to figure out that it's been driving the movement fast or slow by some number of milliseconds. Eventually, that will pile up to the point that it's not any better than running the thing off of batteries. As the author points out, the cheap quartz mechanism has no way of reporting the position of the h…

The pulsetime is just to advance the clockwork one step, and is kept fixed, the advancement driven by the mechanism is discrete. As long as you keep track of the count, you wont accumulate drift. The adjustment is to get that stepping working, if it doesnt miss a step, youre good.

In a perfect world, yes. But mechanisms aren’t perfect and it’s entirely possible if not likely that steps will be missed as friction increases over time and things wear.

I’m not saying these things matter much in this context.

The clock will still be far more accurate than purely mechanical version. And, re-synchronizing it is as trivial as turning the knob, just as you would for the all mechanical mechanism.

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#87
post #80

What's the best way to periodically get time and date if your customers are big businesses with hostile IT departments?

A great solution I've used plenty of times is to query websites like google.com. I use it whenever my rtc on my Linux laptop gets reset (as long as it's still in my history. Otherwise I just set it manually).

https://unix.stackexchange.com/a/400176

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#88
post #65
post #5

Cool project! The most interesting part, IMO, is the "SRAM with EEPROM backup" chip. It allows you to persistently save the clock hands' positions every time they're moved, without burning through the limited write endurance of a plain old EEPROM. And it costs less than $1 in single quantities. That's a useful product to know about.

That's really neat. TIL. So the way this works seems to be this: It's an SRAM and an EEPROM in one little package along with a controller that talks with each, with a little capacitor (this clock uses 4.7uf) placed nearby. The SRAM part does all of the normal SRAM stuff: It doesn't wear out from reading/writing, and as long as it has power it retains the data it holds. The EEPROM does all the normal EEPROM stuff: It…

What's the purpose of using an LLM to write a comment here?

Re: Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock

#90
post #43

This is great. I spent years looking for an affordable battery-powered WiFi clock that syncs via NTP since where I am, the WWVB clocks never pick up the radio signal. I never considered making my own. Anyway, about two years ago this option popped up on Amazon. I've been happy with it: https://www.amazon.com/OCEST-Wall-Clock-12Inch-Auto/dp/B0DJS... I'm guessing internally it's not much different than the DIY clock in…

Thanks for sharing this. I, too, have spent years trying to find an analog-style clock that is completely hands-off for adjustments (power outage, DST, drift correction) and it looks like this one handles it all.

It feels like in 2026 this should be something default and assumable, but alas, it is not.

Post reply on HN