Top
Best
New

Posted by tokyobreakfast 7 hours ago

Converting a $3.88 analog clock from Walmart into a ESP8266-based Wi-Fi clock(github.com)
341 points | 114 commentspage 2
cbdevidal 3 hours ago|
I’ve wanted to do this because there’s a zillion cool clocks out there that use a similar movement. I’d also wanted to make it battery powered which means doing NTP update only once per day (or less). Doubt that is realistic, tho.

Maybe embed Hall sensors and detect when the hands are in a certain position and when all three line up wake the ESP32, do an NTP update, tick it forward to where it should be, then go to sleep. Probably still use too much power, especially the Halls.

cweagans 3 hours ago|
Use reed switches behind the clock face and magnets on the (presumably) different length hands instead of hall sensors. NTP sync once per day is more than adequate for household timekeeping - it might drift a few seconds here and there, but that’s fine for most people?
cbdevidal 3 hours ago||
Yeah, reeds make more sense. I’d stagger them so that when the hour is at 12, minute at 3, second is at 6, all three reeds (wired in series) wake the microcontroller.
avidiax 7 hours ago||
How does this keep track with DST?

Looking at the code [1], it looks like if the actual time is 1 hour ahead of the displayed time, then we get 10 pulses per second to leap forward. Otherwise, the clock stops running for an hour to fall back.

https://github.com/jim11662418/ESP8266_WiFi_Analog_Clock/blo...

sowbug 7 hours ago||
You have two choices: either assume everyone is asleep at 2 am and won't notice when it happens, or else advance 11 hours. My LaCrosse clock does the latter.
floatrock 5 hours ago|||
Yeah, project needs a time-lapse video of their analogue DST transition event.
gspr 7 hours ago||
And that's pretty much fine for a project like this, seeing as most (all?) locations jump you between DST and not DST at night. So the clock will be off at most for an hour during the night.
ortichic 6 hours ago||
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
jcalvinowens 6 hours ago||
If you think this is overengineered, I built one that will really offend you: https://github.com/jcalvinowens/wallclock :)

The point is to have fun and learn something, not really to solve a problem in a practical sense. The radio controlled clocks are extremely unreliable where I live.

haunter 6 hours ago|||
There are time signal stations all over the world, WWV is the most prominent US one https://en.wikipedia.org/wiki/WWV_(radio_station)

https://en.wikipedia.org/wiki/Radio_clock#List_of_radio_time...

KaiserPro 4 hours ago|||
There is (https://www.nist.gov/pml/time-and-frequency-division/time-se...) and in some conditions you can receive the time signal in the UK.

Our office manager bought some US tuned radio wall clocks, and every now and then they would jump 8 hours forward. I assume it was down to solar weather making propagation changes (https://en.wikipedia.org/wiki/Sporadic_E_propagation)

js2 6 hours ago|||
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).
moduspol 4 hours ago||
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.

qwertygnu 6 hours ago||
Googled "radio controlled clock" and seeing results from $20-$200, lots of inconsistency in what the product is.
alnwlsn 5 hours ago||
These are usually marketed as "atomic time" or "atomic clock" here in the US.
teekert 3 hours ago||
On this topic. Do WiFi signals contain time (unencrypted)? If so why does my oven not pull time from the air and needs adjustment every 2 months? If not, why are APs not defacto time beacons for all sorts of non-smart appliances (and clocks)?
ianburrell 1 hour ago||
I have thought that could use Matter for time sync. It works with both Wifi and Thread. I don't think there is a time message. I also don't know if it has public broadcast since Thread needs pairing to work.

The advantage is that smart devices might have Matter support already. People with Matter devices will have border routers, which are perfect place for running NTP and broadcasting time.

cardiffspaceman 3 hours ago||
I worked with CFG80211/MAC80211 on an old Linux kernel years ago. I don’t think time of day is in any packet.
js2 6 hours ago||
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 this submission.

moduspol 4 hours ago|
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.

Dachande663 7 hours ago||
I'm currently making something similar but using a BKA30D-R5 (a dual stepper motor used in car dashboards) and a hall sensor to zero the hands.
russdill 7 hours ago|
Yes, this project screams for some kind of sensor to detect when the hands reach some known position.
Dachande663 6 hours ago||
Yeah, it's super quick to start with a MK I eyeball to set them, but having a sensor just avoids any drift. I got away with using one by taking a reading and moving the other hand to check they weren't on top of each other already, and then doing a full rotation between readings.
ChuckMcM 5 hours ago||
Pretty awesome. The only thing I would change is to put a USB battery between the usb wall power and the D1 mini. That way for power outages of < a couple of days or so you're clock will be fine.
amelius 4 hours ago||
What's the best way to periodically get time and date if your customers are big businesses with hostile IT departments?
kjs3 23 minutes ago||
Most 'big businesses' I've delt with have a time server someplace internal. It may be a stand alone NTP server, a network device like a Cisco router or a Windows AD server. You might ask the network team/Windows admin team nice and see what they have.
Neywiny 4 hours ago|||
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

btbuildem 4 hours ago||
GPS unit
retired 6 hours ago||
I’m curious how long it takes for the hands to drift to the point where the time difference is perceivable. Luckily the 30 millisecond pulse time is configurable.
accrual 6 hours ago|
It'd be interesting to see the logs or data on how the physical movement falls out of sync. It probably even correlates with temperature and humidity.
More comments...