Electronics > Beginners
How do I make an LED light up using a comparator?
james_s:
Search engines are your friend.
https://www.ti.com/lit/gpn/tlc372
Open-drain is the MOSFET equivalent to open collector, this means that the output can only pull in one direction, down toward ground. So you must connect the LED to +5V through a resistor, and connect the free end to the output of the comparator. When the comparator triggers, the output will become ground, prior to that it is floating (open circuit).
renzoms:
The LED is ON when I turn on the 5V power supply. When the capacitor is connected to 5V, it turns OFF.
When the capacitor is discharging the LED remains off for ~4 seconds, and then turns back ON.
(the opposite of what I want is happening)
alsetalokin4017:
--- Quote from: renzoms on October 22, 2019, 12:17:46 am ---That doesn't sound right, to me. The IC has two inputs and one output on each side, both work the same, as far as I know. And as far as I know, there isn't difference in the sides where the GND pin is and the Vcc pin is.
--- End quote ---
There is only one GND and one Vcc pin for the whole chip, powering both comparators. The inverting and noninverting inputs to the two comparators have nothing to do with the chip's power. You are using one comparator of the pair. Your schematic is correct but your breadboard is incorrectly wired because the noninverting input to the comparator you are using is grounded. It must be moved to the high side of the RC pair in order for it to see the voltage on the capacitor.
alsetalokin4017:
--- Quote from: renzoms on October 22, 2019, 12:24:52 am ---The LED is ON when I turn on the 5V power supply. When the capacitor is connected to 5V, it turns OFF.
When the capacitor is discharging the LED remains off for ~4 seconds, and then turns back ON.
(the opposite of what I want is happening)
--- End quote ---
Is that before or after you corrected the breadboard error?
If after:
So swap the connections to the inverting and noninverting inputs!!! Put the wire that goes to Pin 3 into Pin 2 instead, and the wire that goes to Pin 2 into Pin 3 instead.
james_s:
Swap the + and - input pins of the comparator, this will reverse the action.
It sounds like you do not really understand how a comparator works, it will save you time to grasp the basics from the beginning, study the datasheet, it contains all the information you need.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version