Intro: Autonomous Traxxas Rover Build
This instructable will show you how to turn a standard remote control truck into an autonomous rover. For those that already have a truck, it should come as an easy project to do with just a few tools and then you'll open yourself up to quite a few possibilities such as to surveil an area or just to have the truck drive around while you control a camera system to look around and not have to worry about driving.
Safety Note: Always exercise caution when using power tools and use appropriate protective gear. I always use eye protection even when I solder just in case. I've never been hit with anything but there's a first time for everything.
Here are the parts you'll need:
1x Traxxas Rustler
1x TQ4 Transmitter or other 4 channel transmitter/receiver combo
1x APM 2.5+
1x GPS Module
1x 900 MHz Telemetry Module Pair
1x External BEC
4x 6" Female-to-female servo cable
1x Servo extension
2x Velcro battery straps
1x 10x8" plexiglass sheet
Double sided tape
4x 1/2" spacer
2x 3/4" spacer
6x 1 1/4" M3 bolt
You can use an imperial 1/4" bolt instead of the M3 bolts but it might be pretty tight when screwing them in.
2.5 mm hex driver
1/8" drill bit
Traxxas 4-way wrench
1x Laptop for the ground station and setup of APM
Note: My truck is 5 years old and was already modified for other things so some of the pictures of the chassis may look slightly different than my pictures. Traxxas may have also made some slight modifications over the years so there may be some differences as well. As far as I know, this is the same chassis used on the Rustler and Bandit so you could modify a Bandit instead.
Because of the existing modifcations, all images will show 5 M3 used instead of the 6 that should be used because there was not a hole for a 6th bolt.
This is not part of this instructable as someone else did the build log but if you use the Traxxas TQ4 transmitter, you'll need to convert the two-position thumb switch to a three-position switch. The best way I found is to use a three-position switch from Radio Shack or other electronics outlet but you lose the more polished look of the stock transmitter. I did it using these instructions and found it works fine and the ergnomic switch stays in place. http://traxxas.com/forums/showthread.php?8953226-How-to-Convert-stock-Traxxas-Thumb-switch-to-3-position-center-off-switch&s=b154d3c919e7a07e107581d1e8b538dc
Let's get going on the build!
Step 1: Remove, Relocate, Re-engineer
The basic chassis looks similar to the first image. Remove the ESC, the black ESC mount underneath, and the waterproof receiver box for the modification.
The next image shows the battery bar posts. Remove the battery bar posts using the Traxxas 4-way wrench that came with the truck. Ideally, it would be nice to keep these posts to hold the battery down but we need the holes to make a mounting point for the electronics we'll be adding.
Using the Dremel with a grinding disk, cut four slots in the side of the battery bay as shown in the third image. Make sure the cut is performed from outside the bay to ensure the slots are above the top of the chassis as the bottom of the battery bay is lower than the top of the chassis outside the bay.
When finished with the slots, it should look something like the fourth image.
Thread the Velcro battery straps through the slots as shown in the fifth image.
Mount the ESC on the side of the battery bay using double sided tape. This will require you to cut the screw hole tabs on the side unless you determine a better location for the ESC. You can use Velcro to make it easy to move around if you would like.
Once the ESC is mounted, install your battery to make sure the fit is just right as shown in the sixth image.
Next, remove the ESC and servo wires from the waterproof receiver box. Use the four female-to-female servo connectors and connect them to channels 1-4. When you connect everything, it will be an incredibly tight fit and you'll want to make sure to label the end on the outside to avoid having to figure out which is which. It should look similar to the seventh image.
When that is finished, install the waterproof receiver box again to the stock location. Your setup to this point should look like the eighth image.
Step 2: Cut, Drill, Install
Now is where most of the dirty work comes into play.
Take the 8x10" piece of Plexiglass and cut it down to an 8 x 3" piece. This can easily be done using your ruler and box cutter as shown in the first image. Score the Plexiglass along the ruler several times until you get a good groove in the Plexiglass. Then put the sheet up against an edge on a workbench or table right along that line and snap the piece off the rest of the way. As long as you scored it properly, it should break away without any issues. You'll end up with a piece that looks just like the second image.
Using the ESC plate that you removed in the previous section, place it on one end of the Plexiglass and make marks on the four outer holes to get the proper drilling locations for each hole as shown in the third image, then drill each hole.
A tip I learned after the fact was if you use a piece of wood on both sides of the Plexiglass, it won't crack it nearly as easily when you drill the holes. I would recommend using a clamp to sandwich the Plexiglass between the wood, then get the hole pattern using the ESC plate, and drill straight through both pieces of wood and the Plexiglass at a high speed to keep from cracking it.
Once that is finished, line up the Plexiglass holes with the holes where the ESC mount connects to the chassis. On the other end of the sheet, mark where the holes need to be drilled to go where the battery bar posts used to be and then drill the holes. You can get the basic idea in the fourth image. Don't drill it like it shows in the image unless you want it to crack! Just mark where the holes should be and then use the wood tip I mentioned above.
Now that all the holes have been drilled, put the bolts through the Plexiglass and ESC mount as shown in the fifth image.
Unless you find spacers that are all the right lengths, you'll likely have to cut it to 1/2". I just used some wire cutters and it did just fine and you get the added benefit in that you can now screw them on to the bolts and they'll hold the bolts in place without falling off as you try to install everything later on. When you finish this part, it should look like the sixth image. Remember, in my build, I only used three bolts here because I didn't have the fourth hole in my chassis from a previous modification. Most Traxxas Rustler chassis's will have four holes you can bolt to.
Do the same on the front end using the 3/4" spacers as shown in the seventh image.
Everything should line up well if you measured properly (seventh and eighth image) and if so, screw in all six bolts using the 2.5 mm hex wrench.
When you are finished with this portion, your truck should look similar to the ninth image.
Step 3: AutoPilot Connections
Lay out your APM, GPS, and telemetry module however you like and use double sided tape to hold it in place as shown in the first image. I placed the APM in the middle of the newly created platform to keep it as far away from the servo and the motor to to keep the magnetometer readings as accurate as possible.
The second image shows the proper way to connect the receiver cables to the ArduPilot input.
Rx Ch 1 -> APM Input Ch 1
Rx Ch 2 -> APM Input Ch 3
Rx Ch 3 -> APM Input Ch 7
Rx Ch 4 -> APM Input Ch 8
The ESC connector will need to be modified by removing the red wire from the connector. This can be done by lifting the plastic tab and pulling the red wire out. This must done because the Traxxas ESC BEC puts out 6V and that will ruin the APM. Once the cable has been pulled out of the connector, it can be taped back with electrical tape, which is the preferred method, or be cut if it will not need to be used in the future.
The board will be powered by the external BEC and can be plugged into any of APM outputs except for channel 1 or 3. Make certain your external BEC is set to output 5V and is not set for 6V.
At this point, you should also make sure the J1 jumper is in place on the APM so the external BEC will power the board and the truck electronics. If you use two separate power supplies (more advanced) or you use the 3DR Power Module along with a different ESC, then you will not use the J1 jumper and will need to remove it.
The ESC (with red cable removed) connects to Channel 3 of the APM output. A servo extension connects to Channel 1 of the APM output and the other end of the cable should go to the servo. If your cable reaches due to your placement, then you will not need the extension. These connections are shown in the third image.
Looking at the second image, you'll see the cables I used from the receiver to the APM were too short so I spec'd out longer cables in the parts listing but those lengths only apply if you mount it the same way as pictured. If you want the APM mounted along the axis of the truck, you'll need longer cables.
Once you get things mounted and connected, you're finished with the build! Add your own camera afterwards for fun and seeing how the rover navigates on its own!
Step 4: Mission Planner and Parameter Settings
This section is kind of required and only a quick primer. You can also get all the detailed information from http://rover.ardupilot.com/ as it is more thorough and not the objective of this Instructable, although the basics are here to get you going.
Download the Mission Planner (MP) MSI or ZIP file from http://ardupilot.com/downloads/?category=4 and install the program. This program will be used to load the firmware onto the APM and the main screen can be seen in the first image.
Note: It is only for Windows systems.
Once the program has been installed, connect the APM to the computer using the USB cable that came with it. Click on the ArduRover v2.42 (or whichever version is the most recent when you read this Instructable) icon and it will load the firmware to the APM. If it does not, it's likely your computer did not recognize the APM. Install the USB drivers from the same website you got the MP from and try again afterward.
When the firmware loads properly, you should connect to the APM through the planner. This can be done either by keeping it plugged in via the USB cable or using the telemetry module and connecting through that. Make sure to select the proper COM port regardless at the upper right of the MP, leave the baud rate at 115200, and click connect. At first, it will likely look for MavLink messages and then will start loading up the parameters.
On the left of the MP, you will need to click on "Standard Params" and then clock on ArduRover Pids. See the second image for the values used on my truck. It works fairly well and should give you a start although you will likely need to tune the parameters yourself later if they aren't optimal for your truck. Once you have copied the values over, be sure to click on "Write Params" at the bottom or it will keep the stock parameters.
For a detailed explanation of all the parameters you can possibly tune, you can click on "Advanced Params" on the left, then "Adv Parameter List" and then you will see descriptions of the variables. Some may not have descriptions but the parameter name themselves gives a good idea of its function.
Once the parameters are set, be sure to run the radio calibration before you do anything else and set the proper modes on the third channel on your radio.
For other details regarding MP setup, the APM:Rover guide does a fairly good job getting the basics going. Again, that can be found at http://rover.ardupilot.com/ and it is required to do a radio calibration at a minimum and then you should be set to go.