Electron I/O max current

Hi!

The Electron is documented so well, but I can’t figure out what the max current on the different GPIO pins is. (maybe just me. found 25 mA for the Photon on the forums)
I need it to find a suitable transistor to switch 200 mA current on the 3.3V pin and if it is feasible to directly power 5 LEDs with 20 mA.

Thanks in advance for points in the right direction.
Cheers

@bayed, the maximum current that can be supplied by a single GPIO pin is 25ma though I wouldn’t push it that far. Also, the TOTAL current for ALL GPIO pins is 120ma so at best you could do 6 pins at 20ma each.

I’m not clear if the switching requirement for 200ma via the 3.3v pin relates to the 5 LEDs. What 3.3v load are you switching and is it for power or modulation (PWM)? Do you absolutely need 20ma for each LED and what type of LED are they (color)?

1 Like

Hey @peekay123,

thank you, for your reply.

Concerning the LEDs, I look for as much calenda as I can get with white color. (forward voltage around 3.2 V) Im not sure on this one, but it would simplify the design where the current one uses not directly powered LEDs from a mcu). If you advise against this in general, I can go back.

The 200 mA power switch is unrelated to the LEDs. I just want to shutdown all other parts connected to the power pin of the electron, while it is sleeping. I need 1 mA to saturate the transistor I have at hands, so with reasonable max 20 mA, I assume 1 mA for a long time period won’t be an issue.

Cheers

@bayed, for controlling power to other components I suggest using an N-Channel FET like a 2N7002 which can handle 300ma. With the gate pulled down to GND via a 10K ohm resistor, it will be off until you pull the gate HIGH with a GPIO pin. No current draw, no fuss, no muss.

As for the LEDs, since you want these as bright as possible, I would drive them using a FET as well. You can experiment before you do you final design.

2 Likes

Ok @peekay123 , thank you very much. But just in general, using 5 pins @ 20 mA for an extended period of time results in faster wear down or is reasonable?

@bayed, the STM32 specs call for max 25ma per pin and 120ma overall so you are within the spec and will not incur faster wear. Be sure to calculate your current limiting resistor correctly to make sure you don’t exceed your planned current. The package will be hotter of course and your overall current consumption on the Electron will be higher so be sure to plan for that if you are operating on battery only. :wink: