I know what you're thinking, "Isn't a Zero a bit overkill for a clock?" For a normal clock, probably, but with the internet it can be so much more than a normal clock! You could make a clock that automatically adjusts across time zones based on it's IP address, or perhaps a clock to track your latest amazon order. For me, the clock tells me when the next subway train is coming at my stop. This is a relatively simple build that requires some soldering, but all off-the-shelf components.
- a 1.2" 7-segment display from Adafruit in whatever color you want
- a Raspberry Pi Zero and supported power chord
- some female to female jumper wires
- a small wifi dongle, preferably one that you don't have to compile the module for (ahem)
- (for the non press-fit version) 4 M2.5 screws and 3mm spacers
There are now two versions of the clock included: the original design features a removable backplate and requires some M2.5 screws and spacers, but results in a slightly more visually appealing clock as the seam is hidden at the back and on the corners and the layers are vertical. The press-fit clock requires no screws and features a bezel on the front of the clock, but the design has to be split horizontally instead of vertically. The press-fit version has been updated as of 8/30/2018 to be slightly larger in the horizontal to support better pressing and fitting. If you need the original files for some reason you can grab them here: https://github.com/rsheldiii/openSCAD-projects/tree/master/clock.
If you are a better EE than I you could certainly buy just the display and some resistors and skip the I2c backpack altogether, opting for some protoboard or even posterboard to hold the display in. If you're going that far you could also snag a cheap one off Ebay or Alibaba and change the dimensions in the SCAD to fit.
I now highly recommend a pi zero W for this clock, since you don't have to do any of the weird soldering I did. However if all you have are pi zero originals, you can set it up with wifi; I recommend snagging a starter kit if you don't have the requisite parts already and doing a NOOBS graphical installation. Doing a regular Raspbian installation over serial is also doable. I used wpa_supplicant for my Wifi configuration.
The pi zero can't support the amount of power a Wifi dongle draws over USB so you'll have to do this wifi patch hack to get it to run off the main USB power. This means you can't plug anything else into that USB port so be warned!
Printed in Hatchbox PLA with 3 layers top and bottom. The only hard part about the design is the curvature, and perhaps getting the port holes well formed if you have problems with your first layer sticking to the bed. Other than that the design should be pretty resilient to most changes you can make.
As tight fitting designs are wont to do, my setup might not work on your machine. I highly recommend measuring your display and seeing how close the values are to the ones at the top of the SCAD file, regenerating as necessary, and if all else fails breaking out the X-acto knife and sandpaper and going to town.
You can follow this guide for a general how-to on enabling I2c and using the backpack with a raspberry pi. I've included pictures of the wire setup on this page, but for posterity purposes here they are:
- +5V and V_IC on the clock should go to 5v on the raspi, which are pins 2 and 4 according to this image
- GND should go to ground, which is pin 6
- SDA and SCL, the data and clock lines for I2c, need to go to the SDA and SCL GPIO pins on the pi, 3 and 5 respectively
Adafruit has a few example python scripts to get you started in the tutorial.
That should be it, let me know if you have any questions!