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 53Next »

what is the use of 1st and 8th sensor? can't we make it with 7 sensors and one front sensor?it would make a byte as well

midhun_s (author)  amaljoshy953 days ago
Certainly. Removing one sensor might not seriously affect the performance. But that would mean you will have to consider the front sensor as one among the seven bits. I think this would make the program part a little complex as you cannot directly associate the bit positions with the physical layout of the sensors. After all, more sensors you choose, more are your possibilities of fine tuning your robot.

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_jun221 month ago

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

midhun_s (author)  rohit_jun221 month 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_k2 months ago

hi

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

midhun_s (author)  m_a_k2 months ago
Download the program.rar file from Step 17. You will find the .hex file in it.
m_a_k midhun_s2 months 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_danesh3 months ago

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

bsingh215 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_ishank6 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_ishank6 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_ishank5 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.

sunil936 months ago

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

bsingh216 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
jaseel17 months ago
muralysunam made it!7 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)  suyashbansal268 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)  suyashbansal268 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)  suyashbansal268 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)

mrahman2010 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)  mrahman2010 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).
Sayem10 months ago
Can you explain the design of sensor array? it is not clear to me.
jaseel111 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)  jaseel111 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.
jaseel11 year ago
I assembled and programmed this robot.
but not works.
I didn't get anything in display.

how to troubleshoot?
midhun_s (author)  jaseel11 year 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.
I Tested using 3 LCD displays,
what is the use of 4 switches?
midhun_s (author)  jaseel11 year 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.
Priyandan1 year ago
Instead of Atmega32 what other micro controllers can u use
midhun_s (author)  Priyandan1 year ago
If you're following the same design for the circuit that I've described above, you can choose an Atmega16 instead.
Priyandan1 year 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.
1-40 of 53Next »