Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Motor that acts like a servo (http://www.chiefdelphi.com/forums/showthread.php?t=54994)

thefro526 25-02-2007 16:21

Motor that acts like a servo
 
How exactly would I make a motor act like a servo in EasyC? I know I would need to use some kind of sensor like a potentiometer or an encoder. Also does anyone know how to wire a potentiometer to a PWM?

-Dustin

Bharat Nain 25-02-2007 16:31

Re: Motor that acts like a servo
 
You would need to use a potentiometer or encoder depending on your use.

A potentiometer can only go so many turns and are good for arms and such.

An encoder is for continuous rotation, like drives.

Hopefully someone else can help you with the wiring.

Kingofl337 25-02-2007 17:44

Re: Motor that acts like a servo
 
Plug a Motor into a PWM Port.
Connect a Potentiometer between 10-100k to a Analog Input.
Wiring doesn't matter as long as the wiper goes to the White Wire (signal)
and you connect power and ground to the other remaining pins.

Then you have to link them mechanically and write in easyC a P.I.D. loop to control the whole deal. Check the White papers in CD Media under P.I.D. .

NeedMoreEngines 25-02-2007 18:02

Re: Motor that acts like a servo
 
yeah we did the same thing and it works SO WELL. it's really awesome.
i remember talking about the programming with the team mentor and you have to use a potentiometer to input the values that you want the motor to move to. i'm pretty sure you can do it with any motor. we did it with a globe first and then a window.


All times are GMT -5. The time now is 04:54.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi