Saturday, August 1, 2015

How to Hack a Servo Trimpot

This article will show you how to hack a servo so that you can read the analog signal coming out of it. This will let you track the voltage of the servo when it is rotated.

Steps

  1. Open up the servo. Unscrew the screws at the base of the servo. Make sure to use an appropriate screw driver, often size #00. Keep the servo flat on the table and handle with care. Picking it up could cause the front side to fall off, spilling gears.
    Open up the servo.jpeg
    • Don’t take out the gears unless you’re sure you can reverse engineer and put them back.
  2. Identify the variable resistor (trimpot). This is the resistor with three pins, and wires leading from it to the circuit board. This variable resistor is also called the servo trimpot.
    Identify trimpot.jpeg
    • Occasionally, this resistor is attached to the circuit board, rather than a separate component.
  3. Solder a wire to the wiper wire. Solder a wire to the analog signal pin of the trimpot. This is almost always the central pin of the trimpot. See Tips for a way to confirm this.
    Solder a wire.jpeg
    • Avoid soldering the other pins. If you accidentally make the wrong connection, remove the solder and try again.
  4. Screw the servo back together. You will need to make room for the extra wire that you added. Try cutting a notch in the cover with a pair of wire cutters.
    • Take care not to let the gears fall out during this step.
  5. Measure the servo's voltage with a multimeter. Set a multimeter to voltage mode. Power your servo using a 5V supply. To measure the servo's voltage, connect the positive probe of the multimeter to the analog wire that you soldered on the the servo. Connect the negative probe to the ground pin. Now you should be getting readings. Experiment and turn the servos head to see the readings change.
    Measure voltage.jpeg
    • The voltage reading is based on the resistance set by the trimpot. With a little experimentation, you can use this output to represent the direction the servo is facing direction.

Tips

  • Follow these instructions to identify the analog signal pin of the trimpot:
    • Power the servo by connecting the VCC of the servo to the 5V pin of a microcontroller, and the Gnd pin to a battery Gnd.
    • Set a multimeter to read DC voltage.
    • Touch the negative probe of the multimeter to the ground of the power supply.
    • Touch the positive probe of the multimeter to one pin at a time. Touching more than one pin will short the trimpot.
    • Spin the trimpot's head. If the voltage reading changes, you have found the analog signal pin.


from How to of the Day http://ift.tt/1JDMwCb

No comments:

Post a Comment