Make a wall avoiding Robot! by Brandon121233
Featured
Objective: To create from scratch a working robot that is able to avoid walls and obstacles.
Ever wanted to make a robot that could actually do something, but never had the time or knowledge to do it? Fear no more, this instructable is just for you! I will show you step by step how to make all the necessary parts, and programs to get your very own robot up and running. I was first inspired to build a robot when I was ten, and saw Lost in Space, with that famous B-9 robot, I wanted one! Well six years later I finally built a working robot, its name- Walbot of course!

To find out more...Go to step one.




 
Remove these adsRemove these ads by Signing Up

Step 1: Gathering supplies

Now is a good time to order and collect some of the things you will need for this project. The "brain" of Walbot is a Microcontroller by Atmel called the Atmega168, it is very fast, easy to use and cheap, so that is what I will be using in this project. If you prefer to use PIC, or other Microcontrollers thats fine, however I can't help you out with the code then! Since I did not feel like wasting my time building a prototyping board for the Atmega168, I bought the USB Arduino; it is very easy to use, supports USB, has the boot-loader already burned in, quite cheap, and has free programming software that is similar to C++. Well enough of that talk, let's get on with what you will need!
note: these are only the prices I found from a quick search, if you look harder you probably will find better prices somewhere else, also the DIgiKey links might be broken or timed out, just search for the part description and whatever price matches the one listed here.

Parts:
Arduino USB board - $34.95
LV-EZ1 Ultrasonic Rangefinder- $25.95
2X 54:1 16mm Spur Gearmotor, FF-050- $13.80
2XPack of 4 Energizer NiMH AA Batteries- $4.85
9Volt Energizer NiMH Battery- $8.99
2X3mm Aluminum Bearing Block- $3.50
2X 3xAA battery holder (DigiKey part # SBH-331AS-ND - $0.98
2.1 x 5.5 x 9mm Right angle DC Power Plug - $0.95
2X Noise Suppression Capacitors - $0.50
L298 double full H-Bridge - FREE SAMPLE!
12"X12" sheet of 1/4" Lexan polycarbonate - $16.36
3X Aluminum 1" 8-32 standoffs - $0.45
4X 2-56 X 1/4 BUTTON CAP SCREW - $0.37
BOX of 100 4-40 X 3/8 BUTTON CAP SCREWS - $5.40
3X 8-32 X 3/8 BUTTON CAP SCREWS - $0.29
Neoprene Foam Tire - 3"D x 0.75"W (pair) - $5.36
Mounting Hub - 3mm (pair)- $8.00
9Volt battery clip (DigiKey part # 234K-ND)
Break Away Headers - $2.95
2 red 2 green and 1 yellow 3mm LED - $2.20 total
4X 1N5818 SCHOTTKY Diode (DigiKey part # 1N5818-E3/1GI-ND) - $0.15
2X 47k and 2X 2.2k and 1X 10k resistirs (digikey part #'s P47KBACT-ND and P2.2KBACT-ND and P10KBACT-ND) - $0.34
Ping Pong ball or other small low friction sphere for a caster- Free????

Custom order Arduino circuit shield see step 4

Optional / If your a complete beginner:
22AWG High Strand Count Silicone Wire Combo Pack - $16.80
Polarized Connectors to make things look neat, you will need crimp pins, 4X 2 pin header and housing, 4 pin header and housing - $6.45
Velcro for sticking things to base

Tools
these are the suggested tools to have for this project, you could either buy borrow or use something else you have for the same purpose.
Bandsaw for cutting the Lexan base and various parts.
Drill Press for drilling straight holes in Lexan base.
Tap and Die set for tapping holes in the Lexan base.
Good soldering iron for soldering various parts on the robot.
Digital Multimeter for debugging electrical components.
Wire strippers
Needle-nose pliers for gripping and crimping the connectors

GeniusDevils says: Mar 9, 2013. 11:24 PM
Bingo, this is a cool autobot.

Try a different concept Wall Following Robot
kinglevi says: Feb 11, 2013. 6:29 PM
hi this is a very good project i completed i but i need the code for the sharpe ir please send it to king02 levi2004@yahoo.ca
topgear01 says: Nov 27, 2012. 10:59 PM
In your code under the distCal function where did you get 204 in
dist = ((valAvg/204.8)/.009765625);
also i would like to see how you calculated distance with the IR sensors
link for the updated codes does not seem to work
thanks !! great job
ashik says: Apr 30, 2012. 9:13 PM
can i pls have the proper Cutting and Drilling guide Word document and also the PCB information soon...
can u pls mail it to ashikbekal@gmail.com
pls Brandon
smokiemcpott says: Jan 8, 2012. 2:44 PM
Oh, softwarelink not work :(
HERNAN MOMA says: Nov 25, 2011. 11:03 AM
Brandon I cant find de code for the Infra red sensor
paulc2 says: Oct 17, 2011. 9:47 PM
Can't access the site to get an electrical schematic of the motors shield. Nor the PCB manufacturer.

Is the schematic still available and where can I get it

Thanks
brownjd says: Aug 2, 2011. 2:23 PM
It looks like the link to the Cutting and Drilling guide Word document is broken. Anyone have it?
brownjd says: Aug 1, 2011. 8:06 PM
It looks like a number of the parts are not available anymore. Does anyone have any alternatives for the motors and capacitors? I think a lot of the items from Trossenrobotics are not available...
moc.selbatcurtsni says: Jan 6, 2011. 7:17 PM
This is a Great bot 1st of all, but this bot would be much improved with full circumference sensors and the capability to map its tracks and all the obstacles the sensors have found.
Brandon121233 (author) says: May 27, 2010. 6:52 AM
Ok so this is kinda embarrassing but I recently just lost all of my Walbot files to a broken (reaaaalllly broken trust me) hard drive, I have backups of most of the files from uploading them here, but I'm missing the Walbot shield .sch file that I have linked to here. Did anyone by chance download it at some point and still have it? Or if someone can figure out how to see if they can get around the "this link appears to be broken" msg for this  www.instructables.com/file/F3LWTE5F3AQ37KW/ link, that would be sweet too.
Brandon121233 (author) says: Mar 31, 2010. 11:07 AM
 So if anyone has pictures of their version of walbot please send them to me (brandon121233@gmail.com) I want to add a section to this instructable featuring pictures of other peoples versions of walbot. THANKS
Kryptonite says: Nov 29, 2009. 11:12 PM
On step three in the first picture, you can't hover over the yellow box inside the other one, but I'm assuming it's just pointing out where the half ping pong / table tennis ball goes.
8thWonderOfTheWorld says: Nov 27, 2009. 9:06 AM
First of all great instructable. This is a really cool idea and I'm excited to build it. I have two questions, though. I am making the pcb myself. What do the red arrows (like the one connected to pin 9 of the H-bridge) mean? And what do the JP(number) stand for? Thanks to anybody to take the time to answer my noobish question.
Brandon121233 (author) says: Nov 27, 2009. 10:43 AM
The only picture with red arrows is the 4th pic and the H Bridge is not a part of that. Not sure what you mean by JP, can you give me a more specific quote?
8thWonderOfTheWorld says: Nov 27, 2009. 8:47 PM
Sorry about not being more specific. When I referred to the red arrow, I meant in the schematic. The schematic also has JP1, JP2, etc., and I didn't know what that meant. Thank you very much.
Brandon121233 (author) says: Nov 28, 2009. 8:25 AM
thats Jumper 1 and Jumper 2, kinda like auxiliary ports should you ever want to add more sensors...
Abhinav789 says: Nov 4, 2009. 11:09 AM
I think that the text for step 1 is missing as I am unable to view only this step but I can view the others. I need to know what materials to use. Please can you fix this as soon as possible?
Brandon121233 (author) says: Nov 4, 2009. 12:51 PM
huh thats very odd, it seems as though intructables is having a bit of a problem as it refuses to show that step??? If I click edit it shows all the text but when I save it nothing shows up for step 2... I might have to contact Eric W bout this

but for now heres a link to where you can also find the same instructable www.societyofrobots.com/member_tutorials/node/45 also take a look at some of the other member tutorials and stuff on that site. I know the guy who runs it, and as far as hooby robotics goes- he's the best.
avishekghosh07 says: Jul 29, 2009. 9:25 PM
Very nice robot, I have already arranged materials but waiting for the schematic. Can anybody help me to get the schematic? kindly help me Thanks.
kennyvs says: Jun 17, 2009. 9:23 AM
hi brandon, i just start on making the PCB myself cause i dont have that much money to spend on, i have a problem on the schematic that you have posted. The line that connect to pin 9 of hte H-Bridge, i see it as an arrow that does that mean? does it mean the same as Pin 4 of the H-bridge too (the one that connect to the +), which i assume to with +8v right? And your 2 battleries, it in series right? I just want to make sure of these before i solder on the H-bridge. Thank in advance.
Sergant Tinkers says: May 23, 2009. 8:55 AM
cool bot
Abhishek.D says: May 12, 2009. 1:12 AM
Abhishek.D says: May 12, 2009. 1:10 AM
princessmia says: Mar 12, 2009. 11:43 AM
hello.i cant open the schematic file as well. can u send it to my email pls? nadiacatlady@y! thxz.
akatsuki666 says: Feb 11, 2009. 12:05 PM
ok all i want is for you to email me the shcamatics . i emailed you so you should have my email (i cant open the shcamatics in the file there in on step 4)
akatsuki666 says: Feb 11, 2009. 4:26 AM
i sent you the e-mail
akatsuki666 says: Feb 10, 2009. 2:04 PM
ok i rly wana od this project but my arduino has errors saying expected ' } ' before ' else ' at global scope pls help ty vm
Brandon121233 (author) says: Feb 10, 2009. 3:01 PM
hmmm did you modify the code, that I have uploaded, at all? If not I need to look at it, but I think you might have accidentally left out a brecket after one of the else statements. Click on the error and it should highlight the section thats wrong in red.
akatsuki666 says: Feb 10, 2009. 2:38 PM
fixed it...your origanal didnt work but the lazer one did. one more step for me(but a good learning opertunity) ty pep
akatsuki666 says: Feb 10, 2009. 2:32 PM
another error is.. in function ' avoid walls() ': error: expected intalizer before ' int '
smitty9357 says: May 4, 2008. 8:23 AM
i love this robot and i really want to finish it but whenever i try to verify the Walbot_QT_Program it says, " error: expected primary-expression before 'else' can you please help i need to finish this by Tuesday.
Brandon121233 (author) says: May 4, 2008. 10:59 AM
Did u accidentally delete a bracket after one of the else statements? It should highlight the area where the error is if you click on the error message. If you still can't find the problem copy and email EXACTLY the code that is giving you the error and I'll take a look at it. As far as I know of the code that I have posted compiles without errors... my email is Brandon121233@gmail.com
akatsuki666 says: Feb 10, 2009. 2:12 PM
and yes the errors with else but i deleted nothing pls help
akatsuki666 says: Feb 10, 2009. 2:11 PM
a bunch of errors.... help
smitty9357 says: May 5, 2008. 2:10 PM
ok thanks that works now but what exactly did ypu mean when you were talking about step six on on page "step four" could you explain it in a little more detail.
Brandon121233 (author) says: May 5, 2008. 4:08 PM
Its where you solder the 9Volt connector tab wires to the 2.1 x 5.5 x 9mm Right angle DC Power Plug, that needs to be soldered together so that the positive (red wire on the 9volt power tab) is connected to the CENTER (inside metal part) of the DC power plug. If you are still confused I'll update that section with some pictures. By the way, would you mind sending some pictures of your Walbot (if you have a camera) to my email: Brandon121233@gmail.com. I would love to see what someone else's creation looks like, and if its ok with you I'll add some of the pictures to a new section of like people who have built Walbots. Thanks a bunch if you can...
jimsondefrancia05 says: Jan 8, 2009. 7:47 PM
bredon i use stepper motor, do you think its the same as yours? whats the difference if i use stepper motor?
jimsondefrancia05 says: Jan 8, 2009. 7:40 PM
bredon plz give me a jpg file of the systmetic diagramn
jimsondefrancia05 says: Nov 13, 2008. 7:34 PM
hey brendon can give systematic diagram in your robot as a image file
Brandon121233 (author) says: Nov 13, 2008. 11:25 PM
??? Not sure what that means, could you explain it in better english
dark sponge says: Dec 29, 2008. 7:04 PM
He wants the Schematic of the Arduino shield.
Brandon121233 (author) says: Dec 29, 2008. 8:52 PM
image? the link for the files are there, do you literally mean you want an image like JPEG or TIF of the circuit?
dark sponge says: Dec 30, 2008. 8:45 AM
Yes, I think that is what jimsondefrancia05 means.
Nitin Sharma says: Dec 13, 2008. 8:36 PM
hey man, everything is gr8 this is really a gr8 instructable but plz give me a circuit diagram for this (i can't fing any on the link which u gave)
timmy1234s says: Nov 28, 2008. 5:53 PM
instead for the plexiglass, can we use just use a plain old CD? That would be preffered
jimsondefrancia05 says: Nov 14, 2008. 10:03 PM
bredon i mean can you please give some systematic diagram about the circuit of your robot and I use stepper motor than a spur. whats the difference of the two? if i use stepper as a motor, there its instances that it will affect the program
jimsondefrancia05 says: Nov 9, 2008. 12:21 AM
hey bredon were we can find this code #include "WProgram.h"
jimsondefrancia05 says: Nov 9, 2008. 12:07 AM
hey bredon i use stepper motor do you its ok for your circuits? whats the difference if use stepper motor that your motor?
timmy1234s says: Nov 1, 2008. 6:47 PM
can you post the code for the robot for us?
Brandon121233 (author) says: Nov 1, 2008. 7:09 PM
Brandon121233 (author) says: Nov 1, 2008. 7:08 PM
its uploaded on this server, check out the programming step for the download link
jimsondefrancia05 says: Sep 21, 2008. 6:26 PM
hey bredon can u add some function to your robot like the robot cannot fall into edge. like the rombaa. cliff sensor. tnx for ur robot it help a lot
Noodle93 says: Sep 23, 2008. 5:01 AM
I'd probably use an IR Sensor for that.
jimsondefrancia05 says: Sep 23, 2008. 8:21 AM
can u show some technique how to do it?
Noodle93 says: Sep 23, 2008. 6:51 PM
I haven't made one, but I"d use a IR Sensor, there should be tut on arduino.cc And then use an IR LED, all sorta hanging off the edge. You'll have to play with the threshold of the cliff detection though.
jimsondefrancia05 says: Sep 24, 2008. 5:29 AM
can u show some circuit how to do it i am willing to pay and also the code
Noodle93 says: Sep 24, 2008. 5:36 AM
Sorry mate.

http://www.arduino.cc/playground/Main/PanasonicIrSensor

Make the led and the sensor attached underneath the robot. The codes not too hard ;).

I haven't even made a robot yet, just LED arrays and such. We'd use IR as opposed to ultrasonic because a. cheaper and b. there's not much infrared light coming in underneath the robot. It shouldn't be too hard.
jimsondefrancia05 says: Sep 25, 2008. 3:01 AM
hahahah.... wats done is done... i got 10sec. 2 require...
Jahoovi says: Sep 18, 2008. 7:46 PM
kewl
smitty9357 says: May 5, 2008. 4:02 PM
Hey we finished it but our breakaway headers dont look right, they look different than yours and the ones in the picture on the website. We arent sure whehter or not they sent us the wrong ones. Could you describe the ones you have or give us a link to another site. Thanks in advance
Brandon121233 (author) says: May 5, 2008. 4:22 PM
They should look like this http://www.societyofrobots.com/images/sbs_breakaway_header.JPG
http://www.societyofrobots.com/images/sbs_breakaway_header2.JPG
if they're bent or something just use some pliers to make them straight. They will work just as long as they fit in the bottom of the circuit shield and on the top of the arduino female header pins. I got them from Sparkfun.com so thats the best place I can think of to get them.
sajidsutar says: Aug 21, 2008. 3:22 AM
please give us the block diagram & some important applications of wall avoiding robot
mylesmyles says: Aug 8, 2008. 7:08 PM
I have an idea... what if you programed it to alternate between turning left and right? It seemed to be curving in the video. That would make the batteries discharge more or less equal. Nice instructable by the way.
chi chi chippy says: Aug 1, 2008. 2:29 PM
wat is the over all price for the bot. cuz i want to make one for as cheap as posible. and is this a good, first time makeing a robot, robot? if its not can some1 give me a link to the simplest robot for a begginer to start on. thanks if u can help me out
Brandon121233 (author) says: Aug 1, 2008. 7:24 PM
actually I think what you might be looking for is right here $50 Robot Tutorial by John Palmisano my robot is for people with a little more experience with electronics and mechanics, also mine looks nicer when its finished but his is much cheaper and easier to build, if you still feel that his is past your skill level I would get like a Boe-Bot from parallax Be-Bot. It is a little more expensive though, and if you have any more questions please feel free to contact me whenever you like. If you are really serious about building a robot I would suggest becoming a member of the Society of Robots Forum there are tons of very smart people that are glad to quickly answer any questions you might have and give good advice. Happy building!
chi chi chippy says: Aug 2, 2008. 5:30 AM
thanks for the anwers but i think i bit off more than i can chew. im not that good at that stuff and the bebot thing is to expensive for me. but thanks any way. i made a vibrobot frome watching youtube and i used a old motor i had and masking tape and a 9v battery. thanks any way.
ph0new610i says: Jul 24, 2008. 11:20 PM
please send it as quick as possible
ph0new610i says: Jul 24, 2008. 11:18 PM
hey brandon can you send all the details of robot circuit diagram and a clear intruction sets to me on chetan10289@gmail.com please it is urgent.....i want to use this in my yearly project i will be thankfull to you... i m waiting for your reply
sc lightning says: Jul 9, 2008. 7:39 PM
i just had an awesome idea put a vacuum and a gps locater and have it vacuum your house!!!
robotkid249 says: Jul 2, 2008. 10:03 AM
nice music
jimsondefrancia05 says: May 31, 2008. 11:59 PM
hey bredon were is the switch of the robot the on and off how to connect it
lordofthedonuts says: Mar 12, 2008. 10:30 PM
Seeing the video reminded me of Pong or Brick, the way this robot moves is just like the ball in these two games. Prehaps with a bit of modifications in the Program we could make a robotic Pong game!
zjharva says: Dec 25, 2007. 9:29 AM
Nice song in the video
David Cousins says: Dec 14, 2007. 5:28 PM
Brandon Amazing. Great bot. Fast too. I once made a bot using RC servos for motors. It worked, but it was so slow. I used sharp sensors, but not the sonar ones. Awesome job. The instructions are great too.
Brandon121233 (author) says: Jun 27, 2007. 1:57 PM
Well larger/heavier robots tend to have to be recharged often, just look at Roomba.
backcountry says: Jul 5, 2007. 3:56 PM
Think it could be modified to use a single rechargable 12V battery? Simple voltage divider could send 8v to the processor and 4v to the motors... Better yet would be to have a connector so the 12v battery could be recharged without having to physically remove it.
Brandon121233 (author) says: Jul 5, 2007. 5:42 PM
Yes it could be, but because of space limitations, finding a 12v battery pack that would fit in there, and be cost effective as well would be pretty hard, not to mention the extra electronic components it would require. For Walbot I KISSed it (keep it simple stupid).
backcountry says: Nov 29, 2007. 4:06 PM
Actually, if you really want to keep it simple, check this out:
http://www.youtube.com/watch?v=szJ0eleTgSk

A 9 volt battery, 5v regulator, 2 distance sensors, transistors, relays, motors, plus a little mounting hardware is all it really takes!
Gnome says: Oct 23, 2007. 1:02 PM
Add this to the new Laser Cutter Contest! You have to win something!
Brandon121233 (author) says: Oct 23, 2007. 3:36 PM
I put it in the first laser cutter contest and only got a shirt
Danny says: Oct 28, 2007. 7:21 AM
only?
Brandon121233 (author) says: Oct 28, 2007. 11:42 AM
yup, thats what I thought, oh well you win some you lose some
andrew101 says: Sep 23, 2007. 3:59 PM
Exelently done!!!!!!! Finally someone who can take pictures and have a good instructable at the same time!!!
buterSBob29 says: Aug 31, 2007. 8:28 AM
dude im gonna see if i can build this and attach a cover to make it stronger and a solar panel so i don't need batteries
Brandon121233 (author) says: Aug 22, 2007. 10:19 AM
I still have 2 circuit boards for Walbot up for sale- $20 plus shipping. Contact me at Brandon121233@gmail.com
klee27x says: Aug 7, 2007. 9:51 AM
It is controlled by steppers? Maybe you could program it to back up and turn just a little, then go forward again. So it can get into the nooks and crannies. Oh.. then you would need a sensor on the back, too.
Brandon121233 (author) says: Aug 14, 2007. 4:14 PM
Steppers don't have good power to weight ratios generally, so no. They are controlled by spur gearhead motors.
klee27x says: Aug 7, 2007. 9:53 AM
While you're at it, maybe you could add some mandaroty rest stops. That robot make me tired just watching it. :)
Brandon121233 (author) says: Aug 14, 2007. 4:12 PM
I have two extra circuit boards if anyone wants to buy them, I'm selling them 30% off of what you would have to pay from the manufacturer- $20 plus shipping to where ever you are. First come first serve.
Brandon121233 (author) says: Jul 25, 2007. 1:38 AM
I added more pics of the PCB board
technopenguin says: Jul 15, 2007. 11:16 AM
This robot has excellent turning capabilities! You should make a robot sumo version of this. I'm am definitely going to build this!!
technopenguin says: Jul 15, 2007. 11:17 AM
And when I looked at the next step, I noticed you used an arduino board! I haven't seen A robot that used Arduino until now!
technopenguin says: Jul 15, 2007. 11:22 AM
By the way excellent instructable.
Brandon121233 (author) says: Jul 15, 2007. 2:45 PM
thanks
twisted says: Jun 24, 2007. 12:24 PM
it only turns to the right... whats up with that?? some simple code changes could probally fix that.... other than that... good job!!
Brandon121233 (author) says: Jul 8, 2007. 3:34 PM
I fixed it...happy?
twisted says: Jul 8, 2007. 5:42 PM
sweet, thats so awsome! haha great robot! ~Twisted
trebuchet03 says: Jun 24, 2007. 3:06 PM
It doesn't exactly turn... It's more of... It only spins clockwise :p
Brandon121233 (author) says: Jul 8, 2007. 3:36 PM
What exactly DO you define turning to be? A "spin clockwise" still counts as a turn in my books.
backcountry says: Jun 27, 2007. 12:58 PM
This is a terrific instructable (what, no Altoids tins?) and very nicely presented. Something I would dive right into except... I'm bothered by the power consumption and the need to recharge batteries so often. Wondering if there's a way to achieve similar behavior with less juice? The nearest I've come is this solar powered photovore that avoids falling off the edge of a table:
http://www.youtube.com/watch?v=Yi_DUEsEsyY
It just uses photodiodes as an edge sensor.
Brandon121233 (author) says: Jun 25, 2007. 9:13 AM
It can run for almost 4 hours
jugglingmaniac says: Jun 24, 2007. 11:22 PM
nice.. pretty fast to. One question though. How long can it keep on running?lol
Brandon121233 (author) says: Jun 24, 2007. 4:59 PM
never mind I got it to work
Brandon121233 (author) says: Jun 24, 2007. 3:07 PM
Thanks guys Twisted: I know it only turns right... but since for now it only has one sensor there is no point in turning left, as it can't sense stuff to the left or right. However in a day or two I will be adding the 6th step and that is the Sharp infrared update, so you can add in two more sensors and it can decide which way to turn based on whichever the left or right is more open. While I'm commenting, does anyone have a clue as to why I can't add this to the Laser Engraver contest page? When I try to add it to that group it gives me "ERROR 500: Could not execute JDBC batch update" for some reason, anyone know why?
thadrien says: Jun 24, 2007. 3:02 AM
Awesome. First, it's well commented. Second, the source code is very good: code separated in small parts, well organisated and well commented! Continue as this: I am looking forward to see the next robot.
trebuchet03 says: Jun 24, 2007. 1:40 AM
Awesome! And bonus points for using Capsella parts!
Trinity says: Jun 24, 2007. 1:26 AM
lol have you tried putting it in a box and watching it spin?
RyanPotter says: Jun 23, 2007. 11:22 PM
Wow. Just... wow. This is amazingly well-documented, let alone just plain amazing. If I could afford it, I would do this project in a heartbeat. Brilliant.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!