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:
Things:
Tools:
These where the tools i used to make this project.
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
2. Soldering the arduino on the PCB
3. Soldering the amplifier on the PCB
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.
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);
}
}