Processor source/sink current vs output voltage vs temperature - Page 1
Forum section: electronics / projects

author: daqq
author_rank: Super Contributor
timestamp: January 31, 2014, 01:30:30 pm
content: Hi guys,I'm thinking of powering a simple sensor directly from a GPIO of a processor. It's a simple setup, basically a special resistive sensor with a resistor in series that creates a resistive divider, the middle of which gives the output value. The max current of the setup at 3.3V would be around 0.5-1mA. The purpose would be to be able to turn it on and off without any external components.In this datasheet (http://www.st.com/st-web-ui/static/active/en/resource/technical/document/datasheet/DM00077036.pdf) of an STM32F4xx processor, on page 133/134 I can see the GPIO electrical characteristics, but I can't see any Pin sink/source current vs pin output voltage plot. The table specifies, that at 8mA, I will get less than 0.4V whilst sinking to the ground and more than Vcc-0.4V while sourcing.My question:Is there any way to determine/reasonably assume the voltage on the pin, aside from actually measuring it, @ 1mA sink/source, @3.3V main voltage, for the whole temperature range?If the difference on the voltage on the pin vs Vcc/GND would be less than, say, 50mV, it would be good enough. More than that would be a problem. I know I could determine the ratio by measuring the actual voltage on the pin, but there's a good reason I'd like to avoid this. I know I'll suffer some losses of accuracy due to the uncertainty, but it's a rough measurement, so, +/-50mV on the resistive divider excitation is good enough.As it is an undocumented/unguaranteed parameter, I hope I won't have to use it, but it would be nice to know that there's some documentation/graph to this - Atmel has one for this parameter.Thanks,David

author: dannyf
author_rank: Super Contributor
timestamp: January 31, 2014, 02:58:10 pm
content: QuoteFor that, I wouldn't waste any brain cells.Generally, the output resistance is believed to be 20 - 50ohm (20-25ma drive pins) - highly generalized and definitely wrong for any specific chip/pin. You can estimate that by looking at the incremental voltage droop from one drive current to another.If your sensor draws so much current from the pin that requires you to go in for better estimates, you should think about other solutions, like a pnp / p-channel as the real switch.

author: daqq
author_rank: Super Contributor
timestamp: January 31, 2014, 03:05:08 pm
content: I actually just measured it (turns out an office away has a devkit for a STM32F407 processor, lucky break)! The measurement was: Put 1 high, 2 low, slap a resistor between them, measure!The voltage difference for 0.9mA, @3V Vcc, R=3k3 was:High vs VCC - 24mVLow vs GND - 25mVThe voltage difference for 60uA, @3V Vcc, R=51k was:High vs VCC - 7mVLow vs GND - 1mVA bit of non-symmetry going on there, but looks good enough. I'm concerned though for the rest of the temperature range. What behaviour is assumed?

author: dannyf
author_rank: Super Contributor
timestamp: January 31, 2014, 03:20:02 pm
content: So your output (high) voltage drooped 24mv - 7mv = 14mv when the output current increased 0.9ma -> 15ohm? on the high side and 26ohm on the low side.Your data suggests a 1v droop from 8ma - 20ma -> 80ohm? (granted, that's it a max vs. typical calculation).QuoteYeah. That can be sometimes incredibly important. We discussed that in one of my threads where we talked about a mcu-based millieohm meter and one of the guys asked why we wanted to drive the unknown resistor via ac (one pin sources the current and another pin sinks, and vice versa) - that asymmetry is precisely the reason.

author: daqq
author_rank: Super Contributor
timestamp: January 31, 2014, 03:27:11 pm
content: On the high side there's a 24mV vs VCC, so 24mV/0.9mA = 26 Ohm, @0.9mA, @60uA it has a voltage drop of 7mV so it's somewhere around 116 Ohm. Some nonlinearity is there as well.

author: dannyf
author_rank: Super Contributor
timestamp: January 31, 2014, 03:39:10 pm
content: What matters here is the dynamic resistance: dv/di. not v/i.