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.

https://www.robotshop.com/letsmakerobots/node/29634 on making your own IR sensor.

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

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

https://www.robotshop.com/letsmakerobots/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.

Update-

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- https://www.robotshop.com/letsmakerobots/node/31379

Update 5-

Thanks to Aaronsuper 1, I found this link- https://www.robotshop.com/letsmakerobots/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.

UPDATE 6- 

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- https://www.robotshop.com/letsmakerobots/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.

UPDATE

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

while(1)

{

PORTB=1<<3;

_delay_us(13);

PORTB=0x0;

_delay_us(13);

}

}

 

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!!

 

Idea-

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.

Delay-

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.

FINAL UPDATE HERE- 

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?

Re: wall following and obstacle avoidance.

I posted the link to Ro-Bot-X’s tutorial/tip on using IR remote receivers. https://www.robotshop.com/letsmakerobots/node/29634

He uses a pair of IR LEDs and a receiver to be able to check left, right, and straight ahead. I believe 4 LEDs and 4 receivers should give you 360* sensing, to a point. It would be more like 4 quadrant sensing. Anything more than, “hey, there is something there” will require a bit more hardware to keep a stable distance from a wall.

Another option would be to convert a servo to continuous rotation, add a gear that can be driven by said servo, mount an 1/8" stereo jack on said servo, mount an ultrasonic sensor to said gear, and wire the sensor so it can be controlled by 3 wires (power, ground, and signal). Then you get 360* sensing in a more meaningful manner.

A 4 legged walker with 2 servos would require a pair of legs (front or back) to be able to rotate about a vertical axis and the other pair of legs to rotate around a horizontal axis. Once you have your legs moving, just work out what is required to walk.

Part of what you seem to want to be able to do is for your robot to know its location. That requires some kind of map. Legged robots and tracked robots are not the typical fair when one wants to move to a specific location. Wheeled robots are better at getting to a specific point repeatedly, due to their typical lack of slippage in their locomotion. That said, knowing where one is in space is still possible for a walker. Beacons that allow for triangulation are the easiest(?) way to go about locating in a space.

I am sure you will get other helpful pointers from other individuals here.

Thnx!

Hey bird, thanks for the link to Ro-bot-x’ tip and the idea of IR sensors. I will definitely try both the methods of taking the wall. As for triangulation to detect it’s position, my bot will follow the wall and all obstacles that it will face will be along the wall. So that reduces it’s location from 2 D to a roughly 1 D. The coke can is also going to be along the wall. So the bot has to distinguish between the objects that fall in it’s path. Please help me in topics related to that.

PS -

I was looking for this page when I fell asleep last night. This is the 360* sensor I was trying to find: https://www.robotshop.com/letsmakerobots/node/27382

As far as triangulation goes, I was suggestion it, becuase, how does your robot know it is in the room with the coke can? Is there more than one room with the coke can? Is there something in this room that might be similar to a coke can? My thinking was, if your robot knows it is in the kitchen, and it know where it is in the kitchen, then you should be able to determine that a specific obstacle has a good chance of being the coke can you are looking for.

The robot knows that there
The robot knows that there is a coke can because it is built specifically for that purpose. Later on when I have time and money, I’ll generalize it to recognize any obstacle and respond to voice input or rc input but right now, it will be specifically limited to cans. As for rooms, there is going to be any number of them and any number of coke cans both filled and empty. The bot recognizes a filled can and brings it back to start point. It can bring any can. That is not specific.

This morning I have starte

This morning I have starte to write a Tip on how to use the IR proximity sensors to follow a wall. Wasn’t finished and I checked the Is Draft option, then I clicked Submit. I left to work and in the evening I was looking to finish it by adding the code. For some reason, I can’t find it anywhere. There goes your luck (or mine?).

So, here is the link to the best Wall Following tutorial: http://forums.trossenrobotics.com/tutorials/how-to-diy-128/following-a-wall-3283/ If you read it, you’ll see that Mike used a Sharp IR sensor to read the distance to the wall. With a proximity sensor you only get hit/no_hit info, so you need to use a timer to guesstimate if the robot got closer or farther off the wall. However, since I think you plan to enter this robot into my challenge, I feel that I should not help you all the way.

To detect an obstacle of a certain height you can use 2 sensors, one above the other, the sensor placed above should be higher than the object. If the lower sensor detects an obstacle and the higher sensor does not, it can be the object you’re looking for so you can try to grab it. If both detect an obstacle, it is a wall or something like that and need to be avoided. You can also use a color sensor to determine if it is the coke can and not a pepsi can for example. I’ve done this with Lego Mindstorms years ago.

If you have a Sharp IR sensor mounted on a panning servo, you can do a 90 degrees sweep with a distance measurement at every degree and look for several inline short distances that will be the object. get close to it and see the color, if it’s red, grab it, if it’s brown, it’s perhaps the table or chair leg…

See, there are ways to find specific objects with regular sensors, no need for vision that requires a lot of processing power.

Cheers!

Hey, Ro-bot-x, thanks. I’m
Hey, Ro-bot-x, thanks. I’m gonna enter your challenge but you may not give me anything if you wish. Your idea for multiple sensors has sparked up a plan in my mind but I’d better try making it before I discuss it which I can’t do now as I don’t have parts or time (my examinations). Thanks anyways for the idea.