In this post we shall see how to make a Line Follower Robot using the multipurpose iBot designed by Robosapiens .This kit is an excellent design , easy to assemble & learn for beginners in Robotics.

The kit is built on AVR ATMEGA8 development board.As the AVR IC is pre-loaded with Boot Loader there is no need of an external programmer. Hex files can be loaded on to the IC using HIDBOOTFLASH application.

The AVR  Board can work on 6V to 15V DC supply. The control circuit is basically L293D based Dual H – Bridge Motor Driver Circuit with Inverting Buffer which is used for the locomotion of the robot. The motor driver circuit used, intakes digital inputs to make motors running.

The kit is provided with two IR based Digital proximity Sensors that is used as a line sensor. The sensor that is being used is highly flexible and versatile. The sensors can be used as an edge sensor , obstacle sensor , color sensor (black / white) , light sensor etc. Sound Sensor can also be interfaced for making Robots like clap to move,clap to stop



robot1         90

Mechanical Assembly Video :

Line Follower Robot–Mechanical Assembly

Now that the mechanical assembly part is over , let us see how to load the hex files on to the AVR IC.

We shall make use of HIDBOOTFLASH application for this purpose.

Download the application from–files/project:hidbootflash/

Unzip the downloaded file.It is a small standalone exe file  which needs no installation.

Connect the USB cable from Robot to PC & click on Find Device.

Image 1


If the hardware is detected you get the next screen.

Check mark “Reboot AVR” & click on  “Open .hex file”.

Browse to the location where you’ve stored the hex files .Select the required .Hex file to be loaded & click on “Flash Device “

Image 3

If the file is loaded on to the IC , the LEDs PB1 & PB4 glows on the demo board


Image 4

Now remove the USB cable & switch on the power switch to see the Robot working.

Here is the sample C code for a simple Line Follower Robot.This C code can be compiled to a .hex file using WINAVR or  ATMELSTUDIO.


// Project name : line follower
// Designed By  : ROBOMART
Connection settings of Kit


BOOTLooder Condition Check—–>PC5(f 0 bootler section else program execution
section of Flash memory)
Crystal Oscillator————–>PB6 and PB7
VB=Battery Supply
VCC=Regulated 5V+


void main()
DDRC=0b0000000;   //set PORTC as input port
DDRB=0b00011110;  //PB1, PB2, PB3, PB4 as output port
int ls=0, rs=0;   // define & initialize ls, rs integer as 0 to acquire the left sensor status in ls and right sensor status in rs

while(1)          // create infinite loop
ls=(PINC&0b0000001);   //acquire only left sensor status connected at PC0
rs=(PINC&0b0001000);   // acquire only right sensor status connected at PC3

if((ls==0b0000000)&(rs==0b0000000)) //check sensor status for both sensor OFF
PORTB=0b00000000;  //stop
ls=0;              //set sensor status off
rs=0;              //set sensor status off

if((ls == 0b0000001)&(rs == 0b0000000))  //check sensor status for left sensor=ON and right sensor=OFF


PORTB=0b00010000;    //turn right
ls=0;                //set sensor status off
rs=0;                //set sensor status off

if((ls == 0b0000000)&(rs == 0b0001000))  //check sensor status for left sensor=OFF and right sensor=ON


PORTB=0b00000010;   //turn left
ls=0;               //set sensor status off
rs=0;               //set sensor status off
if((ls==0b0000001)&(rs==0b0001000)) //check sensor status for both sensor ON
PORTB=0b00010010;  //move forward
ls=0;              //set sensor status off
rs=0;              //set sensor status off



Video 2 : Loading the Hex file

cooltext753793315     cooltext753795865