LINUS: the Line Following Robot

Introduction: LINUS: the Line Following Robot

About: I am a 21 year old DIY ist and Tinkerer with a deep interest in the field of robotics, electronic and cooking. I am skilled in wood and metal work as well. I work in my basement workshop and i am mostly scra...

This is my attempt at a line following robot. I basically upgraded it as i went so i am just going to give and overview of the build and allow you to use your thinking. I used Lego as the base and then made my own sensor array. The first sensor array had 8 sensors but i realized that only 4 were being used so i made another with only four sensors. At first used the Arduino Uno and then upgraded to standalone Arduino.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Parts Required

These are the parts i used

2 x 6 V 310 RPM Geared Motors
1 x Lego Base
2 x Lego Tyres
1 x Atmega 328
1 x Vero Board
4 x IR Led
4 x Phototransistors
1 x 28 Pin IC Base
1 x 9 V Battery
1 x 9 V Battery Clip
1 x Arduino Motor Shield 
(I used the one i made myself)
2 x Slide Switch
1 x IR Receiver
1 x Crystal Oscilator 16 Mhz
1 x Tactile Switch
2 x 2 AA Battery Holder
Indicator Leds
Resistors (10 k and 220 Ohm)
Jumper Wire
Male Header Strip
Heat Shrink Tube
Zip Ties
Double Side Tape
Female header Strip
Some instrument to program you micro controller. I used USPasp

Basic tools and some skills are also required

Step 2: Motor Assembly

The first thing to do is to get your motor assembly done. For that i glued the two motors together and then to the Lego chassis. To my convenience they were compatible making my job much easier.  BTW. In the last picture i removed one of the motors as it got damaged and i had to wait for the replacement to arrive. 

Step 3: Sensor Array

For the sensor array i used a vero and made my circuit on it. The pictures are of my first attempt but the final version is built the same way, just smaller. The schematic is repeated for every pair of sensor. 

Step 4: Add Batteries

Next is to attach the two battery holder and the 9 V battery. I first used an arduino to test it out but you could go directly to the circuit. 

Step 5: Make the Circuit

For the main circuit i used the Atmega 328 with arduino boatloader. I made it so that the same motor shield was used and with headers i made it removable. Other connections such as connection to sensor array etc were alse with headers to make it removable. The circuit is straight forward. Just the standalone arduino with 4 connections to the motor shield. 

Step 6: Finalizing the Hardware

Next i assembled every thing. The circuit board was was screwed to the chassis and so was the sensor array. After testing i added the IR receiver and the mode switch. 

Step 7: Programming

Upload the program. It is very basic and easily understandable. The robot is also remotely controlled by a tv remote. For that you will need to fund the exact codes of the button you choose for each function. You will also have to install the IR Library. Download and paste in the libraries folder. Then you will wire the sensor to the arduino and upload the code. Use serial monitor to note down the codes. 

if(in == <Hex value>){<code>}  
    else if(in == <Hex value> ){<code>}
    else if(in == <Hex value>){<code>}
    else if(in == <Hex value>){<code>}
    else if(in == <Hex value>){<code>}

Then in this basic code add you hex value and the response is already added. Next for the line following i used a basic analog value but if you use the arduino and along with serial read you can set exact values for your own track. 

Step 8: Conclusion

The robot turned out pretty good. 
Please vote for me if you liked my instructable. 
I will add a video shortly
Thanks for viewing

Robot Contest

Participated in the
Robot Contest

Arduino Contest

Participated in the
Arduino Contest

Be the First to Share


    • Magnets Challenge

      Magnets Challenge
    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest

    5 Discussions


    5 years ago

    Awesome i voted for you!