050317_1802_TinkeringTu1.jpg

Tinkering Tuesday – HUEify – PWM to RGB LED strip driver Board

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.

7 thoughts on “Tinkering Tuesday – HUEify – PWM to RGB LED strip driver Board

  1. Nice!
    Depending on your Arduino (looks like a Mega2560) you might also want to omit level conversion by running the Arduino off 3,3V.
    All it takes is removing the (original) 5V regulator from the Arduino and replacing it with a 3,3V regulator. I did that with an Arduino Uno board that is regularly being interfaced with 3,3V logic (you’ll have to watch out for the voltage feed from the USB connector, though. The boards get fed from whichever voltage is higher: USB or regulated barrel jack).

  2. Got it done. The PWM driver board passed its first verification test in conjunction with the carrier board.
    https://www.amazon.de/clouddrive/share/cHpk7cYdtvFvaBf0FRqt0ubb8ASdcXqAVpbhzELHm8S?v=grid&ref_=cd_ph_share_link_copy
    To the left is the carrier board. Most of the space on the carrier board is consumed by the voltage regulator which takes up to 45 Volts of input voltage (if equipped with a suitable capacitor) and has input voltage reverse polarity protection. Also on board: Switches for Reset and entering programming mode of the JN5168.
    To the right is the PWM driver board. The picture shows only one stage having been soldered. Due to the 3.3V control input I decided to have FET drivers on board (LTC1981) to fully open the channel (so as to minimize RDS_on). The FETs are a bit oversized (16A type, STB16NF06L) and logic level compatible. But it is better to have a choice: One may either use the logic level FET or a regular FET with the driver depending on whatever happens to be available.
    Due to a lack of a powerful regulated voltage supply and appropriate load resistors I couldn’t fully test the behaviour (and heat dissipation) under load. My current voltage supply stops at 1.5A and sends the JN5168 into brown out. *g*
    This picture (bonus) is the carrier board with Peter’s firmware in action:
    https://www.amazon.de/clouddrive/share/HvpKbifOt5d4O9v00VGRWrSRn22tuvVMqPnj2SGVzjn?v=grid&ref_=cd_ph_share_link_copy
    I really like the idea of not having to waste all those leftover strips and being able to reuse them. If only Peter published his sources. That would save me a lot of work on the software side.

    1. Wow Daniel. Nice work. Looks a *little bit* more professional than mine 😀
      I am also excitedly waiting for the sources from Peter to finish my build. I want to put everything in place when it’s done because I always have to recable the JN5168 in order to program it.
      Would love to see how you are using your final setup.

  3. Thanks. :)
    I’m very much of a friend of flying cables. But since board manufacture has become dirt cheap I tend to go for more robust setups. That excludes weird errors caused by too many cables 😉
    Without any prejudice (ad follows :) ): The boards were made by aisler.net. Excellent quality, good value for money, no hassle (just uploaded the KiCad file and got three boards of each for ~32€. They provide a Github-like interface for the project with direct-order capability). China (itead, SEEED), of course, is an option, too. But that takes much longer and is a lot more work (conversion to Gerber has to be done by oneself).
    If you’re interested in the boards I may create a Github repo… Drop me a note.

    1. As I am just beginning with this kind of tinkering (the most until now was soldering some cables together or at most 3 components on a board) I am not willing to spend money on ordering PCBs just to see that I forgot something important :-) . That’s how I am currently working. I design in fritzing but while soldering I see that I wasn’t thinking of something and just add it later (that’s why my board looks so messy and has all those additional pin headers to connect to the screw terminals).
      I am also new to most of the things I am working with like transistors, MOSFETs, etc. so I just went with a cheap MOSFET that was recommended as an „old but working standard go to“, the BUZ11 even if it is not the best suited one.
      But I will remember your recommendation on aisler.net if I advance to this stage.
      As I am so new to this I would definitely like to see your schematics and your complete part list to try and understand it and see what I may do better/different in the future.

      1. I’ve just uploaded the schematic.
        And don’t worry. Your description matches the exact process of creating a schematic. :)

        BUZ11: Oldie but goldie. Cheap, widely available and reliable. Pretty low channel resistance when fully conducting. Although the full potential (30A current) can only be unlocked by higher gate voltages (5V gate voltage gives about 8A current and 3.3V gate voltage really tends to give you headaches).

Schreib einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *