I’ve got a question about esp32. Searched the internet & different datasheets but not a conclusive answer to be found…
What is the max output current on gpio pins?
& what is the total output current on esp32?
In the meaning of each gpio has 1 20ma led connected,
How many gpio (leds) can you turn high at the same moment?
Each GPIO pin is rated at 40mA for a ESP32. It is recommended that a max of 20mA per GPIO pin for best thingies. The developer boards as specked out to having a 3V3 LDO that should supply 250mA. 250mA is the ESP 32's max current draw with every GPIO pin on and every API module in use. I use 330 ohm resisters to drive a single external LED. Seems to workout alright.
The thing is for my project i’ll be: reading out 16 analog inputs with mulitplexer, but for every analog input i’ll be using an output to turn on a led…
If channel 2 has a certain value read out by multiplexer i’ll turn on a led..
but if channel 2,6,7,9 has the same certain analog value, i’ll be needing to turn on 4led’s..
If 10 channels or that analog value i’ll be needing to turn on 10leds..
Have got any suggestions? Needs to be a board not a strip.. & preferable with led heads not smd.. smd would work to but difficult.. purpose is to place strings of fibre optics on ledhead & keep it in place with heatshrink..
if led turns on, fibre’s light up..
firstly by just math and what's been suggested thus far: 250mA max current, ~20mA per led that's a total of 12 LEDs before you get dangerously close to that max. you could also use PWM to drive them and lower the brightness, thus saving some power. but i'm not sure if PWM requires an extra power internally.
lots of solutions:
Use 10 or less LED's and your fine. I know i said 12 before but the ESP has its own LEDs on the board which you can't assume will always be off.
Use the 74HC4051 Multiplexer Chip that can effectively let you reduce GPIO pins used and provides the extra power, so long as you are using your external power and not the ESP32, that would work.
You could also use as suggested: NeoPixels. These are fancy SMD LEDs with the driver chips and accompanying passives all built in to the LED. they are often sold in a strip with double sided tape on the back, and available in different densities, more dense == more LED's per Inch. These LED are fancy in that you only need ONE wire to control a string of them, and a VCC and GND wire. each LED is independently controllable. and the libraries that exist add all kinds of animation complexity IF you need that. and for that as well you MAY need an external power supply.
lastly, you could just use transistors, resistors, LEDs, and an external power supply. but this solution seems like its a bit over-engineered and full of inefficiencies. most likely a " i had the parts on hand" solution.