0
\$\begingroup\$

I'm using a LM339 voltage comparator by supplying it 5V, with a reference voltage of 1V. I have a 3K pull up resistor on the output to 5V. For some reason, the output voltage is always 2V. It doesn't change at all when my input signal rises above the 1V reference voltage. Any thoughts would be much appreciated :)

LM339

Edit: I wasn't clear in the diagram, but the bottom phototransistor is actually attached to a voltage regulator. Also, I tried removing the top photodiode and now the output is always 5V. I think it's like this because I have to pull it high to Vcc so I'm not sure how to make this work.

\$\endgroup\$
  • \$\begingroup\$ Decent description, but I think you should post the schematic. Is your Vref on the inverting input? \$\endgroup\$ – DigitalNinja Sep 25 '15 at 22:42
  • \$\begingroup\$ Okay I will, and yes it is. \$\endgroup\$ – Haley Sep 25 '15 at 22:47
  • \$\begingroup\$ @Haley (1) Please read: Rules and guidelines for drawing good schematics. (2) It's always good to link the datasheet for the parts that you are using. That saves time and clicks. Folks out here appreciate that. \$\endgroup\$ – Nick Alexeev Sep 25 '15 at 23:35
  • \$\begingroup\$ Thank you, what program do you use for making schematics? \$\endgroup\$ – Haley Sep 25 '15 at 23:41
  • \$\begingroup\$ @Haley Altium (which you seem to be using) would do just fine. Even paper and pencil will do. The issue is more with good schematic habits, rather than capture software per se. \$\endgroup\$ – Nick Alexeev Sep 25 '15 at 23:48
0
\$\begingroup\$

You need to connect photodiode o/p to I/V converter and then assign it to non-inv pin of comparator. Measure i/v converter output and accordingly verify LM339 o/p is changing or not.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Wouldn't a simple resistor be an I/V converter, or do you mean using an op amp I/V circuit with a DAC? \$\endgroup\$ – Haley Sep 26 '15 at 5:19
  • \$\begingroup\$ en.wikipedia.org/wiki/Transimpedance_amplifier#/media/… refer above schematic, By changing Rf,you can vary output voltage above and below reference ( in your case 1v) \$\endgroup\$ – Electroholic Sep 26 '15 at 5:27
3
\$\begingroup\$

As long as the anode of the photodiode is not connected, the input will not be driven to any particular voltage. Simply reading the voltage across the diode does not mean that it will be seen as such by the circuit.

Ground the anode.

Edit - Sorry, but I got turned around. The cathode should be grounded, and the anode tied to the comparator. Alternatively, provide a reference voltage greater than 1 volt, and connect the anode to that.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ The the cathode will go negative when there is light. A resistor from the cathode to the positive supply would work. Select the resistor depending upon the desired sensitivity. \$\endgroup\$ – Kevin White Sep 26 '15 at 3:21
  • \$\begingroup\$ Sorry, my diagram wasn't very clear. The bottom photodiode is actually connected to a voltage regulator. Are you talking about the top or bottom photodiode? \$\endgroup\$ – Haley Sep 26 '15 at 4:29
  • \$\begingroup\$ The top diode is an LED as shown in your diagram (the arrows go away from the device). The bottom device has the arrows going into the device and so I assumed it was a Photodiode. What voltage is the regulator? \$\endgroup\$ – Kevin White Sep 26 '15 at 22:48
1
\$\begingroup\$

It truly sounds as if you don't have the ground pin connected properly.

You are aware that the pinout of the LM339 is NOT the standard quad op-amp pinout?

Vcc is pin 3; Ground is pin 12. The 4 output pins are pins 1, 2, 13, 14.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I just uploaded a schematic, and GND is connected correctly \$\endgroup\$ – Haley Sep 25 '15 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.