Today I want to show you the board that I created in order to drive 4 RGB LED strips from 16 PWM outputs of the Arduino Mega. It is not the best design as this is my first board and I began without really knowing how to connect the strips in the end 😉 This board connected to the Arduino Mega controlled by the output of the JN5168 will then be the final solution to integrate light in to our nightstands.
I built the design in fritzing so let’s have a look at it:
- J3, J5, J7, J9 are the connectors (male pin headers) for the PWM pins from the Arduino Mega
- J2, J4, J6, J8 are also male pin headers to connect the RGB strips
- J1 ist the input for the external power source (5V in my case) also as male pin headers
- J22 are additional ground pins to connect the ground from the Arduino (I connected three because you never know…)
- Q1 – Q12 are MOSFETs, in my case BUZ11
On the board I put all ground connections to the second PCB side (orange) so the connections are clear.
When I had already started soldering the board I thought about how I wanted to connect the RGB strips in the final setup and I decided to go with commonly available 4 wire RGB strip cable (can be found on ebay) and connect it via screw terminals. I was not able to change the design I already started so I just added another board (in the end I had enough space on the same board) which had four 4-pin headers again directly connected to four 4-output (okay, it’s eight 2-output) screw terminals:
I did not put much effort in making the fritzing pretty so the schematic view is a real mess and in the breadboard view I just used perfboard without any wire connections. So essentially just use the PCB view. It should be obvious. Anyway I would modify the board to make direct connections to the screw terminals if you want to use it. But it is working now and it is my first completely self designed and soldered board J
You can download the fritzing file here: 16PWMIn_4RGBOut
This is the progress with the first working module (I already showed a work in progress version in the previous post):
This is the final board including all terminals and pin headers. I even have space to include the logic level converter (LLC) that I need for the JN5168. This way I can directly connect the grounds all on this board. This is not yet soldered because I ran out of solder wire.
This is the board connected to the Arduino and currently directly from the pin headers to the RGB strips.
I put together a small sketch that activates the colors one after the other on all 4 strips. You can download it here: Arduino_Mega_4_RGB_Strip_Color_Test
This is a video of the Arduino Mega controlling all 4 strips via PWM signals from 16 pins:
Next task is to solder the LLC and reconnect the JN5168. Then I have to prepare the wires to connect from the screw terminals to the RGB strip (needs a little soldering and heat shrink tubing). This will then suffice to control all 4 strips with the same setting (one endpoint) but the final piece will then be to create 4 endpoints on the JN5168 to control the 4 strips independently.