Author Topic: Comparator with dual supply and excessive current draw [solved]  (Read 1358 times)

0 Members and 1 Guest are viewing this topic.

Offline geo_leemanTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
    • Professional Website/Blog
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.
« Last Edit: April 24, 2019, 02:03:56 am by geo_leeman »
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #1 on: April 23, 2019, 09:43:18 pm »
I see the inputs are -0.3-36V (DOH!)
Doh what? There is no such thing as GND pin on 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.
« Last Edit: April 23, 2019, 09:56:12 pm by wraper »
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #2 on: April 23, 2019, 09:52:41 pm »
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.
 

Offline geo_leemanTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
    • Professional Website/Blog
Re: Comparator with inputs allowed be to negative
« Reply #3 on: April 23, 2019, 09:55:25 pm »
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.
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #4 on: April 23, 2019, 09:57:55 pm »
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.
« Last Edit: April 23, 2019, 10:00:11 pm by wraper »
 

Offline geo_leemanTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
    • Professional Website/Blog
Re: Comparator with inputs allowed be to negative
« Reply #5 on: April 23, 2019, 09:59:52 pm »
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.
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #6 on: April 23, 2019, 10:02:18 pm »
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.
Here 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.
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #7 on: April 23, 2019, 10:06:58 pm »
About unused opamp and comparator input pins, page 8.
PDF
 

Offline geo_leemanTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
    • Professional Website/Blog
Re: Comparator with inputs allowed be to negative
« Reply #8 on: April 23, 2019, 10:30:31 pm »
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?
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #9 on: April 23, 2019, 10:49:12 pm »
grounding both pins through a resistor was listed as "ok, but not the best"
Dunno 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.
« Last Edit: April 23, 2019, 10:58:01 pm by wraper »
 

Online wraper

  • Supporter
  • ****
  • Posts: 17952
  • Country: lv
Re: Comparator with inputs allowed be to negative
« Reply #10 on: April 23, 2019, 10:51:01 pm »
On the current dumping into the 4072 - level shifting, clamp diode, other recommended practices?
Easiest would be current limiting resistor in series and Schottky clamp diode to GND.
 

Offline geo_leemanTopic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: us
    • Professional Website/Blog
Re: Comparator with inputs allowed be to negative
« Reply #11 on: April 24, 2019, 02:03:18 am »
Quick bodge with some diodes from the bin and it's behaving now. Thanks for the education on comparators!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf