Comparator Project.

Thread Starter

MAA01

Joined Sep 21, 2021
12
Test the LED on it's own with a voltage source and 470-1000Ω resistor in series with the LED.
I checked led independently with 5V and 1 k resistor.it glows fine.but Output of the IC is not changing at all even I applied +5V at non-inv input directly with inverting as suggested by you.but no result
 

MrChips

Joined Oct 2, 2009
30,794
I checked led independently with 5V and 1 k resistor.it glows fine.but Output of the IC is not changing at all even I applied +5V at non-inv input directly with inverting as suggested by you.but no result
Show us a photograph of what you have.
 

Audioguru again

Joined Oct 21, 2019
6,688
The floating input goes high to near the positive supply voltage causing the output to go low and light the LED.

The inputs are PNP then the bias current goes to ground. Your S339 IC has much more input bias current (250nA max) than a real LM339 (100nA max). You need a resistor from an input to ground to cancel the bias current.
With a 5V supply then with an input at 1V and the max input bias current is 1V/0.25uA= 4M. Use a 1M resistor from the inverting input to ground to cancel the input bias current and cause the "floating" input to be a low voltage. The resistor value is so high that it will not affect your actual input voltage.
 

Thread Starter

MAA01

Joined Sep 21, 2021
12
The floating input goes high to near the positive supply voltage causing the output to go low and light the LED.

The inputs are PNP then the bias current goes to ground. Your S339 IC has much more input bias current (250nA max) than a real LM339 (100nA max). You need a resistor from an input to ground to cancel the bias current.
With a 5V supply then with an input at 1V and the max input bias current is 1V/0.25uA= 4M. Use a 1M resistor from the inverting input to ground to cancel the input bias current and cause the "floating" input to be a low voltage. The resistor value is so high that it will not affect your actual input voltage.
I have replaced the S339 with LM339.Should i use 1M resistor with the inverting input?
 
Top