A nicer version of my AT90S1200 binary clock
As you can see from the updated gallery photos, I have a working binary clock. To review, the minutes and seconds are 1, 2, 4, 8, 16, 32 from left to right, top to bottom, and the hours are in a line at the bottom 1, 2, 4, 8, 16 from left to right, displaying 24 hour time; 13:42:17 in the picture. The firmware is a straightforward initialization of the STM32's built-in battery backed RTC followed by some simple LED multiplexing. Unlike my older clock, this clock will keep excellent time with a 32kHz clock crystal, even if it is left unplugged for a year or two. The case is more like a stand, a quick and easy 5mm plywood front panel glued to an angled side of a piece of 3/4" plywood, painted light blue.
This was a fun little project. Just sitting down and building something, no new boards, easy firmware. Eventually should add finishing touches like shortening the wires, screwing everything down, maybe enclose the back, but for now I'll enjoy my new combination clock-nightlight.
I'm using an old board I designed to sink 8 channels through mosfets. The board has its own switching regulator for the micro and up to 8 2-pin JST-PH headers that provide Vin (up to 20+ volts, 5V in this project) on one pin and switched GND on the other. but this project needs high side switching. The only ones I had were some surface mount MMBT2907A's. After some careful soldering and heatshrink I have a cable that switches 5V from the blue to the red wire when you ground the control signal. A 0603 3k3 resistor limits the base current. I don't have a lot of through hole.
The back of a scrap PCB served as a non-flammable surface to solder on.
The two wires on the same side of the transistor feel surprisingly firm, but the red wire is not as confident. Hopefully it will be strong enough. It works!