How to position control a dc motor with a pot?

Hi people!

I've been reading A LOT. but still couldn't figure out if it is possible to control a dc motor position using an arduino only, i have a 12V geared dc motor and a 10K slide potentiometer..

what i want to accomplish is that whenever i'll turn the slide all the way up the shaft of the motor will go 180 degrees.

i've heard of someone that made his servo motor a dc one, but i tink he also used another chip to make it work..

i would want to minimize cost and space since this is all i need to be done so i was thinking of this "ardweeny" from solarobotics, which is a very small yet working arduino, do you think it's enough for me?

in the future i would also like to replace the pot with a joystick but fot the same purpose..

is it possible?

Thanks a lot! :)

If I'm understanding you right, you're going to need some kind of feedback from the motor to tell when it's at 180 degrees.

Servos have built in Potentiometers and circuits that allow for feedback, which allows for the precise control of 180 degrees. You could also use an Encoder as shown in the link below, but generally cost more and require more work on the software side.

I typed "dc motor to servo" in Google, 541,000 links. Number one: http://www.truetex.com/servomod.htm

Thanks bob!

it seems like that these encoders are not easy to find, I am not worried about the software side but i do need to cut the cost for this project..

anyway, i believe a simpler solution would be to get a servo, or a dc motor that has the encoder pre-assembled.

but if you know of somewhere which is "hobby-friendly" to buy encoders from,

please let me know..

Thanks again! :)

No problemo :D

Yeah, I'd suggest using a Servo, the precision will be just as good, if not better, and also they're very easy to control in software with the Arduino.

http://www.arduino.cc/en/Reference/Servo http://www.arduino.cc/en/Tutorial/Sweep

The 2nd link shows you how to move the Servo from 0 - 180 degrees. Pretty simple, just write servo.write(180) to set to the 180 degree mark. :)

I haven't used encoders personally, but there's a few tutorials out on how to use them. Just give Google a search for something like "arduino motor encoder" or something similar. :)