simple line follower robot -...

13
4 4 4 2 7 7 7 2 0 1 5 S i m p l e L i n e F o l l o w o o e r r o b o o o h t t t p : / / / p l a y w i t h r o b o t o o s . c o m / s i m p l e - l i n e - f o l l o w o o e r - r o b o t o t t 1 / 2 0 Simple Line Follower robot May 14, 2012 It is a machine that follows a line, either a black line on white surface or vise-versa. For Beginners it is usually their first robot to play with. In this tutorial, we will teach you to make the line follower robot move on the line with a type of feedback mechanism. It’s the most basic example of adding small intelligence to a robot, but it’s actually the designer’s intelligence!! After reading this section completely you will be playing with the one shown below. Moreover we will make it modular so that it can be easily modified in future. The main electronics/mechanical components that will be used in making this line follower robot are two sensors made using LDRs, transistors as motor driver circuit, acrylic sheet, General purpose board, Two DC motors and battery. So let’s start making its chassis. Chassis It’s basically the frame of the robot on which motors and wheels are mounted and all the circuitry part is also placed on it. For base, we will be using Acrylic sheet of dimension 14x13cm square and thickness of 4mm for our chassis, it can be easily available at any picture frame shop. 404 - Not Found

Upload: others

Post on 03-Oct-2019

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 1/20

Simple Line Follower robotMay 14, 2012

It is a machine that follows a line, either a black line on white surface or vise-versa. For Beginners it isusually their first robot to play with. In this tutorial, we will teach you to make the line follower robotmove on the line with a type of feedback mechanism. It’s the most basic example of adding smallintelligence to a robot, but it’s actually the designer’s intelligence!!

After reading this section completely you will be playing with the one shown below. Moreover we willmake it modular so that it can be easily modified in future.

The main electronics/mechanical components that will be used in making this line follower robot aretwo sensors made using LDRs, transistors as motor driver circuit, acrylic sheet, General purposeboard, Two DC motors and battery.

So let’s start making its chassis.

ChassisIt’s basically the frame of the robot on which motors and wheels are mounted and all the circuitry partis also placed on it.

For base, we will be using Acrylic sheet of dimension 14x13cm square and thickness of 4mm for ourchassis, it can be easily available at any picture frame shop.

404 - Not Found

Page 2: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 2/22 20

Acrylic sheet

Drive MechanismWe will be using a three wheel differential drive using two motors and one caster wheel or an Omnidirectional wheel. The Direction and speed of the two motors can be controlled independently.

Page 3: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 3/33 20

Motor, Motor clamp and tyre

Caster wheel

Page 4: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 4/44 20

Chassis Layout

Our first step would be drilling holes to fix caster and clamps for motors. Though i haven't done anydrilling while making this line following robot, just pasted caster and motor clamps with the help ofdouble sided tape!!. But if you are making it for any small college project or competition fix every thingproperly with screws. Also solder a 2 pin connector to the motors pins.

Motors with connector

Now fix motors, caster and also attach wheels to the motors. As I said it is to made modular, attach atwo pin connector to each motor.

Page 5: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 5/55 20

Final chassis

Now the chassis is complete. Lets make its circuit!.

CircuitWe will be using light sensors, particularly Light dependent Resistors (LDRs) to detect black line onwhite surface. The figure below will explain how to detect black line on white surface.

Line detection logic

The overall circuit for this robot is shown below. To know in detail about sensor circuit see this tutorial(/light-sensors) and for motor driver circuit part see this (/dc-motor-driver-circuits).

Page 6: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 6/66 20

Complete circuit

How would the above circuit works?The logic is simple. Left sensor will be controlling left motor, when the sensor is on white surfacemotor will be switched on else switched off. Similarly right motor is controlled by right sensor. Thepicture below will give you an idea.

Page 7: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 7/77 20

logic

Related articles on PlayWithRobots

Advance line follower robot (/advance-line-follower-robot) | Edge avoider robot (/edge-avoider-robot) |Sensor circuits (/light-sensors) | Motor driver circuts (/dc-motor-driver-circuits) | AVR basic inputoutput concepts (/avr-basic-io)

Now lets make it. To sense the line properly sensors must be placed on the robot is such a way thatthey are very close to the ground. For this we have divided the circuit into two parts, first part wouldbe LDR and LED pairs. These are to be soldered on a small general purpose board and mounted justin front of caster wheel facing downwards. This circuit is connected to the second part with the help ofa 4 pin connector. This sensor part is modular as we can use them for another purpose also. Youdon't need to solder them again, just unplug the connector and use them. Ensure that distancebetween two LDR must be 4-5mm greater than the width of the black line. It is necessary to cover theLED LDR pair with some absorbing material in order to avoid ambient light (enviremnet light) to fall onLDR. See the pictures below.

Page 8: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 8/88 20

General purpose board

Sensor Part soldered

Page 9: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 9/99 20

Insulated soldered part

sensor covering

Second part consist of motor driver circuit and the threshold adjusting potentiometer. This part wouldbe soldered on another general purpose board and would be placed on the top of chassis. Thereason for placing potentiometer in this part is that it would be easier to adjust sensor threshold. Seethe pictures below.

Page 10: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 10/00 20

Part 2 soldered

Now all the chassis and circuit part is done lets combine them all!.

Combining allFix the sensor part just in front caster,facing downwards. ensure that there is very less clearancebetween sensor covering and ground. See the picture below.

Page 11: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 11/20

Sensor Placement

Now connect the battery to the circuit and also plugin the motors in there respective connectors. Formore information regarding battery and there charging circuit see this tutorial. I am using two 3.7V Li-ions cells in series for this robot.

Small cheap 9 V batteries will not be able to drive this robot for more that 4-5 minutes.

Page 12: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 12/22 20

Li-ion battery

Complete Robot

Page 13: Simple Line Follower robot - profs.hsu.ac.irprofs.hsu.ac.ir/haji/files/2016/02/Simple-Line-Follower-robot_2.pdf · 4/27/2015 SimpleLineFollower robot 4/20 Chassis Layout Our first

4/44 27/77 2015 Simple Line Followoo er robotoo

htttt p://// playwithrobotoo s.com/simple-line-foff llowoo er-robotoo /tt 13/33 20

Adjust the threshold of LDR such that when sensor is on black surface voltage at base of transistormust be less than 0.5Volts. If motors are rotating is reverse direction just change the polarity of thatmotor. After all this you would be able to make a robot that moves like the one below!.

Hope you liked the above tutorial. Subscribe to PlaywithRobots on facebook for more updates.

404 - Not Found

More on PlaywithRobots

avr-tutorialsIntroduction to AVR microcontrollers (/avr-introduction/)Basic hardware and software required for AVR (/avr-getting-started/)AVR fuse bits (/avr-fuse-bits/)Input/Output Concept (/avr-basic-io/)

make-robotsManually controlled robot (/manually-controlled-robot/)Edge avoider robot (/edge-avoider-robot/)Advance Line Follower robot (/advance-line-follower-robot/)Simple Line Follower robot (/simple-line-follower-robot/)

motor-driver-circuitsDC-Motor Driver circuits (/dc-motor-driver-circuits/)

pioneer-p3dx-robotHuman Interaction with Pioneer P3-DX (/p3dx-interaction/)Pioneer P3-DX and ADstar planner (/pioneer-p3dx-adstar/)