R/C Auto Pilot
Have you ever wanted to simply tell your R/C vehicle where to go and simply let it do the rest.
The R/C Auto Pilot, part of the R/C Pilot Project allows you to do this. It uses a standard GPS’s waypoints to navigate a R/C vehicle to either a "Goto" waypoint or it can follow a "Route" of waypoints. It can be used inside of a plane, car, truck, boat or even a robot.
The GPS unit needs to support NMEA at 4800 baud (a standard that most GPSs do support). You connect it to the RCAP using a serial data cable. If you are looking to make your own cable, take a look at http://pfranc.com/. I highly recommend them for Garmin GPS connectors.
The RCAP uses four standard R/C leads to connect to your R/C receiver and battery. Two male leads to connect to two channels of your R/C receiver, one to activate the RCAP the other to pass through the normal signal from your R/C radio while the autopilot is not activated. A third lead (female) from the RCAP connects to a servo to steer your vehicle. The final female lead is used to connect to the battery.
Once a waypoint is activated on your GPS, it will start sending data to the RCAP. (Meaning you MUST have a Goto or Route active at all times on the GPS for the RCAP to function properly when activated). The RCAP will ignore this data and simply pass through your R/C radios instructions while it is not activated. Once activated, by using a spare switch on your R/C radio (gear switch for example) it will then read in the $GPRMB and $GPRMC sentences from your GPS to determine the heading needed to remain on course for the currently active waypoint.
There are 3 adjustments that need to be set on the RCAP.
- Servo direction.
- Max. servo travel
- Course correction gain
Servo direction (slide switch S1) simply allows you to reverse the direction a servo turns while the RCAP is activated. You should test this out before actually putting the RCAP into your vehicle to make sure it matches the expected response.
Max Servo Travel (Variable resistor R2) allows you to set a maximum end point that you will allow a servo to travel. This is especially important when installing the RCAP into an aircraft. I recommend starting with a minimal setting and increasing it slowly.
Course Correction Gain (Variable resistor R3) allows you to adjust how aggressively you want to RCAP to remain on course. A low setting means that the RCAP will slowly turn toward the current course. A high setting will have the turns perform much quicker. The amount of correction used is also proportional to the amount off course the vehicle is, the greater the amount off course, the greater the correction is. I would recommend starting with a minimal setting and increasing it slowly.
The RCAP needs it’s own power source of 6V. A 5-cell R/C receiver battery works well. I will be testing some 2-cell lithium ion polymere batteries shortly and will report on its use in the discussion forums at http://groups.yahoo.com/group/rcpilot/.
When using the RCAP inside of an aircraft, the recommended method would be connecting the planes rudder to the RCAP. An additional method of stabilizing the plane is needed as well. RCAP has been tested with Futaba’s PA-1 and FMA Co-Pilot. Both of these work well with RCAP. Please ensure the method used for correcting your planes stabilization has been tested before installing the RCAP.
Building the RCAP
You may obtain all the necessary files in one of two ways.
You can download a complete archive of version 1.1.
or you may browse the CVS repository on SourceForgeThe RCAP is based on MicroChip’s PIC series of microcontrollers. It uses the PIC16F876.
You need to either compile the code using Micro Engineering Lab’s PicBasic Pro or download the HEX file and burn the micrcocontroller using a PIC programmer that can program 28 pin PICs.
A pre-programmed microcontroller is also available at R/C Online Canada.
Next you will need to make a printed circuit board.
You may either use the .PCB file found in the circuit folder or the bw-art file. The .PCB file is in Traxmaker format.
A professionally produced PCB is also available at R/C Online Canada
The rest simply involves soldering the correct components into place.
Click for larger view.
If you are interested in purchasing a complete project kit, PCB, case, components or a pre-assembled RCAP please e-mail mikejp@videotron.ca for details.
Kit Assembly
You need to trim the PCB board to fit inside of the plastic case. This may be done using a band saw, utility knife or many other ways.
Next you will need to drill a hole to hold the voltage regulator heat sink.
Solder in the Vreg with the heat sink below it. If you have some heatsink compound use it between the Vreg and the heatsink. A small bead of solder on bottom of the screw will ensure that it does not come loose.
Solder in the rest of the components using the BOM (Bill of Materials) and the schematic. The casing of the DB9 will need to be removed to fit.
Do not place the RS232 or PIC chips into the sockets until you are completely done soldering and have tested the Voltage Regulator.Click for larger view.
Solder the appropriate servo wires (not included) for your set up.
Cut out the side of the plastic case to allow the DB9 plug to fit through it. You may also need to trim a bit of the plastic bolt retainers.
Drill 2 holes into the lid to allow you to make adjustments.
Before placing the RS232 or PIC chips into their sockets, measure the voltage coming from the 5V voltage regulator. If it's not close to 5V there is a problem somewhere. Be sure to align the notches of the PCB, sockets and chips.
And now you should have a completed RCAP. Be sure to test it on the ground before using it inside of an aircratf. If your GPS has a simulation mode it is a very convenient way to test the RCAP.
Connecting RCAP
The 2 male leads from the RCAP go into the rudder channel and an auxiliary channel. The 3-wire female lead receives the plug from the rudder servo. The 2-wire female lead connects to a 6V (5 cell) battery.