voltage comparator
I'm trying to auto-discharge a capacitor when it's charged using LM311 (voltage comparator), but although it worked on a protoboard while I was testing with a 12V PSU it's not working on the real thing
any ideas on what may be wrong? schematic:
![[IMG]](proxy.php?image=http%3A%2F%2Fwww.picamatic.com%2Fshow%2F2009%2F05%2F10%2F03%2F03%2F3587408_800x306.png&hash=7a6971ab92687444eb00f6c81a0cca5f)
(I tried swaping pins 2/3)
a quick explanation:
since 120V (actually 120*sqrt(2) = ~170V peak) is too much for the LM311, I used a voltage divider both on the main source and capacitor
on the main souce I used smaller resistance to give enough current to the LM311 (it needs at least 12mA)
on the capacitor I used a smaller proportion on the resistors so that it triggers when it reaches 95~98% of the main voltage
the problem is that output pin is always 0V