LM358P Light Comparator

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I am attempting to duplicate the comparator portion of the circuit shown here under question 17: http://www.allaboutcircuits.com/worksheets/opamp2.html .

The schematic of my breadboard is attached. I have double checked my wiring and believe it to be correct, however the circuit does not operate as expected. I can see the voltage at the LDR junction change as vary the amount of light varies on each LDR, but I have not been able to light either LED. I have tried varying both pots at both extremes, and currently have them set at mid range. I know the op-amp is good, the power is properly connected, the LED's are good. What could be wrong?

Thanks.

ETA: Never mind. It was a pot in wrong. I have corrected the attached schematic to show the pots in the correct orientation. Rotating the pots clockwise will produce maximum sensitivity.
 

Attachments

Last edited:

ScottWang

Joined Aug 23, 2012
7,409
The original design is to driving the motor, the LDR1 and LDR2 can't face to the same brightness.
So if you want to test your circuit when you connected to a LED, you have to make anyone of LDR1 or LDR2 to get more brightness or darkness.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I completed breadboard construction of the circuit identified in post 1 of this thread; my schematic is attached.

The circuit works reasonably well, but I have some questions.

1. At very low light levels, the circuit performs erratically. I need to disable it when available light falls below a certain level. Should I use another LDR to do this, or is there a better way?

2. As I built the breadboard with 2N3904 and 2N3906 transistors, I must limit the size of the motor being controlled. I am thinking of 100 mA; is that correct?

3. What would be a good choice for transistors to control up to 3 A? And do only the PNP's have to handle increased current or do all four transistors need to be replaced?

Thanks.
 

Attachments

ScottWang

Joined Aug 23, 2012
7,409
I'm just thinking that you may separate the Op amp and LDR to two sections, became two independent light detectors, only the output of two op amp is the same.
 
Last edited:

Audioguru

Joined Dec 20, 2007
11,248
I completed breadboard construction of the circuit identified in post 1 of this thread; my schematic is attached.
I turned the PNP transistors around so that they have the positive pin up.
I cropped your schematic so it is not as big as my neighbourhood.

1. At very low light levels, the circuit performs erratically. I need to disable it when available light falls below a certain level. Should I use another LDR to do this, or is there a better way?
Maybe the lousy old LM358 has too much noise. Use a low noise audio dual opamp.

2. As I built the breadboard with 2N3904 and 2N3906 transistors, I must limit the size of the motor being controlled. I am thinking of 100 mA; is that correct?
Those transistors work poorly above 50mA. A motor that runs at only 100mA is pretty small and might draw 1A when starting or when stalled that might burn out the little low current transistors.

3. What would be a good choice for transistors to control up to 3A? And do only the PNP's have to handle increased current or do all four transistors need to be replaced?
All the transistors drive the motor forward or reverse. The base current from the opamps must be 1/10th the collector current but the max opamp output current is only 20ma so replacing the transistors will not help. darlington transistors can be used but they have a 1V or more voltage loss. Mosfets can be used instead of transistors.
 

Attachments

Audioguru

Joined Dec 20, 2007
11,248
The lousy old noisy LM358 dual opamp has inputs that work when their voltage is at ground in this circuit.
But the low noise TL072 dual opamp inputs DO NOT WORK when their voltage is within a few volts from ground in this circuit. It needs a negative supply in addition to the positive supply.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
If you using this circuit to control the motor, then you should separate the LDR to two sides, as left side and right side.
Yes, I think you are correct. However, the circuit is quite responsive as I have it laid out on the breadboard. I have seen videos where the LDRs are separated by several inches, and I have also seen them side by side, but with a thin divider between them. Both methods seem to work. I intend to experiment and see which works best.
 

ScottWang

Joined Aug 23, 2012
7,409
Long time ago, I got an idea is to use four LDRs to control two motors, two LDRs for the horizontal motor and another two LDRs for the vertical motor, the idea is for chasing the sunlight - sunlight tracer, but I didn't really to make it, several years ago that I heard someone made the similar product and applied the Patent and passed.
 
Top