Introduction: Line Follow Robot, No Programming Required

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

RiteshYadav (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.

laxmi01 (author)2015-09-26

the right motor is M1 and left motor M2

yaswanth raj (author)2015-08-18

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

shoshu (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

RaulL (author)2015-05-01

Does it work with only one LDR?

shashankrwt342 (author)2014-12-30

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

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

I live in Vietnam but i very like this thing

Aditya Tripathi (author)2014-10-11

can i use 2 ldr's

Aditya Tripathi (author)2014-10-11

can i use 2 ldr's

sagar thakur (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...

jrastogi (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

jrastogi (author)2014-07-14

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

leebates (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

ram123manohar (author)2013-09-17

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

argha halder (author)2013-08-10

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

rexxxdavid (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...

sabariprasad (author)2013-07-27

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

profpat (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!

profpat (author)2013-07-17

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

Nitro-methane (author)profpat2013-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.

profpat (author)2013-07-17

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

Nitro-methane (author)profpat2013-07-17

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

Mahmoud Alaa (author)2013-07-05

WHAT transistor should i use please help ME FAST

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

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

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

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

benmurton (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

Sundar005 (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?

Mayank3 (author)2013-06-30

My circuit is not working can you upload a video plzz

Nitro-methane (author)Mayank3 2013-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.

AndyGadget (author)2013-06-30

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

Nitro-methane (author)AndyGadget2013-06-30

Sorry, also the wheels are from a lego set.

AndyGadget (author)Nitro-methane2013-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.

Mayank3 (author)2013-06-30

My circuit is not working can you upload a video plzz

vishalapr (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.

Wyle_E (author)vishalapr2013-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.

Nitro-methane (author)2013-06-30

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

makesomeso (author)2013-06-30

can you make a vid of it in action?

Tarun Upadhyaya (author)2013-06-30

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

Kiteman (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,364views

407favorites

License:

Add instructable to: