Maker Pro
Maker Pro

open Collector comparator LM339N

bennethos

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

Attachments

  • lm339N.jpg
    lm339N.jpg
    91 KB · Views: 1,613
Last edited:

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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.
 

bennethos

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

Attachments

  • 2013-01-20 11.54.10.jpg
    2013-01-20 11.54.10.jpg
    67.1 KB · Views: 316
Last edited:

duke37

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

Two of your ground connections short out D3.
 

bennethos

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

ninojovannionde

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

bennethos

Jan 6, 2013
15
Joined
Jan 6, 2013
Messages
15
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 6, 2013
15
Joined
Jan 6, 2013
Messages
15
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 6, 2013
15
Joined
Jan 6, 2013
Messages
15
found the original schematics

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

Attachments

  • psu.jpg
    psu.jpg
    73 KB · Views: 593
Top