Let's Make Robots!

Autobot, work not even started and finally got the clearance to start...

This is blog is written so that Birdmun and other people can help me find parts for and make my bot. The bot is going to be a multi phase development. The final objectives of the bot will be- navigate through a room full of junk while following a wall to find a can of coke, identify the object and bring it back to the start point.

The phases of development-

1) Make a bot that had 4 legs (ie quadped), and is able to navigate the room without hitting anything (obstacle avoider). Pretty much like the start here robot.

2) Give the obstacle avoider wall following capabilities. It can follow a wall till it finds an obstacle in it's path which it avoids and then continues to follow the wall.

3) Give this robot a final capability of object recognition so that it can identify a can from other objects and bring it back.

You guys have spurred me on to develop this thing a bit more. These are the steps that I'm going to add but after the first 3 stages are done-

4) Make the bot with wheels for better accuracy.

5) Make a method so that the bot can triangular its position in space.

6) Make a mechanism for the bot to recognize any object and take voice commands.

7) Use a bluetooth module so that the bot can reply when its found the can and when it has returned to the start position.

Since it's going to take me some time to reach stage 3 I would like to hear the best of your advices on the first 2 stages. Thanks in advance for any sort of help.

Thanks to community support, I've been getting links to some of the best sites. Here are a few that I would like to share and thank Birdmun and Ro-bot-x for finding them-

http://forums.trossenrobotics.com/tutorials/how-to-diy-128/following-a-wall-3283/ on wall following.

http://letsmakerobots.com/node/29634 on making your own IR sensor.

http://letsmakerobots.com/node/29185?page=3 on making a 3 servo hexa spider using which I'll make the 2 servo quadped.

http://letsmakerobots.com/node/10003 on making a cheap infrared proximity sensor and IR beacon

http://letsmakerobots.com/node/32401 on making cheap IR beacons and mapping a room

http://www.electronics-lab.com/downloads/calculators/002/index.html on how to make the circuit of an IR beacon.

http://tronixstuff.wordpress.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/ and http://tronixstuff.wordpress.com/2010/10/29/tutorial-arduino-and-the-i2c-bus-part-two/ on how to use an I2C with an arduino.


While going through the tips on infrared proximity sensor, I was tempted to make a triangulation method because it is just so much better than the wall following the robot will have to do. But on searching, I couldn't find links to make a method of triangulation using IR leds. If there is a viable method, please post me a link below. Triangulation us going to be for the robot to find its location in the room

2nd Update-

After continuous long talks with DanM, Birdmun, DaveyJones, Basile and others, I finally found out how to carry forward with triangulation. For the robot to know about it's locality, I'll use an I2C bus and 24LC512, memory to map the location and for the infrared beacon, I'll use the infrared led modulated to 34khz and use that to make the bot detect it's location. The light will be modulated using a 555 timer.

Update 3-

The things that I'm thinking to shop-

Things from Your duino-

Yourduino Mega 2560 ($34.00)

6 AA Battery case with Arduino Plug($2.00)

Breadboard 16 cm with power and gnd busses ($3.50)

Breadboard mini ($2.00)

555 Timer general purpose pack of 10 ($1.00)

Infrared LED 5 mm pack of 10 ($1.00)

Infrared Receiver IC 38 kHz pack of 5 ($2.00)

1 wire jumpers female ends 20cms 25 pieces ($1.50)

Breadboard jumpers Male-Male 65 pieces ($2.50)

Sensor Pan and Tilt Kit ($8.00)

8 SG 90 Micro Servos

Things from Ebay-

2 Microchip 24LC512 I2C memory IC as sold here- http://item.mobileweb.ebay.com/viewitem?itemId=390339352777&cmd=VIDESC

Now, 3 of my questions-

1) Is the material that I've listed sufficient enough to build the bot that I mention above? I'm going to make the legs of my bot myself and also the arm and a few sensors but apart from that, is the material complete?

2) The I2C IC that I mention above will be used for the robot to map the room that it is in. Is it the right IC to use our am I mistaken?

3)Do you have links to parts that are cheaper in cost? If yes, then please leave the link below as comments. I'm working on a very limited budget and any help will be grateful.

Another update-

Here are the links that I've found to a cheap multimeter and soldering iron. You can ignore these if you like because they are just as a reference for me-

http://www.ebay.in/itm/Digital-Multimeter-Voltage-Amp-Current-Resistance-Meter-Polarity-Overload-Protec-/270973358488?pt=LH_DefaultDomain_203&hash=item3f17455198#ht_3501wt_1139 and http://www.ebay.in/itm/Complete-Soldering-Solution-25-Watt-Led-Iron-Solder-Wire-Paste-D-Wik-Tweezer-/120903745559?pt=LH_DefaultDomain_203&hash=item1c266cc017#ht_883wt_905

Screw Driver- http://tinyurl.com/Jackly-31-idn-1-Screw-Driver98

Update 4- After talks with Mogul, I've dropped the idea of using a 555 Timer and instead, I'll be using a centralised circuit for my IR beacons and use an Atmega 8 to control them.

I found the Atmega 8 here- http://item.mobileweb.ebay.com/viewitem?itemId=260964533478

and the tutorial to bootload the Atmega 8 here- http://letsmakerobots.com/node/31379

Update 5-

Thanks to Aaronsuper 1, I found this link- http://letsmakerobots.com/node/7474. That is one awesome project.

Link to moduation- Amplitude-shift keyingOn-off keying and Manchester code. All three links have been found thanks to mogul.

I also will try making a PCB for the central control of my 4 IR beacons. Here is where I'll buy my drill from and here is where the Bare Copper PCB is coming from.


I've decided to add a color sensor to my bot so that it can view it's surroundings and more importantly, can recognize the coke can by it's color. Here is the blog that I've read- http://letsmakerobots.com/node/23768 all thanks to Magyk. There are 2 ways I can do it-

a) The Easier Method- Buy myself a color sensor as the one found here- http://arduino-direct.com/sunshop/index.php?l=product_detail&p=179&r=724

b) Make yourself a color sensor using LEDs and a photoresistor. This is what I've decided to do as the easy method doesn't suit me. LED can be 1 RGB or can be 4 LEDs 1 each of Red, Blue ,Green and Yellow colors. The LEDs that I've viewed are RGB here- http://arduino-direct.com/sunshop/index.php?l=product_detail&p=213&r=723 and the PhotoResistors are here- http://arduino-direct.com/sunshop/index.php?l=product_detail&p=307&r=725.

The help that I need is that when I'm using RGB LED, do I need to use a separate yellow LED as well or can I skip that and just use a single RGB.


I've written this code for my Atmega 8. Please check it for Errors. It is just to blink the IR LED at 38kHz frequency-


#include <avr/io.h>

#include <util/delay.h>

void main()


DDRB=1<<3      //port B3 or ATmega8 pin 17 set for output

PORTB=0x0;      //setting up portb to null










OHK, after a lot of confusion on what I'm trying to do with my Infrafeds, I finally post my plan (be free to denounce it completely, I'm know to be highly prone to errors)-

I have a setup put in the room. Here is my setup-

I have the bot with the infrared reciever mounted on a continous rotation servo and hiding in a tube. My room is also rigged with 4 infrared LEDs, one in each corner of the room, each connected by wire to my ATmega8 placed at the center of the room on a breadboard.

The positive ends of the infrared LEDs are connected to a single PWM output from the mega 8 and the negative ones to 4 different Digital I/O pins to send the code. The code thus generated is inverted of the one I want to transmit. This will be corrected by inverting the code at the transmission site or the reciever end (which ever suits me).

For the transmission, I am going to use infrared LEDs broadcasting digital waves at the rate of 38kHz with the Duty Cycle being flexible so I can increase or decrease the distance of transmission. My limitation is that the reciever I'm using just listens to 38kHz waves and due to budget problems, I'm forced to stick with my limitation.

For finding the robots heading, the calculation is going to take a simple encoded continuos rotation servo and the IR reciever mounted on it is going to have the tube. The tube rotates to locate the beacons and using that it finds its heading. I get t he angle readings from the encoders and the heading.

I some how need the bot to know its location so I need to know the distance from the beacons. That's where I need your help!!



Ohk, I've dropped the Manchester Code idea for a simple reason, when we write in that code, there is a strong probability that the receiver might not view the wage as a 38khz wave and hence it won't receive it. Instead, I'm going to use on off keying which was the initial idea that mogul told me about. The p junction of my ir led is going to be connected to a 38khz wave and the n junction to the data pin transmitting my code. The receiver reads a high whenever the ir led is low and vice versa. The data going to be transmitted is going to have a special protocol for transmission. It is going to end with string termination character null(ie \0) which is equivalent to binary zero (maybe I'll have to change this). The transmission starts when the robot sees a null character and it ends when it sees the second one. The help that I want from you is the functions that will be required to code this and not the complete code. I'm talking about functions from AVR. Give me all relevant suggestions and algorithm but let me code it myself. I learn faster and better that way. Thanks in advance for your help.


Due to my engineering examinations, I am facing a delay currently in working on making my first robot. Those who know me will know that I had to give an exam on this 15th (15/5/12) and since my mom had given me permission that I can work on this only when I successfully clear an exam, I have not done so with the exam on 15th. As a result, my mom has barred me from even visiting this site till all the results don't come out and I clear atleast one exam. Due to this, I'll be able to manage to sneak here somehow but all plans on how to make my robot take a back seat atm. I hope that June will bring better luck to me.


This is my final buying list. Please tell me if something is wrong or I have to buy something else as well...

  1. Arduino MEGA 2560 X1   - My brain
  2. SG90 Small Servo Positional X10   - For legs and 2 for arm
  3. MG995 Metal Gear Servo Positional X1    -for lift required in arm. Will be mounted on the bse
  4. Breadboard 16cm with power and ground busses X1   -for the main robot to be used for coneecting servos and sensors
  5. LED Assortment 5 Colors (Red, Blue, Green, Yellow, White) X1  -for the color sensor
  6. Capacitor Assortment Ceramic (23 values between 1uF and 1pF) X1   -just an item I thought I should have
  7. Breadboard 8cm with power and ground busses X1    -for the central controller of the IR beacons
  8. Resistor Assortment 1/4 W 5% 20 Values 20 each X1   -another must have item
  9. Breadboard jumpers male-male approx 65 pieces X1   -you can't make a bot without wires
  10. 6AA Battery Case with arduino plug X1    -power for my bot
  11. Infrared Reciever IC 38kHz Pack of 5 X2   <  -distance, proximity and communication
  12. 40 pin flat cable, female ends X1      -more wires/li>
  13. 4AA Battery case with switch X1      -power for my beacon s
  14. Photoresistor type 5516 5 to 10 kΩ 10 each X1   -input from color sensor
  15. Infrared LED 5mm package of 10 X1    -output for IR sensor and communication
  16. Pins multipurpose male male 5 strips of 40 X1    -more connections
  17. Mini pushbutton switch(package of 25) X1    -Ah, this is for the LMR live drawing and its a secret comodity so please don't shout about it
  18. IC Atmel DIP 28 Atmega 8 16PU X1   -for my central beacon unit
  19. Digital Multimeter X1     -you need this. Don't argue with me
  20. Shanu cheap soldering iron 35 watt flat tip wooden handle X1
  21. SN754410ne dip 16 2 pieces X1   -to drive the only motor I have which'll be used for location finding
  22. SD Card module X1(instead of eeprom) X1    -For the memory
  23. 555 general purpose timer ic, package of 10 X1  -Just to experiment
  24. Capacitor assortment electrolytic 20 values, 10 each X1      -a must have
  25. 16 pin ic socket wipe type 0.1" pitch-0.3" row 30 pcs/tube -so that I don't burn SN754410
  26. 8 pin ic socket dual write type 0.1" pitch 0.3" row 60 pcs/tube X1 -just for future developments if I buy Attiny
  27. 28 pin ic socket dual wipe type 0.1" pitch 0.3" row 17 pcs/tune X1.    -so that I don't burn Atmega8


    My final budget is $72.25. Any advises?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I saw the package of 10 IR LEDs and one battery pack for a beacon... Do you have transistors and/or 555 chips -whichever you will need for the beacon(s)?

As to soldering kit, do you want a good one? (ie expensive) or just a simple iron?  The common (simple) irons can be purchased for only a couple / few dollars US.

I'm going to use the ATmega 8 for my IR beacons (see my final update).

As for soldering irons, I want one which may be simple but has a decent heating power (>25W). I don't want a expensive one as I can't afford it right now. I want a kit which has everything I'll need to do the soldering job...

As per Shout Box, I understand now that you are using the AtMega 8

For soldering irons, 25 watts is good. I would not exceed 35 watts maximum, though. With too hot an iron, it is too easy to overheat and destroy electronic chips or even diodes and transistors. You should hold the iron to the part being soldered only about one second. With solder paste or flux, the solder should flow that quickly and not overheat the parts.



Well, I'm lucky as I just finalised on buying a 35W soldering iron. I won't be buying flux though so I keep your advise on my mind while soldering (Vishu picks up the iron, starts melting solder and then thinks about what dan said and oops.... :D

With a new soldering iron, you will not have this problem right away, but the tip of the iron tends to oxidize quickly.  You will get best results if you keep the tip of the soldering iron clean.

Without flux you may find that some parts will not take solder very well.  Instead of continuing to heat the part and possibly damage it, stop and carefully clean the surface which you wish to solder.  This is something that the flux does when you use it, so without flux, you may have to do it by hand.  None of the wires and small parts should ever require heating more than one or maybe 2 seconds before the solder will flow on them.  Only heavy metal pieces will require more heating.

Flux is a material used to remove impurities from the metal. Also, it acts as an impurity itself thus decreasing the melting point of the metal. So if I'm correct, flux just acts as a melting point depressant. Why can't I use some other solid for this purpose? Some solids present in a typical kitchen. I know this question can be a really stupid one...

There probably are things present in a typical kitchen that might work. I just cannot think of any at the moment.


You can use a chunk of rosin resin. But if you have a rosin core solder, you won't need anything extra, as the rosin inside the solder takes care of removing impurities and help the solder flow faster. I prefer leaded solder, for faster and easier soldering and I use a 15W pencil style solder iron. Sometimes it's a bit weak, takes time to solder a lead to a pad that's on the ground plane, but I never burnt a part or exfoliate a trace with it. I supose a 25W would be perfect, but they have a thicker tip and I need a very thin tip for my boards or for SMD.


15 W is okay for the small parts, but be careful as too cold of an iron can result in a "cold solder" joint. (poor connection which will come loose).  Also it can take longer to heat up the junction and actually heat the whole part inside too much.  You want the surface of the leads to heat up and be done with the job before the interior of the parts get hot.

 So as you say, 25 is better for all-around duty, and 35 is good if you run into heavy soldering, like the metal tabs on larger jacks or transformers, etc. I generally recommend 25 to 35 range.

However what I wanted to point out was that for most name-brand irons, there are interchangeable tips with different sized and shaped points.

I was just looking at a new tip for my Weller, and found some that are 1/32 inch (0.79 mm). I was thinking of getting one, since the tip I currently have if fatter (about twice that wide).  However, I decided to take the present tip and chuck in into my lathe (a drill would do, also) and turn it down to a finer point. After all, it is just a chunk of copper. :-)

You could also grind it down on a grinding wheel, but be careful and take it slow or you will take off too much and have to start over with a slightly shorter tip to sharpen.  It might even be possible to do it by hand with sand paper, twisting it back and forth until the point is finer.

Just an idea I thought I would share,


I think I have a cheapo iron bought for about $10 or so. The tips are coated at the sharp end with something. I tried to sand down a tip after it did not hold solder anymore, anything I did to it did not make it work again, so I bought a new tip, with a few spares, just in case. I found out that I can use the 15W iron without problems, solder fast with it, except sometimes when I solder to the ground plane. I will look for a 25W cheapo iron just in case, to see how well that works. I have a Weller 15W battery operated iron (3 AA) that I use at competitions or anywhere else I might not find a power outlet. I'll probably go through a couple of battery charges before I can finish up soldering a whole Arduino board, but for broken wires or changing a part rapidly it works fine. Thanks for your tips!

Oh, back home in Romania, I had a pencil style soldering iron with a fine tip made by an old electronist guy there, with adjustable temperature (a tiny trimpot in the handle) that was smaller than any pencil style iron I found here in the stores. Unfortunately, it works on 220V, here I have 110V at the mains. I really miss that little iron...