Make Line Follower Robot in 5$

by Explaining Today in Circuits > Robots

4053 Views, 37 Favorites, 0 Comments

Make Line Follower Robot in 5$

2015125214010.jpg

We all have faced a few set backs due to limited budget and reduced funding.

We can overcome this situation by innovating and using the cheap materials available to us.

INTRO

ATtiny13A.JPG
2015125214010.jpg
2015125164247.jpg

The most basic concept in robotics is the line follower robot.

But this comes to us to at cost more than negligible.

To try new combinations and algorithms we need to cut the cost to down to negligible rate.

And be able afford failures helping us move forward from learning from our mistakes.

ABOUT

This instructable is about reducing the cost and increasing programming skills.

MATERIALS

ATtiny13A.JPG
13a.jpg
2015125134809.jpg
2015125140128.jpg
2015125133519.jpg
2015125133546.jpg
2015125133623.jpg
2015125134218.jpg
2015125134237.jpg
2015125133839.jpg
2015125134418.jpg
2015125134448.jpg
2015125135952.jpg

`1) Attiny 13a - .81$

2) ir module - 0.49$

3) motors - 1.1$

4) Wheels - .33$

5) chassis -1.4$

6) H-bridge - .60$

7) wires - .11$

8) Jumper cables - .25$

9) 9v batteries - .16$

10) Arduino

11) Rubber bands- .02$

12) nuts and bolts

total cost <= 5$.

CONNECTIONS

2015125144114.jpg
2015125143940.jpg
2015125143414.jpg
2015125143403.jpg
2015125143328.jpg
2015125143317.jpg
2015125134156.jpg
2015125142116.jpg

Start off with the connects.

Connect the ir module to the to the chassis and establish connection making sure the module is facing downwards to the ground.

Attach the motors with the help of nuts and bolts.

Once the motors and the ir modules are connected add the ball wheel.(purly for support).

Add wheels to complete the hardware of the body.

ATtiny 13a Programming

To reduce the cost of the line follower robot we use attiny 13a.

Which is a very low cost micro controller.

We use the Arduino as the ISP(in system programmer) to program the attiny13a.

The ATtiny13 is a 8 pin micro controller,with 3 PWM pin and 2 Analog pins .

But in this tutorial we use only digitalWrite and digitalRead for the simplicity of understanding the program and the code.

As shown in the datasheet.

http://www.atmel.com/Images/doc8126.pdf

Downloads

PREP ISP(in System Programmer)

attiny13a.jpg
fritzing.png
isp.bmp
3.bmp
2.bmp
1.bmp

Connect the pins as shown,

slave reset: 10: ---> pin 1

MOSI: 11: ----->pin 5

MISO: 12: -----> pin 6

SCK: 13: -----> pin 7

Once the connection is made betwwen arduino and attiny.

Connect GND(ground) and VCC ( voltage)

GND ----> pin 4

Voltage ----> pin 8

once the connection is done open arduino software

And open ISP sketch

browse in >>

arduino--->file--->examples--->ArduinoISP

after selecting the right board and comm port,upload the sketch.

ADDING FILES

1.bmp
2.bmp
3.bmp
4.bmp
5.bmp

To get the attiny to be recognized by the arduino we need to add core files to its hardware settings.

goto--> arduino folder or follow directory below as it is set as default

c: --> program files --> arduino --> hardware --> attiny13 (paste the file and extract the attiny13a.zip file).

once you have pasted and extracted the files we get now see new board options on the board section.

To get accuracy of delay command use 9.6 MHz whose delay timing has been corrected.

Downloads

PROGRAMMING

ATtiny13A.JPG
attiny13a.jpg
1.bmp
3.bmp
2.bmp
4.bmp

Since there are only few pins on ATtiny we need to change the program.

Code :

int leftInput=3; //reads value from the pin 3 as left sensor
int rightInput=4; //reads value from the pin 4 as right sensor

int leftMotor=1; //controls the left motor by reading and processing the value input by sensors

int rightMotor=2; //controls the right motor by reading and processing the value input by sensors

int leftValue = 0; // setting the value to zero

int rightValue = 0; // setting the value to zero

void setup()

{

pinMode (leftMotor, OUTPUT);

pinMode (rightMotor, OUTPUT);

}

void loop()

{

leftValue = digitalRead(leftInput);

rightValue= digitalRead(rightInput);

if ( leftValue ==HIGH && rightValue ==HIGH)

{

digitalWrite (leftMotor, HIGH);

digitalWrite (rightMotor, HIGH);

}

else {

if ( leftValue==LOW && rightValue==HIGH)

{

digitalWrite (leftMotor, LOW);

digitalWrite (rightMotor, HIGH);

}

else {

if (leftValue==HIGH && rightValue==LOW)

{

digitalWrite (rightMotor, LOW);

digitalWrite (leftMotor, HIGH);

}

else {

if (leftValue ==LOW && rightValue ==LOW)

{

digitalWrite (rightMotor, LOW);

digitalWrite (leftMotor, LOW);

}

}

}

}

}

MERGE : Add All the Componets

2015125174826.jpg
2015125181119.jpg
2015125151352.jpg
2015125153951.jpg
2015125154000.jpg
2015125154027.jpg
2015125154047.jpg

Since the Attiny does not have an inbuilt voltage regulator and its tolerance is limited to 1.8 v - 5.5v

we need to use a voltage regulator .

And once this is done assemble all the parts and wire the circuit.

Now use a rubber band to clamp them into one place so it does not fall off of the chassis

This apparatus can be run on AAA battery as it consumes very little power and is very efficient.

PREP THE TEST BOARD

2015125161828.jpg
2015125161911.jpg
2015125161932.jpg
2015125164230.jpg
2015125164247.jpg
2015125163558.jpg

Now to trial run the line follower robot build a test board.

Use a PVC black tape and papers to prep the board.

once it is set power it up and watch the robot follow the line.

USES

ATtiny13A.JPG

The line follower robot is a great feat of combining both software and hardware and prototyping.

This is a the most common test for robot hobbyists .

With such a cheap way we can all afford failures and move forward instead of not trying at all.

Breaking all innovative barriers.