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.
Attachments
Module_A_Case.stl
Module_B_Case.stl
Module_AB_LED_Frame.stl
Module_AB_LED_Cover.stl
Module_B_Dots_LED_Cover.stl
Module_B_Dots_LED_Frame.stl
Module_A_Diffusers.stl
Module_B_Diffusers.stl
Diffusers_All.stl
Feet_5_Deg.stl
Elec_Case_Big.stl
Elec_Case_Small.stl
Back_Parts_Big.stl
Back_Parts_Small.stl
Cable_Covers_A_Big.stl
Cable_Covers_A_Small.stl
BE_Test_Parts.stl
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:0015:03:0021: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 + RTCnodeMCU + buttonsnodeMCU + level shifternodeMCU 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.
79 Comments
Question 1 year ago
"According to your choice of electronics you can choose between two sizes for the electronics case." - Does the big have more LEDs per segment or is it just based on the CPU board/rtc - if so what can fit what?
What size power supply did you use - my calculations put it a little over 20 amps!
Thanks!
Answer 1 year ago
The smaller one will fit Arduino Nano/Pro Mini as stated, the bigger one adds additional space for a ZS-042. Both can be seen in Step 1 and later on. Which one you'll need depends on what microcontroller/rtc combination you're planning to use... you can always download the STL files and check measurements to make sure.
Interesting calculation...
WS2812B, max. current 60mA
67x 60mA = 4020mA = 4.02A (~20W @5V)
This would include all the unused leds and using all RGB channels at full brightness while using all segments (88:88) - something not really happening when using this as a clock (except when changing colors using v7 enabling preview and creating a white palette). But anyways... I've written a lot about power consumption before and in other instructables/things. All my sketches do implement a power limit, in sketch v7 it's 500mA.
(From ClockSketch v7-Instructable, linked right at the top of this thing)
Reply 1 year ago
Thanks so much for the detailed explanation. I now see where this is configured for fastled, I was calculating at 100% brightness! I see the difference in the 2 sizes now, (paying attention).
Question 1 year ago
Hello parallyze! Awesome projects! Just one question why would you make the designs multiples of 0.5 and layers 0.25mm just for the sake of measurements?
Answer 1 year ago
Hi,
0.25mm layer height is what I'm using most of the time, so that's simply what I recommend. Tolerances along Z usually don't mind if you print at .20 or even finer (or whatever magic number it is, someone might believe in). Printing at 0.3 isn't a problem either, so that's really just a recommendation for print duration/part quality.
The walls are multiples of 0.5mm because of a simple reason: 0.4mm nozzles are propably the most used ones out there and an extrusion width of 0.5mm is printable with different nozzles (0.3, 0.4, 0.5). While I personally prefer 1.2mm/2.4mm walls and therefore using an extrusion width of 0.6mm this makes printing using a 0.3mm nozzle tedious and has another flaw: Many people not reading the instructions... if you have a look at some of my older designs (Grid Clock v2, includes a video showing settings/differences in Cura), you'll notice I've been using multiples of 0.6mm for quite a while.
But: Slicers calculate things differently, also there's different default settings. If printing a 1.2mm wall using Cura and its default of 0.4mm for the outer perimeters, you'll end up with 2 walls and a small 0.4mm space between them where gap fill/zig zag will be used. This takes much more time than printing 2x 0.6mm walls and in some places will produce weaker parts (screw mounting poles).
Using 0.5mm just seems to be the most convenient and universal width so far. Simplify3D/IdeaMaker will default to 0.48mm on a 0.4mm nozzle, close enough to 0.5mm. Slic3r/PrusaSlicer default to 0.4mm x 1.125*, it's just Cura defaulting to 0.4mm for outer perimeters... but on a 1.0mm wall there's usually no additional infill going on.
(* for some features, extrusion width is based on layer height in slic3r, if not specified otherwise)
It doesn't really help one has to enable advanced settings in Cura to get access to "line width" (not using Cura recently, think that's what they call the extrusion width).
The video might explain the 0.6mm vs 0.4mm stuff I'm talking about :)
https://www.youtube.com/watch?v=1hZofhkjUFs
2 years ago
Hi.
I have a problem.
I'm building it, but my led display only minutes not display hour, how can I fix it, pls help
Reply 2 years ago
If it's not working from the dots or right after the dots please double check the led strip connections. If the sketch wasn't changed and minutes display properly it's very likely there's something wrong with the data connection - maybe the center strip was accidentally put in in reverse, switching data in/out direction?
Otherwise please post a few pictures showing the connections (data and power lines), this might be helpful.
Reply 1 year ago
i have a same problem but i connect everything right!
Reply 1 year ago
If it's the same problem you should ask the one who said it's working now but didn't tell anyone what the cause was. He didn't answer any of my questions, so replying to me is a bit pointless.
How do you know, did you test the led strip?
Reply 2 years ago
it's ok now.
thank you so much.
Question 1 year ago on Step 1
bonjour quelle sketch pour construir "S7ripClock merci
Answer 1 year ago
....the sketch is also linked within the first lines from this Instructable, just like on the other Instructable you just commented on....
Question 2 years ago
how to make color shifting and overlay mode save? after I'm powering it back all settings (except display mode) are default
Answer 2 years ago
What sketch version, what platform? Colormode set using the buttons or changing variables? What's the output on the serial monitor?
Question 2 years ago
hi i have a question can i use 30 led instead of 67 led ? means 1 led for each segment in the 7 segment of the led ....if yes what should what should i change in the program by the why I'm new to this... thank you
2 years ago on Step 11
Hello,I have a problem.I used ide to compile V6 code when there was an error, how to solve it, thank you.
Arduino:1.8.13 (Windows 7), 开发板:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
警告: DS3232RTC 库要求运行在 avr 架构(),可能与你现在运行在 esp8266 架构上的开发板()不兼容。
In file included from C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:24:0:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:14:21: note: #pragma message: FastLED version 3.004.000
# pragma message "FastLED version 3.004.000"
^
In file included from C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/FastLED.h:65:0,
from C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino:24:
C:\Users\Administrator\Documents\Arduino\libraries\FastLED\src/fastspi.h:135:23: note: #pragma message: No hardware SPI pins defined. All SPI access will default to bitbanged output
# pragma message "No hardware SPI pins defined. All SPI access will default to bitbanged output"
^
C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino: In function 'void setup()':
S7ripClock_BE_v6-pre:192:21: error: 'RTC' was not declared in this scope
setSyncProvider(RTC.get);
^
C:\Users\Administrator\Desktop\S7ripClock_BE_v6-pre\S7ripClock_BE_v6-pre.ino: In function 'void setupClock()':
S7ripClock_BE_v6-pre:537:5: error: 'RTC' was not declared in this scope
RTC.write(setupTime); // write setupTime to RTC
^
exit status 1
'RTC' was not declared in this scope
在文件 -> 首选项开启
“编译过程中显示详细输出”选项
这份报告会包含更多信息。
Reply 2 years ago
This looks like you're compiling for nodeMCU but did not uncomment "#define nodeMCU" on top of the sketch....
Reply 2 years ago
Thank you very much. I canceled the comments as you said, but there was a new error. I couldn't find the rtcds3231 library. I'm a novice, I can't write code, and I've been studying it for a long time, so I'm ready to give up, but thank you very much for your work.
Reply 2 years ago
As the instructions cleary state:
Install "Rtc by Makuna" using the Arduino Library Manager. The only thing one has to change if compiling for nodeMCU instead of Arduino when using a DS3231 rtc module is the two slashes in front of "#define nodeMCU". All used libraries are listed in the instructions and all of them can be found using the Library Manager inside the Arduino IDE.
Question 2 years ago
Hello,
I'm building this beautiful clock a second time now and I'm having an issue with it. The first build used a D1 Mini with WiFi, now I'm using an Arduino Nano with RTC. The sketch is RE_v6. After soldering the cables to the correct pads, I only see one segment lighting up after I connect the power. On the serial monitor I can see the debug options and I can also enter the setup of the clock, but nothing changes on the clock itself. Do you have an idea what might be wrong?