# comparators lm399 not working

#### Fanfire174

Joined Mar 13, 2018
240
Hey guys,

I have a question about comparators I have 230 to 9v step down transformer and lm339. I want to compare positive and negative voltage. Does anyone know of a LM399 IC ?
Input voltage is 230v AC for transformer. I measure the output voltage of transformer is 8.5 aprpx
I have given 5v Dc supply to pin number 3 of IC and pin 12 is connected to ground
positive of transformer connected to pin 5
Negative of transformer connected to pin 4

I am measuring output voltage of comprator 1 but it show only 0 volt. Why it is not showing output voltage

#### Attachments

• 115.2 KB Views: 19

#### crutschow

Joined Mar 14, 2008
27,764
anyone know of a LM399 IC ?
No.
What does it do?
I am measuring output voltage of comprator 1 but it show only 0 volt. Why it is not showing output voltage
The LM339 has an open collector output.
It requires a pull-up resistor (say 10kΩ) from the output to V+.
Do you have that.

One of the inputs needs to be connected to ground (can be through a resistor) so there's a path for the input bias current.

Note that the input should no go below ground or above the supply (5V) or you may zap the device.
Thus you need to connect the transformer through a resistor and clamp the inputs (such as with diodes to ground and the +5V).

#### Fanfire174

Joined Mar 13, 2018
240
No.
Note that the input should no go below ground or above the supply (5V) or you may zap the device.
Thus you need to connect the transformer through a resistor and clamp the inputs (such as with diodes to ground and the +5V).
Have you looked connection between transformer and LM339 ?

I have different size of resistors. I have 4004 diodes

I did just one change I have connected 12 k resistors at + input and - input of LM339

Can we give 10 V AC signal with 12k resistor to LM339

Last edited:

#### Dodgydave

Joined Jun 22, 2012
10,050
Hey guys,

I have a question about comparators I have 230 to 9v step down transformer and lm339. I want to compare positive and negative voltage. Does anyone know of a LM399 IC ?
Input voltage is 230v AC for transformer. I measure the output voltage of transformer is 8.5 aprpx
I have given 5v Dc supply to pin number 3 of IC and pin 12 is connected to ground
positive of transformer connected to pin 5
Negative of transformer connected to pin 4

I am measuring output voltage of comprator 1 but it show only 0 volt. Why it is not showing output voltage
Supply pins are pin 3 Positive, pin 12 Negative, i dont see any supplies?

#### Fanfire174

Joined Mar 13, 2018
240
Supply pins are pin 3 Positive, pin 12 Negative, i dont see any supplies?
i have pic development board there is 5v supply. I am giving 5v supply to bread board.
yellow wire is positive and orange wire is negative

Joined Mar 10, 2018
4,057
Are you trying to create a zero crossing detector for he AC line ?

Regards, Dana.

#### Fanfire174

Joined Mar 13, 2018
240
Are you trying to create a zero crossing detector for he AC line ?

Regards, Dana.
Yes I am trying to make zero crossing detector circuit AC sinwave

#### MrChips

Joined Oct 2, 2009
24,238
1) LM399 is a precision voltage reference. LM339 is a quad comparator.

2) LM339 has open-collector outputs and requires a resistor from output to Vcc, as @crutschow already stated.

3) Use an optocoupler as @danadak has suggested.

#### Fanfire174

Joined Mar 13, 2018
240
1) LM399 is a precision voltage reference. LM339 is a quad comparator.

2) LM339 has open-collector outputs and requires a resistor from output to Vcc, as @crutschow already stated.

3) Use an optocoupler as @danadak has suggested.
I connected 10K from output to Vcc. I am getting 2.1 v Dc at output but I need 0v and 5v DC

you mean I have to use optocoupler instated comparator

Joined Mar 10, 2018
4,057
The optocoupler is largely for safety reasons.

The 2.1V is really quite out of spec if comparator is driving low. Spec is 400 mV off its
- rail sinking 4 mA which is much higher current than you are asking for. Very suspicious
of either part is good or is your 10 K actually 100 ohms.

Regards, Dana.

#### Fanfire174

Joined Mar 13, 2018
240
The optocoupler is largely for safety reasons.

The 2.1V is really quite out of spec if comparator is driving low. Spec is 400 mV off its
- rail sinking 4 mA which is much higher current than you are asking for. Very suspicious
of either part is good or is your 10 K actually 100 ohms.

Regards, Dana.
Please take loot at this connection. when I measure the output voltage at optocuole 4n33 between pin 4 and pin 5. It is 5v DC

#### Attachments

• 151.3 KB Views: 2

#### Fanfire174

Joined Mar 13, 2018
240
The optocoupler is largely for safety reasons.

The 2.1V is really quite out of spec if comparator is driving low. Spec is 400 mV off its
- rail sinking 4 mA which is much higher current than you are asking for. Very suspicious
of either part is good or is your 10 K actually 100 ohms.

Regards, Dana.
Please take look at this connection. I measure the output voltage at optocuoler 4n33 between pin 4 and pin 5. It is 5v DC

#### Attachments

• 151.3 KB Views: 2

#### AnalogKid

Joined Aug 1, 2013
9,362
Did you measure with a scope or a meter?

ak