Driving a servo motor

Thread Starter

Preety

Joined Apr 14, 2014
41
Hello! I am currently doing my project and in part of it I need to drive a three wire servo motor with an mbed processor. However, I suppose the processor output is too low to generate the appropriate PWM for driving the motor. What is the best method to interface the processor and the motor so as to increase the voltage with minimum noise? Are there any external resistors and capacitors which may be required? Grateful if anyone can please help me in this probably with a circuit diagram. for info the processor output is around 3V but the pulse of the motor is not given in the datasheet which further complicates it. Help please!!
 

tshuck

Joined Oct 18, 2012
3,534
The 3V output is probably enough for the servo controller to understand, assuming this is a hobby servo.

Try it, then decide if something more is needed...
 

Thread Starter

Preety

Joined Apr 14, 2014
41
Hi. I had initially tried the servo to be driven directly from the processor but no response. I am only given the data that the supply voltage of the motor is between 4.8-6V. I assume that the pulse must be lower but not knowing the exact value is bad. I can try using a BJT amplifier but I do not know how to wire it for a three wire servo motor and what will be the additional external components required. I presume it must be something simple but unfortunately I am not very familiar with electronics circuitry.
 

MaxHeadRoom

Joined Jul 18, 2013
28,698
If this is a 3 wire servo motor as in RC control, you need a ESC Electronic Servo Controller which you can pick up on ebay for a few $.
All three windings are switched in sequence.
These usually use very high current for a short period, as the motor gets very hot.
Do you have anything on the motor?
Getting my servo's and main motors mixed up!
Max.
 
Last edited:

tshuck

Joined Oct 18, 2012
3,534
Well, the PWM signal is just a control signal, it isn't meant to supply power. The servo has three pins: power, ground, and the control signal. The PWM signal goes to an onboard controller inside the servo. This takes care of driving the motor.

Here is a tutorial to familiarize yourself with servos. Does your servo look anything like the image on the linked page?
 
Last edited:

Alec_t

Joined Sep 17, 2013
14,332
If your processor supply is 3V and the servo supply is, say, 5V you may (depending on the servo's fussiness) need a single transistor stage as a level-shifter. That will invert the signal from the processor, which will therefore have to invert the logic used for the drive signal. A standard servo expects a 1-2ms positive-going pulse every 20ms or so.
 

tshuck

Joined Oct 18, 2012
3,534
If this is a 3 wire servo motor as in RC control, you need a ESC Electronic Servo Controller which you can pick up on ebay for a few $.
All three windings are switched in sequence.
These usually use very high current for a short period, as the motor gets very hot.
Do you have anything on the motor?
Getting my servo's and main motors mixed up!
Max.
ESC with respect to RC devices usually refers to Electronic Speed Controller, which is used to drive brushless DC motors that so often come on RC models.
 

Thread Starter

Preety

Joined Apr 14, 2014
41
For the time being the motor does not have any load on it. I previously used a similar motor and it worked fine when connected directly to the processor.
 
Last edited:

THE_RB

Joined Feb 11, 2008
5,438
Please use the name "RC servo" not "servo motor". They are totally different things. :)

The 3v micro digital output pin will drive the RC servo pulse pin directly. That pin only needs a low signal voltage and is independent of the RC servo's PSU voltage.

It's still a good practice to put a resistor (330 ohms or so) between the processor output pin and the wiring to the RC servo. That protects the processor's output pin if the wire is shorted or someone plugs the RC servo in backwards etc.
 

Thread Starter

Preety

Joined Apr 14, 2014
41
From what I read, I think that the current from the processor is too low to drive the motor. So I assume I must be requiring a BJT amplifier to amplify the PWM signal. The only thing is that I do not know how to proceed for the wiring of the three wire RC servo.
 

BobTPH

Joined Jun 5, 2013
8,998
From what I read, I think that the current from the processor is too low to drive the motor. So I assume I must be requiring a BJT amplifier to amplify the PWM signal. The only thing is that I do not know how to proceed for the wiring of the three wire RC servo.
You are confusing the power connection with the control signal. You should connect the power and ground connections to a 5V supply, and connect the ground to your uController ground. Then the control input can be contrlled directly by the uController. It does not require any significant current.

Bob
 

Thread Starter

Preety

Joined Apr 14, 2014
41
I am already supplying the rc servo externally with 5V and I connected the control wire to the PWM pin out of the controller. I had tried that with another rc motor and it worked fine. the new motor is slightly higher torque but it does not work at all.
 

tshuck

Joined Oct 18, 2012
3,534
Okay, note you've said RC motor. Is this a motor or a RC servo? :confused:

Have you tried it since? You may have damaged your controller.

Could you post a picture of the.....device?

What are the three colors and what did you connect to what?

What does your PWM signal look like?
 

THE_RB

Joined Feb 11, 2008
5,438
The control signal pin does not have to source any significant current. It can be driven from from any standard microcontroller's digital output pin.

The problem might be that your larger RC servo has a different pinout, from memory i think Hitec and Futaba have different pinouts on their 3pin plugs.

Or it might be a problem with your power supply, servos can run fine from 5v but the 5v supply needs to be able to provide enough current.
 
Top