-->
Page 1 of 1

Current on a GPIO digital input pin

PostPosted: Sun Mar 29, 2020 3:21 pm
by PedanticPete
I've got a GPIO pulled down to a 'common' ground and I'm triggering an interrupt (Rising) from a 10v signal.

I have a 10kohm and 4.7kohm voltage divider so when there is a signal I am getting just over 3 volts on my pin, & this works fine, however, I am curious to know what I should be thinking about regarding the current?

So if I've got my k's and m's right

10v/14.7kohm = .6mA

In the datasheet (OK I'm out of my comfort zone even suggesting I understand that stuff) the I/O section says Imax is 12mA so I'm fine for this one pin, if I have 3 pins all pulled high I'd be at 1.8mA(is this how it works?) still fine, but is this how I should be thinking about it? is the Imax per pin or for the board? I've already killed a 'D1 mini' due to messing up on voltage, want to make sure I don't replicate that later down the line with current ... I think I've answered my question to myself by rewriting the question a number of times ... but I am not quite sure ... lol

Thanks for any clarification on Imax and how cumulative pins work?

Pete

Re: Current on a GPIO digital input pin

PostPosted: Mon Mar 30, 2020 2:10 am
by schufti
on any gpio used as input you don't have to be worried about "current". The current mentioned in the ds is relevant when using the gpio as output. To be absolutely on the safe side voltagewise (surges > 10V) you can use a 3V9 zenerdiode in parallel to the 4k7.

Re: Current on a GPIO digital input pin

PostPosted: Wed Apr 01, 2020 8:06 am
by PedanticPete
Thanks for clarifying the Datasheet info for me schufti, much appreciated

Pete

Re: Current on a GPIO digital input pin

PostPosted: Sun Apr 12, 2020 6:44 am
by eriksl
Configured as input, the GPIO is very high impedance so it will only draw a couple of microAmperes. No need to worry.