Introduction: Line Follow Robot, No Programming Required

This is the line following robot which i designed and built for an NCEA electronic design assessment. the idea came to me when playing around with light dependent resistors (LDR's), realising that the motor speed can be varied when wired in series with the LDR and a transistor. I decided to name the robot HEMI, simply because of its hemispherical shape.

Step 1: Overview

You will notice that the pictured robot is built to micro dimensions(it measures 45mm in diameter), but this isnt neccesary, and this instructable will explain how to build it according to the parts that you can get hold of. the line follow robot is a great first robotics project, giving you good idea of how to achieve autonomous behaviour using simple electronic components and some mild soldering skills.

parts needed include:

 an NPN transistor
a resistor (the value of which later be determined later)
batteries (between 6 to 12 volts depending on size of robot and motor requirements, I used two 3v button cells).
two motor and gearbox assemblies
a switch
a light dependent resistor (LDR)
and a suitable shell. (mine was the clear case from a toy, it measures 45mm in diameter).
a multimeter or ammeter

note: the picture does not include the transistor because at the time of taking the picture i was still in the process of designing and didnt think that the transistor was neccesary. also, only one resistor was needed.

Step 2: Design

The circuit, and placement of components is the most important part of the design, I will explain the two diagrams given above.
the right motor is wired in series with an LDR and a transistor. the LDR is placed at a 45 degree angle to the driving surface and recieves light reflected from this surface. when the surface is black, less light is reflected onto the LDR, when the surface is white, more light enters the LDR.
the resistance of the LDR varies depending on the amount of light entering it. (most LDR's varie between 3000 ohms when light and 10000+ ohms when dark) this means that the current is varied coming out of the LDR. a transistor is used to "bump-up" this current to make it sufficient to drive the motor. therefore the righthand motor will be "high" (lots of current) when on a light surface, and will be "low" (no current) when on a dark surface. the left motor recieves a constant current so always remains on however it is wired in series with a resistor which makes it spin slower than the right motor when the right motor is "high". this means that the robot zig-zags along the side of a black line.

Step 3: Assembly

my base plate is a round pice of plastic cut out from a plastic container. i cut slots in it for the wheels, switch and LDR. the motor and gearbox/assemblies are simply attached with hot glue along with the switch. the LDR is a bit more tricky as it has to be mounted at a 45 degree angle to the ground and it most protrude from thebottom of the base by the same amount as the wheels because it also doubles as a bogey wheel to keep the robot stable. a pictue is shown of how mine was placed on the bottom of the robot.
also i chose to cut out a small piece of PCB to solder my components onto. this sat nicely on top of the motor assemblies.

Step 4: Diagnostics

the best thing to do for this step is to mount all components into a breadboard , and do a simulation by holding the LDR against a black and then a  white surface at the right angle. the results can be found by measuring the current from the the emmitor leg of the transistor. the results that i found were 0 amps when the surface was black, and 0.6 amps when the surface was white.
this means that the left motor wants to recieve a constant current of about 0.3 amps. we can work out what the resistance needs to be by putting the data into the equation r=v/i  (where r=resistance, v=voltage and I=amps) so:    6/0.3   =   20ohms. we need a 20 ohm resistor.
i also added a final design to give an idea of how the circuit will fit onto the PCB board.

Step 5: Soldering

all components were soldered onto the copper side of the PCB board. wires from the motors, switch and LDR were pushed up from underneath and soldered into place. the battery holders were formed from some bent paperclips.
.

Step 6: Enclosure

all that is needed to do now is finish off the robot by attaching the enclosure, then the robot is ready for a test run. set it down with the switch turned on and the LDR over the top of the black line.you will find that the robot will only work correctly under certain light conditions, so there may be a bit of trial and error to find the right lighting for it to work, but this shouldn't be too much of a problem.
unfortunately my computer would not allow me to upload a video, but i have added some extra pictures.

Comments

author
RiteshYadav made it! (author)2016-01-08

can the LDR be placed in the center or just after the right tire.
also can I ise bc547 transistor.
have any body added a led.
explain.

author
laxmi01 made it! (author)2015-09-26

the right motor is M1 and left motor M2

author
yaswanth raj made it! (author)2015-08-18

it is cool!!! but i cant clear with the schematic plz sent proper diagram

author
shoshu made it! (author)2015-08-13

bro, this is a cool one ..but can you plzz sent me the circute diagram ..so that it is easy to find.... plzz broo plzz. ;) :D

author
RaulL made it! (author)2015-05-01

Does it work with only one LDR?

author
shashankrwt342 made it! (author)2014-12-30

which transistor did you use . what was the no. / or will any npn transistor will work ??

author
Thế Sẽ ĐếnT made it! (author)2014-10-18

I live in Vietnam but i very like this thing

author
Aditya Tripathi made it! (author)2014-10-11

can i use 2 ldr's

author
Aditya Tripathi made it! (author)2014-10-11

can i use 2 ldr's

author
sagar thakur made it! (author)2014-09-03

hello,

your project is awesome but can you please specify the parts more clearly like which ldr you are using because i am stucked in between maybe because of the ldr.....it will be really helpful if you reply fast...

author
jrastogi made it! (author)2014-07-15

i have made the one by the circuit diagram shown above but it doesnt work only the motor2 runs can you please help me

author
jrastogi made it! (author)2014-07-14

hello i am using 6v aa batteries can you please show me the circuit diagram

author
leebates made it! (author)2013-12-09

Hello,

Where did you get the motor and gears from? Are these out of a toy? I can't seem to find anything that small available to buy.

Maybe you could post the link?

Thanks

author
ram123manohar made it! (author)2013-09-17

can you email me how does this work...this is really the simplest awsome LFR..
ram123manohar@gmail.com

author
argha halder made it! (author)2013-08-10

so cool!!!!!!!!!!!!!!!

author
rexxxdavid made it! (author)2013-08-10

awsome work dude... as you said it wont work under certain light conditions. i tried to add a led under the robot as the light from the led reflects to the ldr. it will also give a cool look to the robot. but i cant find the right place to fix the led. i hope it will work fine under any light enen in the dark if you can adda light source...

author
sabariprasad made it! (author)2013-07-27

how the robot turns left&right according to the line?
which controls the robot?

author
profpat made it! (author)2013-07-18

yup, i got it, just the arrow for the emitter is on the collector, but the connection is correct for a npn transistor, thanks!

author
profpat made it! (author)2013-07-17

hi, according to your drawn schematic, the transistor is a pnp!

author
Nitro-methane made it! (author)Nitro-methane2013-07-18

Sorry, I must have made a mistake there as well, if you look in the parts list of the first step I wrote NPN.

author
profpat made it! (author)2013-07-17

nice one! can we use a npn transistor instead of a pnp transistor?

author
Nitro-methane made it! (author)Nitro-methane2013-07-17

yes, i actually made a typing error on one of the previous replies, i was meant to say NPN. Sorry.

author
Mahmoud Alaa made it! (author)2013-07-05

WHAT transistor should i use please help ME FAST

author
Nitro-methane made it! (author)Nitro-methane2013-07-05

I used a BC548B transistor. Most standard PNP transistors will work.
Hope this helps

author
Mahmoud Alaa made it! (author)Mahmoud Alaa2013-07-06

thanks very very very much , and can i have your permission to add this circuit to my new 'able ??? i will appreciate that very much :D

author
Nitro-methane made it! (author)Nitro-methane2013-07-06

sure, thats fine. And it would be great if you could acknowledge it to me in your instructable.

author
Mahmoud Alaa made it! (author)Mahmoud Alaa2013-07-07

ok thanks very much and i will be posting my able as soon as i can

author
benmurton made it! (author)2013-07-03

Hey Oliver

Nice job, you may remember me, Mr Taylor introduced us when you made that cool as jet boat.

Have you thought about putting a little LED facing down next to the LDR with a shield between the two? This would allow it to work more reliable. Another idea is using an infra red LED and a infra red photodiode, this eliminates interference from normal visible light yet again making a more reliable.

Really awesome instructables! Two thumbs up and my vote!

Message me or come and see me at school if you need any help or have any cool ideas that you feel like sharing. :)

Benjamin Murton

author
Sundar005 made it! (author)2013-07-02

That's really a good one. But I have a doubt. What happens if the line to be traced is other than black; say red or yellow?

author
Mayank3 made it! (author)2013-06-30

My circuit is not working can you upload a video plzz

author
Nitro-methane made it! (author)Nitro-methane2013-07-02

Sorry for the late response, I will try and upload the video again when I get the chance but there are no guarantees. As for your circuit, I can only suggest that you tell me what parts you used and I may be able to help.

author
AndyGadget made it! (author)2013-06-30

 
Very nice.  Those motor / gearbox / wheel assemblies are neat; Where did  you get them? 

author
Nitro-methane made it! (author)Nitro-methane2013-06-30

Sorry, also the wheels are from a lego set.

author
AndyGadget made it! (author)AndyGadget2013-07-01

Of course! I didn't recognise it as a servo with the top cover off.
(And Lego sets always come in useful for small (and not so small in the Technics sets) wheels.)  Neat set-up.

author
Mayank3 made it! (author)2013-06-30

My circuit is not working can you upload a video plzz

author
vishalapr made it! (author)2013-06-30

First time I have seen a line follow robot without any programming, I would be making this soon!
Did you buy those tiny motors online or at a local store? When I use such small motors with gearboxes they are not strong enough to move anything.

author
Wyle_E made it! (author)Wyle_E2013-06-30

This project is the functional equivalent of EMILY, the "Electromechanical Inebriated Ladybug" that was a cover story in "Popular Electronics" about half a century ago. That robot was bigger, and had a relay between the transistor and the motor, because it used motors and gearboxes from toy cars, but it worked the same way. This version, with a little paint, would look even more like a ladybug.

author
Nitro-methane made it! (author)2013-06-30

They came from two Brocken 9g micro servo motors, thanks, I'm glad you like it

author
makesomeso made it! (author)2013-06-30

can you make a vid of it in action?

author
Tarun Upadhyaya made it! (author)2013-06-30

My thoughts are exactly like Kiteman. This is just awesome:). Please post a video if you can.

author
Kiteman made it! (author)2013-06-30

This is really cool - I have a soft spot for robotics thst do not need microprocessors to do their thing.

Any chance of seeing a video of it in action?

About This Instructable

47,131views

408favorites

License:

More by Nitro-methane:Homemade r/c jet boat, including jet driver/c racing hovercraft, 2 channelline follow robot, no programming required
Add instructable to: