Saving A Clock Radio With An LM8562

Smart phones have taken the place of a lot of different devices especially as they get more and more powerful. GPS, music and video player, email, and of course a phone are all functions tied up in these general-purpose devices. Another casualty of the smart phone revolution is the humble bedside alarm clock as its radio, alarm, and timekeeping functionalities are also provided by modern devices. [zst123] has a sentimental attachment to the one he used in the 00s, though, and set about restoring it to its former glory.

Most of the issue with the clock involved drift with the timekeeping circuitry. Since it wasn’t accurately keeping the time anymore, losing around 10 minutes a day, the goal to save it was to use NTP to get the current time and a microcontroller to make the correction automatically. Rather than replace everything in the clock except the display, [zst123] is using the existing circuit board and adding an ESP8266 to grab the time from the Internet. A custom driver board reads the current time displayed on the clock directly from the display itself and then the ESP8266 can adjust it by using the existing buttons through a relay wired in parallel.

Using the existing circuitry was certainly a challenge especially since the display was multiplexed, but the LM8562 that came with these clock radios is a common and well-documented chip for driving displays like this, giving [zst123] a leg up over something unlabeled or proprietary. Using NTP is certainly a reliable and straightforward way of getting the current time too but there are a few other options for projects like these like using GPS or even a radio signal.

Simple NTP Clock Uses Custom RGB 7-Segment Displays

A great majority of hackers build a clock at some point. It’s a great way to get familiar with electronics and (often) microcontrollers, and you get to express some creativity along the way. Plus, you get something useful when you’re done! [Tadas Ustinavičius] recently trod this well-worn path and built a neat little NTP clock of their own.

The build uses an ESP 12F as the core of the operation. It’s charged with querying an NTP time server via its WiFi connection in order to maintain accurate timekeeping around the clock. For display, it drives a series of custom 7-segment displays that [Tadas] built using 3D-printed housings. They use WS2812B addressable LEDs and thus can display a rainbow of colors.

For initial configuration, the phone creates its own WiFi hotspot with a web interface for changing settings. Once configured, it connects to the Internet over WiFi to query an NTP server at regular intervals.

It’s a simple build that does a simple job well. Projects like these can be very valuable, as they teach you all kinds of useful skills. If you’ve been working on your own clock design, don’t hesitate to let us know. You can use a microcontroller, relays, or even a ball.

Hackaday Prize 2023: Sleek Macro Pad Makes 2FA A Little Easier

We all know the drill when it comes to online security — something you know, and something you have. But when the “something you have” is a two-factor token in a keyfob at the bottom of a backpack, or an app on your phone that’s buried several swipes and taps deep, inconvenience can stand in the way of adding that second level of security. Thankfully, this “2FA Sidecar” is the perfect way to lower the barrier to using two-factor authentication.

That’s especially true for a heavy 2FA user like [Matt Perkins], who typically needs to log in and out of multiple 2FA-protected networks during his workday. His Sidecar is similar in design to many of the macro pads we’ve seen, with a row of Cherry MX key switches, a tiny TFT display — part of an ESP32-S3 Reverse TFT Feather — and a USB HID interface. Pressing one of the five keys on the pad generates a new time-based one-time password (TOTP) and sends it over USB as typed keyboard characters; the TOTP is also displayed on the TFT if you prefer to type it in yourself.

As for security, [Matt] took pains to keep things as tight as possible. The ESP32 only connects to network services to keep the time synced up for proper TOTP generation, and to serve up a simple web configuration page so that you can type in the TOTP salts and service name to associate with each key. He also discusses the possibility of protecting the ESP32’s flash memory by burning the e-fuses, as well as the pros and cons of that maneuver. The video below shows the finished project in action.

This is definitely a “use at your own risk” proposition, but we tend to think that in the right physical environment, anything that makes 2FA more convenient is probably a security win. If you need to brush up on the risks and benefits of 2FA, you should probably start here.

Continue reading “Hackaday Prize 2023: Sleek Macro Pad Makes 2FA A Little Easier”

A 1960s Copal flip clock

Classic 1960s Flip Clock Gets NTP Makeover

Many of the clocks we feature here on Hackaday are entirely built from scratch, or perhaps reuse an unusual display type. But sometimes, an old clock is just perfect as it is, and only needs a bit of an upgrade to help it fit into the modern world. One such example is the lovely 1960s Copal flip clock (in German, Google Translate link) that [Wolfgang Jung] has been working with — he managed to bring it squarely into the 21st century without changing its appearance one bit.

Like most flip clocks from the 60s and 70s, the Copal clock uses a small synchronous AC motor to advance the digits. Because this motor runs in step with the mains frequency, it also acts as the clock’s timing reference. However the original motor had died, and a direct replacement was impossible to find. So [Wolfgang] decided to replace it with a modern stepper motor. He designed a small PCB that fit the original housing, on which he placed a Trinamic TMC2225 stepper motor driver, a Wemos D1 Mini and a small 5 V power supply.

A flip clock mechanism with a PCB attached to itThanks to its WiFi connection, the D1 can find out the correct time by contacting a Network Time Protocol (NTP) server. Displaying that time would be tricky with the original hardware though, because there is no indication of which numbers are displayed at any time. [Wolfgang] cleverly solved this problem by placing an IR proximity sensor near the lowest digit, allowing the D1 to count the number of digits that have flipped over and thereby deduce the current state of the display.

There’s plenty of fun to be had with classic flip clocks like this, and with a bit of hacking any old split-flap display should be usable for your own clock project. If none are available at your local thrift store or yard sales, you can always roll your own.

ESP32 LED Eyes Help Keep Toddler In Bed

We’ve seen a lot of custom clocks here at Hackaday, many of which have pushed the traditional definition of the timepiece to its absolute limit. But for all their wild designs, most of them do have something in common: they assume you can actually read a clock and understand the concept of time. But what if you’re developing a clock for a toddler who’s only just coming to terms with such heady ideas?

The answer, at least for [Riley Parish] is a set of 3D printed eyes that are illuminated with either yellow or green LEDs depending on whether or not it’s time to get out of bed. More than just the color of the light, the eye design (which is embedded into the rear of the front panel) switches between wide-open and tightly shut depending on the time of day.

Internally the device is very simple, with the 5 mm LEDs and their associated resistors connected directly to the digital out pins on an ESP32 development board. While the dual-core microcontroller is admittedly pretty overkill for flipping some LEDs every 12 hours or so, the firmware does at least pull the current time from NTP — plus the powerful MCU offers plenty of room to grow. A web front-end to configure the device or check its current status would only be a few more lines of code.

As it so happens, this isn’t the first toddler timepiece to grace these pages. Perhaps unsurprisingly, those previous examples also used changing color to help indicate the passage of time.

Circuit-less PCB Featured As Faceplate For A Digital Clock

If there’s no circuitry on a printed circuit board, does it cease being a “PCB” and perhaps instead become just a “PB”?

Call them what you will, the fact that PCBs have become so cheap and easy to design and fabricate lends them to more creative uses than just acting as the wiring for a project. In this case, [Jeremy Cook] put one to work as the faceplate for his “742 Clock,” a name that plays on the fact that his seven-segment display is 42 mm tall, plus it’s “24/7” backward.

In addition to the actual circuit board that holds the Wemos ESP32 module and the LEDs, a circuit-less board was designed with gaps in the solder mask to act as light pipes. Sandwiched between the boards is a 3D printed mask, to control the light and direct it only through the light pipes. [Jeremy] went through a couple of iterations of diffuser and mask designs, finally coming up with a combination that works well and looks good. He mentions a possible redesign of the faceplate board to include a copper backplane for better opacity, which we think is a good idea. We’d also like to see how different substrates work; would boards of different thickness or using FR-4 with different glass transition temperatures work better? Check out the video below and see what you think.

We’re seeing more and more PCBs turn up as structural elements, from enclosures to control panels and even tools, and we approve of this trend. But what we really approve of is what [Jeremy] did here by making this clock just a dumb display that gets network time over NTP. Would that all three digital clocks in our kitchen did the same thing — maybe then they wouldn’t each be an infuriating minute out of sync with the others.

Continue reading “Circuit-less PCB Featured As Faceplate For A Digital Clock”

Stratum 1 Grandmaster Time Server On A Budget

[Jeff Geerling] has been following the various open source time projects for some time now, and is finally able to demonstrate a working and affordable solution for nanoseconds-accurate timekeeping in your local lab. The possibility of a low-cost time server came about with the introduction of the Raspberry Pi CM4 compute module back in Oct 2020, whose Broadcom network chip (BCM54210PE) supports PTP (Precision Time Protocol, IEEE-1588) 1PPS output and hardware-based time stamping. Despite the CM4 data sheet specifying PTP support, it wasn’t available in the kernel. An issue was raised in Feb last year, and Raspberry Pi kernel support was finally released this month.

[Jeff] demonstrates how easy it is to get two CM4 modules to synchronize to within a few tens of nanoseconds in the video below the break. That alone can be very useful on many projects. But if you want really stable and absolute time, you need a stratum 1 external source. These time servers, called grandmasters in PTP nomenclature, have traditionally been specialized pieces of kit costing tens of thousands of dollars, using precision oscillators for stability and RF signals from stratum 0 devices like navigation satellites or terrestrial broadcast stations to get absolute time. But as Lasse Johnsen, who worked on the kernel updates remarks in the video:

In 2022 these purpose-built grandmaster clocks from the traditional vendors are about as relevant as the appliance web servers like the Raq and Qube were back in 1998.

It is now possible to build your own low-cost stratum 1 time server in your lab from open source projects. Two examples shown in the video. The Open Time Server project’s Timecard uses a GNSS satellite receiver and a Microchip MAC-SA5X Rubidium oscillator. If that’s overkill for your projects or budget, the Time4Pi CM4 hat is about to be release for under $200. If accurate time keeping is your thing, the technology is now within reach of the average home lab. You can also add PTP to a non-CM4 Raspberry Pi — check out the Real-Time HAT that we covered last year.

Continue reading “Stratum 1 Grandmaster Time Server On A Budget”