6

Build Your Own RC Tankbot

Mark Martens and I recently finished up the RC Brutusbot project for Solarbotics, and while it has already been presented on the Solarbotics Blog I felt the urge to go beyond that and share a deeper look into what we did. I wanted to present an alternate way to make your own Radio controlled system without a lot of the hassle of designing your own hardware from scratch. Here’s a look at the RC Brutusbot project in action:

YouTube Preview Image

After currently submersing ourselves in Wireless RF networking and at the same time wondering how we could display a practical example of the new  Brutusbot kit, we ended up putting 2 and 2 together as a matter of convenience and curiousity. It’s the classic illustration of looking around your present environment and saying  “Hey, what if we take this and combine it with this…..”. This approach may or may not have been inspired by Dave Hrynkiw who, not more than a week before us, came up with the BEAM tank-mouse he affectionately named; Herbert. Included below is a description of how we built a Radio Controlled tankbot with Solarbotics parts and how you can build your own.

Here’s how to build your own

1. Gather the parts (pictured below), which include the not-so-well known but simple/robust Synapse Wireless RF100 modules and their breakout boards, a Brutusbot Tank Kit, a Motor Driver Kit, and some miscellaneous parts to build a controller.

2. Assemble these kits and connect them to match up with the circuit diagrams (also pictured below)

3. WITHOUT your LiPo battery plugged in, use the Synapse FTDI adapter board to hook one of your Synapse RF nodes to USB and upload the code provided. For now you can follow the instructions from this PDF, I’m working on instructable that should be done this week that will better illustrate the steps in doing this. Plug the battery back in once you are done using the USB port.

4. Provide power first to your tank and then to your controller (order seems to matter when establishing the link)

5. Push both or your controller’s thumbsticks forward and your RC tankbot should now be on it’s way with each thumbstick controlling a separate tank tread.

RC Tank Parts List:

Compact Motor Driver Kit
Synapse Breakout Board Kit (wrong SKU pictured, sorry!)
Synapse RF100 802.15.4 RF Network Module
Brutusbot Kit

RC Controller Parts List:

Synapse RF100PC6 Coordinator Bundle = 39250 + 51752
2000mAh 3.7V LiPo battery
Thumb Joystick
Breakout Board for Thumb Joystick
Prototype PCB


Controller Background and Notes

In terms of cost, this RF network system seems to compete with even the most low end RC transmission systems. And even though you don’t really get a physical controller with this system, it is a lot more flexible and versatile than a standard RC link. As a theoretical example (that we still might do one day) we could have had a complete diagnostic link between the tank and controller with the Tankbot sending sensor data and battery power results back to the controller for real-time, remote results.

Now as you may have noticed the controller was not built with all the same parts listed above, as I created the original controller with a Laser cutter and I’m pretty certain not everyone has one of those……yet :) (follow the Lasersaur project?). So I made up a list of parts that will do the same thing minus the enclosure and buttons. With this portion of the project you’ll have to get out your bus wire to make several point-to-point solder connections.

So it turns out that such a DIY controller does exist in kit form. I just had to go back into the memory banks a little bit. If you’d like a controller that is available for you to build as a kit, check out the ArbotiX Controller which you could adapt a Synapse module very easily to with the Synapse-Xbee adapter Kit. The Arbotix system which was originally designed by Trossen Robotics for Mech-Warfare competition robots but could easily be re-purposed for more peaceful means. As a side note, in the same way, this Synapse Wireless based system could also be adapted to be used in exciting robot competitions such as Mech-Warfare.

Tankbot Background and Notes

I called this part of the project a Tankbot, instead of a generic RC tank, because it uses a platform that was originally designed for a robot and we are using Synapse Wireless RF nodes that are user-programmable and can be used to control the tank autonomously or as a hybrid autonomous/user-controlled system. The tankbot can easily become autonomous by adding sensors and programming the on-board node to sense, compute, and react. You could even hook the node up to another microcontroller, such as an Arduino, and program it over the air.

For the tank-side we needed an Dual H-bridge motor driver to handle the current requirement of the motors so we used what was readily available to us, the compact motor driver kit, which is a widely excepted, often cloned, board that seems to meet our needs more often than not. Most Dual H-bridge motor drivers will work for this application, it’s just nice to have a 5V regulator already on board. Another a tid-bit of info if it interests you, for this project we had to create a brand new product because we had the need for a  Synapse Breakout board and didn’t have immediate access to one, so we re-purposed one of our kits for this goal and made it into a kit as we figured others may want a cheap Synapse module breakout as well.

We had to take a few nature shots before the white stuff covers up all the nice fall colors.

Controller Side Circuit Diagram

Tank Side Circuit Diagram

Code for the Tank side Node

"""
RC Brutusbot Code wirtten by Mark Martens Sept. 2011

Hardware used: Brutusbot kit + Compact Motor Driver Kit + Syanpse Breakout Board kit + Syanpse Wireless RF100PC6 node
"""

# Use Synapse Evaluation Board definitions
from synapse.evalBase import *

otherNodeAddr = "\x00\x92\x3B"      # <= put the address of the Controller-side node here

@setHook(HOOK_STARTUP)
def startupEvent():
"""This is hooked into the HOOK_STARTUP event"""
setPinDir(0, True)
setPinDir(1, True)
setPinDir(2, True)
setPinDir(3, True)
#end of Startup

def leftRev():
"""Left Reverse"""
writePin(1,True)
writePin(0,False)

def leftFwd():
"""Left Forward"""
writePin(0,True)
writePin(1,False)

def LeftStop():
"""Left Stop"""
writePin(1,False)
writePin(0,False)

def rightRev():
"""Right Reverse"""
writePin(3,True)
writePin(2,False)

def rightFwd():
"""Right Forward"""
writePin(2,True)
writePin(3,False)

def rightStop():
"""Right Reverse"""
writePin(2,False)
writePin(3,False)

Code for the Controller side Node

"""
RC Controller Code wirtten by Mark Martens Sept. 2011

Hardware used: Analog Thumbsticks + BattR15 + Syanpse-FTDI Adapter Kit + Syanpse Wireless RF100PC6 node
"""

# Use Synapse Evaluation Board definitions
from synapse.evalBase import *

otherNodeAddr = "\x00\x92\x3B"      # <= put the address of the Brutusbot-side node here

@setHook(HOOK_STARTUP)
def startupEvent():
"""This is hooked into the HOOK_STARTUP event"""

def readController():

""" This function will read our controller positions """
global leftAxisLR,leftAxisUD,rightAxisLR,rightAxisUD
leftAxisUD = readAdc(2)
leftAxisLR = readAdc(3)
rightAxisUD = readAdc(1)
rightAxisLR = readAdc(0)

if leftAxisUD < 475:
rpc(otherNodeAddr,'leftRev')
print("LeftRev")
elif (leftAxisUD > 575):
rpc(otherNodeAddr,'leftFwd')
print("LeftFwd")
else:
rpc(otherNodeAddr,'LeftStop')
print("LeftStop")
#End of our else

if rightAxisUD < 475:
rpc(otherNodeAddr,'rightRev')
print("rightRev")
elif rightAxisUD > 575:
rpc(otherNodeAddr,'rightFwd')
print("rightFwd")
else:
rpc(otherNodeAddr,'rightStop')
print("rightStop")
#End of our else

@setHook(HOOK_100MS)
def timer100msEvent(msTick):
"""Hooked into the HOOK_100MS event"""
readController();

While we did expect more than a 250ft line of sight (LOS) transmission (as the RF100 nodes are rated for 2.5 miles LOS) we did find that going farther with the range would become impractical as it is very hard to see the Brutusbot from that far away, nevermind trying to control it to come back to you! It is important to note that controlling something near the ground seems to be a bit more difficult as ground surfaces aren’t exactly ideal to bounce RF signals off of. Synapse Wireless does document that they achieve their results with each module 4 feet off the ground. That being said, if we needed to get higher signal reliability and longer transmission range we could have always have upgraded to the SMA version of the RF100 nodes, maybe next time.

Well we hope you have as much fun doing this project as we did!

Share