LDR Line follower.

Thread Starter

Voltboy

Joined Jan 10, 2007
197
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?
 

Attachments

thingmaker3

Joined May 16, 2005
5,083
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.
 

Thread Starter

Voltboy

Joined Jan 10, 2007
197
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:
 

Thread Starter

Voltboy

Joined Jan 10, 2007
197
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..:(
 

thingmaker3

Joined May 16, 2005
5,083
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.
 

Thread Starter

Voltboy

Joined Jan 10, 2007
197
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?
 
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.
 
Top