Analog input max current with potentiometer

I have a 10kOhm potentiometer connected with mass and vcc on a seperate 3.3V power supply. The wiper pin of the poti goes into one of the analog input pins of the Arduino Due.

Now if I power on ONLY the poti power supply, I measure (depending on poti angle) max approx 38mA going into the analog pin. Is this ok?

If I instead first power on the Arduino and then the poti power supply, I measure nearly 0mA.

Is there a electrical mistake in my setup? Do I need additional resistors? All tutorials directly hook up the poti onto the analog pins without resistor.

It's not okay but normal behaviour. The input protection diodes clamp input voltage not to go higher than Vcc-0.7V, so that Vcc becomes input voltage - 0.7V. This may power the entire board but can cause errors on 16MHz boards.

Put a resistor (about 1k) before the input pin to limit the current to harmless values.

Yes, I did note that an LED connected to another pin starts to turn on without the Arduino itself being powered. Does this behavior damage the board or are the input protection diodes (I didnt know they exist) protecting the board from being damaged?

What is the correct order for powering on the Arduino and several other externally powered sensor devices? When should I connect the Arduino to the PC? Should I upload a program to the Arduino with or without powered on external power supply for the connected sensors?

If you're going to have the pot powered while the Arduino is off in normal operations, you should add external diodes to shunt the voltage to ground. As DrDettrich said, there are internal diode clamps, but those are there to protect against ESD and aren't sized to handle more than a few microamps so don't rely on them.

It is bad practice to power the pot from a different supply than the 3.3volt of the Due.

Two problems if you do.

  1. phantom-powering, as explained.
  2. ratiometric relationship is lost,
    which means that any difference in Due VCC and pot VCC will also influence returned A/D value.

Always power a pot from directly from VCC/GND of the MCU.

1 Like

Ok, phantom powering seems to be the reason. Sooooooo, how do I know if I did damage the Arduino?

I did apply the combination "arduino off" and "poti powered on" only for a short time (some seconds for the mearements) after I did notice that the Arduino seems to draw current since the LEDs on other pins started to light up.

Nobody can guarantee that your controller is healthy, but chances are good that nothing was damaged in your case.

Never separately. :roll_eyes:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.