User Tools

Site Tools


raspberry_pi_led_clock_and_ntp_server

Raspberry Pi LED Clock and NTP Server

Jan 2017 (Updated Mar 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. The NTP part is also working. The only parts left to do are to actually have some PCBs made, and some enclosures 3D Printed.


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:

  1. Raspberry Pi (you can use any Pi for this, but if you use a Raspberry Pi 1, you will have to rewire)
  2. SD Card, 4GB is enough if you use the minimal install (no GUI)
  3. A wifi dongle or wired connection
  4. A 7 Segment LED (This project uses common Anode)
  5. A dozen 330R resistors
  6. Two LTV-826 Opto Isolators (or equivalent)
  7. Something to prototype on (breadboard)
  8. Some wires (either use single core prototype wire or the jumper wires for Raspberry Pi's)
  9. 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

raspberry_pi_led_clock_and_ntp_server.txt · Last modified: 2023/03/09 22:35 by 127.0.0.1