Saturday, June 28, 2008

My Butler Robot: Building the Robot's Head

The robot head for your butler robot can be whatever you want . I decided to make a dome shaped head with one eye. Here are the instructions for the robot head that I made:

Get a 12" diameter cake cover and if its not silver yet , then spray paint it silver.

Now find a soldering iron that you don't mind destroying. ( you can actually just clean it up afterwards it doesn;t really destroy it)Plug in the soldering iron and wait for it to heat up.

Now find one threaded PVC connector ( 1.5" diameter is what I used).

Hot glue that piece to the silver dome in the place where you want the eye. Now the soldering iron is nice and hot you need to slowly melt a hole inside the PVC piece you just glued. Make sure you don't melt the actual plastic piece.

After you made your hole , wet the soldering iron with a sponge and unplug it , letting it cool. Take some PVC pipe ( I used a 7" , 1.5" diameter PVC pipe) and hot glue it to the bottom of the cake cover as shown. Make sure the PVC is attached securely.

Find that webcam that you will dedicate for this butler robot ( I used Quickcam Pro 4000 ) and glue it so that the lens of the camera is looking through that hole we melted.

Now the glue the other end of the PVC pipe to the center of the top piece of the wood platform we made.Cool head isn't it?

My Butler Robot: Building the Upper Body

After the bottom is completely assembled and the robot is actually starting to like like a robot, we have to build the upper body , which is the part that will really define the butler robot.This stage will also require the most amount of materials.

I used:

  • one 5.5" x 9" plywood and 3/4" thick
  • one 5" x 9" plywood piece and 3/4" thick
  • two 10" x 21" plywood piece and 3/4" thick
  • one 9" x 11.5" plywood piece and 3/4" thick
  • one 9" x 21" plywood piece and 3/4" thick

Cut those materials and lay them outside on the floor. Take out a canister of black spray paint and prepare to paint!

Now take your canister of black spray paint and spray all the boards with a nice layer of black paint. Be sure to wear latex gloves so that you don't get your hands dirty.

Let the painted wood dry and now get ahold of the mini -fridge. If it isn't black already then spray paint that as well.

Attach the 5.5" x 9" piece to one of the 10" x 21" pieces as shown in the picture below.

Grab the other 10" x 21" piece and attach it to the other end of the 5.5" x 9" piece.

Now attach the 5" x 9" piece to the other end of the wood.

Stand up the wood that was all connected together so that the 5.5" x 9" piece is on the bottom end.

Take the 9" x 11.5" wood and screw it in to the top as show in the picture.

Take two L brackets and connect it so that the top of the bracket is 5" above the floor.

Take that mini-fridge and lay it down on top of the L brackets we just put up.

To secure the mini-fridge in place use a hot glue gun to glue the sides of the minifridge to the wood.

It should be secured and shouldn't wobble in there. Make sure that you have enough clearance to opne the fridge door.

The mini-fridge should have two black wires coming out from the back. Connect the end of one wire to the positive terminal of the 12V battery and the end of the other wire to the negative terminal. Now whenever the robot turns up the minifridge will be on.

The laptop that I dedicated to Chives was an old one I had and had a 17" screen. Lay the laptop that you have vertically on the space that is in back of the chassis and secure it with L brackets.

Unscrew the plexiglas cover that we put on the motor enclosure place it on the floor . Now put the wooden box we just built on top of it ( aligning it so that its in the center). Secure the wooden box to the plexiglas using two L brackets.

Monday, June 23, 2008

Building the Lower Body

After you have finished the whole motor control part its time to make the body for the butler robot. This is the "essence" of the robot so be careful.

STEP 1: Create a box for the relays and Phidgets

When we ended off in the motor control section , the robot had no enclosure and was entirely open and prone to damage.

To make a box for the phidgets and relays you'll first need to measure it out.

If you followed my template then you will need:

  • Two pieces of 14 1/2" by 8 " plywood and 3/4" inch thick
  • Two pieces of 11 1/2" by 8" plywood , 3/4" thick
  • One piece 14 1/2" by 13" plexiglas piece

Assemble the wood pieces only for now as shown in the picture, it should be a rectangle. Just take some regular 3/4" drywall screws or some nails and attach the wood like as pictured below:

Now to see if its the correct measurements put the box you just made over the batteries, relays and phidgets. It should fit around them perfectly , as demonstrated below.

STEP 2: Paint the enclosure silver

Take the the wood enclosure off the chassis and lay it on the floor in a well ventilated area. Now get a canister of silver spray paint or just a bucket of silver paint and a paintbrush. It would also be a good idea to wear gloves right about now. Spray paint the entire outside of the wood in an even coat of paint. Then let it dry for about an hour or two .

STEP 3: Fasten the wood enclosure to the chassis

Fasten the (now silver and hopefully dry paint) wood enclosure to the chassis using L brackets.

Now it should look like this after you fasten it down with L brackets.

STEP 4: Now take some 1/4" plastic spacers

You will need 6 plastic spacers that look like this:

Nail two or three spacers to each side of the top of the enclosure as show in the picture below:

STEP 5: Put on the Plexiglas Cover

Take that piece of plexiglass that we cut before and put them on top of the spacers. Then drill holes in the plexiglas so that the holes are over the spacer holes and screw the plexiglass through the spacer into the wood.

Building the Motor Control System

After the chassis is complete we have to make an interface to the motors so that we can control it from a laptop.

The two best methods to control a motor are using a MOSFET motor driver or using a relay. Since I am all about making a robot from common parts and taking advantage of everything available , I used relays. The only downside of a relay is that they cannot be PWMed , which in plain english means you can't have speed control with relays.

For those who have 125 dollars to spend on motor interface , they can get this

For the majority who dont have that cash to spend, you guys will use automotive relays. The relays I used can be found here. Make sure that you get this socket also. The socket is awesome because it has color coded wires AND it allows you to replace relays easily. You need a total of 8 relays and a total of 4 dual relay sockets.

The motors will be powered by either one or two 12V lead acid battery(ies) OR buy two 6V batteries. The battery(ies) that you buy must be able to provide at least 20AH each. If you decide to go with two 12V batteries you wire the batteries in parallel, if they are two 6V batteries then you wire them in series. If its only one 12V battery then obviously you just directly connect wires to the battey without any hitch.

The relays need their own separate supply of 12V to actuate them ( not really needed, you can use the lead acid batteries for this also but its not really good practice to use one source for driving and and being actuated at the same time on a relay ) . What I did was just use eight AA batteries wired in series and then later I switched out the AA batteries for a 12V rechargeable NiMH battery pack . Just make sure they give out 12V total after wired in series.

Step 1: Know what everything does - the relays ,Phidgets interface, and the batteries

Before we actually start making the relay motor controller circuit let's examine what a relay is and how it works.

Read the HowStuffWorks Article on Relays.

You should now understand that a relay is an electromagnet and a switch, and when the electromagnet has electricity running through it the switch closes, but otherwise the switch is open. The switch in our relay will turn on or turn off a motor. You need 4 relays to make a motor be able to go forwards and reverse. If you want to understand how that works have a look at this page.

The electromagnet will be turned on by a neat piece of hardware called a Phidgets Interface Kit. That is the hardware that will interface the computer to the relays. The interface board consists of 16 inputs and 16 outputs. Right now we are interested in the digital outputs. The outputs are just digital switches that switch to ground.

So lets look at the schematic below. Lets pretend that the switch was on the lower line and not the upper one. If the switch was on the lower line then when it was pressed it would let current flow and the LED would light. The Phidgets electronically "press" that switch and close the circuit. Instead of the LED we have a relay and so we always apply power to the relay but the ground part is left open. Only when we want to turn on the relay to we send a command to electronically close the ground switch.

***NEED TO UPDATE SCHEMATIC***

Step 2: Wiring the relays for Motor A

You should have 8 relays and 4 dual sockets. Put each relay in its designated socket.

The following steps are only for two dual sockets ( four relays). The other two remaining dual sockets will get a different wiring which will be detailed in step number three.

By the way whenever I say to connect the wires , I mean to solder them together. Also, the wheelchair motors should have four wires coming out. There are two thick ones and two skinny ones. Leave the skinny ones alone for now. The thick ones should also be different colors, usually blue and red. If its different colors then just know that I refer to one of the wires as the blue wire and the other one as the red wire.

You can either follow the steps below or just read this schematic and follow it. Make sure you follow the shematic by color code.

A. First Dual Socket:

1. One of the relays in the dual socket

Here is the color code key for the wires for the one of the relays on the socket , do this for only ONE of the relays:

BLUE- Connect to power( the positive ) of the motor's batteries. This is the motor's battery's , not the batteries for the relays.

BLACK- Connect to the ground(negative) of the relay's battery

YELLOW- Connect to the blue wire of the motor

WHITE- Leave alone for now

RED - Not used in this project so you could just rip it out or whatever

2. The other relay in the dual socket

Now for the OTHER relay thats in the same dual socket as the other one we just did:

BLUE- Connect to ground( the negative) of the motor's batteries. This is the motor's battery's , not the batteries for the relays.

BLACK- Connect to the ground(negative) of the relay's battery

YELLOW- Connect to the red wire of the same motor used above

WHITE- Connect to the white wire of the other relay in the same dual socket

RED - Not used in this project so you could just rip it out or whatever

Now that we are done with that dual socket , so set it aside. Pickup the second dual socket.

B. Second Dual Socket:

1. One of the relays in the dual socket

Here is the color code key for the wires for the one of the relays on the socket , do this for only ONE of the relays:

BLUE- Connect to power( the positive ) of the motor's batteries. This is the motor's battery's , not the batteries for the relays.

BLACK- Connect to the ground(negative) of the relay's battery

YELLOW- Connect to the red wire of the motor

WHITE- Leave alone for now

RED - Not used in this project so you could just rip it out or whatever

2. The other relay in the dual socket

Now for the OTHER relay thats in the same dual socket as the other one we just did:

BLUE- Connect to ground( the negative) of the motor's batteries. This is the motor's battery's , not the batteries for the relays.

BLACK- Connect to the ground(negative) of the relay's battery

YELLOW- Connect to the blue wire of the same motor used above

WHITE- Connect to the white wire of the other relay in the same dual socket

RED - Not used in this project so you could just rip it out or whatever

STEP 3: Wiring the Relays for Motor B

Now we have finished the motor control for one of the motors. One motor down, one more to go. The other motor will have the EXACT same wiring as the first motor except that YELLOW wires will go to the second motor and not to the first motor ( which we just finished wiring above) . So follow the exact steps for wiring it again , making sure to wire it to the second motor and not the first.

After you are done wiring both motors , locate the white wires. From each wire joint ( point where the white wires were soldered together) you need to connect some wire ( NOT ONE OF THE RELAY SOCKET WIRES) to the joint and then leave the end of that wire alone. If you followed the schematic and not the written steps , then you already did this step.

OK so if you followed all the steps correctly you should have four wires(one per dual socket) which are connected on one side to the relays, but are not connected to anything on the other side. You should also have a ton of wires everywhere. A good idea now is to organize the wires. Grab some labels and start labeling whatever you feel is important to label. Also get some wire ties or string and tidy up.

STEP 4: Enclosing the Relays and Labeling

I put both my relay circuits in a nice plastic box and closed it up. This protects the relays and also looks nice as well. Notice how neat it looks! I labeled each individual relay. Disregard the words "forward" on the label for now, we will deal with this all later.

STEP 5: Mounting the batteries

If you haven't done so already , mount the batteries. Use L brackets to hold the batteries in place. L brackets are 90 degree brackets of metal that can be found in all hardware stores ( like Home Depot, Lowes, etc.) Just use the L brackets like I used it below to fasten the batteries to the chassis. Make sure the batteries are fastened tightly and don't move, because while the robot is moving you don't want heavy objects like batteries falling out. Also, notice that I put duct tape to cover the battery's terminals. You should do the same because you want to have the battery's terminal covered at all times to prevent short circuits.

STEP 6: Connect the wires to the Phidgets

Remember the four wires you have from the wire joint from the relay? Now its time to connect them to the Phidgets. Connect the wires to the Phidgets output ports 0 - 3. Each wire getting its own terminal, order doesn't really matter. Also , connect a wire to the relay battery's ground connection ( negative side) and connect the other end to the two Phidgets terminals closest to output terminals 0 - 3 , they are marked "G". This assigns each output of the Phidget to its own dual relay.

STEP 7: Mount the Phidgets

To mount the Phidgets just stick screws or nails through its mounting hole and into the top of the plastic box which encloses your entire relay circuit. If you don't like that , then just mount it anywhere as long as the wires aren't getting to tightly pulled.

STEP 8: Connecting the Kill Switch

Wheelchair robots are very powerful machines, if something goes wrong and it doesn't stop or something it WILL DO DAMAGE. This is why we need to install a mechanical kill switch. All the switch is , is a standard light switch. The switch should have either two wires or two terminals on the side of it. Just cut the negative wire that is going from the motor's battery to the relays. Now that it's cut , connect a switch in between the two wires. Very simple.

Building the Chassis

The first step to building a butler robot is to construct a chassis.

The chassis is probably the most important part of the robot. If this fails than the entire robot is practically pointless. This is the foundation of the robot. The chassis is the mode of transportation of the robot.

For motors I decided to use preowned wheelchair motors since they were pretty cheap ( ~$70 on eBay) and since they can handle a very heavy load .

What to ask when buying a wheelchair motor:

  • Do the motors actually work?
  • Do the motors come with wheels attached?
  • Do they draw more than 15 amps per hour?
  • Do they have too high RPM? ( this is relative to your application )
  • Do the motors have bad gears that make a lot of noise when turning?

RPM stands for rounds per minute. Now lets examine that further. That means that at 1 RPM a 12" wheel will turn exactly once , which also means that the wheel traveled 12". Now if that number was higher , say 60 RPM , then that would mean the robot would travel 12" per second. Now for me thats too fast , but it all depends how fast you need it to go.

STEP 1: Choosing the right material

The material we need for the chassis needs to be strong and able to support massive pounds. I went along with wood , though plexiglass will be okay. Make sure you use 3/4" thick wood . Any thinner will not really support the weight. 1" is okay also, but its just extra weight.

STEP 2: Mounting the Motors

You then mount each wheelchair motor to a piece of wood or plexiglas using the mounting holes as shown in the picture. Use washers and the appropriate sized thread when securing the motors to the material. Try to align the sides of the motors with the wood so that the wheels are aligned straight.

STEP TWO: Mount the Caster Wheel

Get a caster that can support 250 pounds . I purchased one from Home Depot, but any caster that can support 250 lbs. is good.

Attach the caster to the base as shown in the picture.

Now you should have a base looking something like this:

A Sketchup CAD of the base can be found here

CHASSIS IS COMPLETE!