# open Collector comparator LM339N

Discussion in 'Electronics Homework Help' started by bennethos, Jan 20, 2013.

1. ### bennethos

15
0
Jan 6, 2013
Hi all,

Trying to understand a simple comparator circuit but can't figure it out.
I'll explain :

I reverse engineered part of a linear power supply. The comparator's schematic part lights up a LED if there is a difference between the 2 inputs.
To create this issue one has to connect a load on the regulated PSU but wrongly. By that I mean instead of putting the psu's 5V rail to 5V, you put it on the ground or on a -12 or +12v rail.

- Basically i'm trying to understand what happens when you create this short circuit. How would it affect the comparators inputs and make the LED work.

In attach part of the comparator schematic (only for the 5V power rail part)

I hope I was able to make myself clear a bit... Else I will explain in more detail.

#### Attached Files:

• ###### lm339N.jpg
File size:
91 KB
Views:
1,613
Last edited: Jan 20, 2013
2. ### Harald KappModeratorModerator

12,454
2,984
Nov 17, 2011
Are you sure you got that circuit right? It doesn't make sense to me. The voltages at the comparator's "+" and "-" input are essentially the same. Whatever you connect the 5V supply to, both inputs will follow that voltage via the resistors R1...R4.

3. ### bennethos

15
0
Jan 6, 2013
That was my conclusion too.

I reverse engineerd the 3 inputs from the LM339N, they all look quite the same. the 4th is not being used and they grounded both inputs.

Problem is, I can really make the led go on (on the PCB). If I connect the load power connector wrongly. For instance if you connect it 1 pin too high you put part of -12v on the +5v , part of +5v on the +12v and so forth...

In attach a picture of the PCB, will be easier to understand I think.

#### Attached Files:

• ###### 2013-01-20 11.54.10.jpg
File size:
67.1 KB
Views:
316
Last edited: Jan 20, 2013
4. ### duke37

5,364
772
Jan 9, 2011
It would be easier to understand with one ground rail.

Two of your ground connections short out D3.

5. ### bennethos

15
0
Jan 6, 2013
Yeah I know what you mean, made a mistake there. But didnt want to draw the whole voltage regulator part too, so just took a separate 5V power source.
Basically the VCC input of the LM339N comes directly from the rectifier.
The VCC current also goes in a L7805CV voltage regulator outputting 5V. It's those 5V's going into one of the comparator inputs.

does this make more sense ?

Last edited: Jan 20, 2013
6. ### ninojovannionde

2
0
Jan 21, 2013
it seems that the comparator always detects positive input is greater giving an output of positive and the led will not glow...

7. ### bennethos

15
0
Jan 6, 2013
thx for having a look. What I'm intrested in understanding is how we can make it glow when a short-circuit occurs...

obviously by lowering the voltage of the non-inverted input. But the problem seems to be that both inputs are just following the input voltage due to the voltage dividers coming from 5V.

We could also up the voltage of the inverting input, this would cause the non-inverting to go low as well ?

8. ### bennethos

15
0
Jan 6, 2013
Another thing I noticed :

* When poweron switch is used the -12v LED lights up a couple of for 1 sec
* when powered-off all the leds burn a sec and dim out

so obviously there is a voltage difference on of the inputs or the leds wouldn't burn...

9. ### bennethos

15
0
Jan 6, 2013
found the original schematics

Found the original schematics. Hope this clears things up for some explanation on my original questions ?

File size:
73 KB
Views:
593