Chat freely about anything...

User avatar
By CheapB
#5456
martinayotte wrote:
CheapB wrote:I have 20 mini LED currently driven off x 1.5v AA batteries that I would like to be able to turn on and off via WIFI and I wonder If I can drive them directly from GPIO

20 Leds on a single GPIO ?
You will need to add a driver for that, either a plain transistor such as 2N3904 or something like ULN2003/ULN2803.


Thanks, that was my original thinking, but these are small leds, so 20 x 15-20mA = 300-400ma. which is borderline what is possible on an arduino, so that is why I am asking about max safe current on a GPIO.

Thanks!
User avatar
By quantalume
#5459 How low of a voltage will the ESP8266 run at? If you use 2 X AA, then in order to use the full capacity of the batteries, you will need to discharge to < 2 volts. Wouldn't it be better to use 1 X AA and a boost SMPS or 3 X AA and a buck/LDO regulator?
User avatar
By lethe
#5460
CheapB wrote:Thanks, that was my original thinking, but these are small leds, so 20 x 15-20mA = 300-400ma. which is borderline what is possible on an arduino, so that is why I am asking about max safe current on a GPIO.

The Atmega328p datasheet (which applies to most Arduinos) states an absolute maximum DC current of 40mA per I/O pin and 200mA on VCC/GND pins. So if you drive your LEDs directly from a single Arduino, you exceed that pins max. current by a factor of 10! (and the current on VCC/GND pin by a factor of 2)
Depending on the forward voltage of your LEDs, you can put 2 (or maybe 3) of them in series, instead of wiring all in parallel and bring the overall current consumption down to 150-200mA. But even that would exceed the I/O pins max. current, so there's no way around using a transistor.
User avatar
By Sprite_tm
#5468 Small note about your spreadsheet: you can either put batteries in parallel, doubling their capacity, or in series, doubling their voltage. I presume you want to do the latter, due to the ESP not working on 1.5V. If so, you can't assume double the capacity, so you'll be working with only 2500mAh in total.