Driving a servo motor

Discussion in 'General Electronics Chat' started by Preety, Apr 14, 2014.

  1. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    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!!
     
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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...
     
    Preety likes this.
  3. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    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.
     
  4. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    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: Apr 14, 2014
  5. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,383
    495
    I would get servo instruction/datasheet.
     
  6. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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: Apr 14, 2014
  7. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,776
    1,103
    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.
     
  8. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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.
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    Yes, I realized my error mixing up servo's and main motor, I corrected it after the fact.
    Max.
     
  10. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    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: Apr 14, 2014
  11. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.
     
    shortbus likes this.
  12. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    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.
     
  13. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,509
    2,369
    3 RC wire servo's come in analogue or digital, what version do you have?
    Max.
     
  14. BobTPH

    Active Member

    Jun 5, 2013
    782
    114
    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
     
  15. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    I am having the analogue version.
     
  16. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    ... Did read the link I gave you in post #6? It explains all this...
     
  17. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    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.
     
  18. Preety

    Thread Starter Member

    Apr 14, 2014
    41
    0
    Yes I did read the tutorial and I cross checked everything I connected on the circuit board.
     
  19. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
    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?
     
  20. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    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.
     
Loading...