Flash Clock

The absolute requirement for this clock was that the time is automatically set. You just plug it into the power source, and it shows the correct time. The previous clock in that space had a 1-minute-per-month accuracy problem, and that was kind of a pain in the ass.

I have wanted to test these small microcontrollers for a project for a while, and this seemed like a good first project. As a photographer, I thought this clock could be camera-themed. I have some film cameras, and one of those is a doppelganger to me named Petri. I bought this just for the name, and it is used display purposes only.

I first thought that I will 3D print a fake flash unit for it. Then I started browsing used flashes and they were priced reasonably and would look a lot more authentic. I ended up to a Soligor MK-21A unit from kamerastore.com (not sponsored) here in Finland.

Donor flash Soligor MK-21 A

I wasn’t sure if everything would fit in this but the size was pretty much perfect. It even had removable diffusor that was perfect for the display. I would have preferred a broken unit for this one but could not find one. I guess these are so cheap that all the broken ones go right to the bin.

New electronics

I had previously watched this YouTube video featuring the Raspberry Pi Pico and ST7735 display. It seemed easy enough to follow, so I decided to incorporate these components into my clock as well. I selected the Pico W with Wi-Fi since I was planning to use the internet for accurate time and temperature.

I disassembled the Soligor flash and discovered that the display and Pico would fit inside quite nicely. I had to remove the old electronics from the flash and modify the battery compartment, but everything appeared stock from the outside, except for the tiny hole where the USB cable comes out.

Initially, I used jumper wires for testing, but since they were functional and fit inside, I decided to secure them in place with hot glue. I 3D printed a tray for raspberry pi pico and a frame for the display to fit it into the diffusor holder of the flash head (step files for printing can be found from the GitHub).

Code

I was a software engineer in my previous life, so I have done my fair share of coding. However, this was my first microcontroller project. I chose to use CircuitPython for the Pico since I’ve recently utilized Python for the small projects I’ve worked on.

I wanted a font that resembles engravings in old lenses. I could not find one that I was happy with, so I decided to create my own font for this project (SVG, TTF on GitHub). The CircuitPython fonts are 1-bit fonts and appeared jagged, so I coded my own simple font system too.

Although the font looked good, I encountered an issue with the display being too bright. I realized that this display did not support display brightness adjustment. The bitmaps were 256-color indexed bitmaps for size reasons, leading me to modify the palette to achieve a dimmer image. I have not coded anything with bitmap palettes since the Windows 3.11 days, but I guess it was a good time to refresh some memories. While I was at it, I also adjusted the palettes to be more yellow since the display was too blue for my taste.

One of the original requirements for me was that the clock retrieves the correct time from the internet, but that was easily achieved using CircuitPython libraries. Additionally, I added a temperature feature that gathers its data from Open-Meteo.

Code in GitHub

Display

The main goal was just to display time. The display features the time at the top, with a font big enough that it can be seen even from farther away. There was room for more, so I added temperature in the bottom left corner that looks like focal length markings in orange. On the right bottom corner, there is a red dot that can be found on many vintage lenses; it turns blue if the temperature is below freezing.

Display explained

The date is displayed at the bottom. On a test use, it was more distracting than helpful, so I made it configurable and don’t personally use it. The rest of the space was filled with depth of field graphics that were common in old metal lenses. I kind of wish those could be found in modern lenses too.

Summary

The clock project began due to the inconvenience of accuracy issues with a previous clock. The idea of a camera-themed clock originated from my interest in photography. Another concept I had in mind was a Back to the Future DeLorean time machine-themed clock, but that might be a project for another day. All in all, it was a nice little project; MicroPython is suitable for these types of projects, especially for beginners. The electronics were easy to handle, and help was readily available through YouTube videos.