# Why am I seeing a voltage drop between arduino pins at 15mA?

I need a voltage divider in my project to give me a source of 1.1V potential across a low-resistance test device. The setup couldn’t be much simpler - I have a pair of digital pins, one set to output HIGH and the other outputting LOW. When there is no path between them, I read a little over 5V. However, when I place a 220ohm and a 47ohm resistor, in series, between them, I expect to read 5V across the pair of them. With around 270ohm of resistance, there should be less than 20mA of current running through them. The Arduino Uno (getting its power via USB in this case) should be more than capable of putting out that much current. In fact, if I drop the resistance down to 38ohm, I see more than 50mA flowing.

So what is the source of the voltage drop? Why am I not still seeing 5V? It’s an issue because as long as I don’t know what’s causing the problem, I can’t be sure that my reference voltage is going to be consistent. If it is behaving strangely, I can’t trust my measurements.

Thanks.

What voltage are you measuring?

What are you seeing if not 5V?

The Arduino I/O pins are not ideal voltage sources. They have some internal resistance. So once the current starts flowing, a pin driving high will have a lower voltage than 5V, and a pin driving low will have a higher voltage than 0V.

I wouldn't repeat the 50mA test again. That will damage your microcontroller over time.

-- The Rugged Circuits Yellowjacket: 802.11 WiFi module with ATmega328P microcontroller, only 1.6" x 1.2", bootloader

The voltage I'm measuring is from pin to pin - from the HIGH pin to the LOW pin. (I have set them as pinMode(OUTPUT).) When there is no path from HIGH to LOW, the voltage difference is 5.02V. With the 265.5ohms of resistors in there, I read a difference of 4.27V. While this is going on, wiring the LOW pin to an analog input pin gives me an input of something like 92, implying that the HIGH pin is at full potential but that the LOW pin is running at .75V relative to ground. When I check the potential difference between ground and the LOW pin, I see a .344V difference. Between HIGH and +5V, I see .373V. In other words, those pins are being pulled away from 0V and 5V.

My gut feeling is that this will be fairly consistent and that I can go ahead and build my voltage divider - with slightly different resistances - and that the effect will be consistent enough that I can rely upon my final product.

I was very careful with the low-resistance test - having it only hooked up long enough to get a reading out of my multimeter.

Thanks

Have a look at this page:- http://www.thebox.myzen.co.uk/Raspberry/Understanding_Outputs.html I wrote it specifically for the Raspberry Pi. That processor allows you to set the output impedance of a pin. On the arduino this impedance is fixed but the rest of it still applies.

The datasheet for the ATmega implies a worst-case output impedance of about 40 ohms from the output FETs - most devices will perform better that this, yours is about 25 ohms per output, each dropping about 0.35V at 15mA. Be thankful the ATmega has such powerful output drivers, most logic outputs are in the hundreds of ohms. A lot of chip area is devoted to these large output FETs in fact, the output margins of the chip are all pads and large FETs.

Someone's done a tear-down of an ATmega88 chip, VERY LARGE JPG here: http://flylogic.net/chippics/atmega88/atmega88_m2_lrg.jpg (The interdigitating structures in the blue outer strip are the output transistors)