Note that the plywood backer board is narrower than the frame opening. This is to leave a gap on each side for the LED wiring. The gap will be hidden by the 2" trim that is installed after the box is assembled.
Route the grooves for the plywood and acrylic sheet in the pine frame. Note that the acrylic groove is routed on all four sides, but the plywood groove is routed on the top and bottom only. To assure alignment, it is best to route the pine before cutting to size.
Now comes the most critical step... installing the LED strips onto the plywood panel. This is critical because the spacing between rows and the alignment of pixels vertically between strips must be precise or your text and numbers will be 'crooked' and look off. Having built a couple of these now, here's the technique that I use that has worked pretty well, given the following info:
Preparing the pixel strips
We now need the 16 strips of 25 pixels each. Cut each strip carefully, trying to cut exactly in the center of the copper pads.
Next, tin each of the copper pads on all 16 strips with a bit of solder.
If you are going to be using JST 3-pin connectors to join your LED strips together, go ahead and solder the connectors onto the end of each strip. Assure you are soldering the red wire to the +5V pad, the green wire to the DI/DO pad and the white wire to the GND pad. Also assure you are using the male and female connectors properly. The standard is that the female connector is used on the DATA IN end of the strip (indicated by the small white arrow on the strip) and the male connectors on the DATA OUT end.
Why use JST connectors?
For one, I'm lazy. These connectors come with pre-tinned ends and saves me the step of tinning a total of 96 wire ends myself.
Next, by adding the JST connectors, I can complete all the soldering and bench test the entire 400-pixel strand before installing on the plywood panel (and then enclosing in the frame). If I made a bad solder joint.. or reversed the wiring... or found I can't connect the strips because I used two female connectors on the same strip, etc., it's much easier to correct before installing. And while rare, it is also possible that a strip could be faulty. Again, easier to swap out and replace before installation than after (trust me on this one!).
If you opt not to use JST connectors, that's fine. Proceed with the strip installation and then wire your strips together with short runs of 22-24 gauge wire.
Installing the pixel strips on the plywood panel
OK... again, careful precision is needed here to get everything aligned. While not absolutely necessary, I highly recommend putting down double-sided tape and then applying the pixel strips. While the pixel strips do have an adhesive backing, this isn't the world's strongest adhesive. Add to the fact that your sticking on painted plywood and that the pixels will generate some heat, and there is a very strong possibility that the strip adhesive will fail at some point, leaving you with a "drooping" strip inside of your frame. And the only way to repair this is to take the entire frame apart. You can hopefully avoid this by using good double-sided tape. My first matrix is over a year old and to-date, no pixels have come loose.
I use 3M 0.4" wide mounting tape. The advantage of this is that 0.4" = 10.16 mm, so I can carefully lay down strips of tape evenly over the lines made earlier for each strip. The tape will then serve as my guide for the actual strips themselves.
Pixel number 1 in the matrix is the first pixel on the lower left corner. This also where our control box and DC power will connect to the LED strip, so we'll start there. Carefully remove both the tape cover and the paper backing on the LED strip. ASSURE THAT THE DATA DIRECTION IS MOVING FROM LEFT-TO-RIGHT on this first strip. Carefully center the first pixel on the first pixel vertical line made earlier and make sure that no bubbles or wrinkles occur. The 13th pixel should center on the center line and the 25th pixel should center on the rightmost vertical line made earlier. Take your time here!
Now move to the second strip, REMEMBERING TO ALTERNATE THE DATA DIRECTION FOR EACH ROW. The second strip data should be pointing from right to left. Basically, the data for the entire matrix needs to 'snake' from pixel 1 on the lower left to pixel 400 on the upper left:
Continue working your way from bottom to top, assuring that the data flow for each row is the proper direction and, if you used JST connectors, that you have the proper male/female connector to join the strips as shown above.
As you lay down each strip, check carefully for horizontal and vertical alignment. Gently pull up and adjust strips as necessary. Again, if the vertical alignment is off, it will be be very visible when the LEDs are used to show numbers and letters.
Once all 16 strips are installed, if you did not use JST connectors, then wire the strips together as shown in the above data flow diagram... +5V to +5V, data out to data in, and GND to GND. If you did use JST connectors, connect all the strips together appropriately.
At the end of the final strip (pixel 400 in the upper right corner), you will need to solder lead wires to the +5V and GND pads on the LED strip (there should NOT be a JST connector here). These will be connected to the power supply to provide power injection to the LED matrix. I'd recommend 20 gauge wire, with each about 14" long (you can always trim to length later).
Once all wiring is completed, I'd highly recommend one final bench test. After the next step, the individual strips will no longer be accessible without disassembling the frame and case. If you are building the dual controller version with WLED, you can go ahead and flash the latest WLED on one D1 Mini and create a temporary breadboard version as I describe in
this post.
Once you are sure all 400 pixels are lighting and responding as expected, you are ready for final frame assembly. Note that if you don't connect the power injection leads during this test, you may observe some color changes and/or flickering due to voltage drop over the 400 pixels. This is OK for the bench test... as you really are just assuring that all 400 pixels are lit. The color drop/flicker will be resolved once the power injection leads are connected.
Final Frame Assembly
Once again... assure that your LED strips are securely attached to the plywood panel and that all solder joints are secure before final assembly. Should something come loose, you will need to disassemble the frame to access the LED strips. And if you countersink and putty over the wood screws, this could be quite a challenge!
But the actual assembly is pretty straightforward. Insert the acrylic sheet in the frame grooves, the plywood into the grooves on the top and bottom frame (assuring it is centered), and glue/screw the four pieces together. Butt joints are used, as the entire front will be covered with mitered trim.
Countersink and putty over the screws if desired and optionally paint the frame in your choice of color. Finally, paint, miter and install the 2" trim, aligning the outside edges of the trim with the outside part of the frame.
Note the small holes drilled in the bottom for the power cord and toggle to switch between the dual controllers. There is also a small hole drilled on the right hand side for the eventual button controls. Your locations may be different (or not needed), but you'll want to determine and drill these prior to final electronic installation. See below for more details.
At this point, you are ready to install the electronics and controls.
Electronics and Controls
If you have a 3D printer or access to one, you can find .stl files for enclosures for the control boxes, clock module and buttons/toggle switches in the
Github repo. But the use of these 3D printed parts is totally optional. If you do not have access to a 3D printer, you will just need to find alternate ways of mounting some of the controls.
Preparing the control board
First, if you haven't done so, prepare the D1 Mini with the firmware. The Arudino sketch and instructions for installation onto the D1 Mini can be found in the
Github repository, and I'll refer you there, as the
repository will always have the latest files and information.
Here's the wiring diagram for the control box and buttons:
(Note that this is for a single controller version - clock/scoreboard only. If you wish to use dual-controllers with WLED, there are some slight modifications to the above. See below for details on a dual-controller installation).
If you'd like step-by-step details for wiring the above, see my other post on creating a
3D Printed LED Clock, as the controller is the same, except this version only uses three buttons instead of 5.
I highly recommend using pin headers for the D1 Mini as opposed to soldering directly to the proto board. While the Arduino sketch supports over-the-air (OTA) updates, in the event that a code update goes sideways, the board ends up in a boot loop, or simply fails, you don't want to have to rebuild or replace the entire control board. By using a pin header, you can simply pop out the D1 Mini and reflash via USB or even replace with a new board.
Configuring for dual-controller (Clock and WLED)
If you wish to have the ability to also take full advantage of the light patterns and effects of WLED in addition the clock/countdown/scoreboard features, you can add a second controller and a basic toggle to switch between controllers.
First, build and configure the WLED controller via the instructions provided in the
Build your own LED light strip controller. However, since the matrix LED only accepts a single signal line, you'll need to take the signal lines (green wires) from each controller that would normally connect to the JST connector and run them each to a SPDT (three-way) toggle switch:
With this configuration, you can set the switch to the right position to send the signal from one controller through to the LED matrix or to the left position to send the signal from the other controller. Placing the toggle in the center position will effectively turn off the matrix by not sending any signal.
The toggle switch can be mounted anywhere on the outside of the frame. If you have a 3D printer (or access to one), a .stl file is provided in the
Github repo for a box that will hold the three buttons and the toggle switch:
Installing the controls in the frame
The above shows my final placement of components on the back side of the frame. The power supply is mounted with 1/4" screws, using spacers to assure that the screws do not protrude thru to the front...
use caution here... you do not want to punch through the front and potentially into a LED strip! All other components are simply hot glued to the back panel.
The power supply is connected directly to both controllers, the JST connector and the power injection leads. In my case, the matrix was going to be mounted high enough on a wall that I ran a sheathed cable to the control box with buttons and toggle switch, but you could optionally attach these controls directly to the outside of the frame itself.
Home Assistant/MQTT Integration
The current clock project supports over 40 MQTT states and over 30 MQTT commands for controlling the clock. Details on how to setup MQTT and optionally integrate into Home Assistant can be found in the
Github wiki.
I was so happy with the first matrix, I've now built a second version to place in the garage. It is unlikely I'll really need a scoreboard and countdown timer in the garage, but the functionality is there if ever needed! And maybe I'll find some automations that can utilize these additional functions (e.g. door open message, countdown timers for auto-lights off or overhead door closures, etc.).
Let me know in the comments if you have any questions or recommendations for improvements. You can also submit issues or PRs via the
Github repo for this project.
Supporting this blog and related YouTube channel
If you'd like to support future content on this blog and the related YouTube channel, or just say thanks for something that helped you out, you can use any of my Amazon links to make a purchase at absolutely no cost to you. Or if you prefer to say thanks directly, you can buy me a one-off cup of coffee at:
hello!
ReplyDeleteI`m Enrique from mexico
ReplyDelete