Coding4Fun Cannon – Building the Robot

Description

We have a chicken or egg issue here. Do we talk about how to build the robot, or about the software needed to run it? Since the hardware choices directly determine how the software will be developed, we have to think about how to make the robot safe and
at the same time functional. No one wants a 100lb robo

We have a chicken or egg issue here. Do we talk about how to build the robot, or about the software needed to run it? Since the hardware choices directly determine how the software will be developed, we have to think about how to make the robot safe and
at the same time functional. No one wants a 100lb robot with a pressurized co2 tank and armed t-shirt cannons running wild. This article won’t really talk about code, since that is a different, upcoming article; rather, this article will explain how to build
the physical robot, code-named Betty. To find out about the Windows Phone 7 application, code-named Frank, wait for the next article.

In this multipart article series, we’ll cover:

Part 9c into Part 143B? What?

For a project like this, there are no real instructions. It is a custom project. If I was asked to build another one, chances are it would look different. I spent a lot of time drawing out and talking to people, figuring out how to get all the parts to play
nicely. Only then did I go down to my local plastics place (I recommend TAPs Plastic in Seattle) to give them a technical drawing of what I wanted. The parts will vary depending on the look / feel you want. I wish I could give you part drawings that you could
replicate, but I don’t think they would do you much good. What I will do, however, is give you a ton of pictures, which should point you in the right direction.

Research and development

Typically, I research parts and features to death. However, due to the two-week time constraint of being ready for the Mix conference, I went with what I knew worked for my previous projects while focusing on how to make Betty self-contained since requiring
Betty to be plugged in would defeat the purpose of having her be a robot. The design of Betty was broken down into a few key parts: driving, aiming, shooting, brains, and power.

Driving a robot

Without knowing the weight of certain parts, I had to choose a base that could handle the load and be big enough to support everything I loaded onto Betty. From building random, previous robots, I knew of a company, Robot Marketplace, with a ton of internet
parts, including full bodies. I decided a medium version complete with stock batteries and motors would fit my needs. The batteries are configured here in series to boost the voltage from 12volt to 24volt. The kit comes with an AmpFlow motor controller, which
is actually a rebranded Roboteq controller. This connects to the computer via a serial to USB adapter. You’ll also have to get the Roboteq software to configure the motor controller to work off RS232 (Serial Port).

Shooting and aiming a t-shirt cannon

The cannons are Burst 175 T-Shirt cannons with electronic solenoid valves, allowing them to be fired with the Phidget 0/0/4 Relay board. The cannons are mounted onto a Servo City Pan-Tilt which is controlled by a Phidget Advanced Servo Controller. The pressure
on the robot is fixed.

Having a brain and communicating

Since Dan and myself had features in the initial planning that could require heavy processing, we decided it was best to have a laptop control everything, though initially, ideas of using the .Net Micro-framework were put out there as well. We decided on
a 13” HP Envy to be the brains of the operation. One thing we loved about this laptop is the extended battery, which snaps onto the bottom to give it a 14-hour life!

We used a Linksys wireless router for getting the phone and the laptop to be able to talk to one another. For the keynote, we had to leverage a wired connection, but we’ll typically use a wireless connection between Betty and Frank.

Powering everything

The battlebot kit comes with batteries to power the motors, but we still needed to power everything else. I went with 2 massive 12volt 17-amp hour batteries, which just barely fit the case, and I wired them in series to boost the voltage. This would give
me the massive amount of energy needed to power all of the random electronics. Since nothing on this robot, other than the motors, runs at 24v, we adjusted the voltage. This is where the BEC (Battery Elimination Circuit) came into play. Here is the breakdown:

If you use different parts, you’ll have to pay attention to the voltages. This is one reason why I like the Castle BEC units, I could just alter the voltage instead of buying a new BEC.

I also highly recommend installing on/off switches. If you plug stuff in with this type of voltage, you’ll get sparks, which carbonize the plugs.

Building knowledge brain dump

To mount the top of the robot to the chassis, I had to get a drill press and drill the sidewall of the front and back plate. I decided to save some money and buy a low-end drill press for this, but having a higher end drill press would have made my life
a bit less stressful. Drilling it had 1/16th of an inch on either side to punch through. After drilling, I used a 10-24 tap to put in screw threads so I could use thumbscrews to mount the two together. The two plates were T-6 aluminum, so I used
WD-40 to help lubricate both drilling and tapping. If you’ve never tapped a hole before, make sure you go a half turn in and then a quarter turn out. This helps break up the little bits of metal in the hole and so helps prevent the tap from breaking.

One thing to be aware of is the movement of the Pan-Tilt and how this relates to mounting the cannons. We had programmatic stops so the cannons didn’t go too far up or down or rip out any cords by rotating too much.

Another helpful tip is to use extra wire so you can move stuff around. Then, once you figure out final layout, either trim the extra wire or install entirely new wiring.

My final tip, and the tip to follow if you only follow one, is the following: use a Voltmeter before you connect anything together. I failed to follow this advice and had two wires switched, which reversed the polarity of the power. When I turned it on,
I had a nice electrical fire break out, which destroyed 3 BECs. This was a hundred dollar mistake, which took a half-day to repair, and it could have been far worse. Verifying and re-verifying the voltage will not only keep you safe, it will keep you from
having to buy new parts after explaining why the hallway smells like burnt plastic.

Hey, wait a second, you have a custom part!

Yes, yes I do. It is a part I made to help simplify the wiring on my automated bartender, drinktendr . It is designed to have a single power cord in, the positive wires go to the relay and back again, and have proper power cords go back out to the target
device. You can wire this up without the board; it just will be a bit messier. If you want to get the boards created, the file for the PCB is in Codeplex in the source code area in the Files directory.

Pictures should help

I think the two primary areas that will help show the who/what/when/where/why/how are overviews of the top and of the cannon mountings.

Chassis

Cannon

Body Top

Why doesn’t mine look good yet?!?!

It takes time to get all the mountings and wiring installed correctly. We had to demo to
the Gu using a robot that had wires all over the place! It wasn’t pretty, but the key thing is that it got the job done. Only after I got the functionality working did I shorten wires and do some cord clean-up.
I stated this above, but I’ll reiterate the fact, that having longer wires helped me move stuff around while being able to adapt to new layouts.

Conclusion

Building two Betties was a fun and hard project. By leveraging past projects, we completed the project quickly without compromising functionality.

In upcoming articles, we’ll talk about how to program Betty, as well as how to get the phone to talk to her. Also, if I missed a section of building out Betty that you want me to cover, please comment and I’ll happily explain more of what I did.

t with a pressurized co2 tank and armed t-shirt cannons running wild. This article won’t really talk about code, since that is a different, upcoming article; rather, this article will explain how to build
the physical robot, code-named Betty. To find out about the Windows Phone 7 application, code-named Frank, wait for the next article.

In this multipart article series, we’ll cover:

Part 9c into Part 143B? What?

For a project like this, there are no real instructions. It is a custom project. If I was asked to build another one, chances are it would look different. I spent a lot of time drawing out and talking to people, figuring out how to get all the parts to play
nicely. Only then did I go down to my local plastics place (I recommend TAPs Plastic in Seattle) to give them a technical drawing of what I wanted. The parts will vary depending on the look / feel you want. I wish I could give you part drawings that you could
replicate, but I don’t think they would do you much good. What I will do, however, is give you a ton of pictures, which should point you in the right direction.

Research and development

Typically, I research parts and features to death. However, due to the two-week time constraint of being ready for the Mix conference, I went with what I knew worked for my previous projects while focusing on how to make Betty self-contained since requiring
Betty to be plugged in would defeat the purpose of having her be a robot. The design of Betty was broken down into a few key parts: driving, aiming, shooting, brains, and power.

Driving a robot

Without knowing the weight of certain parts, I had to choose a base that could handle the load and be big enough to support everything I loaded onto Betty. From building random, previous robots, I knew of a company, Robot Marketplace, with a ton of internet
parts, including full bodies. I decided a medium version complete with stock batteries and motors would fit my needs. The batteries are configured here in series to boost the voltage from 12volt to 24volt. The kit comes with an AmpFlow motor controller, which
is actually a rebranded Roboteq controller. This connects to the computer via a serial to USB adapter. You’ll also have to get the Roboteq software to configure the motor controller to work off RS232 (Serial Port).

Shooting and aiming a t-shirt cannon

The cannons are Burst 175 T-Shirt cannons with electronic solenoid valves, allowing them to be fired with the Phidget 0/0/4 Relay board. The cannons are mounted onto a Servo City Pan-Tilt which is controlled by a Phidget Advanced Servo Controller. The pressure
on the robot is fixed.

Having a brain and communicating

Since Dan and myself had features in the initial planning that could require heavy processing, we decided it was best to have a laptop control everything, though initially, ideas of using the .Net Micro-framework were put out there as well. We decided on
a 13” HP Envy to be the brains of the operation. One thing we loved about this laptop is the extended battery, which snaps onto the bottom to give it a 14-hour life!

We used a Linksys wireless router for getting the phone and the laptop to be able to talk to one another. For the keynote, we had to leverage a wired connection, but we’ll typically use a wireless connection between Betty and Frank.

Powering everything

The battlebot kit comes with batteries to power the motors, but we still needed to power everything else. I went with 2 massive 12volt 17-amp hour batteries, which just barely fit the case, and I wired them in series to boost the voltage. This would give
me the massive amount of energy needed to power all of the random electronics. Since nothing on this robot, other than the motors, runs at 24v, we adjusted the voltage. This is where the BEC (Battery Elimination Circuit) came into play. Here is the breakdown:

If you use different parts, you’ll have to pay attention to the voltages. This is one reason why I like the Castle BEC units, I could just alter the voltage instead of buying a new BEC.

I also highly recommend installing on/off switches. If you plug stuff in with this type of voltage, you’ll get sparks, which carbonize the plugs.

Building knowledge brain dump

To mount the top of the robot to the chassis, I had to get a drill press and drill the sidewall of the front and back plate. I decided to save some money and buy a low-end drill press for this, but having a higher end drill press would have made my life
a bit less stressful. Drilling it had 1/16th of an inch on either side to punch through. After drilling, I used a 10-24 tap to put in screw threads so I could use thumbscrews to mount the two together. The two plates were T-6 aluminum, so I used
WD-40 to help lubricate both drilling and tapping. If you’ve never tapped a hole before, make sure you go a half turn in and then a quarter turn out. This helps break up the little bits of metal in the hole and so helps prevent the tap from breaking.

One thing to be aware of is the movement of the Pan-Tilt and how this relates to mounting the cannons. We had programmatic stops so the cannons didn’t go too far up or down or rip out any cords by rotating too much.

Another helpful tip is to use extra wire so you can move stuff around. Then, once you figure out final layout, either trim the extra wire or install entirely new wiring.

My final tip, and the tip to follow if you only follow one, is the following: use a Voltmeter before you connect anything together. I failed to follow this advice and had two wires switched, which reversed the polarity of the power. When I turned it on,
I had a nice electrical fire break out, which destroyed 3 BECs. This was a hundred dollar mistake, which took a half-day to repair, and it could have been far worse. Verifying and re-verifying the voltage will not only keep you safe, it will keep you from
having to buy new parts after explaining why the hallway smells like burnt plastic.

Hey, wait a second, you have a custom part!

Yes, yes I do. It is a part I made to help simplify the wiring on my automated bartender, drinktendr . It is designed to have a single power cord in, the positive wires go to the relay and back again, and have proper power cords go back out to the target
device. You can wire this up without the board; it just will be a bit messier. If you want to get the boards created, the file for the PCB is in Codeplex in the source code area in the Files directory.

Pictures should help

I think the two primary areas that will help show the who/what/when/where/why/how are overviews of the top and of the cannon mountings.

Chassis

Cannon

Body Top

Why doesn’t mine look good yet?!?!

It takes time to get all the mountings and wiring installed correctly. We had to demo to
the Gu using a robot that had wires all over the place! It wasn’t pretty, but the key thing is that it got the job done. Only after I got the functionality working did I shorten wires and do some cord clean-up.
I stated this above, but I’ll reiterate the fact, that having longer wires helped me move stuff around while being able to adapt to new layouts.

Conclusion

Building two Betties was a fun and hard project. By leveraging past projects, we completed the project quickly without compromising functionality.

In upcoming articles, we’ll talk about how to program Betty, as well as how to get the phone to talk to her. Also, if I missed a section of building out Betty that you want me to cover, please comment and I’ll happily explain more of what I did.