Ted's Home Page Get Firefox! Get Thunderbird! Saturday, May 18, 2024, 9:59 pm GMT
    Home :: Contact :: Blog :: Updates (Tue, Feb 12) :: Search :: Highlight Linux :: Apache HTTPD :: PHP :: VIM :: OCS
          email me email me
 
[Ted and a baby giraffe]
 
Contact Me
Résumé/CV
More Information
 
Faculty Job Search
Industry Job Search
Research/Graduate
Work
My Teaching Sites
 
General Posts
(including
LaTeX
templates)
 
Utilities
 
Public hg repos
Public git repos
 
Links
The Blog
 
Guestbook
 
 
 
 
   
 
 
  email me
email me
email me
email me



         

How to hack the "servo" out of "servomotor"...

PURPOSE

  • This page describes converting a standard 3-wire hobby (e.g. Futaba) servomotor to a simple 2-wire DC gearhead motor that is driven by a pulsed or analog DC power source.

  • For information on the more typical 3-wire hobby servomotor to 3-wire continuous rotation servomotor, see Seattle Robotics Society: How to modify a servo.

[ NOTE: A MUCH BETTER reference is available (PDF, HTML, LaTeX). HOWEVER, it
does not have the
quadrature encoder example that IS included here. ]

By Ted Pavlic

Pictures taken from Seattle Robotics Society: How to modify a servo webpage

Table of Contents

Introduction and Background: This is NOT the Typical "How to Hack a Servo" Website...

Most websites do not result in DC gearhead motors; they result in modified servomotors.
There are plenty of websites available like Hacking a Servo, but these websites instruct users on how to turn a simple hobby servomotor, like the Futaba S-148 or the Futaba S-3003, into a continuous rotation hobby servomotor. In other words, the resulting motor is not a simple DC motor. It still is a servomotor, and it still requires a servomotor controller to turn it. What the modifications do is convince the servomotor that it never reaches its goal angle, and thus it continuously rotates trying to achieve that goal. The motor still runs off of 5V, and it is still controlled with a pulse-width modulated (PWM) [digital] signal.
Historically, this webpage was for MIT HandyBoard users.
This webpage was originally created to help students using MIT HandyBoard controllers onboard small autonomous robots. The HandyBoard is a nice product, but only one servomotor can be controlled easily, and it is nearly impossible to control more than two servomotors. Students using the HandyBoard will often need two motors as drive actuators and at least one more motor for some deposit or pick-up mechanism. Often "unhacked" servomotors make great deposit, pick-up, or steering actuators, so if a servomotor is to be used as a drive motor, the HandyBoard runs out of servomotor control outputs very quickly.
This website is about converting to a DC gearhead motor instead.
The reason why a student would want to use a servomotor as a drive motor is that hobby servomotors often come with very nice nylon gear trains that make for a fairly speedy but also fairly strong motor. So the ideal situation would be to "hack" the servomotor to access its internal DC motor directly, thus turning the servomotor into a DC gearhead motor. An additional bonus of this is that most hobby servomotors have DC motors which can be fairly safely operated at upwards of 9V, which makes for a pretty powerful DC gearhead motor.
It's nicer to use DC motors on the HandyBoard.
So now that the student has a DC gearhead motor with the HandyBoard, the motors can be controlled with the motor outputs (four H-bridge circuits) which frees up the one or two servomotor control outputs.

So how do I do it?

I encourage you to read the Hacking a Servo information to gain a better understanding about how a servomotor works. It should also help you anticipate what needs to be done to turn the unit into a true DC gearhead motor.


Simply, follow every step in that information, but STOP at the "Now for the actual modifications" step. That is, do:
  • Open the case by removing the four long screws at the bottom of the unit. It should be easy to remove the bottom and the top of the housing.

    Top View of Open Housing (Click for Larger View)


  • Remove the gear assembly, but be careful to remember how they were originally arranged.

    Gears Removed from Housing (Click for Larger View)


  • The next step will vary depending on what type of servomotor you have. Look for small screws that attach the drive motor to the housing. Hopefully there will be two small phillips-head screws going into the top of the motor, but there are no guarantees.

  • Remove the motor and circuit board from the housing. You may have to apply a lot of force to the top of the potentiometer sticking out of the top of the housing in order to pop the circuit board out. You don't have to worry TOO much about breaking anything as we shall find out in a second that the circuit board matters very little. Be sure not to break any of the gears or the housing, however.

    Electronics Removed from Housing (Click for Larger View)

  • At this point you should have a bunch of gears, a plastic housing, and a circuit board with a DC motor attached.


Now that you have the motor apart, it's time for the new steps.
First, remove the control circuitry.
Regardless of your objections, take some sort of cutting device (like some small diagonal cutters, for example) and clip the circuit board in half. That is, get rid of the important part of the circuit board next to the motor. The only thing we care about is the motor. You can leave the half of the board mounted onto the motor, but get rid of the stuff next to it. If you are uncomfortable with clipping the board in half, then have someone help you and apply a soldering iron to the leads coming out from the motor going into that board. As the solder heats up, you should be able to pry the board away from the motor. Then only a bare motor will be exposed. If you have a difficult time doing this, just break off that unneeded circuitry.
Next, salvage the three wires from the control circuitry.
The control circuitry you just clipped off should have three wires soldered to it. You probably want to use these wires, so remove them from the control circuitry. It is not difficult to use a soldering iron to heat up the existing solder to the point where you can slide the wires right out.

Since you only need two wires, you can remove one of the wires if you want.
Finally, attach the wires directly to the motor.
Now solder the two remaining wires to the two leads coming from the bottom of the motor. If you clipped off the board, these leads will be protruding through the bottom of the circuit board remaining connected to the motor. To each lead coming from the motor, solder one wire. These wires will provided the PWM-regulated power from the Handy Board motor ports.


You can start using the steps from the previous information at this point. Start at the "Now, reassemble ..." step.

That is, do:
  • Insert the motor (now without the control circuitry) back into the housing. You should notice that now the potentiometer will NOT protrude out the top because it is not there anymore :). Only the motor will protrude out the top of the housing.

  • Fasten the motor as necessary (that is, put the proper screws back or do whatever steps are necessary to fasten the motor inside the housing).

  • Before reassembling the gears, you will have to remove a little plastic "stop." It's a small nub of plastic on one of the gears that should obviously keep the gears from turning a full 360 degrees. Simply clip or cut this stop off with diagonal cutters or some sort of knife. Make the gear smooth so that there will be nothing keeping it from turning 360 degrees.

    Gear Shown With and Without Rotation Stop (Click for Larger View)


  • Reassemble the gears and place them back onto the housing on top of the motor.

  • Put the housing back together. You now have a DC gearhead motor.

  • Try turning the motor. It should be able to turn 360 degrees with only the resistance of the motor. If there is any extra resistance, open it back up and be sure you removed the mechanical stop all the way. Also be sure that the motor leads aren't being shorted together.

Some Important Notes:

It's safer to regulate the output voltage to the motor.
You may want to add some voltage regulation in line with the two wires of this cable in order to ensure the proper rated voltage goes to the DC motor. You will have to seek separate documentation for this step.
If motor seems to be binding, check your wiring.
When soldering the wires onto the motor within the housing, be careful not to let the wires touch. Because those wires are most likely braided, it is very easy for some strands of the braid to reach over and short against the other motor lead (or a strand from the other wire).

Not only is this bad for the HandyBoard (shorting the motor ports will reset the HandyBoard and may cause damage), but shorting the motor leads together prevents the build up of any "back-EMF" from the motor, and the motor will have an urge to stall. Because of the gear ratio on the output of that motor, this effect will be very apparent, even when the motor is disconnected from the HandyBoard and is being backdriven manually.

After you assemble your modified motor, try to turn the output manually. If the output gears appear to be binding and the gears appear to be put back together correctly, then MOST LIKELY the wires soldered to the motor leads are shorting somewhere. Check your wiring inside the motor housing.

Use a capacitor close to the motor.
I am generally in favor of adding a relatively large capacitor as close to the motor as possible with as short of leads as possible. This will help protect the HandyBoard, help prevent conditions which cause your HB to reset under higher loads, keep the battery voltage fairly consistently high across all motor ports, and will help the motor be able to respond to changes more effectively. On a DC motor, this capacitor can be very large. None of the higher frequency information is important for the motor's operation. As long as the motor isn't lagging when turning on and off, that capacitor is not too large.

In the past, these servos have been pretty quiet motors already very safe for HB usage like this; however, if you notice some weird problems during normal running of the robot (make sure you have no mechanical issues causing the motors to bind up and stall), you may think of adding such a capacitor.
It's very often possible to run the hacked servomotors at the full output voltage of the DC motor ports (9-11V).
FEH students should feel free to ask for other TA's experience with "hacked servo" drive trains, but with this particular hack typically there is not often a problem simply running the motor "open." That is, typically groups are able to run the DC gearhead motor produced here directly off of the battery voltage with no voltage regulation. If you wish to take the [relatively low] risk of burning out your motor and/or, drawing enough current to reset the Handy Board during normal operation, simply modify the cable to plug directly into the motor ports. Either by removing the female header at the end of the existing servo wires and putting on an appropriate male header, or by simply creating a male header which can be plugged into the female header, modify the servo power cable so that it can be plugged into the Handy Board motor ports. Remember that the motor ports provide voltage and ground separated by one space. That is, the connector is three-wide.

Quadrature Encoder Example

There is a fairly simple interesting extension of this process that also adds a quadrature encoder to the DC gearhead motor modified servomotor. For more information about the use of quadrature encoders, see Comments on Quadrature Encoders, which actually uses the above page as an example of some general rules on how and when to apply quadrature encoders.

 

 


appalling appalling
appalling appalling
email me email me
 
1620020 hits
(322 today)
 
Terms of Use
Ted Pavlic <ted@tedpavlic.com>   appalling appalling appalling appalling email me email me GPG Public Key: D/L, View, Ubuntu, MIT, PGP (verified) (ID: E1E66F7C) This Page Last Updated on Tuesday, February 12, 2019, 6:17 pm GMT