Small LED Strip Controller With LED Amp and Arduino Nano

11,186

105

18

Intro: Small LED Strip Controller With LED Amp and Arduino Nano

A small LED strip controller made with a LED amplifier and an Arduino Nano. Perfect for making custom lighting patterns and/or control the led strip from your computer. It uses the Mosfet gates from the Amplifier to control the LED strip without putting a load on the Arduino. Because of the design of the amplifier some changes has to be done to its PCB so that it doesn’t fry the Arduino and this means that you have to have some skills in soldering before trying out this project.

This project is inspired by “LED Strip Controller w/ LED Amp + Arduino” made by: ehsmaes. It takes the idea of using a led strip amplifier and an Arduino to control the LED strip, but uses a PCB to make the circuit smaller, and fixes the problems with the amplifier frying the Arduino. Link to instructables:

https://www.instructables.com/id/LED-Strip-Controll...

Step 1: Things You Will Need

Things:

  • Prototyping PCB
  • Arduino Nano
  • LED strip amplifier
  • Some small wires. I use resistor legs
  • shrink tubing

Tools:

These where the tools i used to make this project.

  • Soldering iron
  • Solder
  • Exacto knife
  • Hobby knife
  • Heater of some sort (for the shrink tube)
  • Pliers
  • Tweezers
  • Wire cutter
  • Multimeter. Optional, but makes testing before powering on easy.

Step 2: Making the Circuit

The circuit was built in three steps, photo 1. Modifying the amplifier, Soldering the arduino on the PCB, and Soldering the amplifier on the PCB. In the photo above you can see how the amplifier should be connected when it has been modified, photo 2.

1. Modifying the amplifier

  • Cut the shrink tube of the amplifier, photo 3.
  • Mark where the red wire is connected and desolder both the red and black wire, photo 4.
  • Here comes the hard part. Desolder the IC on the middle of the PCB. A good way to do this is to wedge the exacto knife under the IC and the pressing it up while you heat up the legs of the IC. Be careful not to pull of the pads on the PCB. Sadly i forgot to take a photo of this part but the IC can be seen lying beside the PCB in photo 5.
  • Desolder the two resistors marked in photo 6.
  • Solder the pads marked in photo 7 together.
  • Cut the PCB track marked in photo 8 with the hobby knife like it is shown in photo 8.
  • Solder the power cables back on the board, but solder the black wire on so that it connects both to the original pad and the resistor, like it is shown in photo 9.
  • And the last one. Desolder the LED strip connector, photo 10.

Step 3: Soldering the Arduino and Amplifier on the PCB

2. Soldering the arduino on the PCB

  • The PCB should be cut so that it has one extra row of holes than what is needed for the arduino, photo 1.
  • Solder the arduino down on the board so that the USB is on the opposite side of that extra row, photo 2.

3. Soldering the amplifier on the PCB

  • Place the amplifier on the PCB so that the RGB pads lign up with digital pin 9 on the arduino and solder one wire from the closest pad to the pin. Then solder the other two pads to digital pin 10 and 11, photo 3.
  • The other hard part. Look at photo 4 or this wont make much sense. Solder the output pad to the left to the extra row, YELLOW box. Solder the left leg of the left mosfet to the ground pin of the arduino, RED box. And then solder the right output pad to the Vin pin on the arduino, GREEN box.

Next put the shrink tube on over the arduino, heat it and cut it to cise. remember to cut holes for the reset buttom and the LED's of the arduino, photo 5, 6, 7, 8, 9, 10.

Step 4: Code

The code for this is just the standard fade code for fading a diode but made so that it changes between red, green and blue.

int ledPinB = 10;

int ledPinR = 11;

int ledPinG = 9;

void setup() {

// nothing happens in setup

}

void loop() {

// fade in from min to max in increments of 10 points:

for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinR, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}

// fade out from max to min in increments of 10 points:

for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinR, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}

// fade in from min to max in increments of 10 points:

for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinG, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}

// fade out from max to min in increments of 10 points:

for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinG, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}


// fade in from min to max in increments of 10 points:

for (int fadeValue = 0 ; fadeValue <= 255; fadeValue += 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinB, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}


// fade out from max to min in increments of 10 points:

for (int fadeValue = 255 ; fadeValue >= 0; fadeValue -= 10) {

// sets the value (range from 0 to 255):

analogWrite(ledPinB, fadeValue);

// wait for 30 milliseconds to see the dimming effect

delay(30);

}

}

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge

    18 Discussions

    0
    None
    daniel_asilva

    11 months ago

    Hey. With these changes, have you fixed the problem with the inverted logic from the amplifier as mentioned by ehsmaes? Where 0 is on and 1 is off, or 0 is on and 255 is off? I guess it could be a problem for my existing code ;( I also found this article about led amplifiers that talks about its logic https://perso.aquilenet.fr/~sven337/english/2015/01/19/Tearing-down-a-RGB-LED-strip-amplifier.html
    I’ll be very happy if I can revert the logic back to normal just to not need to change my code.

    0
    None
    SólbjørnOmito321

    Reply 2 years ago

    As we are onþy using 3 of the signal pins from the arduino it should be possible to connect it to the remaining pins :)

    0
    None
    DennisB10

    2 years ago

    In Step 3 Image 4:

    Why do you solder the left output pad to the free row of the PCB? Is it just for stability or did I miss something and it is actually connected to something?

    1 reply
    0
    None
    MattF82

    2 years ago

    Just wondering if this setup is customisable to be used with 2x12v LED Strips by using 2 of the LED amplifiers using the pins 8, 7, 6 to control the second strip, and bridging the power source from UIN to one LED Amp to the second?

    2 replies
    0
    None
    SólbjørnOMattF82

    Reply 2 years ago

    That should be possible yes. I would solder the two amplifiers directly to the Vin source and then a wire from the amplifier to the arduino :)

    0
    None
    MattF82SólbjørnO

    Reply 2 years ago

    Thankyou for your quick reply. i look forward to trying this out when my parts arrive >.<

    0
    None
    qwer1304

    2 years ago

    Hi,

    Why do you think the opamp was frying the Nano?

    Nano's output is connected through a 10K resistor to opamp input.

    Worst case, if 12V is somehow at the input and Nano's output is at 0V the current is (12-0)/10K=1.2mA which very much well within Nano's specs.

    Thx,

    D

    1 reply
    0
    None
    SólbjørnOqwer1304

    Reply 2 years ago

    I am not a 100% shure that it was the opamp that fried the nano but i wasn't prepared to set a -12v source to the max 5v input of the nano even if the calculations say its ok :)

    0
    None
    charleneeshong

    2 years ago

    Hey! I have a slight problem ... the LED amplifier I bought has a slightly different layout than the one you used, and since I'm not familiar enough with circuit design to tell what's doing what, I'm not sure how to make the proper changes to the amplifier to ensure it doesn't blow the Nano. Can you help?

    2 replies
    0
    None
    SólbjørnOcharleneeshong

    Reply 2 years ago

    Sorry for the late
    answer :) I can’t say much from that photo but could you desolder the possitive
    and negative wires and then take two new photos of the top side and bottom side
    of the PCB and tell me what stands on the two IC's that are on there (the name
    of the IC's). If you do that i will see what i can do :)

    0
    None
    reggaeshark

    2 years ago

    How can I make this project wireless...

    By wireless I mean with no power supply...

    Battery powered? Help please

    1 reply
    0
    None
    SólbjørnOreggaeshark

    Reply 2 years ago

    Sorry for the late answer
    :) Powering it from a battery shouldn't be a problem as long as you use a 12V
    battery. It won’t work with a battery with les output voltage and will need a 12v
    regulator capable of at least 5A for at battery with a higher output voltage.
    To connect the battery you just connect the positive power wire (red wire) to
    the positive terminal of the battery and the negative wire (black wire) to the
    negative terminal. Hope this helps :)

    0
    None
    SólbjørnOpremendrak

    Reply 2 years ago

    if you mean to turn on each led individualy that is not possible with this kind of LED strip. You should be able to buy those kinds of LED strips and controllers on ebay though :)