Main > Driving & Racing Cabinets
Adding Race Leader lights - advice needed
jorgenjl2:
--- Quote from: baritonomarchetto on April 03, 2023, 01:22:51 am ---You were not using the code buttersoft linked you, then, being that tested and working...
--- End quote ---
Correct. Besides a missing bracket at the end (your pages code was fine), the code ran fine but did not turn on the led strip. I quickly realized the digitalwrite I think it was would not work for an led strip and was more for an led. The good news is my method requires no mosfets, special circuits, etc. It also requires no soldering. Obviously there are different use cases though.
baritonomarchetto:
You can bet a microcontroller GPIO is not capable to drive a led strip: it outputs 20-50 mA (depending on the pin). That's why no loads other than small leds are commonly seen in arduino's examples: they absorb 5-20 mA max, depending on the current limiting resistor value used
jorgenjl2:
--- Quote from: baritonomarchetto on April 04, 2023, 02:23:56 am ---You can bet a microcontroller GPIO is not capable to drive a led strip: it outputs 20-50 mA (depending on the pin). That's why no loads other than small leds are commonly seen in arduino's examples: they absorb 5-20 mA max, depending on the current limiting resistor value used
--- End quote ---
It is my understanding that the Arduino gives up to 500ma which in the examples I have seen can run a very small number of leds (<10 even though I saw examples where people ran huge strips through usb and one pin only I don’t think that is recommended at all). However, in my test case so far I have 40 leds running off a 5v3amp power supply. Each led uses about 50ma (or 20ma green plus 20ma red plus 20ma blue = 60ma each led at 255 brightness white) so if my math is right that would be about 2000ma or 2 amps (up to 2.4ma full white) so leaves a little room with 3amps power supply. So far it works great.
PL1:
--- Quote from: baritonomarchetto on April 04, 2023, 02:23:56 am ---You can bet a microcontroller GPIO is not capable to drive a led strip: it outputs 20-50 mA (depending on the pin). That's why no loads other than small leds are commonly seen in arduino's examples: they absorb 5-20 mA max, depending on the current limiting resistor value used
--- End quote ---
I agree that you can't provide operating power to a string of LEDs via GPIO (red and black wires), but you can drive the data line for an addressable LED strip via GPIO. (yellow wire)
- The only downside is that the RasPi may not be able to accurately control the timing for the addressable LEDs and run other software at the same time. For example, Sjaak wrote a skeeball program for RasPi that uses an Arduino to run the addressable LEDs as shown here.
--- Quote from: jorgenjl2 on April 04, 2023, 07:08:44 am ---I saw examples where people ran huge strips through usb and one pin only
--- End quote ---
Sounds like they were using USB, not GPIO pins, for the LED operating voltage and the one pin was the data line for the addressable LEDs.
--- Quote from: jorgenjl2 on April 04, 2023, 07:08:44 am ---if my math is right that would be about 2000ma or 2 amps (up to 2.4ma full white) so leaves a little room with 3amps power supply. So far it works great.
--- End quote ---
Sounds good. :cheers:
Scott
baritonomarchetto:
The 500mA Arduino can provide are out of the 5V pin (after the built-in voltage regulator), not out of a GPIO. As Scott pointed out, you can drive the data line, not operating power. From what you write I argue you are using the 5V pin, but do not forget a load of some hundreds mA will drive the built-in regulator hot.
That regulator is not really intended to drive an external load, but step down the 9-12V one could use to power the arduino.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version