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.
Electronic – arduino – Does a potentiometer need a resistor in series between power and ground
arduinovoltage
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.
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.
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.