Thanks to All for replies,
and in particular to "arg001" for you detailed explanation.
I think the error I was making is that when I was reading the data sheets for LED I was assuming the forward current for the LED is the minimum current required to light the LED whereas you seem to be saying that the forward current is the maximum current that the LED can tolerate.
As I am looking to light up to 20 LEDs. I should be picking a resistor in series to the LED which would limit the current flow to approx 2mA per LED and assess whether that gives me the LED brightness that I need. Consequently if I then light 1 LED on each of 20 GPIO pins.,this will give me a power requirement of 40mA which is safely within the Pico's 50 mA limit.
Is my logic now correct?
"ame" suggests using WS 2812 LEDs or similar. To use these LEDs would I not need to provide a separate 5 volt supply to each LED.? If I were to use several individual WS 2812 LEDs on a single GPIO pin how do I specify that I want led nos 1,3,5 & 7 to be lit and led no 2, 4 & 6 to be off? or would all WS 2812 LEDS on the same pin need to be lit or off?
"gmx" mentions using an I2C PMW controller based on PCA9685. Is this something that I would add to a Pico or is this an item that I would use instead of a Pico?
A couple of people have mentioned using a transistor this is something I will have to spend some time to get my around. So far with my Picos all I have done is:
1. use magnetic switches to identify the location of a train on a model railway;
2. use relays to stop the model train in a station and to route the train around different route
3. display information on an LCD display.
By training I am a Chemical Engineer and have only started to to look at Picos since retiring, and with your help I am learning fast.
Many Thanks
Wirralian
and in particular to "arg001" for you detailed explanation.
I think the error I was making is that when I was reading the data sheets for LED I was assuming the forward current for the LED is the minimum current required to light the LED whereas you seem to be saying that the forward current is the maximum current that the LED can tolerate.
As I am looking to light up to 20 LEDs. I should be picking a resistor in series to the LED which would limit the current flow to approx 2mA per LED and assess whether that gives me the LED brightness that I need. Consequently if I then light 1 LED on each of 20 GPIO pins.,this will give me a power requirement of 40mA which is safely within the Pico's 50 mA limit.
Is my logic now correct?
"ame" suggests using WS 2812 LEDs or similar. To use these LEDs would I not need to provide a separate 5 volt supply to each LED.? If I were to use several individual WS 2812 LEDs on a single GPIO pin how do I specify that I want led nos 1,3,5 & 7 to be lit and led no 2, 4 & 6 to be off? or would all WS 2812 LEDS on the same pin need to be lit or off?
"gmx" mentions using an I2C PMW controller based on PCA9685. Is this something that I would add to a Pico or is this an item that I would use instead of a Pico?
A couple of people have mentioned using a transistor this is something I will have to spend some time to get my around. So far with my Picos all I have done is:
1. use magnetic switches to identify the location of a train on a model railway;
2. use relays to stop the model train in a station and to route the train around different route
3. display information on an LCD display.
By training I am a Chemical Engineer and have only started to to look at Picos since retiring, and with your help I am learning fast.
Many Thanks
Wirralian
Statistics: Posted by Wirralian — Fri Dec 20, 2024 7:02 pm