BattleBots Home
Meet the Robots Building & Competing Upcoming Battles News & Press New Store!
Our Sponsors







how to build a bot
tips from the pros
parts and materials
tools of the trade
charts and formulas
how things work ((in SVG))
how to drive ((in SVG))

how to compete

how to get a sponsor

battlebot rules and guildelines

the battlebox arena

design your own bot ((in svg))

tips from the pros

This "Tips from the Pros" installment comes courtesy of Norm Muzzy, the mastermind behind M.O.E. (Marvel of Engineering). Norm lets us in on the unique advantages of using the IFI Robotics Control System! Read all about it!

IFI Control System
by Norm Muzzy, Team Flaming Monkeys

Several weeks ago, I decided to make the switch from a 72 Mhz RC control system to the IFI control system. There were several reasons for making this switch. First off, my existing radios were 72 Mhz based. I could have had them retuned, but felt there were other advantages in making a switch to the IFI system. The primary reason is to deal with frequency conflicts at the competitions. The IFI system uses a frequency system that takes care of the frequency coordination issues. I don’t understand how it works, but it takes care of the coordination! What this means at the events is that I will have a better chance of being able to turn on and test our robots before we move into the box. The ability to have a higher level of programmable control is an additional benefit. We are thinking about using a sensor on the robot to decide when to fire the weapon hammer. This level of programmability is built into the IFI system, so we don’t need to add another computer of some type to handle the logic.

The shipment from IFI arrived, and it was time to spread out the toys! The primary pieces of the control system are as follows:

Operator Interface (OI). This is the flat black interface box that people carry up to the drivers stand. This is where you plug in a joystick and switches or other control input devices. It has a cable that goes to the transmitter module.

Robot Controller. This is the unit that goes in the robot itself. The receiver module is made to unplug from the back of the motherboard. This way you can wire a motherboard into each robot, and then move the receiver module from robot to robot without unwiring everything. The robot controller has numerous indicator lights on it to tell you its status. It has connections to drive speed controls via a standard PWM signal, to drive relays with a logic level on-off signal, and to read inputs from sensors that you might carry on the robot. The controller can be programmed to react in an appropriate manner to the inputs from the Operator Interface and the switches on the robot.

The rest of the stuff! We ordered a joystick, a couple more IFI speed controls, and a couple of their relay modules. There were also a number of cables to hook everything together, and a power supply for the OI. One thing that you will need to do is to download the manuals for the IFI system, and also the Basic Stamp Editor V1.091 Beta program from Parallax. The robot controller is programmed from your PC based computer.

Planning the installation:
First thing we did was to unwire Jo Mama and hook everything up to the IFI robot controller. Probably not the right way to start off! After a bit of moving things back and forth, we decided to set the robot controller up with a couple servos so that we could adapt the program to work the way we wanted it to work.

We used one of the small 12V batteries from the robot to power the robot controller. We connected servos to the PWM outputs, and the spike relay boards to the relay connectors. The PWM power connection needs to be provided, so we plugged a standard RC battery pack and switch into one of the unused PWM connectors. The default program looks to use two joysticks for control (one joystick for left drive, one for right). We wanted a single joystick control, so we downloaded the ‘2000onejoy’ program from the IFI website.

Programming the Robot Controller
The setup on the computer went OK. I needed to disable some of the software that was watching the serial port, things like the Hot Synch cradle for my Palm Pilot, and the connection for my digital camera. Once I got those out of the way, the computer was communicating with the controller just fine. I borrowed a jumper from the brake/coast connector on one of the victors, installed it on the WP (write protect) connection on the robot controller, and we are ready to program!

The ‘2000onejoy’ program gave us the control logic that we wanted. Using servos to show the commanded output was much more peaceful than having the robot making noise! We needed to reassign which buttons controlled the relays, but after reading through the program it was simple to do.

Understanding the Robot Controller
The programmable part of the robot controller can be a bit intimidating. But once you understand how it fits together and how the program works, I don’t think it is any more complicated than trying to figure out how to program my Futaba computer radio! There are a few key sections of the program that you need to find.

The Operator Interface (OI) Analog Inputs section tells you how to figure out where your input joysticks or other controls are going into the system. Variables like P1_x and P2_x refer to port 1 or port 2 on the OI. If you plug a joystick into port 1, and move the handle side to side, you will be varying P1_x. If you push it forwards or rearwards, you will be varying P1_y. When we get to do the math to drive the speed controls, those are the variables we will use.
The Operator Interface Digital Inputs and Aliases section tells you where the switch inputs are in the program. Things like P1_sw_trig and P1_sw_top refer to the trigger switch and the switch on the top of the Port 1 joystick. So, if you want the trigger switch to turn on a relay, you are going to be using the variable P1_sw_trig!

The Robot Aliases section shows you how the variables are tied to the relay output ports. Each Spike relay connector carries the command signal for two relays. Thus, Relay Connector 1 has Relay1_fwd and Relay1_rev. The Buttons to Relays section is where you assign the OI input to drive the appropriate output signal.

The Serial Output command is what sends the control signals to the output pins. This is where you assign the values to the different PWM pins, and turn relays on or off. We take the values from the OI numbers, do the calculations, and assign them to the PWM outputs. Many of these programs can be downloaded from the IFI website. Once you understand how the programming works, you can cut and paste from other programs, and write some of your own code to create your own custom control system.

Hooking up existing components
The IFI system works very well with it’s own components, but how does it work with other brand speed controls and such? Well, the servos plugged right in and worked. All we needed to do was put power for them on the pwm pins using a standard RC battery receiver pack. I tried some RC car speed controls, and they worked just like they should. We don’t run Vantec speed controls, but these should also plug right in. The PWM signal is an industry standard, so most of this is plug and play!

How about the Team Delta Relay Boards. We use these on MOE to turn the cutter blade on and off. These are driven by a PWM signal, but they need to act like a relay channel. Looks like two ways we could approach this! We could plug in another joystick and use the joystick to run the relay board. Looks like plugging a joystick into port three on the OI will give us control of a Team Delta board plugged into PWM3. Yup! I would rather use a switch, so it looks like we need to put a couple lines of programming in.

Up near the top of the program we need to let it know that we are going to use a variable (PWM3) for some calculations. Find the lines that say PWM1 var byte and PWM2 var byte. Add the following line:

PWM3 Var byte 'Modified output for PWM3 <----ADDED

Then to the end of the program, where we did the calculations for the tank steering:

PWM3= (((2000 +127 + (p1_sw_trig * 127) – (p1_sw_top *127)) MIN 2010 MAX 2245) –2000)

The PWM signal has a value of 127 at neutral. Adding 127 drives it to full forward, subtracting 127 drives it to full reverse. If the both buttons are pushed they cancel out and it stays in neutral. The 2000 value is there to make sure the calculation never goes negative (it can’t with this equation, but you may want to do something fancier).

Last thing we need to do is add the PWM variable into the Serout command:

Serout USERCPU, OUTBAUD, [255,255,pwm1,relayA,pwm2,relayB,pwm3,p4_y,
p1_x,p2_x,p3_x,p4_x,p1_wheel,p2_wheel,
p3_wheel,p4_wheel,127,127,127,127]

Now the relay control from the buttons on the joystick is assigned to the PWM3 signal.

OK, so now I want to look at our MOE and Phoenix robot, where we use four speed controls to control four drive motors. We could use Y cables, but it is also easy to simply put the same signal on a couple more PWM output pins. Lets put it on PWM5 and PWM6:

Serout USERCPU, OUTBAUD, [255,255,pwm1,relayA,pwm2,relayB,pwm3,p4_y,
pwm1,pwm2,p3_x,p4_x,p1_wheel,p2_wheel,
p3_wheel,p4_wheel,127,127,127,127]

Not too tough! I hope this gives you an idea of how to install the IFI system in your robot, and how to use some of the programmable features that it has. Time to go cut some more aluminum!

Norm Muzzy
DO NOT CONSTRUCT OR OPERATE A ROBOT OR BATTLEBOT UNLESS SUPERVISED BY A QUALIFIED ADULT.

CONTESTANTS ARE SOLELY RESPONSIBLE FOR THEIR ROBOT OR BATTLEBOT WHETHER OR NOT IT COMPLIES WITH THE RULES OF BATTLEBOTS, INC. (COMPANY) OR HAS BEEN INSPECTED FOR SAFETY OR OTHERWISE BY THE COMPANY.

THE CONTESTANTS' RESPONSIBILITY INCLUDES ALL MATTERS OF SAFETY, CONDITION, DESIGN, CONFORMITY TO LAW, OPERATION, MERCHANTABILITY AND FITNESS FOR USE AND FOR ANY PARTICULAR PURPOSE.

BY ACCESSING THE COMPANY RULES OR PARTICIPATING IN ANY EVENT EACH CONTESTANT WAIVES ALL AGREEMENTS, WARRANTIES, GUARANTEES, RIGHTS AND REMEDIES, EXPRESS OR IMPLIED (IF ANY), INCLUDING BUT NOT LIMITED TO, ANY OBLIGATION OR LIABILITY OF THE COMPANY WITH RESPECT TO ANY MATTER DESCRIBED ABOVE AND ANY DIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATURE, WHETHER OR NOT ARISING FROM THE NEGLIGENCE OF THE COMPANY OR ANY OTHER PERSON, AND ANY RISKS WITH RESPECT THERETO ARE HEREBY ASSUMED BY CONTESTANTS.
Contact comments privacy copyright Site created by Iguana Studios, Inc.