Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Having problem to connect two LM358 Comparator together!

Status
Not open for further replies.

kaixiang

Newbie level 4
Joined
Apr 2, 2009
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,337
Hi guys,
I'm building a position detector by using photodiode.

My idea was i connect two or three lines of photodiode to AT89S8252 microcontroller.
where each line of photodiode consist of 4 photodiodes and one reference of photodiode is used as a reference photodiode to determine the changes of the other photodiode base on the current sunlight.

Now my question is how do i connect the photodiode together.
First i tried to use one LM358(dual comparator) to compare. --> Success
Then i proceed with two LM358 to compare --> Fail
Attached below is the schematic diagram of my two LM358 Circuit.
Anybody know what happen to my circuit?
or do you have any better idea beside using the comparator?
The photodiode datasheet shows that the Maximum reverse voltage is from -0.5 until 12V. How do i achieve the voltage of 5V? Do i need pull-up resistor or any other thing?
when not connected to power supply, i straight away check the voltage of the photodiode simply by connecting the anode and cathode to multimeter and the value i get is 330mV.
Would really appreciate anyone who help me with this.
thanks you!
 

Hi kaixiang,

In the ckt, I think you are trying to use the photodiode in photovoltaic mode(like solar cell). This may not be a good idea as the potential generated would be too small.

You may try using it in the photoconductive mode by providing a reverse bias. For that, connect resistors from the cathode of the photodiodes to the positive supply line. The value of the resistor ':!:' , you may need to expiriment (between 1k and 10k).
 

hi matbob,
thank for the reply but i would know about the photoconductive.
Can i connect like:

[+5V]----[Resistor]----[-photodiode+]----[GND]
 

Hi kaixiang,


Yes correct. You need to reverse bias the diode,thats all.
 

Your opamps do not have a DC reference voltage at their inputs. Their inputs are floating. Also, the LM358 is very noisy and might not work without any negative feedback.

Why not use an LM393 dual comparator IC?
 

the LM358 is very noisy and might not work without any negative feedback.
It can work as a comparator of course. Any OP can. Due to compensation for unity gain, the response is considerably slower.
If the application doesn't need high speed response, there's nothing against it.

LM358 and LM393 input stages are rather similar, so most input related parameters, e.g. input current, input voltage
range, offsets are almost equal. A "lousy" OP can still work as a low performance comparator...
 

I think the "lousy" opamp is so slow and is so noisy that its output will be full of noise when the input passes the threshold voltage slowly. Negative feedback and hysteresis might help reduce the noise.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top