Introduction: S7ripClock - Basic Edition

Another redesign (stopped counting them) of something I did before. So welcome to the latest iteration of "S7ripClock", a modular 7 segment clock built using led strips. The modules (2 digits) only use a single piece of led strip and can be used for other projects. Or simply build the clock as it can be seen in the pictures/video.

This is my first creation on Instructables, so hopefully I haven't forgotten something important. If you think there's something missing, leave a comment.

Update - 2021/07/15

- Sketch v7 available. I also recommend having a look at the notes about electronics when building one of my things! https://www.instructables.com/ClockSketch-V7-Part-...

Update - 2020/06/01

- Added a draft of sketch v6 which supports being compiled for nodeMCU/ESP8266, see Step 11 for details

(replaced by v7)


Update - 2020/03/14

- Added some more tolerances to some parts (AB_LED_Frame, Diffusers)

- Added single STL (BE_Test_Parts.STL) to check fitting accuracy (have a look at "Test Parts")

Step 1: Overview and Notes

Here's some pictures to give you an idea of how this thing works. The basic idea is the same, only using 3 strips of leds. I wanted to keep the electronics case size low by using a "DS3231 for Pi" RTC module. You will notice I've connected one to the center strip (power) and put it inside the center module. While that does work, I don't recommend it. From the 10pcs "DS3231 for Pi" I've bought 4 turned out to be rubbish/broken/useless(or M-models). So I went back to the very common ZS-042 RTC module and designed a case for that also. Shame it's so bulky. ^^
The "DS3231 for Pi" does fit inside the smaller case without problems also, getting it inside the center module was just to see if it would work, not a recommended thing to do...

When building this I recommend getting all the parts for a module done first, insert the led strip then and do the soldering afterwards. I tried to save some time by doing this first, but it is quite tedious to put everything inside once the 3 pieces of led strips are connected....

Dimensions (without feet):
275.2mm (w) x 112.8mm (h) x 33.5mm (d)

Step 2: 3D Printed Parts / Printing Instructions

To build the clock as shown you will need the following parts. I suggest printing the diffusers using clear PLA and everything else using black PLA. Hopefully there's an animated GIF showing up to give you an idea of how the parts fit together. The biggest part (x/y) to print is 148.6mm x 112.8mm, so it should be printable on most printers.


1x Module_A_Case.STL
1x Module_B_Case.STL
2x Module_AB_LED_Frame.STL
2x Module_AB_LED_Cover.STL
1x Module_B_Dots_LED_Frame.STL
1x Module_B_Dots_LED_Cover.STL
1x Feet_5_Deg.STL

1x Module_A_Diffusers.STL
1x Module_B_Diffusers.STL (includes the two dot-diffusers)

According to your choice of electronics you can choose between two sizes for the electronics case.

Cable covers and back parts must be used accordingly:

1x Back_Parts_Big.STL
1x Cable_Covers_A_Big.STL
1x Elec_Case_Big.STL
_OR_
1x Back_Parts_Small.STL
1x Cable_Covers_A_Small.STL
1x Elec_Case_Small.STL

Walls are multiples of 0.5mm, so I strongly recommend using an extrusion width/line width of 0.5mm for optimum results (print times/rigidity). I've used a layer height of 0.25mm. Parts are kept very simple to print, there's no steep overhangs or anything that should cause trouble. Just don't squish the first layer too much, otherwise you might have some trouble fitting the diffusers. All parts are chamfered on the first layer, so the first layer doesn't have to be perfect.

There's also a "Diffusers_All.STL" in case you want to fit them on the bed for a single print.

Step 3: Other Requirements

Other parts you'll need to build the clock as shown are:

67pcs WS2812B LEDs, 60pcs/meter strips, 5V, each led individually addressable, 10mm wide
(IP65/67, coated/rubberized ones do not fit!)

1pc Arduino Nano or Pro Mini

1pc DS3231 RTC module (ZS-042, DS3231 for Pi or similar)

2pcs 6x6mm push buttons

Some wires (AWG 26 min.recommended)

A USB cable / USB Wall Charger

9pcs M3 screws (length 6mm - 10mm, doesn't really matter. 8mm recommended)

You need a working Arduino IDE to upload the sketch. Also you should know about the difference between compiling and uploading a sketch or installing the required libraries. If you're completely new to leds/arduino I recommend working through something like Adafruits Neopixel Guide first.


Notes:
The sketch is using the FastLED library. So other LEDs can be used but this instructable will not include such modifications. Same goes for using an ESP8266 without logic level shifters and WS2812B.
For RTC communications the DS3232 library by JChristensen is used. So other models are supported (DS1307), I just didn't come across one without massive drift yet... ^^

Step 4: The LED Strips

There's a strip of 32 leds inside each of the two modules. The center strip is using 3 leds. Before cutting the leds from the reel I suggest to look for solder joints on the strip which might interfere with bending the strip. I didn't want to bend that joint in the first picture so I simply cut off 2 leds and started all over again.

When doing this watch the orientation of the frame (notch indicates top) and start with data in on the left side.

There's a picture showing the led strips already connected and a DS3231 attached. It's up to you if you put the strips inside the frame before soldering or afterwards. And I don't recommending cramping the DS3231 inside the center module, I just wanted to know if it would fit...

Connection #1 will be the one connected to the Arduino later. Connection #2 connects Data Out from the first module to the center strip (Data In, top). And finally #3, connecting Data Out from the center strip to Data In from the second module. #4 is where power will be coming from, I've chosen a regular 2m USB wire. So technically we end up with 67 leds connected to an Arduino on the left side (while still looking at it from the back) and power from the right side. That's how the schematics represent this.

Step 5: Preparing the Modules

After talking about the led strips it's time to show some details of how the parts are put together.

Put the diffusers inside their corresponding holes. Make sure to watch orientation (center diffuser with it's opening to the top). Theres a small bar on top of the cases where the led frames notches will be. Put in the led frames and clip them in place by pressing evenly across the frame.

Module A to the left side, Module B (the one with the dots) to the right. Remember, it's up to you if you do the soldering before or after doing this step. The cables from the bottom side of the center strip will be routed to the top, so make sure you don't cut them too short. :)

Ignore the gray/white wires in the pictures if you're not trying to fit a small DS3231 inside the center module.

Now it's a good time to add the USB/power cable to the right side/Data Out of module B. Put on the covers afterwards and route the cables accordingly.

Step 6: Putting Everything Together

Put on the electronics cover. Make sure you don't pinch any of the wires coming out of the modules. When soldering the buttons make sure to not accidentally connect them wrong. The feet are held in place by the bars left/right, I suggest moving the clock slightly off the work surface to keep it level when putting in the screws.

Route the USB/power wire as shown. When putting on the cable covers watch for the little square holes. They should point upwards. Upload the sketch and finish everything up.

Step 7: Electronics / Schematics

Here's how everything is connected:

ButtonA -> Arduino D3 + GND (yellow/black)
ButtonB -> Arduino D4 + GND (purple/black)
RTC SDA -> Arduino A4 (gray)
RTC SCL -> Arduino A5 (white)
LED Data -> Arduino D6 (green)

Power goes to the strip and is then used to power the Arduino and RTC using +5V.

It just takes slight modifications to use 12v led strips. Simply don't power the Arduino from +5V then, just keep the RTC there. The Arduino can take 7-12v on it's VIN pin, so this would be the only connection having to be modified. Just avoid powering the Arduino by USB and feeding the leds from +5V using the onboard VRM.

Step 8: Other

By now you should be done building the clock. If you're having problems try to isolate what's causing them. The clock will tell you on the serial console (74880 baud) what's going on, so check if maybe it's just "Entering setup" because both of the buttons might be shorted... ^^

For more information I recommend having a look at one of my older clocks and it's remixes. I wrote a lot there about different aspects: https://www.thingiverse.com/thing:3014572

Step 9: Arduino Sketch

The software sketch is at version 5. This is because it is very close to the one I've been using for some of my other projects, so I didn't want to confuse this because of the redesigned "hardware" around it...

Basic usage:

Button A: Select brightness

Button A (long press): Switch color mode (per digit/per led)

Button B: Select color palette

Button B (long press): Switch 12h / 24h mode

Button A + B: Enter setup

While in Setup: ButtonB -> Increase +1, ButtonA -> Accept/Next


v5 removed, use v7 instead.

Step 10: Test Parts

There's a single STL to test how good parts will fit. They're using the same tolerances as the main model files, it's just cut down to test how well diffusers/led frames will fit.

I've printed the test parts a bit too low on purpose. First layer is printed with rectangular infill @50%, you can clearly see how infill is too thick and how the first signs of "elephant foot" show up.

Step 11: Sketch Update V6 - NodeMCU/ESP8266 (experimental)

This information is outdated and I highly recommend reading the v7 Instructable about this.

Here's a current draft from v6 of the software sketch. This adds support for compiling it on a nodeMCU/ESP8266 instead of an Arduino Pro Mini / Nano.

Uncomment "//#define nodeMCU" and select correct board type within the Arduino IDE to compile this for nodeMCU + RTC. If you don't want to use a RTC, uncomment "//#define useWiFi" and use ntp.

When using ntp make sure to choose an appropiate ntp pool adress and set your timezone offset, ntp will always deliver UTC time.

When running (on nodeMCU) the clock will sync it's internal clock to either the RTC or ntp every 6 hours:

  • 03:03:00 (hh:mm:ss)
  • 09:03:00
  • 15:03:00
  • 21:03:00

On Arduino the internal clock will sync to the RTC every 15 seconds when now(); is called (setSyncProvider).

If you're using v5 on an Arduino there is no need to upgrade to this one.

Important notes:

For a simple clock I don't prefer the nodeMCU for various reasons. Here's a few of them:

WS2812B leds use a 5v logic level. nodeMCU/ESP8266 don't, they're using 3.3v. While this does work very often right away depending on your combination of led strips/nodemcu a logic level shifter might be required.

Without an RTC the clock is useless when there's no wifi connection. Most nodeMCUs drift quite a lot and personally I wouldn't accept clocks running up to a few minutes off each 1-3 months...

The advantage is: nodeMCUs can be powered by 5v, just like an Arduino. So if using WiFi/ntp and setting up colors/brightness once, you theoretically don't need the buttons. Omitting the RTC this leaves just the power connections and a single data line for the whole clock in the same way as before.

I've attached some schematics:

  • nodeMCU + buttons + RTC
  • nodeMCU + buttons
  • nodeMCU + level shifter
  • nodeMCU all alone

As there's half a gazillion different versions of nodeMCU/ESP boards out there: I've only been using this on a nodeMCU v3 which, judging by pictures, is using the nodeMCU pinout mapping. So if you're using a Wemos D1 Mini or something else you might have to adjust the pin mappings inside the sketch.

When compiling for ESP/nodeMCU the DS3232RTC library is replaced by Rtc by Makuna.