Shop OBEX P1 Docs P2 Docs Learn Events
Making a servo? — Parallax Forums

Making a servo?

MarkSMarkS Posts: 342
edited 2008-05-25 20:30 in Robotics
I have a project in mind that will require several very powerful servos, 12, actually. I'm looking at AmpFlow's C40-300 or S28-400 for the motor. The mechanics are rather easy, but the electronics aren't. I'm not too sure what the software in the microcontroller does or how it is written.

These motors will be too much for the HB-25 motor controller, so I'll need to make my own H-bridge. What I'm more confused about is how to make the actual controller. I was thinking about using a Propeller for each servo, along with an ADC for potentiometer readings. The software and control from this microcontroller to the motor is where I need help.

This is going to be a large quadruped walker and the control for the joints will not be standard. The main computer (Mini-ITX or bigger, considering a full size motherboard with a Core2Quad processor) will tell the leg to move and it will do so until the joint sensors register the correct position. I'd like to stay away from PWM for control. A simple serial command will suffice as each joint will be reporting back its position many times per second. I want the servo's controller to process this command and adjust the speed and direction of the joint itself.

I understand that this is all extremely complicated, but that only makes it more fun. Has anyone here made their own digital servos before? How could I best go about doing so? Any ideas?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-24 03:56
    Try not to mix up the notions of a motor controller with a servo. The HB-25 is a motor controller. It drives an H-bridge to be able to make the motor go in either direction and it uses PWM to allow a microprocessor to set the speed of the motor based on the width of a control pulse that's compatible with a modified servo motor (modified to eliminate the positional feedback and mechanical stops). If you include positional feedback or speed feedback, then you have a servo controller. It sounds like you only need an H-bridge to supply full motor current of both polarities and possibly another setting to effectively short the motor and hence stop it quickly. Rather than use a potentiometer, how about using a digital position encoder? These usually involve optical sensors and an optical disk using a Gray Code for the position information.
  • MarkSMarkS Posts: 342
    edited 2008-05-24 18:23
    This will be a servo. It will not and cannot have full 360° rotation. Not only that, but it can never run at full speed. It will need position and speed feedback. I was looking at a H-bridge circuit last night after I posted this and was surprised at the simplicity of the design. I'm assuming that the microcontroller sends a PWM pulse to the required two H-bridge "switches" (probably going to be high current MOSFETs in my case) to adjust motor speed?
  • FranklinFranklin Posts: 4,747
    edited 2008-05-24 19:07
    That is how you control the speed but there is no position control in the H-bridge so you will have to provide that with another circuit. The easiest way to get position control is with a servo or second best a stepper motor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • MarkSMarkS Posts: 342
    edited 2008-05-24 21:56
    Franklin said...
    That is how you control the speed but there is no position control in the H-bridge so you will have to provide that with another circuit. The easiest way to get position control is with a servo or second best a stepper motor.

    Position control is provided by the potentiometer or digital position encoder that Mike mentioned. I know that much about servos.

    I think this would be perfect for the H-bridge circuit. Any thoughts?

    Post Edited (MarkS) : 5/24/2008 10:14:20 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-05-24 23:05
    There's no reason you can't drive the motor with an H-bridge. In fact, that's how it should be done. What makes it a servo is the incorporation of position feedback and a PID loop to make the motor behave the way you want it to. You will have to write some code for the latter. Since that will require some trial and error, I highly recommend adding limit switches at the travel extents to act as emergency shutoffs. With the torque you're talking about, an errant program could easily destroy something.

    -Phil
  • Tom CTom C Posts: 461
    edited 2008-05-25 13:52
    MarkS,

    Lynxmotion sells this product for making monster servos, with a dc gear motor and a pot, and the price is hard to beat:· http://www.lynxmotion.com/Product.aspx?productID=648&CategoryID=52

    I know that the current carrying capability of this module may not be sufficient for your requirements, but the manufacturer of this module may make bigger modules and it might be worth exploring if they do.

    Just a thought.

    Regards,
    TCIII

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    If you are going to send·a Robot·to save the world, you·better make sure it likes it the way it is!

    Post Edited (Tom C) : 5/25/2008 3:38:37 PM GMT
  • MarkSMarkS Posts: 342
    edited 2008-05-25 20:30
    Tom C said...
    MarkS,

    Lynxmotion sells this product for making monster servos, with a dc gear motor and a pot, and the price is hard to beat: http://www.lynxmotion.com/Product.aspx?productID=648&CategoryID=52

    I know that the current carrying capability of this module may not be sufficient for your requirements, but the manufacturer of this module may make bigger modules and it might be worth exploring if they do.


    Just a thought.

    Regards,
    TCIII

    Thanks, but if I do it myself, I might end up learning something! lol.gif The design of the electronics seems much easier than I thought, although It's still a little cloudy.
Sign In or Register to comment.