I have a new set of 12 volt led strip lights with 300 leds, and wish to power them from a 12v 8.5 amp power supply.
I have the ground and positive outer wires connected to 12v ground and positive. Then I have the green data wire , from the inner wires, connected to pin 3 on my arduino, and also have the white ground wire connected to GND on the arduino.
I read on an older post from 2016, about this and someone said to connect both the ground of the arduino and the 12v power supply ground, together.
How do I do that, by running a wire from the ground of the led strip to the ground, or earth? on the 12v power supply.
I connected the arduino with the USB lead from my pc, and the ground from the arduino to the -V connection where the ground of the outer wire is connected and the leds did not light up. I then moved the ground lead to the earth connection, but still no led lights.
I am using the FASTLED DemoReel100, and I have added a picture of my setup above this post
#define DATA_PIN 3
//#define CLK_PIN 4
#define LED_TYPE WS2811
#define COLOR_ORDER GRB
#define NUM_LEDS 64
CRGB leds[NUM_LEDS];
#define BRIGHTNESS 96
#define FRAMES_PER_SECOND 120
void setup() {
delay(3000); // 3 second delay for recovery
// tell FastLED about the LED strip configuration
FastLED.addLeds<LED_TYPE,DATA_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
//FastLED.addLeds<LED_TYPE,DATA_PIN,CLK_PIN,COLOR_ORDER>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
// set master brightness control
FastLED.setBrightness(BRIGHTNESS);
}
// List of patterns to cycle through. Each is defined as a separate function below.
typedef void (*SimplePatternList[])();
SimplePatternList gPatterns = { rainbow, rainbowWithGlitter, confetti, sinelon, juggle, bpm };
uint8_t gCurrentPatternNumber = 0; // Index number of which pattern is current
uint8_t gHue = 0; // rotating "base color" used by many of the patterns
void loop()
{
// Call the current pattern function once, updating the 'leds' array
gPatterns[gCurrentPatternNumber]();
// send the 'leds' array out to the actual LED strip
FastLED.show();
// insert a delay to keep the framerate modest
FastLED.delay(1000/FRAMES_PER_SECOND);
// do some periodic updates
EVERY_N_MILLISECONDS( 20 ) { gHue++; } // slowly cycle the "base color" through the rainbow
EVERY_N_SECONDS( 10 ) { nextPattern(); } // change patterns periodically
}
#define ARRAY_SIZE(A) (sizeof(A) / sizeof((A)[0]))
void nextPattern()
{
// add one to the current pattern number, and wrap around at the end
gCurrentPatternNumber = (gCurrentPatternNumber + 1) % ARRAY_SIZE( gPatterns);
}
void rainbow()
{
// FastLED's built-in rainbow generator
fill_rainbow( leds, NUM_LEDS, gHue, 7);
}
void rainbowWithGlitter()
{
// built-in FastLED rainbow, plus some random sparkly glitter
rainbow();
addGlitter(80);
}
void addGlitter( fract8 chanceOfGlitter)
{
if( random8() < chanceOfGlitter) {
leds[ random16(NUM_LEDS) ] += CRGB::White;
}
}
void confetti()
{
// random colored speckles that blink in and fade smoothly
fadeToBlackBy( leds, NUM_LEDS, 10);
int pos = random16(NUM_LEDS);
leds[pos] += CHSV( gHue + random8(64), 200, 255);
}
void sinelon()
{
// a colored dot sweeping back and forth, with fading trails
fadeToBlackBy( leds, NUM_LEDS, 20);
int pos = beatsin16( 13, 0, NUM_LEDS-1 );
leds[pos] += CHSV( gHue, 255, 192);
}
void bpm()
{
// colored stripes pulsing at a defined Beats-Per-Minute (BPM)
uint8_t BeatsPerMinute = 62;
CRGBPalette16 palette = PartyColors_p;
uint8_t beat = beatsin8( BeatsPerMinute, 64, 255);
for( int i = 0; i < NUM_LEDS; i++) { //9948
leds[i] = ColorFromPalette(palette, gHue+(i*2), beat-gHue+(i*10));
}
}
void juggle() {
// eight colored dots, weaving in and out of sync with each other
fadeToBlackBy( leds, NUM_LEDS, 20);
byte dothue = 0;
for( int i = 0; i < 8; i++) {
leds[beatsin16( i+7, 0, NUM_LEDS-1 )] |= CHSV(dothue, 200, 255);
dothue += 32;
}
}
I have the white ground wire from the outer wires connected to the -V port on the 12 Volt power supply, and also have a white ground wire from the inner wires connected to the GND on the arduino.
On the green data wire I have a 510 ohm resistor connected to data pin 3.
One other thing I have done is to swap over 2 arduinos, as the one I was using didn't seem to work with lighting up the led strip. The other arduino , which I robbed from another project, was working correctly and does light up the led strip.
The arduino is powered by a 9 Volt 2 Amp power supply.
Do I need to change the resistor for a different value and do I need to connect any other wires etc.
Grumpy_Mike:
For best results connect both ground wires of your strip together and both 5V wires as well if you can. The resistor is fine.
The strip is 12v not 5v, but it won't make any odds.
So I should connect both red wires to the +12v terminal on the power supply, yes, and connect both ground/white wires together.
You can see how they are at the moment from the pic, and it would mean to move one of them to its new position.
Does it matter that , for example, I move the white GND on the arduino to the -V on the power supply.
Change that number to 100 for a "12volt, 300 LED" strip.
Because a 12volt addressable LED strip works in sets of three (can't control each single LED, as with a 5volt strip).
Are you sure you have connected the data wire to the data input (not the output) of the strip.
Leo..
Change that number to 100 for a "12volt, 300 LED" strip.
Because a 12volt addressable LED strip works in sets of three (can't control each single LED, as with a 5volt strip).
Are you sure you have connected the data wire to the data input (not the output) of the strip.
Leo..
I changed the number of leds in the sketch before I uploaded it. It is 64 now because I couldn't save it as the same name with 300 leds.
The green data wire is connected from the input of the strip; where the arrow points towards the leds, to a digital pwm pin 3, via a 510 ohm resistor on the arduino.
There is a male ws2811 type plug, with 3 pins, connected to the input of the female socket which goes to the strip. It is more secure than just plugging in jumper wires.
It seems you don't understand that you only have 100 LED drivers on a 12volt-300LED strip.
That's why you have to set the number to 100, not to 300.
Leo..
Wawa:
It seems you don't understand that you only have 100 LED drivers on a 12volt-300LED strip.
That's why you have to set the number to 100, not to 300.
Leo..
Ah yes , now I understand as I thought you meant 100 leds, and not drivers as per this:
"Change that number to 100 for a "12volt, 300 LED" strip."
Now I have changed it to 100.
What was also a bit confusing, was that the line in the sketch says: #define NUM_LEDS 100. LEDS not Drivers.
Can I ask for a bit more clarification on connecting the 12v power supply ground to the led strip. Is it just a matter of running a wire from the 12 -V terminal to join up with the led strip ground. Both wires are white
avvy66:
What was also a bit confusing, was that the line in the sketch says: #define NUM_LEDS 100. LEDS not Drivers.
Can I ask for a bit more clarification on connecting the 12v power supply ground to the led strip. Is it just a matter of running a wire from the 12 -V terminal to join up with the led strip ground. Both wires are white
12volt addressable strips are a cut-down version of 5volt addressable strips.
The 5volt strips have a driver chip inside each LED, the 12volt strips have chips that drive groups of three LEDs.
So you can't address each LED of a 12volt strip individually.
How do you power the Arduino. USB or 12volt on V-in.
Leo..
I can honestly say that I did not know that about the 12v led strips. As it asks to define the number of leds in the arduino sketch , I say 300, as it it leds it asks for, and not led drivers.
The WS2811 led strip works great with the figure of 100, and I will have to remember that in future.
I power the Arduino by a 9 volt 2 Amp power supply, and the led strip from a 12 volt 8.5 Amp power supply.
Regarding this: The 5volt strips have a driver chip inside each LED, the 12volt strips have chips that drive groups of three LEDs.
So you can't address each LED of a 12volt strip individually.
Would 5volt led strips be better than 12volt ones.
avvy66:
Regarding this: The 5volt strips have a driver chip inside each LED, the 12volt strips have chips that drive groups of three LEDs.
So you can't address each LED of a 12volt strip individually.
Would 5volt led strips be better than 12volt ones.
Correct.
Define "better".
A 12volt addressable LED strip draws 1/3 of the current of a 5volt LED strip (per LED), and 'bigger' 12volt supplies might be cheaper and easier to get. Less current is also easier on the wiring, e.g. if you decorate a house for Christmas. For bigger projects like that, the same colour per three LEDs is not a real problem.
For small-scale things, individual addressable LEDs could be important.
Leo..
I have a 5volt 5meter led strip in another part of the house, with 30 leds/mtr, and for that I have a 5volt 10 Amp power supply from Radio Spares, and for the 12volt 5 meter led strip with 60 leds/mtr, and I have a 12 volt 8.5 Amp power supply, and also from Radio spares.
At the time of buying the 5v 10 amp PSU, I may have over calculated the led strip requirements, and for the 12v 8.5 amp PSU.
Mmm, define "better". Well better as in more economical maybe??? I think not though if they use x3 the current a 12 volt led strip uses.
5volt addressable LED strips could draw 3*20mA = 60mA per LED.
12volt addressable strips have three LEDs in series, so can draw 60mA per three LEDs.
Leo..
Wawa:
5volt addressable LED strips could draw 3*20mA = 60mA per LED.
12volt addressable strips have three LEDs in series, so can draw 60mA per three LEDs.
Leo..
Using those figures,
then my 5v led strip with 150 leds @ 5mtrs ; 60mA x 150 = 9A, so my 10 Amp supply was or is just right with a bit to spare.
The 12v led strip with 100 led drivers @ 5mtrs: 60mA x 100 = 6 Amp, and so my 8.5 Amp supply is ok with a bit to spare.