LDR Line follower.

Discussion in 'The Projects Forum' started by Voltboy, Nov 29, 2007.

  1. Voltboy

    Thread Starter Active Member

    Jan 10, 2007
    197
    0
    Hello Guys.
    I want to make a line follower robot with LDR's.
    I designed that circuit and I think it could work.
    On the output what it do is that if the output is low it will only power one of the two diode branch.
    The motor are reversed so if you turn the output low the diode will let current pass and one motor will spin clockwise and the other counter-clockwise, that is for taking good curves.
    I want to hear everyone's opinion on my design.. please correct if anything is wrong.

    PS: How to add the +V and Gnd, and motors on eagle cad?
     
  2. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    I see three problems. First, you will be hard pressed to drive a motor from the comparator directly unless you r have very tiny motors. The comparator can only source or sink 20mA. You either need some drivers, or something like an OPA541.

    The second problem is that the motors won't ever run in reverse. The comparator output won't ever go below ground as you have it configured. You need dual supply for that. The LM339 can be run from dual supply - see the datasheet for details.

    The third problem is the robot will oscillate left to right and back again, but will not move forward. At some point the motors must turn the same direction, or the little gizmo won't get anywhere.
     
  3. Voltboy

    Thread Starter Active Member

    Jan 10, 2007
    197
    0
    For the first problem I think I could use an MJ11032 power transistor.

    Could you give more details on dual supply because I don't see it in datasheet.

    For the third problem I think I would put both outputs of the LDR into the (-) of a comparator and the (+) would be connected to a potentiometer. So the both output would "average" and if the average is > than the voltage of (+) turn on both motors.

    Thanks for helping. :rolleyes:
     
  4. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    I was looking at the TI datasheet: http://www.ortodoxism.ro/datasheets2/1/03g078wtqeq1977af5glcauow6fy.pdf

    I'm sorry, friend Yoda, I missed that part the first time around. Those are in the parts category called "supply." You should have two of them, a "supply1" and "supply2."
     
  5. Voltboy

    Thread Starter Active Member

    Jan 10, 2007
    197
    0
    What about if I use each of the input on a different comparator to drive each motor (through the MJ11032) alone.
    And another comparator of the "average" of the inputs connected to both MJ11032' base.

    I still didn't find something about dual supply in the link you gave.
    Btw I'm using the LM339 from Fairchild, I guess it's the same but just for you knowing.

    Thanks about the tip on eagle cad.


    damn.. the packers lost..:(
     
  6. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Two comparators seems a good way to go. Wouldn't have to run the motors backward, either.
     
  7. Voltboy

    Thread Starter Active Member

    Jan 10, 2007
    197
    0
    I made a new schematic.
    It's just one single motor, so what you think?
     
  8. thingmaker3

    Retired Moderator

    May 16, 2005
    5,072
    6
    Looks good!

    R7 is not needed, as long as R2 limits the darlington's base current to less than half an Amp.

    You might also consider swapping position of the LDR and the 10K pot - this would allow you to eliminate Q3, tying T1 collector to comparator input.
     
  9. Voltboy

    Thread Starter Active Member

    Jan 10, 2007
    197
    0
    The R7 is the pull-up resistor. I've heard it's needed for the LM339.
    Why if swapping position of the LDR and the pot I will be able of eliminating Q3?
     
  10. electrocute

    New Member

    Dec 14, 2007
    4
    0
    I had to search for the thread :p. I have to make a Line follower. I think are need are An LED detector circuit, A motor controller, A microcontroller to do all logic. I need a basic Led detector circuit that helps my cause.
     
Loading...