Introduction: RGB LED Ring Clock

Playing around with a 12 RGB LED ring and a Raspberry Pi Pico it occurred to me - how could I make this into a clock?

This project uses a Raspberry Pi Pico and a Waveshare RTC (real time clock) module for the Pico to turn a 12 RGB LED ring into a working clock. The LEDs light up different colours to show the hour and minute hand:

  1. The hour hand is a blue LED.
  2. The minute hand cycles from red to green as each minute passes.
  3. If the hour and minute hand take up the same space then the LED again cycles through a series of colours

The design also includes a physical daylight-saving time switch, a USB-C power input, and the Waveshare RTC module includes a coin cell battery so that the clock will keep time even if unplugged.

I have included a link to my code for the Pico on Github and a 3D printed case on Makerworld.

Github: TellinStories/RGB-LED-Ring-Clock-Pico: A simple RGB LED ring clock built with a Raspberry Pi Pico, WS2812b / NeoPixel ring, and a DS3231 real-time clock module.

Makerworld (3D printed case): https://makerworld.com/en/models/2223262-rgb-led-clock

Supplies

  1. 12 LED WS2812B RGB Ring
  2. Raspberry Pi Pico with male headers. I have not tried with a Pico W, Pico 2 or Pico 2W but I think these would also work.
  3. Waveshare Precision RTC Module for Raspberry Pi Pico (DS3231)
  4. CR1220 battery (sometimes these come included with the RTC module).
  5. Stripboard / veroboard
  6. Stranded insulated wire – something around 22 AWG. You will need approx. 3 x 10cm lengths.
  7. Solid core jumper wire (or use the stranded core wire if that’s all you have).
  8. 2.54mm Screw terminals – 3 x 2-way terminals or 1 x 2-way and 1x 4-way. (Note: the photograph does not show all of the screw terminals needed)
  9. 2.54mm toggle switch.
  10. Female USB-C with wires attached.
  11. Access to a 3D Printer, and at least white filament (ideally also another colour too). 3D printing files are here: https://makerworld.com/en/models/2223262-rgb-led-clock
  12. Access to a soldering iron, solder etc.

Step 1: Stripboard and Soldering Components

  1. Cut a piece of stripboard so that there are 21 connected columns and 10 unconnected rows. In the diagram I have labelled the connected columns A-U and the unconnected rows 1-10.
  2. Solder a jumper wire from A4 to U4 as shown – it will pass underneath the Pico and RTC board when we add them later.
  3. Solder the screw terminals to B1,C1 and R1 to U1, and the toggle switch to M1 and P1.
  4. Cut row 7.

Step 2: Soldering RTC Module

  1. Place the RTC module onto the stripboard as shown – it’s male headers will occupy rows 3 and 10.
  2. Solder the RTC module pins to the stripboard where they are on the same column as one of the pins you’ve already soldered – i.e. B3, C3, M3, P3, R3, S3 andT3.

Step 3: Soldering the RGB LED Ring and Placing the Pico

  1. Solder approx. 10cm of stranded core wire to the VCC 5V, GND and DI pads on the back of the W2812B LED ring. The DO pad should be left untouched.
  2. Push the Pico’s male headers into the female header sockets on top of the RTC module.

Step 4: Connecting Components for Testing

  1. Next we will attach the components so that we can test everything once we have uploaded the code to the Pico.
  2. Connect the LED ring to the board by screwing the wires into the terminal:
  3. GND to R1
  4. DI to T1
  5. VCC to U1
  6. (The screw terminal at S1 is not used)
  7. Connect the female USB-C to the board by screwing the positive (red) wire to the screw terminal at B1 and the negative (black) wire to C1.

Step 5: The Code

  1. Connect the Pico to your computer using a micro-USB cable.
  2. Open Thonny and install Micropython on the Pico.
  3. Go to my GitHub repository https://github.com/TellinStories/RGB-LED-Ring-Clock-Pico and download 3 files: ds3231.py, set_time.py and clock.py. Save all three to your Pico, but when saving clock.py rename it as main.py which means it will automatically run whenever the Pico is powered.
  4. The RTC module will keep the time even when not plugged in (as long as it has the coin cell battery). However we need to set the time first. Open set_time.py and go to line 16 and 17:
  5. # Set time if needed (year [4 digit], month, day, weekday [Mon = 1, Sun = 7], hour [0-23], minute, second, subsecond [set to 0])
  6. rtc.datetime((2026, 1, 1, 4, 20, 30, 0, 0))
  7. Follow the instructions in the code to set the date and time to the current time. For example the one above is for 1st Jan 2026, which was a Thursday, at a time of 20:30. Seconds and sub-seconds are set to 0.
  8. Once you’ve set your desired time in the code run the program. You should only need to set the time once (unless the battery runs out!).
  9. Now run main.py. First you will see a rainbow start-up effect and then the time will show.

Step 6: Testing!

  1. Unplug the micro-USB cable from the Pico.
  2. Make sure the toggle switch is off.
  3. Plug a male USB-C into the socket and you should see a rainbow start-up sequence and then the clock should work.
  4. Switch the toggle switch on and you should see the hour advance by 1. This is the "Daylight Saving Time" switch!

Step 7: Assembling the Clock

  1. 3D print the case – the file can be found here: https://makerworld.com/en/models/2223262-rgb-led-clock
  2. We connected the ring and USB-C socket in the previous step to test the clock is working; we now need to disconnect them to fit the parts into the case, so unplug from the power supply and unscrew the wires to the LED ring and USB-C socket.
  3. Push the wires from the ring LED through the top hole in the case. Press the ring LED into the ring in the case – there are little plastic knobs that should hold it in place.
  4. Screw the wires back onto the terminal – at this point you will probably find that the wires can be shortened so cut a bit off if you want.
  5. If there are tabs on the side of the USB-C socket carefully remove them with a craft knife.
  6. Next push the wires to the USB-C socket through the hole in the back of the case, and again re-connect them to the screw terminal.
  7. Push the USB-C socket into the hole, you may want to secure it with a tiny drop of superglue.
  8. Fit everything into the case and slide the base into it. There are four indentations for the you to stick 5mm rubbery feet on if you wish.
  9. Plug a USB-C power supply into the socket and you should have a working clock!