Line Follow Robot, No Programming Required





Introduction: Line Follow Robot, No Programming Required

Kit Contest

Finalist in the
Kit Contest

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



    • Epilog Challenge 9

      Epilog Challenge 9
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    I am interested in building a mini dome shaped robot like Hemi, and had a few questions

    How well did you get Hemi to perform once you go it set up right, did it squiggle l along at a pretty good
    pace seeing only pic's no video all and all how well do you think it performs .Two advice part any help appreciated this is my component list of what I have 1 IM 393 chip one 8 pin dip socket 6 resistors 10 ohms 5 resistors 51 ohms 2 electrolytic capacitor 100 vf 25v 2 transistor PNP
    2 potentiometer 2 photoresists 2 red LEDS 2 white LEDS is any of this over kill component wise in order to build a good preforming mini line following robot ! my dome I plan to use is 58 mm inside diameter .


    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.

    the right motor is M1 and left motor M2

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

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

    Does it work with only one LDR?

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


    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 will be really helpful if you reply fast...