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 61Next »
usama200028 days ago

what is the minimum rating for battery current wise voltage wise and charge wise

i want to download the pdf of the line follower ropot

can i get help?

can someone pls explain to me what is the device in step 17. must it be made or can be purchased?

Just look for "AVR Programmers" and follow vendor instructions about how to program your ATMEGA32. Here's one suggestion:

https://www.sparkfun.com/products/9825

usama20002 months ago

Should there be a Piece paper between emitter and receiver

midhun_s (author)  usama20002 months ago
You could use heat shrink tubes instead. I've tried and it worked just fine. 5mm heat shrink tube should fit snugly on the emitter.
usama20002 months ago

There are four dip switches in the usbasp programmer what is their function

midhun_s (author)  usama20002 months ago
Switch 1 turns the programmer circuit on/off.
Switch 2, if turned on, provides 5V supply from USB port to the target.
Switch 3 sets slow programming mode on/off. You will have to turn this on when you are flashing program or writing bootloader into an Atmega for the first time.
Switch 4 is rarely used and it allows to update the firmware on the programmer through the same 6 pin ISP used for programming.
amaljoshy952 months ago

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)  amaljoshy952 months 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.
delasierraiii4 months ago

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.

delasierraiii4 months ago

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.

delasierraiii4 months ago

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.

delasierraiii4 months ago

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_jun224 months ago

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

midhun_s (author)  rohit_jun224 months 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_k5 months ago

hi

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

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

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

bsingh217 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_ishank8 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_ishank8 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_ishank8 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.

sunil939 months ago

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

bsingh219 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
jaseel19 months ago
muralysunam made it!10 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
suyashbansal2611 months ago

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)  suyashbansal2611 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)  suyashbansal2611 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)  suyashbansal2611 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)

mrahman201 year 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)  mrahman201 year 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).
Sayem1 year ago
Can you explain the design of sensor array? it is not clear to me.
jaseel11 year 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)  jaseel11 year 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.
1-40 of 61Next »