Pin Voltage Drop Under Load

Arduino Uno

Used my o-scope to measure voltage across a load carrying 28 mA. Output was 50% duty cycle PWM. With no load of course the PWM square waves were at 5v peak. With the 28 mA load on the pin the voltage across the load from pin to ground was 3.2v. Obviously the Atmega is dropping pin output voltage internally under load. Is there any table or graph on the Atmega datasheet that shows the expected pin output voltage vs current the pin is sourcing?

Thanks

The safe operating range for a 328 pin is 20ma. Try limiting the current to 20ma, what do you see?

dykesc: Is there any table or graph on the Atmega datasheet that shows the expected pin output voltage vs current the pin is sourcing?

Figure 31-355.ATmega328P: I/O Pin Output Voltage vs. Source Current (VCC = 5V)

Its possible that the 28mA load current on the pin is within safe operating limits. The 20mA limitation is for steady state. However, for 50% PWM at ???Hz, this is not steady state, so I think the absolute maximum limitation of 40mA on the pin would apply. At 50% PWM, the average current is 14mA. For this load, as long as the PWM duty cycle <= 71%, the average current will be within 20mA.

With the 28 mA load on the pin the voltage across the load from pin to ground was 3.2v.

Its possible that the 28mA load current on the pin is within safe operating limits.

The safe value is 20ma for a pin.
Running it at higher currents you are stressing the controller.

We need to ask how they got to 28ma in the first place?

The graph shows the safe ranges for varying loads.
The OP is complaining about the low voltage they are reading.

The only thing for sure is, it’s functioning in a region between the “maximum operational conditions” and the “Absolute Maximum Ratings”. I see now that this is a stress rating only. None of the graphs are relevant. I’m sure, over time, reliability of the pin is degraded.

voltage across the load from pin to ground was 3.2v

None of the graphs are relevant.

We could however, make a educated guess and extrapolate that 3.2v would be reasonable for a current of 28ma.

The data sheet has no "maximum operating conditions" The 20mA that people take to mean this is a misreading of the data sheet.

Twenty mA is the current drawn by the pin when all the pin parameters are measured, things like mimimum high voltage. if you exceed this then those parameters are not guaranteed to be true.

That is all it means.

The 40 mA stress rating is when damage starts to occour although this damage is not always immediately apparent.

Mike, you must get weary of educating re-educating us all. Thanks.

Just to be clear, 20 ma is OK. 40 ma is bad. Anything in between may be stressing the controller, is this correct?

The data sheet has no "maximum operating conditions"

I'm not sure what you mean by this. The graphs and tables have min/typ/max specifications, where the operating range is min to max, and the "maximum operating conditions" would be the max values or the last data point on any graph.

You won't find the phrase "maximum operating conditions" in the datasheet, but this is meaning I was trying to express.

The graphs and tables have min/typ/max specifications,

No they don't.

take for example: Figure 29-144.ATmega328P: Idle Supply Current vs. Low Frequency (0.1-1.0 MHz)

The only reason why they stop at 0.1MHz is that they can't be bothered going any lower.

In Figure 29-145.ATmega328P: Idle Supply Current vs. Frequency (1-20 MHz) The reason they stop at 20MHz is that is what the spec says is the maximum value to use.