Picture of 'BOB' V2.0
This is a sequel, so to speak, of the 'Obstacle-Avoiding Robot with a Personality' instructable. In that instructable, I decided to call the robot 'BOB'. BOB had quite a few flaws and drawbacks, so I have now improved BOB in a few ways. (He? It?) now has better:

  • Stamina (improved power system)
  • 'Vision' (extra sensors)
  • 'Nerves' (connections are made more securely)
  • Brainpower (different microcontroller)

Bob now uses a switching regulator and a 9.6V RC battery for power, better sensor mounts, an extra GP2D12 IR sensor, a panning servo for the ultrasonic rangefinder, and an AVR ATmega168 microcontroller on an Arduino development board.

I have always loved building projects with microcontrollers, and what would be better than building a robot with one to showcase the microcontroller's fullest abilities!

Step 1: Parts List

Here's a list of what BOB comprises of, and where to get them:


  • 1x Futaba S3003 (Hobby Servo) - Hobbytown USA, Futaba.com
  • 2x Parallax Continuous Rotation Servos - Parallax.com, Acroname.com

Prototyping Hardware/Cables:

  • 1x 3-Wire Sensor Cable - Any online robotic parts reseller. I got mine from Trossenrobotics.com.
  • 4x 'Board Mounting Analog Jacks'. - I got these HERE. I think you can also get them from Digikey.
  • Breadboard - Radioshack
  • Various lengths of wire (for the connections on the breadboard). I used a breadboard because I HATE soldering. The breadboard is used for making all the connections between the sensors and the microcontroller.
  • Male Headers - I've had some I got from sparkfun HERE.


  • 3x Sharp GP2D12 IR Sensors (with 3-wire cables) - Acroname, Trossen Robotics (that's where I got mine), Devantech
  • 'Ping)))' Ultrasonic Rangefinder - Parallax.com, I think I've seen it other places online...


  • 9.6V Ni-Cd Rechargeable Battery (or any other 8-AA cell battery pack/any rechargeable batter yback above 9V) - I had this one from a long time ago when it was once used for a RC racecar. You can get these practically any hobby shop.
  • 5V 1A Switching Voltage Regulator - Dimension Engineering.com or Trossen Robotics (where I got mine)
  • Appropriate connector to fit the battery you're using (for making the connection between the battery and the electronics).


  • Arduino Microcontroller (Arduino Diecimila; I know the picture shows an NG; that was an accident. I meant to upload a pic of the Diecimila. I used the Diecimila, but you don't have to have the latest model of Arduino for this robot.)


  • The chassis I used is one I got from a kit from Parallax called the 'BOE-Bot Kit'. You can use plexiglass, an appropriately-sized sheet of plastic, a pre-machined chassis from an online retailer, or even a block of wood.

Cable Management:

  • Cable Ties - (those white, plastic things you find in packaging for holding things together) You can get them at the home depot, lowes, or practically any hardware store.


  • 1x Piezo Speaker/Element - I used this as an indicator; the Arduino beeps when the program begins running
  • 1x LED
  • 1x 200ohm resistor (for the LED)
1-40 of 50Next »
jpalacios63 months ago
puedo tener acceso a planos y materiales de algún proyecto?
good day.. your sensor (ultrasonic range finder) has 3 pins how about the 4 pins ( VCC,.trig(T),echo(R),GND) how a should connect it.?? and how i change the code?? looking for your immediate reply..

This is probably way too late to tell you, but I'll share anyways in hope of helping others. The three pin ultrasonic range sensors use the middle pin for both the echo and trigger, so some extra code is needed to be implemented. However if you use a four pin sensor, the code merely needs to recognize which pin is the trig and which is echo. If you check out my Instructable http://www.instructables.com/id/Motion-Following-Robot/ , you can find code that pertains to a four pin sensor.

DSPNRG3 years ago
FYI: If I right-click on the file; select 'Save Link As..'; rename file 'BOB_V2_0.pde; I can open it by double clicking, in which case it opens using the default association you have set on your OS; or in the alternative, open your favorite editor (Arduino sketch or, in my case, Microsoft Visual Studio ultimate with the Visual Micro plugin (see http://www.visualmicro.com/). Works like a charm.

I was hoping for better commenting/documentation as my preferred method of code proofing is to simply read the comments for an overall understanding. In this case, however, the code is very simple, so no biggie.

I really like this design schema and may "borrow" some of the ideas for my own project. That is what is so great about these instructables!
Jip93 years ago
Can someone explain how everything is hooked up? I wanted to use an 11 v battery to power everything. The arduino uses 9v so do I have to hook up two sets of wires one to a breadboard with the 5 v regulator and one direct to the arduino or how does it work?
Are you using an arduino uno or duemillonove? or is it an old NG or something?
answers in step 1 :)
Gaark4 years ago
Wow! Bobs' had a MAJOR upgrade! That's a fantastic lil beasty you made there :D
SimonRawr4 years ago
How much did the whole thing cost to make?
abran54 years ago
are rangefinders exspensive?
D5quar3 abran54 years ago
depends, ultrasonic is $32, infrared is $10 to $20
punkhead585 years ago
I just noticed that even though you said that the only raw component needed is a resistor, there's a small rectifier diode on the breadboard. What is that connected to?
linc58855 years ago
Wow I love going to have to Build me one :)
Nibu6 years ago
can you tell me what is the extension of this ATmega168 i found ATmega168 20pu ATmega16820 mu etc which is that particular one you used & how did u programmed it?
RPisces (author)  Nibu6 years ago
Mine was marked 'ATmega168PU'. I programmed it using the Arduino development board and software.
Nibu RPisces6 years ago
where did you got ATmega168PU& Arduino development board and software. ?
just Google search it you should find a whole bunch of people that carry it.
punkhead585 years ago
I like it. It seems a bit too sensitive though, it started freaking out at the end of that video. By the way, I tried your software, it's great.
Rayanarfawi6 years ago
please mortaldoom can you put a scamatic because in the arduino i dnt found pin 5 and 6 , 7, 9, 11 because its the first time i use arduino atmega168 please help me explain me how to make all the connection and thnks
MovieMaker6 years ago
Hi , Mortal! I have just finished a robot made with your software and ArduinoFun's LARS robot shield. I have built many robots but I have yet to build one any easier. It was great. here is a picture if I can find it. Also, I wish to expand on it, I am not a c programmer, but I am trying to get eyebrows attached software wise. I did this before on the basic stamp, but it came out doing everything too slow. So, like you, I moved to the Arduino. But, I could use some advise on c. Thanks! Maybe you could send me a private message and I could talk straight to you through email. Anyway, here is my image.
RPisces (author)  MovieMaker6 years ago
That's an excellent build! I love the design; very creative! Who knew you could use a frisbee for a robot!!! It would be really neat, though, to have the top portion of the robot mounted on a center 'pillar' of sorts, that can be panned via a servo. Then you could mount any amount and type of sensors you please, and they could be rotated in any direction; kindof like R2-D2! Not to mention it would look pretty sweet. I've moved on to a new robot; maybe it'll be deemed 'super-BOB' (BOB V3.0, anyone?); this one uses an iRobot Roomba Red, and some other high-tech goodies. It has the capability to follow a person around, carrying a small (up to probably 50 pounds) payload, and avoids obstacles along the way. Right now it doesn't do a very good job of all this, but I'm working on it! I just recently fried the battery somehow :(, so I'll have to buy a new one. Apparently you can get one on ebay for about 30 bucks... Anyways, now that I know about it, I recommend that you (along with anyone else making a 'BOB') use the servo library for the arduino, which uses internal timers, freeing up your program and not 'blocking' it. This way you can do more while running servos instead of wasting the time 'waiting' for each delay between servo pulses.
I had an UGLY gold roomba530. Who says you have to keep Ugly. Look at it now! Another Question for Mortal, There must be ONE place in your program that the PING sees something. Also ONE place in your program that the IR sees something. Where is which place? I tried to inject an eyebrow UP or Down in some spots, but when I did that, it stopped the program completely at that point. I hope you understand my question. Thanks!
andrew1016 years ago
wow. i really like its program. if it gets confused (finds its surrounded) then it stops to look around and find out whats near it. that is really neat.
NetReaper6 years ago
Lol, now just put a red LED on the head and put a case on it. It will look like a cylon with the red eye
a laser!
Bendunia6 years ago
Fantastic tutorial, well done and thanks for sharing. It looks like the ultrasonic range finders didn't like so much being tilted.
Soldier65756 years ago
The only parts i can not find are the analog jacks and the mount you used for the sensors that attached to the Boe Bot chassis. Digikey says the analog jacks are discontinued. Do you know any place else for them?
RPisces (author)  Soldier65756 years ago
I got the analog jacks and the IR sensor mount from Trossen Robotics. I found the sensor mount here: (http://www.trossenrobotics.com/store/c/3107-Wiring-Cables.aspx) but it looks like they no longer carry/are out of stock of the analog jacks. If they ever pop up again they'd be here: (http://www.trossenrobotics.com/store/c/3107-Wiring-Cables.aspx). But you can find those elsewhere. I used them because they make the wire mess a little neater, but you don't need them. Note that I didn't buy the mount for the ultrasonic sensor; I machined it myself because I didn't want to have to pay for one. Good luck and let me know how it goes!
Thank you. This is the first project that me and my son (11 yrs old) are going to tackle together. We are looking forward to working on it together and learning.
RPisces (author)  Soldier65756 years ago
Oh great to hear that! I will say that it'll definitely be an enriching learning experience! Let me know if you have any questions and I'd be glad to help.
timmy1234s6 years ago
i dont understand how you wire the wires to the breadboard, looks all too complicated.
love it man!, here is my bugbot I got tired of the wally/bobot replicants and am now playing with different chassis and building my own z80 based controler board too. take a look and have a laugh.. I just started casting my own aluminum chassis parts so the next bug will be a scorpion then I want to do a wasp im now figureing howto get it to fly..
bugbot 002.jpg
RPisces (author)  iamdenteddisk6 years ago
CoOl! Good job with the handiwork!
byufan6 years ago
I really want to biuld one but ive never done anything like this would it be to hard and how much would it cost
you could hack an old r/c car.
bubba's robot 001.JPG
could but how
emilk7 years ago
To conserve even more power you can add a power sink driver chip toy your robot. so that you can turn off the sensors that are not currently being read. I use this chip from Allegro named A6801SA-T there are lots of others. but i use this one.
it works well but if your really good then you can add arms or even make it walk!
Hi i Just wanted to know how much does this robot costs $ Cause if you want to sell one i would love to buy one at any costs PLEASE send me a message
1-40 of 50Next »