Raspberry Pi LED Clock and NTP Server

Jan 2017

Does this work?

Yes it does, so read on. At the time of writing I have finished the hardware (not got a PCB made yet, so am still using my prototype) and the Clock software is working. I have not yet started the NTP part, but will do so once the hardware is fully ready (I.E I have a PCB)

What is this for?

I like having a clock visible where I sit, I use an old tablet as a clock right now, which is fine. But I wanted something small enough to perch on the top of my monitor, or under it, that I could just glance at when I want to know the time.
I also want to know the clock is always correct, so I am going to connect it to the internet and sync it to one of the many super accurate time servers out their in the cloudy world of the internet. I also want to use this to set the time of my servers and client PCs at home. I have used Windows for this over the years, but it seems a bit flaky, and NTP just stops sometimes. Hence the super cheap and reliable Pi and Linux solution.
For about £10 I can build this little project, it will be fun and useful at the same time.

What you will need

A basic list of parts is:

Raspberry Pi (you can use any Pi for this, but if you use a Raspberry Pi 1, you will have to rewire)

SD Card, 4GB is enough if you use the minimal install (no GUI)

A wifi dongle or wired connection

A 7 Segment LED (This project uses common Anode)

A dozen 330R resistors

Two LTV-826 Opto Isolators (or equivalent)

Something to prototype on (breadboard)

Some wires (either use single core prototype wire or the jumper wires for Raspberry Pi's)

Some Python code to make the clock work (you can download what I am using)

I am using a Raspberry Pi Zero. The idea is that I can mount my 7 Segment LED (hopefully on a custom PCB eventually) on top of my Zero, to make a very small unit. While you can use a full Raspberry Pi 1, 2 or 3, this would be a total waste of money compared to the cost of the Pi Zero (unless you are going to use the Pi for other things like a web server for instance)

Main Project Elements

The Hardware Build and Test

The Software Build and Test

The NTP Functions