|
A standard Radio Control (RC)
Servo is a motorized device that moves its actuator to a
position specified by a controlling electronic
signal. Inside is a complete servo system including
motor, gearbox, feedback device (pot), servo control
circuitry, and drive circuit. Several sizes of servos
exist that range from very fast to very powerful.
These devices were popularized by the Radio Control
hobbyist movement and, as a result, are very
inexpensive. |
||
The OOPic's oServo
Object is used to control
RC Servos. It has 5 properties that are used to control a
servo connected to the OOPic.
The following program shows a servo connected to I/O line 31 being positioned.
|
||
IOLine Property
RC servos normally have 3 wires: Power, Ground and Control. The Control wire is used to specify were the servo is positioned and is connected to the I/O lines specified by the IOLine property. This control wire is usually yellow or white, but can be any color other than red or black. The I/O lines can be connected directly to the servo. However, if you are powering your servo with a power supply of less than +5 Volts, you will need to put a 1k resistor between the I/O line and the servo's control line. Servos can be powered by a wide range of voltages between 4.8 and 6 volts. Be sure to consult the manufacturer's specifications before applying power. Also, be sure not to power the servo from the same power supply as the OOPic. A servo will pull large amounts of power in quick surges causing the servo's power supply to periodically drop below 4.5 volts. The OOPic has a brown out circuit that resets the OOPic if its power supply goes under 4.5 volts. Using separate power supplies will prevent the OOPic from resetting when driving a servo. |
||
Value Property
It is important to keep in mind that different servos have different mechanical capabilities. Some servos can rotate more than 180 degrees, some less than 180 degrees. A servo manufacturer typically publishes that their servos are only able to rotate 90 degrees with some areas for adjustment. This area for adjustment is usually another 90 degrees or so, giving the servo a full swing capability of 180 degrees. The OOPic will take advantage of the full rotational capability of the servo, whatever it may be. |
||
Center Property
By adjusting the Center property, The 0-63 range of the Value property can be centered over the 180 degree range of the mechanical capability of the servo. Every servo is different. Even with the same manufacturer and model of servo, the mechanical capability may translate to a different area of the servo, so it is important to make this adjustment for each servo you use. When adjusting the Center Value to find the proper value, first set the Center property to 40 and the Value property to 0. Slowly move the Center property down until the actuator on the servo hits its mechanical stop. Then bring the Center property up by 1. |
||
InvertOut Property
The InvertOut property is useful when two servos need to rotate in opposite directions when given the same position value. Such applications include Hexapod Walkers, or modified servos driving the wheels on a robotic base. When doing this, one servo's InvertOut property needs to be set to 0 and the second servo's InvertOut Property needs to be set to 1. Note: If a servo's Center property has already been adjusted and then the InvertOut property is changed, the Center property will need to be recalculated for the other side of the servo's mechanical capabilities. |
||
Operate PropertyThe Operate property specifies whether or not the oServo Object refreshes the position of the servo. If the Operate property is set to 0, then the servo is not sent a refresh signal. If the Operate property is set to 1, then the servo is sent a refresh signal 30 times every second. The following example shows a servo connected to I/O line 31 being positioned to correspond to the position of a potentiometer connected to I/O line 1.
|
||
Multiple servos can be connected
to the OOPic by connecting each servo's control line to a
different I/O line on the OOPic.Each of the servos can be driven from the same power source. When driving more than 1 servo, the refresh signal gets distributed evenly between the servos. As a result, the power surge that occurs when a servo gets refreshed will never be coming from more than one servo at the same time. |
||
| Send mail and comments to: Savage Innovations. |