Comparator with dual supply and excessive current draw [solved] - Page 1
Forum section: electronics / projects

author: geo_leeman
author_rank: Regular Contributor
timestamp: April 23, 2019, 09:31:44 pm
content: I'm working with a comparator circuit that looks at a signal (range -15 to 15 VDC) and a reference voltage (range -15 to 15 VDC) and gives me a logic out for when the signal meets or exceeds the reference voltage. The output goes into a latching circuit, so no need to worry about hysteresis, etc. I've implemented this with the LM339, but after a bit of operation suddenly the negative supply draw increases and the chip gets pretty hot. Looking back at the datasheet, I see the inputs are -0.3-36V (DOH!). Hmmm, so there's the issue I think. The question is, what is a comparator you'd recommend for this? Looking through digikey I'm not finding a suitable part and would like to keep my footprint (14-SOIC 3.9 mm) so I don't have to re-spin a board here. My first thought was to move to a simple quad op-amp, but those pinouts are different.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 09:43:18 pm
content: Quote from: geo_leeman on April 23, 2019, 09:31:44 pmDoh what?There is no such thing as GND pinon LM339 in addition to negative power pin. -0.3V is in regards to it's negative power pin. You have negative and positive power supply pins. And you are allowed to push inputs only a little bit beyond rage of supply voltage (0.3V). It's true for basically any other IC, be it comparator, opamp or even digital IC. If you need to put -15V to it's input, it's negative power pin should be powered by at least -15V or more negative. "Ground" is completely arbitrary for it, nothing to do with it's power supply.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 09:52:41 pm
content: If LM339 is powered properly, I'd be more concerned about what is connected to it's output. As it will pull that towards it's negative pin which likely is at -15V. So if that something has 0V/GND as it's negative power supply, you have a problem. In any case you should provide your circuit.

author: geo_leeman
author_rank: Regular Contributor
timestamp: April 23, 2019, 09:55:25 pm
content: Ok, so my initial thought was indeed that then since I'm having issues I decided it must be -0.3 ground relative, but yes, with no ground, no problem... Hmmm. So I must be dumping current somewhere else there. I've attached a schematic (this section is duplicated again so I use two of the total 4 comparators). It's output is going right into a 4072 to get or'ed together with more error conditions. As you can see the two unused comparators have their inputs tied to ground via 10k.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 09:57:55 pm
content: Where logic out is connected? And you probably shouldn't connect a cap to the output of LM339. There is no issue with input signal voltage range of LM339.

author: geo_leeman
author_rank: Regular Contributor
timestamp: April 23, 2019, 09:59:52 pm
content: Cap is a not-populated, just left myself a footprint for boding anything. Logic out is going straight into a 4072 input. 4072 is powered with +5V and gnd.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 10:02:18 pm
content: Quote from: geo_leeman on April 23, 2019, 09:59:52 pmHere is you problem, you push -15V into 4072, thus sinking a huge current from GND through it's input protection diodes.Also what you've done with inputs of unused compactors is a very bad idea, the worst thing you could do with them.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 10:06:58 pm
content: About unused opamp and comparator input pins, page 8.PDF

author: geo_leeman
author_rank: Regular Contributor
timestamp: April 23, 2019, 10:30:31 pm
content: Ok - this makes sense (as you can tell, this isn't my normal type of system here). On the unused comparators, grounding both pins through a resistor was listed as "ok, but not the best" in a TI forum post, but thanks for the PDF. I'll keep it around for sure!On the current dumping into the 4072 - level shifting, clamp diode, other recommended practices?

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 10:49:12 pm
content: Quote from: geo_leeman on April 23, 2019, 10:30:31 pmDunno where it was posted but PDF from TI says "Never!".What you've done is basically second circuit. Placing both inputs under same potential is the second worst thing after just leaving them floating.

author: wraper
author_rank: Unknown
timestamp: April 23, 2019, 10:51:01 pm
content: Quote from: geo_leeman on April 23, 2019, 10:30:31 pmEasiest would be current limiting resistor in series and Schottky clamp diode to GND.

author: geo_leeman
author_rank: Regular Contributor
timestamp: April 24, 2019, 02:03:18 am
content: Quick bodge with some diodes from the bin and it's behaving now. Thanks for the education on comparators!