Author: Ray King
The design presented here is for a device for testing radio control (RC) servos. The present design has features that make it especially useful to people designing and building radio control equipment. By building a number of these devices in a single enclosure an entire radio controlled model can be set up and tested without having to actually use the RC transmitter.
The most unusual feature of this design is that it doesn’t use a joystick or similar analogue device to determine the servo position. Instead it gives an output of precisely 1.5 ms that can be changed up or down in steps of 0.166 ms and gives a display on a line of LEDs of the position selected. This is of particular use if you are designing and testing radio control devices that use the receiver output directly, enabling a known pulse width to be applied without resorting to using an oscilloscope. With this facility the devices can be calibrated simply and quickly.
Secondly the device has the ability to switch to an ‘exercise’ mode. Selecting this mode cycles the servo between the extremes of its travel and serves as a useful quick test of normal servos to verify correct working. A further LED indicates selection of this mode.
Finally the device uses very few components and is extremely cheap to build since the PIC processor carries out all of the timing functions.
The circuitry is a pretty straightforward implementation of the good old PIC 16F84 processor with eight LEDs D1-D8 and three switches S1, S2, S3 connected. The software generates a servo output signal every 20 ms then scans the switches for a button press. Depending on the button pressed the output pulse length will be adjusted accordingly.
When first switched on the circuit will output a servo pulse of 1.5 ms duration and the middle
LED of the array will be lit. Pressing the ‘up’ or ‘down’ buttons will increase or decrease the pulse width by 0.166 ms and the LED display will move as appropriate to show the pulsewidth selected.
At any time the ‘mode’ button may be pressed which causes the device to switch to/from the ‘exercise’ mode. A servo connected to the output will cycle repeatedly from end to end of its travel — a useful indication of whether the servo is operational or not.
An Elektor-style PCB was designed for the project and the artwork is shown here. Only one wire is required on the board. The author’s own prototype incorporated two of these boards in a single enclosure so that two servos on a model can be tested at once. The board shown in the photograph is a prototype differing from the final version in minor detail.
The source code was written using Proton PIC Basic+ which then compiles into assembler and object code. For those with a PIC programmer, all project software including the hex and source code files is available as a free download, file ref. 040172-11.zip, from the Elektor Electronics website. The PIC is also available ready programmed though Readers Services under number 040172-41.
Several options are available for powering the circuit. A 9-V PP3 (6F22) battery may look okay at first blush but then it will be exhausted quickly even with small servos. A mains adaptor (‘battery eliminator’) is possible, but precludes field use. Undoubtedly the most elegant approach, then, is the use of a case with a battery compartment for penlight (AA size) batteries, and then use four alkaline cells or five NiMH rechargeables to obtain a raw supply voltage of 6 V. This will necessitate the use of a low-drop regulator for IC2, like the 4805 or the LM2940 you find suggested here because it will not drain an almost flat battery due to its own current. An on/off switch is also recommended. The standby current consumption of the circuit amounts to about 5 mA.
Finally, PIC burners among you using the hex file should set the config bits as follows: HS (10) (since xtal > 4 MHz ); WDTE disable (0); PWRTE enable (0). The other config bits are for code protection and their use is at your discretion.
COMPONENTS LIST
Resistors Capacitors Semiconductors | Miscellaneous |
(Elektor Electronics Magazine – 07-08/2006)
Download this article (#040172-uk.pdf) 040172-11.zip >> or direct link |
Labels
- * Elektor 2005 (9)
- * Elektor 2006 (72)
- Adapters (1)
- ADC / DAC (1)
- AM / FM (2)
- Amplifiers (3)
- Antennae (2)
- Articles List (1)
- Audio (1)
- Automatic (2)
- Batteries (3)
- Bluetooth (1)
- Breakers / Contacts (1)
- Buzzers / Sirens (1)
- Clocks / Timers (2)
- Computer (2)
- Converters (2)
- Coolers / Fans (1)
- Counters (1)
- Datasheets (7)
- E-blocks (1)
- Energy (2)
- Flash / Light (8)
- Frequency (1)
- Fuse (1)
- Generators (2)
- High-voltage (1)
- Indicators (2)
- Infrared (IR) (4)
- LCDs (1)
- LEDs (7)
- Magazines (1)
- Meters (5)
- Microcontroller (9)
- Mobile Phone (1)
- Motors (1)
- OPAMP (3)
- PCB (1)
- Photosensors (1)
- Power Supply (2)
- Preamplifiers (1)
- Programming (3)
- Radio (1)
- Rectifiers (1)
- Regulators (1)
- Relays / Switches (10)
- Remote Control (7)
- RS232 (3)
- Security (4)
- Sensors (2)
- Servo (2)
- Simulators (1)
- Small Circuits (46)
- Telephones (2)
- TENS (1)
- Testers (3)
- Timebase (1)
- Tools (1)
- Transmitters (1)
- Trigger (1)
- USB (2)
0 comments: