Here's a rework of something I did a while back. This time it's not only the display modules, it's the complete clock as can be seen in the pictures.
Even bigger with 4 leds per segment: https://www.thingiverse.com/thing:3136688
SE (Small Edition)
The SE also features a complete build video.
This version is using continuous led strips as much as possible - when building this there's less than 20 wires to solder!
Updated software version - v4
Besides more comments v4 adds automatic brightness correction by using a photoresistor.
Updated software version!
I've uploaded sketch v3 which adds some features. Also I've added a details section about the sketch where I'll put the changelog/usage instructions.
Update for smaller build volumes!
I've uploaded two parts (base_frame-noborders and center_frame-noborders) which don't have the upper and lower borders. This reduces the biggest part to print from 178,31mm x 152,85mm to 178,31mm x 147,27mm. So it should be printable on many printers which are limited to 150mm along the y-axis (various makerbot clones for example).
Use the NoBorders-files only if you're limited by build volume.
Update for a 3rd module displaying seconds
If you have this thing up and running you might want to add another module to display seconds: https://www.thingiverse.com/thing:3016537
Width: 400mm (15.8")
Height: 153mm (6.0")
Depth: 30mm (1.2") (not including optional feet)
It may look confusing at times but I think it's hard to build a clock like this easier and faster.
I've used M3x10mm screws (didn't have any other length at home) but anything between 6mm and 10mm should work just fine.
Usage instructions can be found at the bottom
- Walls are multiples of 0.6mm, so I suggest printing these using a extrusion width/wall width of 0.6mm/1.2mm. 0.5mm/1.0mm or smaller will increase print times and give you weaker parts.
- Before printing all the diffusers I suggest printing the single one and test if it fits nicely. Don't squish the first layer too much on the frame or diffuser files!
- After wiring the led strips I strongly suggest running the test-INO before completing everything (rtc, arduino, case, power wiring and so on).
- Of course you can use other led strips as long as they aren't much thicker, 10mm wide and you know how to program them
- The case will fit an Arduino Pro Mini OR Arduino Nano. No usb breakout as I'm only using pro minis for stuff like this...
1 Arduino (Nano or Pro Mini)
1 RTC module (DS3231)
99 WS2812 LEDs, 60 leds/meter, 2x 47pcs, 1x 5pcs
2 button switches, 6mm
1 resistor (300-500ohms)
24 screws (M3, 6-10mm)
lots of wires
Working Arduino IDE
Basic knowledge of what you're doing
Willingness to read this and look at the pictures closely
Remember: You can open the pictures in a new browser tab to see them full size!
Added some pictures to a new section about the print settings I've used. Have a look at the pictures there if you wonder why I recommend 0.6mm.
I printed the diffusers at 0,25mm layer height with 7 solid bottom layers, no infill and no top layers. Might be worth experimenting here to achieve better results for light diffusion.
Base/center frames can be printed with a single perimeter/outer shell and at 60mm/s shouldn't take much longer than 90-110 minutes.
Do not squish the first layer into the bed too much or you might have problems fitting the diffusers inside the frames!
Step 1: Gathering parts
Print these parts:
Get a led strip and pre-bend it slightly. Make sure it fits without bending on any solder joints!
There's more details at the end of the page (Electronics / Schematics) that you might want to check out.
The parts to start with for module #1
Step 2: Fitting everything inside the frame ("I know the pieces fit...")
A picture is worth a thousand words. So here's a few thousand words for you.
Double check the diffusers fit nicely
Avoid "elephant foot" (first layer squish) on the diffusers and frames or you may have to scale down the diffusers to make them fit.
IMPORTANT: Watch orientation of the frame (center-holes towards you) _AND_ data signal-direction!
Yellow to DataIn - this will later be connected to the Arduino (D6). Adding a resistor is recommended (I've used 330ohms). Only this connection will get a resistor, none of the following.
Orange wire connected to the end of the strip (DataOut). This will go to DataIn on the center led strip, see later steps.
This is where we will connect some power wires to the led strip.
Everything cleaned up and done for module #1.
Covers put on to prevent me from accidentally taking it apart while building the other parts...
Double check you have everything in place as shown on the pictures. Putting in the led strips in the wrong direction won't work. Working with the frame upside down (center-holes away from you) won't work.
This one is pretty easy. Do the same as for module #1 but only connect a single wire to DataIn. No resistor, no wire to DataOut. Power wires are connected in the same way as seen in module #1.
Module #2. Only one wire to DataIn which will connect to DataOut of the center strip, see later steps.
This one looks so easy. And it is. But there will be a lot of connections to this led strip, so double check everything!
The parts to start with
Watch the orientation of the center part. The led strip is put in on the left side, starting with DataIn from the top.
Cables coming from module #1 and connected to the center led strip. Module #1 DataOut (orange) is connected to DataIn, power connected to the same side.
Remember the connections:
Yellow: Module #1, DataIn, Arduino D6
Orange: Module #1, DataOut, Center DataIn
Black is always ground, red always +5V
After doing these connections connect Module #2 DataIn (orange) to DataOut of the center strip. You also need some wires for the power connections here:
Power from module #1 goes to upper side of center strip. Power from module #2 is connected to the lower end, together with a USB wire for powering the device later and a pair of ground/+5v (middle ones in the picture) which will be used for powering the arduino and rtc.
This is what you need to end up with. Only three wires left: DataIn from module #1 (yellow) and +5v/ground for the electronics. Be careful not pulling the usb wire (black wire at the bottom).
I recommend testing everything at this point. All you need is an Arduino, connect +5v/gnd to it, yellow wire to D6 and run the Test-INO (thing files).
It'll display 0-9 on all 4 digits and fill all leds starting from 0. If this doesn't look like in the video you might want to check your connections before proceeding.
Put on the case/frame-part and route wires as shown
Connect two Button switches to some wires. One of them will connect D3 to ground, the other one D4.
Button A: D3 + GND, Button B: D4 + GND
I broke off the unused pins. Slightly bend the wires back so you can hold the button in place and put in the little bar holding it.
Now you can do the following connections:
DataIn (yellow) from module #1 -> Arduino D6
+5V -> VCC -> Add cable for RTC!
GND -> GND -> Add cable for RTC!
SDA -> A4 (gray)
SCL -> A5 (white)
What it looks like after the cabling has been done. Route the usb wire as shown so accidentally pulling it won't rip it from the center led strip!
Cable covers and (optional) feet mounted
The provided sketch limits power usage to 5v/1.5A (2 modules, 750mA per module).
As long as you don't change anything and are using a wire gauge between AWG24-AWG20 and common usb cables that's absolutely fine. Wires in the pictures are AWG22 (0,33mm²).
But if you intend to remove the limitation be aware of possible modifications you might have to make!
This should be plenty of power to get some bright leds for anything but extreme daylight/sunlight situations. If you're going to increase the brightness be aware of the power drawn by those tiny leds!
42 (5 unused, 21 per digit) leds equals up to 5v/2.5A. That's maximum of what I'd use AWG 24 for. But remember the power connection and make sure you're using some really thick wires if using two or three modules at full brightness/white.
The XT version has 3 modules. If I didn't just count wrong that means:
12:08:08 (in am/pm) would be the time showing the most segments. Including the dots of two center modules (2x 4) this would be 107 leds lit. At full brightness you're facing a power consumption of up to 6.4A! At 5 volts that's about the power it takes your 3d printer to melt plastic. That's where I would start using something like AWG 20/AWG18...
13.09.2018 - Update to v4
- Added more comments to the sketch
- Added support for a photoresistor/auto brightness
Photoresistor / Automatic brightness corrections
Setting variable "brightnessAuto" to "1" will enable corrections by reading a photoresistor connected to A1.
Example for using a photoresistor: https://playground.arduino.cc/Learning/PhotoResistor
I was using a GL5516 so you might have to change the values inside readLDR(); accordingly to the one you're using.
26.07.2018 - Update to v3
Now only a single sketch for this and the XT-version with 3 modules
Switch between 12/24h format
Toggle color modes per digit/per single led
Selected brightness, 12/24 format, colors and color mode are now saved to EEPROM
As before basic usage is:
Button A: Toggle brightness
Button B: Toggle colors (5 different palettes pre-configured)
Button A + B : Enter setup
While in setup:
Button A: Increase hour/minute
Button B: Proceed to next value/end setup
(in 12h mode the upper center dot will light when it's am, both will light if it's pm)
New in v3:
Button A: Keep pressed to switch between coloring single digits/single leds.
Button B: Keep pressed to switch between 12h/24h format
Single version for basic/XT:
When using this with 3 modules just change "#DEFINE MODULES" in the sketch accordingly. Total led count will be calculated, just change modules from 2 to 3.
If you'd like to add own colors I've commented in the sketch how to set a custom color and put in an example (void colorOverlay) which shows how to modify the already drawn pixels without having to mess with other parts of the code.
24h mode and per pixel/led coloring enabled (XT, 3 modules)
Example of an GL5516 LDR. Red: +5V, Orange: A1, 10k resistor, Black: Ground
As mentioned earlier I strongly suggest printing these parts with an extrusion width of 0.6mm. To give you an example of why I suggest this, have a look at these pictures.
Basic slicer settings (Simplify3D). Extrusion width set to 0.60mm
Speed at 65mm/s, outlines and solid infill at 100%
Other settings were:
- no infill (just print the bottom 3-5 layers solid, the frame walls don't need support/infill.
- 1 outline/perimeter
- Layer height: 0.30mm
Your slicer may use different names for some of these options, maybe "line width" instead of "extrusion width".
You can open the pictures in a new tab to see them full size
Using these settings I get this result:
Estimated print time: 01:18
Due to different reasons (acceleration settings and so on) that's usually a rough estimation of the print time. Using an Prusa MK2S at this settings with acceleration set between 1500-2000 the real print time is about 90 minutes.
0.3 layers + 0.6 extrusion width + 65mm/s are pretty demanding to the extruder. So I don't recommend starting with these settings, maybe use a layer height of 0.25 first or lower speed to 50mm/s to see how your printer keeps up.
The point is this: If you're using a extrusion width of 0.4mm and common print settings with maybe a bit of infill, this may happen:
Same slicer settings with the exception of extrusion width set to 0.4mm and some infill
Estimated print time increased from 01:18 to 02:01. That's quite a lot. If you have a closer look at the picture you will notice there's infill between all those walls. This takes much time while printing. Because if you had this printed at 0.6mm the printer only had to do the walls. They would have touched each other and done.
Additionally these 0.4mm walls with little infill are much weaker than solid 1.2mm walls printed from 2x 0.6mm lines, especially in PLA.
As far as I can tell nozzles with a diameter of 0.4mm are very common. Remember that you can use these with an extrusion width between 0.4mm - 0.6mm without problems.
Especially solid infill layers can be printed much faster:
Slicer told to stop at 1mm print height, extrusion width 0.4mm, 36 minutes estimated
Same settings, extrusion width 0.6mm, 24 minutes estimated
While I know a slicers settings window can be pretty overwhelming at times, especially if you're new to 3d printing, I encourage you to find out what all those things do mean. Using optimal settings for each print might sound tedious, but it can save you a lot of time.
This thing for example can be printed completely in about 7-9 hours on a Prusa MK2S at moderate settings of 60-65mm/s. Including time to swap material for the diffusers. ;)
As the wiring can be a bit confusing at times I'll try to help here somewhat. Never been using Fritzing before, but uploaded a file. This is what it looks like:
Wire colors are the same as in the pictures.
The led signal goes like this:
Yellow: Arduino D6 -> Resistor -> Module #1 Data In
Orange(1): Module #1 Data Out -> Center Module Data In
Orange(2): Center Module Data Out -> Module #2 Data In
Gray: SDA/Data -> Arduino A4
White: SCL/Clock -> Arduino A5
Brown: ButtonA -> Arduino D3
Purple: ButtonB -> Arduino D4
Here's the way the led strips go (blue) and how they are connected to each other (green):
Remember: You can open these pictures in a new tab for higher resolution
Here's two more pictures. The first one shows the led data lines only and how they run through all modules:
And this is how I added power to everything:
Power comes in from +5v/gnd (power source/usb wall plug) and connects to the lower end of the led strip inside the center module. Module #2 is powered from the same connections on the led strip.
From the top of the led strip there's one pair +5v/gnd powering Module #1 and another one for the Arduino/RTC.
When using a stable +5v power supply you can power the Arduino using the +5v pin. Using the vin/raw is meant for 7-12v and will use the onboard power regulator. But connecting the leds to the +5v pin then may draw more power than the onboard regulator can deliver. So I suggest using a good +5v supply and just feed the Arduino from that.... :)