ME102 Lab 4: RC Servo

  1. Servos and control
  2. Hardware Setup
  3. Software Tasks
    • Looping 20 ms signals
    • Servo Library
  4. Check Off
  5. References

1| Servos and Control

While DC motors are simple to operate, they require the addition of an encoder if accurate positioning is required. RC servos are an easy way to achieve accurate positioning. They consist of a neatly packaged DC motor, position sensing mechanism, and control circuitry.

Most RC servos offer great torque for their size. However, they are generally limited to half a rotation. Controlling a servo is easy. A control pulse is sent every 20 milliseconds. The width of the pulse controls the angle of the RC servo.

2| Hardware Setup

All of these servos feed off of the same electrical connections: roughly 6VDC to power the thing, and pulse stream to indicate position. Voltage is always supplied from the red wire. Ground is connected to either brown or black. And the control pulse is read from either a yellow, white, or orange wire. This will be the signal from your Arduino

Power your servo with the benchtop power supply. Make sure that the voltage is limited to at most 6 volts.

3|Software Tasks

Looping 20ms signals

Write a sketch that allows you to control the position of a servo with the potentiometer. You should use an if statement within the loop function that checks to see if a 20 ms has elapsed.

Servo Library

You may have noticed that servo does not behave very nicely and has significant jitter. Luckily, the Arduino has a built in servo library that provides jitter-free action. Load knob sketch (sketchbook> examples> library-servo> knob) and modify it if needed. The Arduino servo library supports up to two servos.

4| Check Off

Show the GSI your code for the first software task.

5| References

http://www.societyofrobots.com/actuators_servos.shtml

For a more in depth look and explanation of different servo options (analog v digital, nylon v karbonite, Futubab v HiTec), this site covers it all.

Boss Robot Hobby Shop

This local store located on 2953 College Ave specializes in RC kits. They have tons of experience with servos, are helpful, and can help you get the servo you need.