I wanted a clock that never needed setting. Things escalated
arstechnica.com
arstechnica.com
There’s a time zone setting offset slider and a DST slider. I basically touch it twice a year, maybe another if I move time zones. I’ve only had to touch it for DST (never switched time zones). Takes me conservatively 10 seconds to find and flip, so it’s taken me 460 seconds or a little under 8 minutes in the past 23 years to do time adjustments.
While these efforts are definitely fun hobby projects, there are cheap reliable solutions out there with minimal intervention that consume the NIST radio signal for time.
Just for anyone interested who wasn’t aware there’s some “old school” time broadcast solutions out there too besides NTP: https://www.nist.gov/pml/time-and-frequency-division/time-di...
https://news.ycombinator.com/item?id=46952384
https://github.com/tanvach/clocksync
https://github.com/kangtastic/timestation
https://github.com/hzeller/txtempus
WVB: A Tiny WWVB Station - https://news.ycombinator.com/item?id=13258631 - December 2016 (49 comments)
https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...
I have a few raspberry pis on my lan that serve NTP time. (you need more than one)
Over the years I've experimented with various flavors.
Right now I have a mix:
1) a pi3 with a gps hat and a battery backup for the pi itself. It uses ntp 127.127.20.20 for gps time, and 127.127.20.28 for PPS. The SMA antenna goes to receiver at the window
2) a pi3 with USB gps on a cable going to the window
3) a pi4 same as above, but with a tiny battery backup rtc attachment
4) a pi5 with usb gps + the new RTC with an added rechargable battery backup
usually, when power goes out, a few reboot, but #1 stays up if <1hr without power. If power outlasts the pi with battery backup, the RTC battery backups take over. strangely #1 doesn't reboot when it has power, some artifact of the battery backup hat - I have to manually reset it.
I've also kind of wondered if GPS might be able to give you a time less accurately but quicker. Sometimes I look at the NMEA GPS output, and it sometimes doesn't have a position fix, but it does give out a time + week number
(this is all for no good reason, just yak shaving.)
No. Accurate time is one of the prerequisites for acquiring a position fix, and it's the one that's the easiest and fastest to obtain from the sky. Typically a receiver should be able to get time within seconds from cold start if there's enough sky visibility, and once it does it is as accurate as it gets regardless of position fix status (unless you care about sub-nanosecond precision, but you need to be able to somehow consume that anyway and you won't with a Pi).
That said, NMEA output will usually contain the time from the module's internal clock that gets synchronized with GPS time when available rather than GPS time directly. Some modules can be configured to report when they have synced their time though, and you could pay attention to the time jumping to infer it too.
It'll be good to far better than seconds when it first gets a signal and will get more accurate (microseconds to nanoseconds) once it has a position fix because it can then compensate for the delays in the signal propagation (you can think of a gps fix as a 4d fix because it also needs to solve for time). You will probably need to use the PPS output to resolve this, though.
You can still get pretty accurate time (microseconds) with the GPS almanac which is broadcast over ~15 minutes and only updated every few months.
Doing really fast time acquisition isn't a hard problem but it's a hardware problem, you can't really change how an ordinary GPS receiver operates, you have to have a custom receiver.
Which is a thing we shouldn't be requiring here. Picking up a single satellite without any position data is enough to drive a clock.
have a driver at 127.127.20.20 -> nmea time
make it normal stratum ntp, like stratum 1 or 2
doesn't give out the time unless there is a position fix (normal behavior)
and make another driver 127.127.20.99 -> nmea time without position fix
at the start, there is no time given at all
then you might get a time without a position fix
then you get a time with a position fix
then you might lose the position fix, but still give out a time.
make it a stratum 14 ntp server
I'd love to buy an off-the-shelf WiFi+NTP clock, but everything I've seen is very expensive, intended for commercial timing applications or synchronizing clocks across a campus.
It's really clever! It uses the speaker as the low frequency transmitter. It doesn't sound right, but it only needs the coil to radiate EM waves.
https://www.amazon.com/OCEST-Wall-Clock-12Inch-Auto/dp/B0DJS...
I have two of them. One project on my list is to see if I can modify the face of it to a different style without breaking it.
Pity they don't seem to make them any more, the newer ones use GPS and don't look quite as nice (in my opinion at least).
https://www.rigbyjewellers.co.uk/products/radio-controlled-r...
Edit: It exists! https://www.walmart.com/ip/Atomic-Radio-Controlled-Clock-Mov...
Might be doing some retrofitting soon!
> Because it works by exploiting this leakage, Time Station Emulator works best with a built-in speaker of a phone or tablet.
> In some cases, wired headphones or earbuds may also be suitable.
> Higher-frequency harmonics are considered artifacts beyond the range of human hearing, so they are routinely suppressed by audio compression algorithms and better equipment.
> Bluetooth devices and audiophile-grade equipment are therefore less likely to work.
Then I thought about the new digital power meters which display time and date and other info in a loop ... and ok I concluded, that's probably down to the mobile link for timing ... until I recalled where I live around the time when the telco's upgraded, the meter lost it's link for a few months - since the power drops out nearly every week the meter once power was restored still had time down to minutes correct.
Though I didn't want a digital clock--my goal was an analog-style clock that never needed any maintenance. And it ends up there are some reasonably priced ones on Amazon that just connect to WiFi once a day and adjust if necessary, including to account for DST. I have it set to run at 4am each day, so any DST adjustment happens while I'm still sleeping.
The only final step is to run hardwired power to it so I don't need to change batteries, but I haven't pulled that trigger yet. Often with projects like this, it's more fun to prove out the difficult parts and I lose interest once only the easy parts remain.
This has nothing to do with the fact that I still haven't figured out how to set the time on my microwave. :D
In Europe, and the UK particularly, every socket has a switch so the microwave is turned off after each use.
I have three La Crosse clocks that run off the NIST time signal out of Boulder, CO, and need their AA battery replaced maybe once a year. The real challenge is running such a thing on a small battery for a year.
I once made a small clock that displayed "A LITTLE AFTER SIX" and such, changing its text every five minutes. Needed a power connection, though.
So, ironically, I've ended up with a non-automatic atomic clock that instead contains a raspberry pi pico w that speaks ntp and has a programmable LED strip. That I have to manually set every DST transition, although the LED controller handles it just fine.
Like an AI that stares at the window and figures out which angle the sun is coming in, then makes a determination on what time it must be.
Then while it’s not sunny or can’t figure it out, it has dead reckoning, but it’s constantly looking at angles of shadows that determine if the time has drifted.
I thought the remote updating would be more convenient than bringing it to the dev computer, but I dunno, it's really not... Except for the one I sent to a friend, but I think she politely stopped asking for help cause it didn't really work for her.
It has issues, but it might be a useful start for someone else...
The "a little after six" clock idea was from a old New Yorker cartoon. Searches for the cartoon have not been successful, because the original had no caption, and the Cartoon Bank search engine is a textual search. If anyone can find it, please let me know.
https://www.uncommongoods.com/product/literary-clock
and I've often wished that it had a set of quotes for such approximate times.
Neat project though! Will keep it in mind for the next time I update a Kindle.
Ok, so instead of bumping your clock +- one hour twice a year you preferred distro upgrades?
Also: I reckon the closest best-value watch alternative that ticks most(?) of the author's boxes is the Casio GW-M5610-1ER, so long as you are inside a radio-controlled time area.
> The end result exactly matched my expectations—the best criterion for success that I can think of. With an LLM providing the heavy code lifting and the CAD work, I think I spent more time waiting on supplies to arrive than on anything else—something attributable to my lack of planning and the ease of next-day delivery.
I think the author robbed themselves of a deeper understanding.
[1] https://www.npl.co.uk/products-services/time-frequency/msf-r...
My MSF clocks at the front of the house keep perfectly synced, the ones deeper in the house wander hopelessly
Why is it so dang impossible to find a not trash simple LED clock that's 'large print', 'the right color', and not annoyingly too bright?
A deluxe model might include a day of the week bar or dot and a month / day in month number (smaller than the time, mostly people care about the time)
The best options are expensive clock displays from like Time Machines, MasterClock, etc... but they are not cheap and not meant for consumers.
https://www.amazon.com/dp/B0CWKYRS84
(the LEDs come in different colors)
https://www.stavros.io/posts/i-made-another-little-bedside-c...
I was tempted to go the Atomic Clock route, based on actual cesium oscillators, having found a cheapish ($999) used CSAC on ebay[1]. However, once I started digging into the data sheets[2], I found something unacceptable, Pin 1, labeled "Tune", an analog tuning input.
It was then that I learned that while the Cesium vapor cells were accurate, they aged, and drifted, unlike a properly degaussed and Zeeman harmonic calibrated Cesium Beam atomic clock, which is a primary standard.
Further demotivating was learning they have a 5-10 year service life. That's a lot of money to pay for what's essentially a better OXCO.
I'll stick with GPS disciplined oscillators for now.
[1] https://www.ebay.com/itm/327134074179
[2] https://www.mouser.com/datasheet/2/523/Microsemi_CSAC_Space_...
How do wannabe time nerds find this email list?
Any time we fix an old radio that goes down to 60 Khz, I always have to see if WWVB is coming in loud enough to be heard.
For example, does time pass differently inside a can at a million volts potential relative to ground? Both positive and negative rate measurements.
What about inside a large "A" field at the heart of a large toroid?
I suppose I could trim them to the same frequency before the experiments, but still $1000 for hone lab experiments is out of my price range.
Might want to flip the clock over and check for a battery door before starting next time.
It would be worth it for me not to have to touch it twice a year for DST.
I made a LED matrix clock using esp32 syncing time with ntp server every hour and an external RTC to do time keeping if my network is down, and it runs perfectly for years, with accuracy +-1s to time.is. Never have to do setting except the first boot to setup wifi.
No need for me to reinvent the wheel, works a treat mounted above my monitor
Funny but I have one which updates time "via the cosmic ether", has big red 7-seg LEDs and as cherry on top it has laser LED based projector that displays same big red 7 seg digits on whatever surface one points it to - ceiling in my case. I bought it decades ago in RadioShack
I didn't look at the code but if it's not interrupt driven it will be wasting even more power.
It's likely that the most power consuming part of the clock is the display.
I tried Flux.ai for electronics for example, and found it too confusing and not as helpful as I'd hoped. I'm hopeful that I can lean on generic AI tools in the future to augment some of the detailed design (while still applying thorough oversight and review of what's produced based on experience).
> Battery-backed self-setting “atomic” clocks that get their updates via the cosmic ether have been a thing for years and get me most of the way there, but damned if I could find one with a red seven-segment display that I liked (maybe someone else’s search kung-fu is better than mine?)
I found this with ~5 minutes of searching. I think it meets your critera: https://www.amazon.com/Sharp-Digital-Alarm-AccuSet-Automatic...
(Regardless, cool project! I think yours still looks better than this one)
This clock still sits on my nightstand. The backlight stopped working years ago, the cheap plastic case is cracked, the numbers on the dial from 12 to 5 have crumbled away. But it keeps perfect time! It is also silent (no ticking at all, no quartz crystal) and has no battery to charge or worry about leaking
I'd pay quite a bit for a replacement, but such clocks haven't been made in over 30 years. An "atomic" clock is cool, but the signal doesn't reach where I live.
https://timestation.pages.dev/
I use it when the daylight saving time switch occurs as not all of my clocks will get the time every night. But this isn't so useful if you never can receive the signal.
The secret to finding an inexpensive radio-controlled clock/alarm/watch of your liking it to be German. They LOVE their Funk-Uhren! Sadly they typically only support Germany's DCF77 signal. You can also trivially find DCF77 receivers as components to use in a project.
There's a map here: https://www.ptb.de/cms/en/ptb/fachabteilungen/abt4/fb-44/ag-...
[1]: https://www.heise.de/en/news/Meteotime-Weather-stations-supp...
https://www.american-time.com/shop/?fwp_product_brand=power-...
Someday, my precious, someday. (My dream clocks would have a smooth-sweeping second hand, no ticking (silent) and be PoE and NTP.)
My main gripe with them is that they reset at midnight (plus every now and then), and take 5 minutes to adjust themselves.
Unfortunately I’ve caught them a few times just showing a seemingly arbitrary time as well. This has always corrected itself after a few hours, but still..
It’s very nice looking clocks, but the reliability is just too low for my liking, as I don’t feel confident enough just looking at them that they currently show the exact actual time.
https://en.wikipedia.org/wiki/WWV_(radio_station)
It just doesn't seem to get used that much, I suppose?
The 60 kHz WWVB, yes. Plenty of cheap wall clocks have "atomic time" as it is marketed over here, meaning it has a radio receiver. You can pick one up at the grocery store. It depends on where you live if it actually works though. Where I live it works pretty well, but I've heard it does not work so well if you live on the east coast. That's quite a ways from Colorado.
That way all the microwaves of the world could listen in and update their clocks accordingly
But on the other hand... gosh, this was about the simplest software engineering challenge imaginable (toggle some I/O pins) and the simplest design task imaginable (make a featureless rectangular box). And the author - a technologist! - isn't just saying "I wanted to try out some new tech". They're saying "this was too hard, I needed help from an LLM" ("would absolutely not be able to meet this challenge", "hit another wall").
And that... I mean, I just don't know what to make of this. Were we always like this? Are LLMs making us like this? Is it good? Is it bad?... and don't give me the calculator analogy...
The article itself appears to have had help from an LLM, too.
I don't sound like LLMs. LLMs sound like _me,_ lol.
I have had an eInk pi weather display in my living room for like 4 years now, pulling data from openweatherapi every half hour. It's my second favorite project (I made an eReader once... if you like waiting 5 seconds for a page to turn, do I have a product for you!) and I use it every single day. Sometimes it doesn't update when I didn't account for a possibility I didn't know about, and thats okay.
I get that this is someone writing for money and I have no experience in that realm, and I'm sure conde nast prefers faster writing for something less in depth... but I almost feel I should spend my monthly $3 elsewhere.
FWIW, Conde has no input on my work. Conde is the machine that provides HR and legal and payroll. Ars is a more or less self-contained world and since I got kicked into management a few years back, my output is my own. I wrote this up because this is how the project unfolded; no one assigned it to me or said I needed to write a July story to make a quota. It was fun. I did the write-up because it felt like an Ars-y thing to write up.
Definitely heard re: wanting to stumble through things and see the warts, but I have to disagree on the "learning enough python to make this work would still have been a weekend project." That's simply not true—if it were, I would have done it.
But it's not like the project didn't require effort. I put in considerable time on the parts that weren't python coding and CAD. Planning out and setting up the systemd service and timers, packaging up the service to ensure the thing was running under a properly isolated service account context, writing the installer, setting up the deployment pipeline—I didn't want to do the usual lazy thing I see so often and just take a barely functional mess of conflicting dependencies and shove them into a docker container and say "Here, this works on my computer, your problem now."
But like I said elsewhere in the thread, at 48 I'm old enough and ossified enough that I've come to accept that coding is simply not a skill I've got in me, and cranking out even something relatively simple like this project is going to be impossible for me without help. I've tried, too—I've bootstrapped myself through code academies, tried DIY courses, thrown myself into code-adjacent weekend projects, and otherwise tried to get to some level of mastery past "hello world," and I just kinda....suck. I bounced off of coding 30 years ago in college, I've bounced off it professionally for anything more than simple bash scripting, and I've bounced off of it in hobbies. I don't know if it's that my english major brain just doesn't do well in chopping problems down into small enough chunks or what—but I know after a lifetime that it's something I'm never going to be able to do.
That and bowling. Never scored over 100 in a game in my life, and likely at this point never will. Some things are just beyond my reach.
As to the rest of your points about not wanting to or not having the time to learn it, I understand. I went through many a tutorial before things started clicking with me. In fact, the only way I made python click for me was combining the abstract code WITH something physical like a screen or lights or buttons. I feel attached to the things I spent the time on because of the blood sweat and tears it took to make them work.
I also think reading the repo sent me into a rage because it looks like all the other claude written code, specifically the worst code I've had to implement from someone who did the whole "works on my computer, your problem now".
I imagine it's somewhat the same boiling rage I feel when I watch youtube videos with obviously AI-written scripts, or read obviously AI-created written content in any area. I can't code, but do write and edit professionally, and the lackadaisical approach many people take with the form and presentation of their written words can be pretty damn offensive. (The responses I hear when I raise these objections are more or less the same ones I raise re: coding, though — "Well, I can't write, and the LLM says what I want to say way better than I could ever say it!" and so on.)
So it goes, I guess, heh.
And things can escalate from there too . . .
Nice fun project!
Edit: Maybe you can add speaker for internet radio to wake up?
Did everyone forget that hackers and engineers like to have fun? Seriously.
Someone at Open Sauce this year made a friggin CRT-based VR headset. Why? Why not.
Did we forget where we came from? Does everything have to be optimal?
The clock could set itself from radio signals: standards-compliant.
The clock could have WiFi or Ethernet and use [S]NTP: standards-compliant.
The clock could have a SIM and use NITZ: standards-compliant.
But BT it is. So now rather than having a dependency on standard or generic resources, it requires a BT pairing with the right kind of phone Ridiculous.
This was my thinking as well, and why I rejected the idea. I'm not installing some rando company's information-harvesting data-selling garbage app on my phone to do something that the clock should do itself.
"setting the clock" means adjusting time, not powering
No complete protocol or handshake, just grab some close-enough time.
[0] https://www.eevblog.com/forum/chat/cheapest-way-to-get-datet...
There are a few places to get the current time:
- on-board real-time clock (RTC) connected to a continuous power source (e.g. button battery)
- GPS
- Colorado WWVB signal (60 KHz), Frankfurt DCF-77 (77.5 KHz), Cumbria NPL (60 KHz)
- the internet (NTP, HTTPS servers, etc.)
- mobile internet (e.g. LTE)
- estimate time elapsed between power cycles by tracking and storing IEEE 802.11 timing synchronization function (TSF) timestamps from nearby wifi routers.
All of these are potentially problematic.
The best option is the RTC. Buy a DS3231, hook it up to your microcontroller and a button battery, and forget about it for a few years. The only problem with these (besides the battery) is that they can drift pretty badly. The fancy ones account for temperature fluctuations and are accurate to ~2 ppm, which is one minute per year. Aside from the drift, it sucks to need an always-on dedicated IC just to know the time, especially if you don't always need to know the time.
GPS is nice but it's hard to get a signal indoors, especially in a skyscraper far away from a window, as can happen here in New York. You also need a relatively bulky component and an antenna.
The longwave radio signals (WWVB, DCF-77, and NPL) are neat and old and what "atomic clocks" use, but the signal is tiny and you need a sensitive long-running receiver, either with a gigantic antenna or a slightly less gigantic ferrite rod. Even then, one of those cheap atomic clocks might not sync at all unless it's placed near a window. The WWVB signal is also very weak in certain parts of America and at certain times of day, so your circuit might only get a bit of signal over the noise once or twice a day, which might or might not be enough to deduce the time.
The plain old internet works fine, but then your power budget involves a wifi radio, though you only need to run it for a few hundred milliseconds per hour. You also need a wifi password, which is a pain to configure in an IoT device. Also, you wanted a clock, why does it need the internet? GTFOOH.
Mobile internet is way overkill.
The last idea is something I haven't tested fully, since my microcontroller (raspberry pi pico w) can't keep up with the "promiscuous mode" unofficially offered by its wifi chip. It's a neat idea, though: you're in an environment with wifi routers all around, and you want to guess the time elapsed since you last checked by listening, without credentials, to the chatter. With enough routers and some flash storage you can probably keep track of time, assuming the whole area doesn't get a power outage.
That's my very long way of saying that keeping time is a solved problem but all of the solutions have drawbacks and none works perfectly.
RTC ICs are for use in bigger systems where main CPUs have other things to do. If you design a clock around a microcontroller dedicated to the task, that microcontroller can do the timekeeping all by itself. No extra IC needed.
Also quartz oscillators (ones built from discrete parts) can be trimmed. If you'd take the trouble, a cheapo quartz oscillator can go from 20..50 ppm to perhaps a few ppm worst case. Which as you point out is in the order of a minute per year. If that's not good enough AND power budget is available, an oven-controlled quartz oscillator improves on that.
All that online / GPS / radio controlled stuff is for convenience only (daylight saving!). Not needed just to have an accurate clock.
Oh and there's using AC mains frequency as timebase.
My experience with embedded stuff is very limited -- just some hobby projects on the Pico.
From what I've read, though, the on-board oscillators (there are a few of them) can drift quite a bit. One data point [says][1] several seconds per day.
On the other hand, if what you want is a microcontroller with an accurate clock, they probably make those (just not the Pico).
That said, why do people need clocks? I usually know the time, day or night, within 30 minutes or so, and if I need to know the exact time (which happens rarely if ever), I look at my watch. There are zero clocks in my home. I would find it quite aggressive to have a big display that tells me exactly what time it is.
Come to think of it there is one clock in the kitchen, on the oven. It's usually never correct because it resets after any power flicker and nobody takes the time to set it back properly. This is a recent oven; it's surprising kitchen appliances still are so dumb.
Later on, when everyone has their own (which are also highly accurate due to tower/network regular syncing) on their phone, I noticed that moving to a new place/classroom/office no longer involve ensuring that we have a wall clock. Nice if there's one, but otherwise we don't care, and if the battery run out, we can't be arsed to buy one and just put it in the shelf.
At this point appliances with accurate clock would only be those connected to the internet (because otherwise TLS won't work if they drifted long enough), dumb devices won't have battery-backed clock because that will cut a single cent of profit which obviously a tragedy that must be prevented at all costs.
I have two clocks in my living room, they're nice because I don't want to wear my watch at all times. I have two because the previous owners of my house just left one, and I thought it looked nice so I left it up. It's actually been handy because wherever I am, wherever I'm facing, I can just glance up and know what time it is.
Do I need any of these clocks? I guess not any of the specifically, but I use them frequently.
- Clocks started becoming a big deal when factory/shift work started being a thing in the early days of the Industrial Revolution.