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 between power and ground of 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.
No, you don't need a resistor between the positive side of the potentiometer and the power, assuming that it's the same voltage level as the arduino runs on.
But, taking your circuits litterally, note that you do need a ground connection between the battery/potentiometer and the arduino.
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.
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.
No, the wiper pin is the part of the pot which "sees" a different resistance based on its position. There will always be the max resistance between power and ground pins on the potentiometer.