Problem with servo and Potentiometer

the servo is not working with the potentiometer for some reason, i am using the “Knob” sketch in the arduino library in the file attched you can see my wiring please help many thanks D.J.B

i appreciate the help and have tested the pot with the link you gave me it seems to work perfectley is there a way i can test the servo, what about using a separate power supply? Many thanks :P

what about using a separate power supply?

Why, how are you powering the servo now? (I almost didn’t want to have to ask that question)

i just did some research and i was powering it from the 5v on the arduino board this was not enough i believe and now power it using the VIN pin it still lags a little when i turn the pot fully the servo is like catching up is the best way i could put it, say i turn it left the pot turns a little then stops the turn stops and so on till it reaches the correct position :~

will the VIN produce 12v if using the power supply? or will there be some resistance

You should not be using the Arduino to supply powerto the servo. Use a separate battery pack and don't forget to connect the grounds together.

if i used a battery pack i just connect the + on the battery to (servo)red and - to (servo)black and only have the signal goin to the arduino? hopefully this will sort my problem out :)

No, you have to connect the two grounds together.

i am new and i know this is stupid but i dont understand what you mean :/ the ground of the servo and....

.. the ground of the arduino.

See:- http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

so the ground on the servo goes to ground on the arduino and negative on the battery pack?

Yes that is called a common ground.

thank you :) i am glad you didnt get frustrated with my little knowledge

Yes that is called a common ground.

is the reason it has to still be grounded to the arduino because the negative on the battery is not a GND?

No the reason is that there has to be a path in order for the current to flow to make things work. Look at that diagram in the link I posted.

oh i understand now many thanks :)

i put a battery pack in like you said and i cant seem to get it to work :/ i but it in to the VIN slot and now it doesnt lag when turning the pot??

i have the pot, servo and the negative on the battery all hooked to the arduino GND and the other side of the pot to 5v and the middle pin to analog 0, the servo red wire is connected to the + terminal of the battery and signal to digital 9 but the servo is not working and also have the arduino plugged in with the power supply?

here is a image of my circuit i dont know if i have forgot somethink :confused:

Check if there is no break in that top line you use for ground. On a lot of bread boards that line is split in the middle.

i already thought about that and moved them in to a different track :/ that didnt work do you suggest i get brandnew batteries? and i also tryed: if i have the power supply and the usb in and the red wire for the servo in VIN it works perfect :) but what if i want to make it mobile :/ i need it to work with a battery.