Instructables


I began work on my first robot about two years ago. For no particular reason, I decided to begin with a line following robot and truth be told, my first attempt at building it was a complete failure. Looking back at my efforts, I believe, for a beginner, I was rather too ambitious. The circuit that I had designed had a bunch of unnecessary stuff which I then believed would give my robot an edge over the others. But it never worked and I had to start all over from scratch.

In my second attempt, I managed to get the robot on track. As delighted as I was with my first robot, it was nowhere near where I wanted it to be. I took it to a couple of competitions and not much to my surprise, it failed in both of them. I knew it was time to make some major changes in the design.

In my third attempt, (actually, it wasn’t the third, it was a revision of my second attempt) I updated the firmware and came up with a much more stable and accurate version. It performed well when tested and much to my delight, it finished first in two competitions and second in another. Though I was proud with what I had achieved, I felt that the robot was visually rather unappealing. And you’ll come to know why from its picture given above. It had wires running all over it and I had no other option but to rebuild it. A month or so later, I had the robot all ready and that is the current version of my first robot.

In this instructable I will guide you through the steps that I've followed in building the current version of my robot. It’s one of those robots which belong to the “scratch-built” category. You might find it difficult to find all the parts that I have used. So I insist you to read through the steps that I have followed, and then implement it in your own way with the parts that you've found.

This instructable requires that you are familiar with the following:
• Soldering and related equipments
• Hand tools like screwdrivers, wire cutters and strippers
• Reading schematics and connection diagrams
• C/C++ programming for AVR microcontrollers (optional)
 
Remove these adsRemove these ads by Signing Up
1-40 of 51Next »

Nice robot, very creative.....

how does the motor move from left and right... I can't see a component used to moved it from left and right... I'm not referring from the program or the sensor... thanks for advance and more power.

Nice robot, very creative.....

how does the motor move from left and right... I can't see a component used to moved it from left and right... I'm not referring from the program or the sensor... thanks for advance and more power.

Nice robot, very creative.....

how does the motor move from left and right... I can't see a component used to moved it from left and right... I'm not referring from the program or the sensor... thanks for advance and more power.

Nice robot, very creative.....

how does the motor move from left and right... I can't see a component used to moved it from left and right... I'm not referring from the program or the sensor... thanks for advance and more power.

rohit_jun2223 days ago

Can you please tell me the name of the inductor used? And the distance in between the two leads?

midhun_s (author)  rohit_jun2222 days ago
I couldn't find any information on the inductor except its value. I bought it from an online shop some long time ago.
m_a_k1 month ago

hi

could you send me the hex file of this robot? please!!!

midhun_s (author)  m_a_k1 month ago
Download the program.rar file from Step 17. You will find the .hex file in it.
m_a_k midhun_s1 month ago

thank you very much but i can't find it.could you send it to me.my gmail is

amin.kameli1990@gmail.com

r_danesh2 months ago

I run the sonssors in bread board but it doesn't work what should i do?

bsingh214 months ago
The fuse bits not working! But I checked my MCU fuse bit using extreme burner. Low fuse bit is 0xE1 and high is 0x99. Is it right if not tell fuse bit in extreme burner. Thank you.
gulati_ishank4 months ago

A great tutorial but i have a query, what changes i would have to make if i am not using mcu's adc?

midhun_s (author)  gulati_ishank4 months ago

You could use potentiometers instead of the resistors that I've used in the sensor array. Thereby you can adjust the threshold manually. You can connect pins from the sensor array directly to any port of your mcu.

Thanks for prompt reply...

I have aleady done that but i am confused with code.

What changes should i make in the code?

midhun_s (author)  gulati_ishank4 months ago

Read data from the sensors to any port of the mcu. This data is equivalent to the binary value obtained using the get_sensors_binary() command. You won't have to use the sensors.h library except for the count_binary() command.

sunil935 months ago

by far the best tutorial on Line following robot that i have come across.......great work midhun

bsingh215 months ago
Can I make this using arduino uno? if I can please give me full details. And please tell me how to contact you.
Thank you
jaseel16 months ago
muralysunam made it!6 months ago

I made this line follower robot with PIC 16F877a. I would like to say that its incredible experience. Thank you Midhun_s for all you help. I made it and trying to integrate maze solving robot too. I changed some parts of algorithm too. Thank you. :)

100_6260.JPG100_6261.JPG

Nice article. Can I make this using Arduino? I was thinking to use 5 sensors because my track seem to be like(image).

line-follower.png
midhun_s (author)  suyashbansal267 months ago

I think it is possible.

I was wondering whether the Sensor array will work on Arduino?

I am having trouble with my current sensor array so I was thinking to make something like yours.
midhun_s (author)  suyashbansal267 months ago

I don't see why not. You can connect any six pins (among the eight) from the sensor array to your arduino analog pins. You can use a digital pin for the front sensor.

Thats fine. But how will the header files(sensors.h) work on Arduino?
midhun_s (author)  suyashbansal267 months ago

You cannot use the library as such on Arduino. It won't work. But you can copy the header files and function definitions from the <sensors.h> and you can use them on Arduino. You can skip the sensor initialization and analog_read() routines as it is already present. This method can be used for other libraries too.(eg. pushbutton)

mrahman209 months ago
Would you please tell me about the use of 9th cell? I went through the page. It is really fantastic. But I could not understand why you used 9th cell in sesor design. Would you explain in detail?
midhun_s (author)  mrahman209 months ago
The 9th sensor comes in handy when the robot detects an intersection. It checks whether there exists a forward path. If it finds one, the robot will skip the turn and moves forward. If it does not, then the robot will take the turn.
Take a look at the algorithm that I've used (it's in Step 24) and also the readings from the sensors (you can find that on Step 33).
Sayem9 months ago
Can you explain the design of sensor array? it is not clear to me.
jaseel110 months ago
midhun_s, Can I convert this robot into line maze solving robot?

can u give details of line maze slving robot

midhun_s (author)  jaseel110 months ago
Yes you can. All you need to do is modify the main() routine to turn this robot into a line-maze solver. I haven't currently tested this one but I'm sure there are articles on the web explaining the algorithm for a  line maze solver.
jaseel111 months ago
I assembled and programmed this robot.
but not works.
I didn't get anything in display.

how to troubleshoot?
midhun_s (author)  jaseel111 months ago
Test the LCD separately. Make sure that the data and control pins are connected as shown in Step 9 and don't forget to adjust the contrast pot.
jaseel1 midhun_s11 months ago
I Tested using 3 LCD displays,
what is the use of 4 switches?
midhun_s (author)  jaseel111 months ago
4 switches are used to get input from the user. In Step 32 you'll find how the sensors are calibrated and how the switches are used.
Priyandan11 months ago
Instead of Atmega32 what other micro controllers can u use
midhun_s (author)  Priyandan11 months ago
If you're following the same design for the circuit that I've described above, you can choose an Atmega16 instead.
Priyandan11 months ago
hey dude. I am also building a robot for a fest. I am planning to build something similar to yours. can u pls help me. Tell me a way of contacting u
khan121 year ago
Thanks for such a great instructable, I wanted to ask you a question that can I change the IR Array to the specs of a give width track by tweaking or editing the code, or do i have to overall change the distance between the IR`s please will be waiting for your reply.
midhun_s (author)  khan121 year ago
The distance between the IRs were chosen for a track width of 3cm but any value between 2 and 4 will work fine. You might consider editing the code if the track width is outside of that range.
ygrowup861 year ago
can i get ur email id
1-40 of 51Next »