Frequently Asked Questions Link
RC-CAM Home
Questions?User-to-User ForumVideo files



RC-CAM Topics
Home
Author Background
Concept 30 R/C Heli
Project Cost
First Flight
Site Sponsor
Legal Notice

RC-CAM Links
RC-CAM1
RC-CAM2
RC-CAM3
RC-CAM4
Special Projects
Movie Catalog
Questions?
Video Site Links
Forums



Test your servos with digital accuracy!

R/C SERVO TESTER


This pocket sized servo signal emulator makes it a breeze to test and setup your servos. It features digital accuracy and is easy to build and use.


Introduction

I recently found myself having to test a large number of R/C servo controlled devices. My normal routine is to grab my spare receiver, plug in the servo and battery, then fire up the transmitter. As simple as this sounds, it is inconvenient for me, especially when the "spare" Rx is installed in a plane. When the transmitter nearly fell off the workbench one day, I decided enough was enough.

I thought about buying a R/C servo signal emulator, but I am a do-it-yourself sort of guy. The various projects I saw on the internet did not turn me on. What I found were circuits that were usually based on LM555 timers. They all seemed to use too many components for too few features.

My goal was to use a cheap PIC microcontroller and do everything I could to minimize the component count. The PIC would ensure precise R/C signal generation and I figured that features could be easily added in firmware rather than by more components. In the end I met all my expectations. And although I used junk box parts, the cost to duplicate my work is well under $10.

The R/C Servo Tester (RCST) is easy to use. Just plug in a 4-cell battery and your servo. The variable pot allows you to set any servo position you wish, within the 1.0mS to 2.0mS range of a modern R/C system. With the press of a button, you can find the precise center to your servo. Flick a switch and the servo will cycle (run back and forth ) at your chosen speed.


Servo Control Basics

Servo PulseThe servo signal is a simple digital pulse. It spends most of its time at a logic low (0 V). About every 20mS it goes logic high (3 to 6 VDC) and then quickly goes low again. It is this tiny window of logic high time, called the pulse width, that gets the attention of the servo.

Please refer to the drawing. The period labeled "A" is called the frame rate. In the example it is repeated every 20mS (50 times per second), which is quite typical for most radio systems.

Modern servos define center as a 1.5mS pulse width, as shown by detail "B" in the drawing. Full servo rotation to one side would require that this pulse width be reduced to 1.0mS. Full rotation to the other side would require the pulse width to increase to 2.0mS. Any pulse width value between 1.0mS and 2.0mS creates a proportional servo wheel position within the two extremes. The frame rate does not need to change and is usually kept constant.

The servo will not move to its final destination with just one pulse. The servo amp designers had brilliantly considered that multiple pulses should be used to complete the journey. This little trick reduces servo motor current draw and it helps minimize erratic behavior when an occasional corrupt signal is received. To move the servo, you must repeat the pulse every few milliseconds, at the chosen frame rate. Modern R/C systems use a 40Hz - 60Hz frame rate, but the exact timing is not critical. If your frame rate is too slow, your servo's movement will become rough. If the rate is too fast the servo may become very confused.


Circuit Construction:

My board was point-to-point wired using 30 gauge insulated Kynar wire. This wire is normally used for wirewrapping, but works fine with a soldering iron. I just strip a bit of insulation off and solder it to the parts. I recommend a 40 watt or less soldering iron (700° tip)

The Perf Boarded CircuitLayout is not critical except that cap C3 should be close to the PIC (mine is soldered directly across pins 1 and 8). Cap C1 should have 2% tolerance for best accuracy. Use a socket for the PIC chip. If your servo voltage will be higher than 5V, such as a five cell R/C pack, then you will need to add an LDO voltage regulator (e.g. LM2931-5 Vreg).

The connections to the battery pack and servo are handled by female servo cables or simple 3-pin headers. I built it both ways and prefer the header version. You can see my stacked 3-pin headers on the upper right of the photo.

Check your work carefully. Do NOT install the PIC chip until you have verified that pin 8 is ground and the pin 1 has 4.75 to 5.25 VDC on it. Remove power BEFORE you install the chip. Double check the servo cable for correct polarity before you plug a servo in. Simple mistakes can destroy electronic parts, servos, and may generally ruin your day.

Your exact PIC choices have some flexibility. You can use a PIC12C508, PIC12C508A, PIC12C509, and PIC12C509A. Project Update: You can also use the easier to find PIC12F508 or PIC12F509 instead.

Be sure to verify that your chip burning system has selected the proper configuration fuses, as shown below. For example, if your programmer uses the PICALL software, then press F3 to review the Config fuses.
      WDT: Watchdog Disabled
MCLR: MCLR Disabled
Oscillator: IntRC
Memory: Code Protected

The PIC's Hex file is designed to automatically instruct the programming hardware to chose these values. However, it is always a good idea to check them for accuracy. By the way, after you program the PIC your programmer will report a failure if you attempt to verify the PIC again. Do not be alarmed -- everything is OK. Just ignore the "failure." Whatever you do, do NOT program the chip twice!

If you have trouble burning the PIC, then please check your programmer. Whatever the fault, it is not a RC-CAM hex file issue. The most common problem is that the user has forgotten to burn the PIC's four configuration fuses, as mentioned above. More programming information can be found starting here.

The entire firmware is written in "C." You do not need to know anything about the C language to build your system. All you need is the object code (Hex file) to program the PIC, which is provided at no charge for personal use. A hobbyist can use the firmware in a personal project at no charge (please review the readme file in the hex file download). Sorry, but I will not provide the text based source code.


Instructions: Servo Signals for all Seasons

With S1 and S2 turned off, the variable pot is used to select the servo's position. The endpoints are software limited to approximately 0.95mS on the low end and 2.1mS on the high end. The step resolution is 10uS, which allows for very smooth movement.

To cycle the servo back and forth, enable switch S2. The cycle speed is determined by the pot's position. The seven sweep times vary from about twice per second to once per twenty-five seconds. Step resolution will vary, depending on the chosen speed. The servo steps are coarse on the faster speeds.

To find the servo's electronic center, just press and hold S1. The servo pulse will be forced to 1.5mS and the servo wheel position should move to a nominal center location. You can also use this feature to help calibrate the knob's tick marks, since it will indicate where they knob needs to be for a centered servo.

The pot position controls an "RC" timing circuit. In effect, R1, C1, and some clever PIC software, are used in place of an A/D convertor to measure the pot's position. Since the reference is not voltage regulated, it is affected by battery voltage. The decoded pot position can vary about 5% over the voltage range of a typical 4-cell NiCD or NiMH pack. However, the S1 (Center Switch) timing is not affected by the battery voltage and will remain accurate throughout all expected voltages.



Design Documents:

The technical details are available as file downloads. There is no charge for the information when used in a personal (hobby) project. Commercial applications must obtain written approval before use.

Please be aware that the information is copyright protected, so you are not authorized to republish it, distribute it, or sell it, in any form. If you wish to share it, please do so only by providing a link to the RC-CAM site. You are granted permission to post links to the web site's main page (http://www.rc-cam.com/). Please respect this simple request.

Schematic Files Schematic Files: PDF file of the RCST circuitry. The components are from www.digikey.com.
Hardware Revision: Rev A, dated 02-19-2003
PIC Object Code Files PIC Object Code: Hex file and license details for the compiled RCST firmware. You should occasionally check for updates.
S/W Version: V1.0, dated 02-19-2003.


The Small Print:

If you need a part then please consult the sources shown in the project (see schematics download). I do not work for, nor represent, ANY supplier of the parts used in this project. Any reference to a vendor is for your convenience and I do not endorse or profit from any purchase that you make. You are free to use any parts source that you wish.

All information is provided as-is. I do not offer any warranty on its suitability. That means that if you build and use this device, you will do so at your own risk. If you find software bugs then please report them to me. I can only make corrections if I can replicate the bugs, so please give me enough details to allow me to witness the trouble.

 

FeedBack:

If you have technical questions or comments about this project then please post it on the rc-cam project forum.


 © 2003-2016 RC-CAM, all rights reserved.