Electronic – arduino – Does a potentiometer need a resistor in series between power and ground

arduinovoltage

I have a potentiometer I use with a circuit to get data readings. This circuit is connected to an arduino mega 2560. I was wondering if I need a resistor in series with the potentiometer? Attached are two picture of what I mean, sorry if the circuits are a bit rough first time I have used an online schematic maker. I would also like to add that the potentiometer values are likely wrong, it was a generic one a friend gave me. All I know is that it goes from 5 ohm to 10k ohm.

Circuit with 330 ohm resistor
Circuit without 330 ohm resistor

Best Answer

First, a couple of CircuitLab tips. Double-click a component to edit its properties. 'R' = rotate, 'H' = horizontal flip. 'V' = vertical flip. Note that when you use the CircuitLab button on the editor toolbar an editable schematic is saved in your post. That makes it easy for us to copy and edit in our answers. You don't need a CircuitLab account, no screengrabs, no image uploads, no background grid.

The important thing is that your potentiometer circuit shares the same ground as your microcontroller. If you leave out the ground connection then you have an open circuit and no current can flow from the potentiometer to the micro.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Both circuits share a common ground with the microcontroller.

There is a difference between the two circuits.

  • The wiper on Figure 1a can go from 0 V at the bottom to 5 V at the top.
  • The wiper on Figure 1b can go from 0 V at the bottom to 5/4 V (1.25 V) at the top because R1 and R3 form a potential divider with the maximum voltage give by \$ \frac {R3}{R1 + R3} V_2 \$.

If your micro's analog input is 0 to 5 V then (a) uses the full scale (typically 1024 counts on a 10-bit ADC). (b) would give a maximum of 1024/4 = 256 counts for 1.25 V.