Logic Gates Line Follower

Posted: April 28, 2010 in Digital Electronics, Robotics
Tags: , , , ,

Line Follower
Here is a low cost line follower for steer type chassis like the one used in remote control car toys.

The circuit consist of three parts, the sensor, logic, and speed controller for the drive motor. The sensor is formed by two IR pairs and fed to a comparator to condition  the signal before it goes to the logic circuit. The logic circuit is basically a SR latch formed from NAND gates. Since the output of the SR latch is logic 1 for Q and ~Q when the input is both logic “0” we invert this to protect the h-bridge. We used the two remaining NAND gates to become an inverter. Thus the logic circuit is only a single chip using a quadruple two input nand gate 74LS00.  The logic truth table is show below:

One problem that I encountered during my early design of this kind of mobot is controlling the speed of the drive motor.  When the mobot is too fast and the steering  of the car is not good the mobot might get out of track. In this version I added a PWM controller using a 555 timer with varying pulse width to control the speed of the drive motor.

  1. nice circuit..is that an H-bridge? :p LOLs

  2. vincerden says:

    you haven’t put protective diodes in your H-Bridge..

  3. knives says:

    what is that circuit with 5.1v 1/2w zener diode is for?? is that 9v on that circuit same as the main supply for all the circuit?

  4. tiktakx says:

    @knives, that circuit is to bring the 9V (which supplies the electronics) to 5V because I used a 74HC00 nand gate and it cannot withstand voltages greater than 5V, though you can also use 7805 voltage regulator

  5. knives says:

    i see. thanks a lot sir. i’ve been reading your posts here and also in electronicslab.ph XD they are very helpful and very informative. thanks again for the share

  6. sprite says:

    may I ask what are those “steer”, “drive” are? isn’t it that a typical remote control car has only 2 motors? (front for steer and one at the back), then what is that “motor_B+” sir?

  7. xtian says:

    gud day, what is that Motor B+? and also, what does your sensor senses at default? a black line or the white part? thanks

  8. tiktakx says:

    the circuit is designed that the motor has a separate supply from the electronics to prevent too much noise going to the circuit

    you are correct, the back motor is the drive motor, and the one in front is the drive motor, thus the drive refers to the back motor and steer is the motor in front

  9. xtian says:

    what i’m asking is where to connect the “Motor_B+” terminal??
    what i understand is that all +5V terminals are connected to each other so the supply for the sensor and the logic gates circuit is from the 9V which is regulated to 5v by the zener diode,… but what i don’t understand is what supply to connect for the STEER and DRIVE circuits sir. is it another bunch of batteries?

  10. tiktakx says:

    yes, its another set of batteries, I usually use the original battery compartment of the toy for powering the motors, and a separate 9V battery to supply the electronics

  11. xtian says:

    oh i see. thanks for the help sir.

  12. 1st year says:

    can i simply connect all +5V? am i correct that all +5V are all from the regulated 9v?

  13. tiktakx says:

    you are correct, simply connect all +5V

  14. cravex says:

    sir can i use the sensor and ir of the “mouseball” mouse? and if yes, what are the pins to be used?

  15. tiktakx says:

    yes you can use that sensor, usually the pinout of the receiver is collector collector emitter

    • archimedes says:

      sir, do you have a mobot which detects obstacles using ultrasonic sensors, the mobot is also a line follower and the obstacle is on the line.

  16. dv says:

    gud day…i dont know where i’ve done wrong in this mobot, i had double check my circuit many times but it is always steers in the RIGHT side when i testing in the line… what might be possible problems?

  17. dv says:

    oh i see, maybe that was the problem. Is there any cheaper H-bridge in the form of IC?

  18. dv says:

    thanks a lot sir…it’s too much worth…

  19. crisTINTINE says:

    kuya may copy ka po nito sa eagle? or sa kahit san na software na nagppcb layout?

  20. crisTINTINE says:

    salamat po nagawa ko na po sya 🙂

  21. RoAnne says:

    Sir. Do you mind kung hihiramin po namin itong project na ito?
    Maganda po sana siyang project para sa logcast namin. 🙂

  22. harris says:

    Thank you very for this project sir. I created the circuit but i change the sensor with only 4 ir led, does it still give the same response?. i got the sensor part from this site. http://www.ikalogic.com/infra-red-proximity-sensor-part-1/

      • harris says:

        Sir i assembled the project and i encountered a problem where the other side of the steering wheel cannot fully turn. The sensor work good even the h-bridge. When i tried to cover the ir led or the photransistor it steers very well. Sir what might be the possible solution for this? Any comment sir.

  23. Jamil says:

    dude we are required to use cmos 4011 quad 2 input nand gate what do you think will be alter in the circuit and also what is the supply use for your motor tnx in advance..

  24. good day po, it’s my 1st time making a mobot project, just asking if pwede po hiramin ung design n to, 😀 and btw, ano po ung values n 100R and 330R, resistors po ba un in ohms?

  25. Jam says:

    because if i put a cmos 4011 nand gate the supply that we need put in the circuit we’ll be change, because i think the IC you used here is TTL which has a VCC supply of only 5V while cmos 4011 needs a supply of 8V. WHAT DO YOU WILL BE THE ALTERNATION IN THE CIRCUIT? tnx in advance…

  26. RoAnne says:

    Good day sir. ayos lang po ba kung i-post ninyo ung list of parts na ginamit ninyo?kase hirap po kame mag decode ng mga items na ginamit dito sa project.thanks sir! 🙂

  27. Andrea says:

    sir…anu pong klaseng capacitor ung mga nagamit? ceramic po ba o mylar capacitor? nagawa ko na po ung sensor board nito kaso parang walang response…malakas po ba ung ilaw nung photodiode?

  28. Ann says:

    sir….ung 7400 po bang nand gate na ic sa circuit eh kukuha din dun sa 5 volts na supply?

  29. Eddy says:

    sir tanung ko lang po kong pede sa sensor board ung LED na red tapos phototransistor, kasi po parang ndi gumagana…hehe

  30. Eddy says:

    sir tanung ko lang po kung pede dun sa sensor board ang ordinary LED na red at phototransistor….tapos dun sa 7400 nand gate ic, sa 5 volts din po ba kukuha ng supply para sa vcc(pin 14)?

  31. mekaniko says:

    gud evening po sir….saan po ba icoconnect ung 14 pin nung 7400 ic, sa 5 volts po ba o dun sa motor supply?

  32. RoAnne says:

    good evening po ulit 🙂 hmm sir pwede po malaman kung ano pinagkaiba nung C5 na nasa diagram sa ordinary capacitor? and hindi po ba kayo nahirapan maghanap nung IRFZ44E? kase po nung nagpunta ako ng alexan kanina, wala daw po sila. thanks po sir! 🙂

  33. Mark Rocani says:

    Sir Tiktakx, san po ba makakahanap ng IRFZ44E? or kung may alternative para dun dito sa circuit na to? Much thanks sir.

  34. Mark Rocani says:

    Sir tiktakx what do you mean by NPN? what certain value po?? .. kailangan lang po nmin malaman kung anong certain value ng transistor that can substitute IRFZ44E.. thank you very much

  35. april says:

    Sir if i were to use a l293d motor driver,,what would be the connection?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s