Go Down

Topic: Controlling a "brain-less" servo (Read 1 time) previous topic - next topic


Hello to everyone, I have a little doubt, I have one dc motor connected to one shaft and one pot connected to it too, its like a servo, but it isn't a servo, so doesn't have the control electronics, so could someone help me in how I would control it so it as good precision, it as a 7,5KOhm pot, so it would be great to have a 2-3 adc bits precision, but how?
Code: [Select]
This is a pseudo-code of what I have tinkered
read pot using analog in
send signal via pwm to move the motor
if(pot reading=end_position){

It will be mounted in a ratter shaky environment , its for a motorcycle, so I don't know if i could have a good precision.
Any thoughts?  ;)


this might work
if not, still an interesting read to see how they got theirs working.


You would need to make a setup similar to a servo. Read the voltage from the pot and see if it is higher or lower than what is measured when it is in the desired position. Depending on the results, move the motor (using appropriate electrical hardware) in the desired direction until the pot voltage is as desired, then stop moving the motor.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0



I wrote a blog post about making "a diy servo" by using a motor and potentiometer for the arduino a couple of years ago.  This may help you, and has complete code to get you on the right path: http://roamingdrone.wordpress.com/2008/07/24/diy-servo-with-arduino-dc-motor-and-potentiometer/

It shows you how to deal with the analog jitter, etc.



Thank you to both of you  ;)
Gonna read it all, and mount a test jigg, then I will give some news. ;)


Keep in mind that drone's modified servo is still very highly geared down:  it's not possible to get that kind of control out of a "naked" DC motor.

If all you need is 2-3 bits of precision on your position control,  you might do better to use a stepper.  Possibly with a shaft encoder instead of a pot.


Let me try to explain a little better, the motor and the pot are part of the motorbike already, and it as already an controller, but I want to have full control over that system, it is geared to, and only moves about 20-30 degrees but the motor makes a lot of full rotation, so I think it as a very big transmission ratio, thanks again for the help ;)
What I wanted to say about 2-3 bits was that due to the shaky environment of the bike the pot will move a bit I think, so if the adc read's 200 or 202 it doesn't matter, but lets see what code can I roll.

Go Up