# open Collector comparator LM339N

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

1. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
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,071
Last edited: Jan 20, 2013
bennethos, Jan 20, 2013

2. ### Harald KappModeratorModerator

Joined:
Nov 17, 2011
Messages:
6,120
883
Location:
Germany-Europe-Earth-Sol System-Milky Way-Laniakea
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.

Harald Kapp, Jan 20, 2013

3. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
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:
193
Last edited: Jan 20, 2013
bennethos, Jan 20, 2013
4. ### duke37VIP Member

Joined:
Jan 9, 2011
Messages:
3,753
351
Location:
Derbyshire. UK
It would be easier to understand with one ground rail.

Two of your ground connections short out D3.

duke37, Jan 20, 2013
5. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
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
bennethos, Jan 20, 2013
6. ### ninojovannionde

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

ninojovannionde, Jan 21, 2013
7. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
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 ?

bennethos, Jan 21, 2013
8. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
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...

bennethos, Jan 21, 2013
9. ### bennethos

Joined:
Jan 6, 2013
Messages:
15
0
found the original schematics

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

#### Attached Files:

• ###### psu.jpg
File size:
73 KB
Views:
454
bennethos, Jan 23, 2013