Introduction: Super Simple Beginners Robot!

About: Evil, Mad, Nerdy Robotics Experimenter!


'''ROBOT VIDEO'''
Here is an offsite link to the video while YouTube is processing the embedded version...

I created this Instructable for the absolute n00by robot wannabe. I have noticed a huge jump in the number of beginners getting into the hobby and the number of "how do I" questions seem to be mounting. Maybe this humble little Instructable will help one or two create their first robot. You will find basic source code at the end of this Instructable.

Don't panic at the number of steps... I broke the robot down into many tiny little steps for ease of following.

This little robot is nothing more than a simple plywood platform that carries a couple of modified model airplane servos as the main drive system, a microcontroller and a IR sensor. I designed in plenty of room to expand and add on. You should be able to build it in about 3 hours if you have the parts on hand.

The microcontroller I chose is the OOPic R. I picked this micro because the dozens of built in objects and sample codes make it easy for the beginner to get up and running quickly. They can be found from any of the major robot parts suppliers for usually less than 60 bucks. Get the starter kit as it has a programming cable and battery clip included.
You can use any microcontroller as long as you can plug a servo directly into it (that shortens the list, lol).

The servos listed are all Hitec HS-311 model airplane servos found at nearly any hobby shop for less than 10 bucks in some cases.

The IR sensor is a Sharp GP2D12 Analog unit available from Digikey (www.digikey.com). Any of the GP2D12XXX analog series will do the job.

The Tailwheel is a simple Dubro .20-.40 model airplane 1" wheel with mount. Pick one up at the hobby shop where you get your servos.

The wood base is a scrap piece of 1/4 inch birch plywood and the servo / sensor mount is a scrap piece of just about anything wooden. I used a piece of fir.

I made the billet aluminum wheels myself but you can use any wheel designed for servo attachment.

The rest of the robot consists of a few screws and some electrical standoffs.

Without the SPECAIL add on at the end it cost me about $95.00 USD. The special step adds about 50 bucks.

Be nice as it is my first Instructable.

Step 1: Tools and Materials

Here is a list of what you will need to build the Super SImple Robot!

Parts list:
-ooPic R Microcontroller (http://www.thebotshop.com/)
(note - You can use whichever microcontroller you are comfortable with)
-Sharp GP2D12 With wired JST connector
-Billet Aluminum Wheels/Tires (or equivelent)
-Hitec HS-311 Servos, Modified
-Super Glue
-.5 X 1 inch Double Sided Tape
-1/4 inch Plywood and a piece of scrap wood
-Dubro .20-.40 RC Airplane Tailwheel assmbly
-Misc. spaces/standoffs and screws/nuts-9 Volt battery
-Heat shrink tubing 1/16 x 3 inches
-3 standard female crimp pins (do not panic if you cant get them)
-Paint *optional
-9 volt battery

Tools:
-Misc Small Screwdrivers
-Needle Nose Pliers
-Drill and bits
-Saw
-Soldering Iron
-Solder
-Sandpaper
-Sharp Pencil
-Ruler

Total Cost approx. $95.00 USD
Time to Build approx. 2.5 - 3 hours

Step 2: Modify the Servos

You will need to modify your servos using the super glue the potentiometer method. I chose not to waste space by detailing it here as there are dozens of articles on Instructables and Google showing you how. If demand calls for it I will add it here later.

Essentially you need to tear them apart, find the 90 (no movement) position, super glue the pot top and bottom, put it all back together, modify the output gear, file off the top of the pot shaft flush with the case mold.

The Hitec HS-311 has a plastic pot shaft that makes it easy to file down. If you use a different servo that has a metal pot you must alter the underside of the output gear instead.

Potentiometer = Pot = Variable Resistor

Step 3: Cut the Wood Parts

Cut a piece of 1/4 inch birch plywood or equivelent, into a 3.25 inch square for the base.

**SPECIAL**
Cut a second piece of 1/4 plywood matching the first for a easy add on later.

Cut a piece of scrap wood into a 2 5/16 inch long, 3/4 inch tall, 1/2 inch thick GP2D12 mount.

The scrap servo / IR mount could be made by laminating 2 pieces of the 1/4 inch birch plywood together.

When everything is cut out give it a gentle sanding to clean up any rough or fuzzy edges.

Step 4: Drill the Holes

Using your microcontroller as a guide, layout the mounting holes on the plywood favoring the front as shown.

Using the tailwheel mount as a guide, layout the mounting holes on the plywood favoring the rear as shown.

Drill all holes with a 1/8 inch drill bit.

If you chose to make the spare base piece from **SPECIAL** in step 3, then clamp the two bases together and drill the microcontroller holes at the same time. Seperate the two pieces and drill the tail wheels holes in one of them only.

Step 5: Install the Servo / IR Mount

Super glue the servo / IR mount from Step 2 to the bottom of the plywood making sure to center it left and right as well as flush it up with the front edge of the plywood as shown.

Step 6: Drill Holes for Servo Wires

Temporarily places your servos in their mounting position behind the servo / IR mount and you will notice that the wires hit the mount on the back side. We will need some holes to allow the wires to pass through. Servos must be oriented so that the output shafts are closer to the front of the base, not the rear.

Using a servo as a guide, determine and mark where the holes need to be drilled on the mount.

Using your pencil and ruler, transfer those points to the front of the mount as shown in step 4.

Drill holes with a 5/16 drill bit. Be careful, you can split the wood. Never fear, if you do just super glue it together.

OPTIONALLY you can reroute the servo wires through a small hole drilled in the bottom of the servo during modification and avoid this step alltogether.



Step 7: Tailwheel

Install the tailwheel assembly at the center rear of the base as shown using a couple of 4-40 X 1/2 inch machine screws and nuts.

Make sure the screw heads, or nuts depending on orientation, get countersunk into the plywood so they do not interfere with servo installation.

Do not worry about height right now, we will adjust it later.

Step 8: Install Standoffs

It is best to get your board standoffs mounted right now before the servo go in.

Using a 4-40 X 1 inch screw, a 4-40 x 1/4 inch standoff and a 4-40 nut, install one in each microcontroller hole as shown.

Make sure the screw heads get countersunk into the plywood so they do not interfere with servo installation.

Step 9: Install Servos

Super glue the servos to the bottom side of the plywood base and up against the servo / IR mount. It only takes a drop or two..

Route the servo wires through the holes in the servo / IR mount as shown.

Step 10: Install the Microcontroller

Install the microcontroller on the standoffs as shown.

It may be necessary to place a washer on each standoff to lift the microcontroller over the tailwheel assembly depending on your layout skills.

Secure the microcontroller with either 4-40 nuts or 2.5 inch female to male standoffs (shown) for the **SPECIAL** add on later.

Step 11: Install Wheels

This step is a biggy... Install your wheels of choice and adjust the tailwheel do that the base sites level or slightly rear low.

Instuctable goody: I have extra sets of the wheels out in the shop, email for details.

Step 12: Add a Battery

Double sticky tape the battery in the space behind the servos and in front of the tailwheel on the bottom of the base. The battery needs to sit on edge to fit.

If you are building the **SPECIAL** version you can wait and use the upstairs space to mount the battery.

Step 13: Plug in the Servos

Plug the left servo into oopic servo port 31. Right most 3 pin port.
Plug the right servo into oopic servo port 30.

Look for the two servo connectors with yellow wires in the image notes at the rear of the picture.

Step 14: Install the IR

Super glue the Sharp GP2D12 over the holes/wires on the front mount.

Mount the IR as high as you can to minimize floor reflections.

Place it wires up and you can see a little relief in the plastic case for the servo wires to fit behind.

Step 15: Wire the IR

The hardest part of the whole robot, trust me.
On each of the wires for the GP2D12 place a 1 inch piece of heat shrink tubing. Slide it way out of the way.

Solder (or crimp) a single female crimp pin receptacle on to each wire.

OPTIONAL - NOT RECOMMENDED FOR NON SOLDERERS!
You can solder the end of the wire just to the tip of the needed microcontroller pins and slide the heat shrink over it to protect from shorting. It must be done fast and carefully.

Slide the heat shrink tubing flush to the face of the crimp receptacle.

Using a lighter of heat gun shink the tubing.

Sorry, I could not get a good picture all all of this small stuff.

Find any open 5 volt pin on the oopic and plug the red GP2D12 wire into it. There are lots of them. I used a spare 5 volt from the 12C port. Shown in the image notes.

Find any open GND pin on the oopic and plug the black GP2D12 wire into it. There are lots of them. I used a spare GND from the 12C port. Shown in the image notes.

Find pin3 and plug the white GP2D12 wire into it. There is only one of them lol.

Step 16: Source Code

UPDATED 2/16/09
SOURCE CODE FOR THE SONAR OPTION IN THE NEXT STEP (SPECIAL STUFF)

Follow the directions for your microcontroller and cut and paste this code into the editor. Compile and send to the robot.

The code is ultra simple but the bot avoids most obstacles it sees. It is easy to take my code and expand upon it.

'SuperSimpleBeginnersRobot
'www.instructables.com
'Ted Macy
'ted@oobug.com
'2/16/09
'-----------------------------------------------------------------
' Create and Setup Objects
'-----------------------------------------------------------------
Dim Servo_Right As New oServo
Dim Servo_Left As New oServo
Dim SRF04Servo As New oServo
Dim GP2D12 As oIRRange(3,8,cvOn)
Dim SRF04 As oSonarDV(8,9,cvOn)

SRF04Servo.IOLine=29 'Set the servo to use I/O Line 30.
SRF04Servo.Center=28 'Set the servos center to 28. (see manual)
SRF04Servo.Operate=cvTrue 'Last thing to do, Turn the Servo on.
Servo_Right.IOLine = 30 'Set the servo to use I/O Line 30.
Servo_Right.Center = 28 'Set the servos center to 28. (see manual)
Servo_Right.Operate =cvTrue 'Last thing to do, Turn the Servo on.
Servo_Left.IOLine = 31 'Set the servo to use I/O Line 31.
Servo_Left.Center = 28 'Set the servos center to 28. (see manual)
Servo_Left.Operate =cvTrue 'Last thing to do, Turn the Servo on.
'-----------------------------------------------------------------
' End Create and Setup Objects
' Main routine is your primary routine called upon power up!
'-----------------------------------------------------------------
Sub main()
Do
Call IR
Call Forward_All
Call SServo
Loop
End Sub
'-----------------------------------------------------------------
' End of Main routine
' Start of Drive System Subroutines
'-----------------------------------------------------------------
Sub Spin_Left()
Servo_Left.Invert=0
Servo_Left = 62
Servo_Right = 60
End Sub

Sub Spin_Right()
Servo_Right.Invert=1
Servo_Left = 62
Servo_Right = 60
End Sub

Sub Forward_All()
Servo_Right.Invert=0
Servo_Left.Invert=1
Servo_Right = 60
Servo_Left = 62
End Sub

Sub REVERSE()
Servo_Right.Invert=1
Servo_Left.Invert=0
Servo_Right = 60
Servo_Left = 62
End Sub

Sub STOP()
Servo_Left = 0
Servo_Right = 0
Call SServo
End Sub
'-----------------------------------------------------------------
' End of Drive System Subroutines
' Start of Sensor Subroutines
'-----------------------------------------------------------------
Sub SServo()
SRF04Servo.Position=15
SRF04.Operate.Pulse(1,1,250)
If SRF04.Value<128 Then
Call Spin_Right
Else Call Forward_All
End If
ooPIC.Delay=600

SRF04Servo.Position=31
SRF04.Operate.Pulse(1,1,250)
If SRF04.Value<64 Then
Call REVERSE
Else Call Forward_All
End If
ooPIC.Delay=600

SRF04Servo.Position=46
SRF04.Operate.Pulse(1,1,250)
If SRF04.Value<128 Then
Call Spin_Left
Else Call Forward_All
End If
ooPIC.Delay=600

SRF04Servo.Position=31
SRF04.Operate.Pulse(1,1,250)
If SRF04.Value<64 Then
Call REVERSE
Else Call Forward_All
End If
ooPIC.Delay=600
End Sub

Sub IR()
If GP2D12.Value<64 Then
Call STOP
End If
End Sub
'-----------------------------------------------------------------
' End of Sensor Subroutines
'-----------------------------------------------------------------

Step 17: SPECIAL STUFF

Using the extra base section cut at the beginning you can add a servo and sonar device for greater ranging abilities.

You will need:

Servo (not modified)
SRF04 or 08 with servo mount from Acroname (www.acroname.com)
Spare base section

Cut a hole in the front edge of the plywood just large enough for the servo to fit into.

Install plywood over the long standoffs and secure with some 4-40 nuts. You will need to countersink the bottom side of the holes to allow the entire standoff diameter to fit in them about 1/8 inch so that the threads stick up far enough.

Install the servo, sonar mount and sonar.

Hook the servo to oopic servo port 29 and wire the sonar to the pins as shown in the oopic users manual. You will have to use the sample code in the IDE to test it as I have not written any yet... Battery died.

You can add many levels for add ons if you want simply by cutting and drilling more pieces of plywood and adding standoffs.

Add more sensors like the QRB1134 to make your bot a line follower.

Have fun and build more bots! You can email me on or off list for help.

I will add video shortly. I am on dialup and have to drive 20 miles to town to get to high speed.

theo570 AT yahoo DOT com

Ted (BIGBUG)