When examining a project, it’s easy to be jaded by a raw parts list. When the main component is an ESP8266, we might say “oh, another 8266 project. yawn!” But we’re certain that when you take a look at [Will Fox]’s Foxie CardClock, it’ll surely grab your attention.
As if all those beautiful LEDs weren’t enough, the rest of the device’s specifications are quite impressive. The core components might be common, but what often separates such projects is the software. With Over The Air updates supported via ArduinoOTA, updates are a snap. A light sensor helps to keep all those LEDs at a sane level, and a once-per-minute synchronization via NTP keeps the time accurate. Even if power is lost, a super-capacitor can hold the time accurate for up to two days with the built in RTC module. There’s even provisions for setting the time using the buttons on the front panel should you want to keep the gadget offline.
The entire project is open source, with the hardware released under the CERN Open Hardware Licence Version 2 and the firmware source code distributed as GPLv3. Users are encouraged to hack and modify the design, and all the information you need to build one of your own is available in the project’s GitHub repository. [Will] also offers a pre-assembled version of the clock for just $45 USD, but unfortunately it seems to be out of stock at the time of this writing.
If credit card sized hacks are your chosen area of interest, you will appreciate this crystal radio made from an actual Credit Card. Thanks to [Abe] for submitting the Tip!
The “setting time manually” is a nice touch. I prefer to have my bedside alarm clock 7 minutes ahead, because high-minute alarms are annoying and if I put the alarm at 8:00 I’ll miss the news.
My old philips alarm clock was getting worse, so I switched to a new one which is terrible in many ways, but when manually setting the time it would drift by 2-3 minutes a way.
I switvhed back to the old one (after replacing a few caps and a microswitch), which I then remembered synchronizes time with mains frequency (clearly shown when European mains frequency drifted about 7 minutes out of sync a years back).
You could set your alarm for 7:59 and not miss the news.
Follow me for more lifehacks.
For only $50 I’ll email you to wake up. Maybe someday you’ll be able to buy an email notifier.
I prefer not to have any smartphones in my bedroom. And this old alarm clock, setting an alarm for 7:59 meant pressing the minute button 59 times (or holding it down 59 seconds). My method works for me, I’m used to it.
or you could just modify the software for the 7 minutes offset from the time acquired by NTP, or modify the buttons to increase/decrease the offset; i love open source ;)
Not much in the way of decoupling caps for the WS-LEDs, which are ofc spread out all over the place. Hrm.
But if it works, it works, I s’pose. The essence of Muntzing, a tried n’ true, time-honored engineering practice ;-)
@Ryan Flowers said: “…and a once-per-minute synchronization via NTP keeps the time accurate.”
No matter which NTP time service he is using (assuming it is not his own), if [Will Fox] is updating the time via NTP once-per-minute he is likely abusing the NTP service. For example updating once-per-minute is in direct violation of the NTP Pool Project’s Terms of Service (ToS), which might get you banned.[1] And since it seems there is a PCF8583 hardware Real Time Clock (RTC) on board already, why update the time once-per-minute at all? Once per day should suffice.
With the ESP8266 there is no need to use an external hardware RTC, for example a PCF8583 in [Will Fox]’s design. The ESP8266 has perfectly good on-die timer-counters and support for deterministic timer-counter interrupts. A quick web search turns up plenty of ESP8266 RTC libraries, see [2] for an example which can be tweaked for accuracy.
Another option would be to use the more advanced ESP32 which has a built-in RTC function. See [3] for an example on setting the ESP32’s internal RTC from a UNIX/POSIX Epoch time-stamp which is available via NTP in /(time.h). See [4] where I explain more about this.
From the .jpg on the GitHub page it looks like there is no cut-out under the ESP8266 module’s PCB antenna. This is bad practice, even if the copper layers on the PCB under the antenna are removed. Also, it looks like there’s a button cell or super-cap for the RTC on the PCB right next to the ESP8266 module’s PCB antenna. Again, best practice is to keep things away from the ESP8266 antenna.
* References:
1. NTP Pool Project Terms of Service
https://www.pool.ntp.org/tos.html
Excerpt:
4. End-User agrees that he or she will not:
(a) Change default settings to make more frequent request of the Services, if using an ntp daemon (“NTP Protocol”);
(b) Request time from the Services more than once every thirty (30) minutes (ideally at even longer intervals), if using SNTP.
(c) Set the time more often than is necessary for the purposes of the device; if the device can keep reasonably accurate time for several days, End-User will not set the time every hour. Additionally, if the device only uses whole seconds, End-User will not optimize the device for millisecond accuracy.
(d) Set up a regular time sync interval such as “top of the hour”, “top of the minute”, or “at minute or second X”.
Examples of Time Setting
BAD: setting the time daily at midnight;
GOOD: Setting the time at boot and every 36 hours after boot (rather than at a specific time);
BAD: Setting the time every 90 minutes at the “top of the minute” (0 seconds);
BETTER: Setting the time every 89 minutes plus random number of seconds between 0 and 120;
BAD – Setting the time every 2 minutes;
GOOD – Setting the time according to needs, for example every 4 hours or daily (or less often)
2. Timekeeping on ESP8266 & Arduino Uno WITHOUT an RTC (Real Time CLock)?
https://www.instructables.com/TESTED-Timekeeping-on-ESP8266-Arduino-Uno-WITHOUT-/
3. lbernstone / ESP32_settimeofday
https://github.com/lbernstone/ESP32_settimeofday
4. My comment on July 5, 2022 at 11:48 pm
https://hackaday.com/2022/07/05/tiny-berlin-clock-replica-also-counts-seconds/#comment-6489901
Well, if I’m not mistaken Espressif’s ESP-IDF and the Arduino IDE’s ESP Core plugins for both the ESP8266 and the ESP32 are at their roots the same code and both have built-in SNTP clients, which are not the same as full-up NTP, but in practice that should not really matter.
For alarm clocks/time clocks etc. Do you really care if the accuracy is below 1 sec?
I would say not. If you wake or clock in at 7:58am or 7:58:23.665553 isn’t going to make a bit of difference as humans just can’t really work in the sub-second domain with any accuracy or repeatability.
Hey there, I really appreciate your criticisms!
1. Point taken about the NTP abuse — that was not my intention, I simply did not research the subject enough prior to release. I’ll definitely not repeat the same mistakes in the future with NTP.
2. I do have the copper pours removed behind the antenna and I’ve tested the WiFi range with my approach and it was quite some distance. It may not be optimal, but it isn’t necessary for it to have maximized range for this application.
I’m working on the Foxie Clock 2.0 right now, but I intend to revisit the CardClock later this year and bring the ESP32-C3-MINI to it as well (this is what I’m using in the FC 2.0).
“When the main component is an ESP8266, we might say “oh, another 8266 project. yawn!””
Who says this exactly? Not being interested in a project because it uses a popular microcontroller is ridiculous. Sure you may have seen thousands of projects that use an ESP8266 but that’s not what’s important, what’s important is what’s done with it. It’s almost like saying you are bored and uninterested in books because they use paper and you’ve read lots of books that use paper, in this example the paper isn’t the important bit, the important bit is what’s printed on the paper, same with projects, it doesn’t matter too much what microcontroller it uses or if you’ve worked with or seen projects use that microcontroller a lot, what’s important and interesting is the code running on it.
Any idea when they will be back in stock?