I used to just use a standard OpAmp for basic comparator needs.
For a recent design I decided to use an LM393 since it was actually designed for this task and could provide faster switching.
I thought it was used just like an Op Amp except for the need for a pullup on the output.
Obviously I screwed up by not reading the datasheet and realising that a little hysterisis (via a large feedback resistor) was recommended but more importantly the Vin should never go below -0.3V.
This last part was the biggest screw up for me :S :S
The Vin on my circuit could have voltages as low as -12V fed to it. I obviously should have added protection via a clamping diode.
The biggest issue of all is that I already made a batch of PCBS using this circuit (see the diagram). Now I am trying to figure out the easiest way to fix this mess (they are all SMD parts).
Some ideas:
1. Replace R5 with a 100K resistor to minimise the max reverse current caused by a negative voltage
2. replace R4 with a diode (anode to ground) to act as a clamp. If this is done then there is no longer a pulldown resistor for the input.
I think it would be too difficult to cludge on a feedback resistor.
What do you guys think is the best solution????
**broken link removed**
Also another question:
What would happen to my circuit if someone put -12V at the input for a long period of time?
For a recent design I decided to use an LM393 since it was actually designed for this task and could provide faster switching.
I thought it was used just like an Op Amp except for the need for a pullup on the output.
Obviously I screwed up by not reading the datasheet and realising that a little hysterisis (via a large feedback resistor) was recommended but more importantly the Vin should never go below -0.3V.
This last part was the biggest screw up for me :S :S
The Vin on my circuit could have voltages as low as -12V fed to it. I obviously should have added protection via a clamping diode.
The biggest issue of all is that I already made a batch of PCBS using this circuit (see the diagram). Now I am trying to figure out the easiest way to fix this mess (they are all SMD parts).
Some ideas:
1. Replace R5 with a 100K resistor to minimise the max reverse current caused by a negative voltage
2. replace R4 with a diode (anode to ground) to act as a clamp. If this is done then there is no longer a pulldown resistor for the input.
I think it would be too difficult to cludge on a feedback resistor.
What do you guys think is the best solution????
**broken link removed**
Also another question:
What would happen to my circuit if someone put -12V at the input for a long period of time?
Last edited: