So I am using an arduino uno to control 2 led strips(30 leds each strip) in my headlights, the strips are ws2812b, but i dont have a waterproof case for the arduino so it has to be stored in the car. The data pin wires will then be a meter and a half to reach my arduino, and each wire will have a 220 ohm resistor. Will this cause any issues (because of the length of the wires), and is there any other issues i should look out for. I also heard the uno is only able to process 30 leds max, (is that true even if i just copy the led array onto the other led array)
The usual issue is memory. One led requires 3 bytes. 30 leds equals 90 bytes, times 2 strips equals 180 bytes. From that perspective, you should be OK.
You can easily test by compiling; as long as dynamic memory usage stays below 75%, there usually are no issues.
Can't advice about the length of the wires.
You should(for both strips)
- Put the 220R close to the data-in of the strip
- run a ground wire alongside the data wire all the way back to the Arduino ground
- put a large cap 100uF or 470uF accross the power lines close to the start of the strip
Alternatively you can connect both strips together (data out -> data in) and run a single pair of wires back to the Arduino. If you do this, you should still put a second 220R close to the second strip and still run a ground wire alongside the data wire between the strips.
gotmilk674:
I also heard the uno is only able to process 30 leds max, (is that true even if i just copy the led array onto the other led array)
Ah... the Uno can process hundreds of leds. Did you mean power the leds from the Uno?
If you meant power, then the answer should be none. If you were powering the Uno from USB, then you could run maybe 5~10 leds from its 5V pin. But if you power the Uno with 12V via its Vin pin or the barrel socket, then don't power any leds from the 5V pin, because it is very easy to cause the Uno's regulator to overheat and fail with 12V.
Better to get a 12V-5V DC-DC converter to power the leds and the Uno (via its 5V pin). It should be at least 4A current capability.
Will this cause any issues (because of the length of the wires),
Maybe, a car is a very hostile environment electrically speaking. Long wires not only degrade the signal but also pick up a lot of interference.
You might have to use a differential buffer to beef up the signal.
PaulRB:
- run a ground wire alongside the data wire all the way back to the Arduino ground
Let's make that clearer.
All three wires from Arduino to LED strips must run as a single ribbon using "figure 8" or similar type cable. The power cable must be reasonably heavy in order to avoid voltage drop - heavy speaker cable might be a good choice. A three wire version of "figure 8" might be practical, otherwise the data wire needs to be bonded or lashed to the power pair.
The 5V supply wire connects to the "5V" on the Arduino but as pointed out, the Arduino cannot supply any power. You need a 5 V "buck" regulator to provide power for both Arduino and LED strips at this same point. 60 WS2812 LEDs draw 3.6 Amps at maximum.
You also want to extend the power wires at the LED strips to connect power (and needless to say, ground ) to both ends of each strip.