Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: YoungGenius on March 11, 2010, 05:44:57 PM

Title: Turn a Motor into a Servo?
Post by: YoungGenius on March 11, 2010, 05:44:57 PM
I already have two regular dc motors, but I want to use them in the 50 dollar robot project. Do i really need to use servos? If so is there a way I can change my motors into servos?

By the way, my motors are quite strong (ones from a old powerwheels) and they come with a gearboc, in case if it helps. Thanks.
Title: Re: Turn a Motor into a Servo?
Post by: Razor Concepts on March 11, 2010, 05:48:36 PM
You will need to use motor drivers and change the code over to accommodate them, you can't change them into servos.
Title: Re: Turn a Motor into a Servo?
Post by: YoungGenius on March 11, 2010, 05:59:08 PM
What does the motor driver do?
Title: Re: Turn a Motor into a Servo?
Post by: little-c on March 12, 2010, 01:53:03 AM
stops the higher voltage needed for the motors from frying the micro, and allows you to switch the direcction of the current.
Title: Re: Turn a Motor into a Servo?
Post by: YoungGenius on March 13, 2010, 09:37:14 AM
Where can I get it and is there a tutorial on how to install it?
Title: Re: Turn a Motor into a Servo?
Post by: chelmi on March 13, 2010, 10:00:31 AM
So far all the question you asked in this thread are answered in the tutorials.

http://www.societyofrobots.com/member_tutorials/ (http://www.societyofrobots.com/member_tutorials/)
Title: Re: Turn a Motor into a Servo?
Post by: YoungGenius on March 14, 2010, 08:17:20 AM
What about this - http://www.societyofrobots.com/schematics_h-bridgedes.shtml (http://www.societyofrobots.com/schematics_h-bridgedes.shtml)
Title: Re: Turn a Motor into a Servo?
Post by: little-c on March 14, 2010, 08:41:06 AM
perfectly fine, I recomend using a L298, solarbotics has one, its cheeper than buying individual mosfets, and saves soldering. basicly its the H bridge without diodes.



Title: Re: Turn a Motor into a Servo?
Post by: Razor Concepts on March 14, 2010, 09:21:08 AM
I prefer the sn754410 over the l298, the sn75 has diodes built in (unless you need the extra amp of current with the l298
Title: Re: Turn a Motor into a Servo?
Post by: YoungGenius on March 14, 2010, 01:28:04 PM
I'm reading some of the tuturials and now I'm confused. So i need to get a motor driver for each motor and just one for both of them. And is the motor controller the microcontroller as well or what? I just don't get it.
Title: Re: Turn a Motor into a Servo?
Post by: waltr on March 14, 2010, 01:51:46 PM
I'm reading some of the tuturials and now I'm confused. So i need to get a motor driver for each motor and just one for both of them. And is the motor controller the microcontroller as well or what? I just don't get it.

Depends on which Motor driver you use. Many driver chips have dual H-bridge circuits so they can drive two motors, others have only one H-bridge so you would one for each motor. The L298 that is written about in the SoR tutorials is a Dual H-bridge so only one needed for two motors.
See the second circuit schematic here:http://www.societyofrobots.com/member_tutorials/node/62 and note that there are two motors connected.

When a driver chip is interfaced to a microprocessor then the code in the processor becomes the motor controller. The motor controller part of the code (there can be other code for sensors, mapping and other bot behavior) sets output pins on the processor to 'control' the motor driver. The common 'controls' are motor on/off, motor direction and PWM for motor speed.

Title: Re: Turn a Motor into a Servo?
Post by: YoungGenius on March 14, 2010, 02:25:59 PM
So say I was to buy the L298 - http://www.robotshop.ca/solarbotics-l298-motor-driver-kit-2.html (http://www.robotshop.ca/solarbotics-l298-motor-driver-kit-2.html)
What would I need to do to the motors and the microcontroller?

I'm really, really sorry for the over excessive use of questions, it's just that this is my first robot I'm building and I'm an idiot so i really don't know anything.
Title: Re: Turn a Motor into a Servo?
Post by: little-c on March 14, 2010, 03:21:18 PM
well, solder it together, but thats not too complicated.

read http://www.robotshop.ca/PDF/kit-motor-controller-l298-solarbotics.pdf (http://www.robotshop.ca/PDF/kit-motor-controller-l298-solarbotics.pdf)

its a good eplanation of a motor driver, much better than most data sheets.

Title: Re: Turn a Motor into a Servo?
Post by: waltr on March 14, 2010, 03:35:49 PM
Look at the build instructions for the Solarbotics motor driver board, there is a logic chart on the bottom of the last page. With this chart and the link I posted earlier you could just use the LDR's to control the motor driver. This could be a good start for you as it is fairly simple.

As you are ready to learn more add a microcontroller board like the Axon or one of the others.
And keep reading.
Title: Re: Turn a Motor into a Servo?
Post by: billhowl on March 19, 2010, 09:38:06 PM
Read this document on Hobby Servo Fundamentals to learn about Servo drive
Title: Re: Turn a Motor into a Servo?
Post by: Ro-Bot-X on March 19, 2010, 09:51:10 PM
Here is a way:
http://www.lynxmotion.com/images/html/ht01.htm (http://www.lynxmotion.com/images/html/ht01.htm)
Title: Re: Turn a Motor into a Servo?
Post by: Admin on May 11, 2010, 05:38:49 AM
My stance on the subject :P

http://www.societyofrobots.com/robot_faq.shtml#servo_vs_motor (http://www.societyofrobots.com/robot_faq.shtml#servo_vs_motor)
Title: Re: Turn a Motor into a Servo?
Post by: Actives on May 16, 2010, 02:24:20 AM
you need at least recommended 1:10 reduction gearbox with potentiometer measure at output send analog signal to micro-controller such as arduino and PID feedback control loop.