Go Down

Topic: feasibility question: turning dc motor to servo? (Read 4 times) previous topic - next topic


There's nothing stopping you from putting a feedback loop on your motor control, and it would solve this problem completely.

Essentially, rather than switch the motor on to move it and switching it off when it reaches the required position, you would specify the desired motor position and continually compare the current position with the desired position and apply power to the motor to move it to the desired position. You could hard-code this feedback quite easily using a simple proportional algorithm, but if you have moving assemblies involved with inertia to deal with then a PID control algorithm would be ideal since it would take care of all of that for you. There is already a PID library for the Arduino. The error signal would be the difference between desired and actual position and the output would be PWM duty cycle and direction.
I only provide help via the forum - please do not contact me for private consultancy.


You probably could use the internals of a small servo to drive the L298 for your motors. below is a search for "monster servo". If your motors have to hold a load, you probably need to use motors with worm gears.

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)


Thank you all! I Attach my design and you could see pots beside the neck and on top of head motor. I'm thinking may be good idea to double pot per motor, then feed each pair to a filter and get rid of error, then try a PID (don't have skills for).
I'd study the search, sure I must know in detail the internals of servo and hope it ends to learn to hold the load with dc motor.

There's nothing stopping you from putting a feedback loop on your motor control

Well, unfortunately what is stopping me is lack of skills in control theory: I've not done the homework, not finished a single control theory book (but have chosen what to read, it has matlab simulations to pass to hopefully couple theoretical understanding with some intuition). I'd give a try to the PID lib you kindly suggested but hardly imagine that in this concept any good result comes without sound theoretical background and gained intuition in putting them to work.

I want to create a friction device but have nothing to start from other than my own idea. I learned that better to find examples of others, before realizing own idea, so not to reinvent the wheel. I don't know any similar project or what to google for. If you got something, please kindly leave me some links.

I have a small experience in feedback: I used an IR-range finder sensor and programmed it so that:
1. servo on which the sensor is installed, turns right all the time until detecting an object
2. when detected, servo turns to left edge of object until losing it, back to 1.
The result was not bad: robot could follow the object by edge.
I think with pots on the neck I'd have the same story: motor turns toward set point and sure won't stay on it but pass it over, then returns. The error of pot will make problems I think.


ironbot, do you have some kind of continuously-rotating pots? Most have somewhat less than 360° of rotation before they hit an internal stop. If you are gearing your motor to your pot with a 1:2 ratio, your motor will not be able to move more than 180° before it hits the stop in the pot.


Rotary encoders would allow a full 360°with the added bonus of a digital output.  Although exactly type depends on how much you are willing to spend.  There rotary encoders specifically designed for use with motors but expect to pay between $30 to over $100 (at least for low volume orders) a piece.  There are others intended for much lighter duty, like input knobs those can be less than a $1.00.  Here's some of the selection avaialble at from one major supplier.

Go Up