Author Topic: LM393 triggering too soon  (Read 767 times)

0 Members and 1 Guest are viewing this topic.

Offline JoostdKTopic starter

  • Newbie
  • Posts: 3
  • Country: nl
LM393 triggering too soon
« on: May 30, 2023, 10:26:33 am »
Hi all,

first post so sorry if I mess something up in the post and since I'm a beginner I'm pretty sure I will batter the terminology. For a battery protection circuit I'm dabbing in voltage comparators and I've got some LM393's. Watched some videos online and recreated some of the circuits. They work fine, except for one thing. I dont really know how to say it, but the 'triggering/activation point/threshold' seems 6% (of the supply voltage) above the ref voltage. To clarify:

Supply voltage 10V:  ref voltage 5v  -> LED starts conducting @ 5.6v   => dif 0.6V         = 6% of 10V
Supply voltage 7.5V: ref voltage 3.5 -> LED starts conducting @ 3.9     => dif +-0.4V     = 6% of 7.5V
Supply voltage 5V:    ref voltage 2.5 -> LED starts conducting @ 2.8v   => dif 0.3V         = 6% of 5V

This offset also happens at other ref voltages, all give the same 6% offset relative of the supply voltage. I just gave these since they are simple to compare.

This is the circuit I use, my understanding is that the values of the pots don't matter.

While in theory, this isnt a problem for me as the offset is always the same and I could just set it lower with a potentiometer, I really want to know what is happening here so I can learn. Searched for the answer online, but couldnt find it. Tried 5 different LM393's but all gave the same result. Also tried moving away from the breadboard and soldering the circuit, same result.

Thanks in advance,

Joost.


« Last Edit: May 30, 2023, 10:31:47 am by JoostdK »
 

Offline srb1954

  • Super Contributor
  • ***
  • Posts: 1091
  • Country: nz
  • Retired Electronics Design Engineer
Re: LM393 triggering too soon
« Reply #1 on: May 30, 2023, 12:50:09 pm »
The circuit as shown would never work as both inputs to the comparator are comparing the same supply rail. Both inputs would simply track up and down at their respective potentiometer ratios and the differential voltage on the comparator inputs would never change sign to cause the comparator to be triggered.

For this circuit to work one of the potentiometers would have to connect to a different supply rail.

Another way to monitor a single supply rail is to have a voltage reference IC or Zener diode on one of the inputs to hold it constant while the other input varies in proportion to the supply rail.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: LM393 triggering too soon
« Reply #2 on: May 30, 2023, 01:32:42 pm »
I *ASS*U*ME* the O.P's circuit is just a test circuit to allow setting one input voltage then slowly sweeping the other.

See if its better behaved with decoupling - try 100nF ceramic directly across the LM393 V+ and Gnd pins, and if the leads to the supply are long, 10uF electrolytic across the V+ and Gnd rails.

What are you doing with the unused comparator?  Both its inputs should be tied to Gnd and its output left open.

The problem may be noise pickup - if you are using open frame presets, use an insulating trim-tool!  Ground metal pot bodies.  Worst case you may need some capacitance to ground at the pot wipers.  See if 10nF makes any difference.

Also, try with the meter connected from the non-inverting to the inverting input.  The offset voltage should be at most a couple of mV, so it should switch pretty close to when the meter goes through zero. 
 
The following users thanked this post: JoostdK

Offline JoostdKTopic starter

  • Newbie
  • Posts: 3
  • Country: nl
Re: LM393 triggering too soon
« Reply #3 on: May 30, 2023, 02:33:31 pm »
Hi Ian,

you would be correct in that assumption, no asses here :). I figured out what was wrong, but I dont know why it is wrong. One tutorial I followed said 'grab a potentiometer, doesnt really matter what value, we are comparing voltages'. So what I did was I just randomly grabbed a 500k pot and a 1k pot. Newby me was thinking, the current doesnt matter, we are indeed comparing the voltage. Well I guess that leads to my strange offset problem. 

I replaced the 500k pot with another 1k one and now it works as expected.

Although there is no more problem, can someone educate me why this did not work?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: LM393 triggering too soon
« Reply #4 on: May 30, 2023, 02:52:07 pm »
 At 50% wiper position, your 500K pot has a Thevenin equivalent resistance of 250K.  I wonder if your multimeter was loading it down?   Good DMMs are typically >10Meg input impedance, but cheap ones may be lower.  It would only take a 2Meg load to account for the observed 6% error.  That's why I suggested connecting the meter between the inputs rather than swapping it from one to the other to measure with respect to ground.  If you were using two meters, both permanently connected, ignore the above.   In that case the issue with such a high source impedance for one of the inputs, could be noise pickup causing the output to rapidly pulse between high and low when its close to the setpoint given by the other input voltage.
« Last Edit: May 30, 2023, 02:55:02 pm by Ian.M »
 
The following users thanked this post: JoostdK

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 5907
  • Country: es
Re: LM393 triggering too soon
« Reply #5 on: May 30, 2023, 02:59:19 pm »
If you want a "battery charged" detector, just use a TL431:
https://dmohankumar.wordpress.com/2015/03/08/tl-431-shunt-regulator-design-note-11/
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: JoostdK

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19522
  • Country: gb
  • 0999
Re: LM393 triggering too soon
« Reply #6 on: May 30, 2023, 10:01:42 pm »
Do you have an LM358 handy? If so, configure it in unity gain buffer (look it up using a search engine) and connect it between the input and your multimeter. This op-amp's input will have a much higher impedance, than the meter and won't load it down as much.
 

Online floobydust

  • Super Contributor
  • ***
  • Posts: 6988
  • Country: ca
Re: LM393 triggering too soon
« Reply #7 on: May 30, 2023, 10:58:50 pm »
I would guess the multimeter leads are a good antenna and the circuit isn't seeing just DC at the comparator's inputs.
Adding a pair of 0.1uF caps to GND, one at each input should make no difference- but it will shunt HF noise if that is a factor here.

OP where did you get the IC's from, the chinese specials for comparators are highly suspect.
I just got some cheap ones and sure enough they perform poorly.
 

Offline JoostdKTopic starter

  • Newbie
  • Posts: 3
  • Country: nl
Re: LM393 triggering too soon
« Reply #8 on: May 31, 2023, 09:18:24 am »
At 50% wiper position, your 500K pot has a Thevenin equivalent resistance of 250K.  I wonder if your multimeter was loading it down?   Good DMMs are typically >10Meg input impedance, but cheap ones may be lower.  It would only take a 2Meg load to account for the observed 6% error. 

I think this was indeed the case. I noticed sometimes the LED would turn on/off (dont remember wich) when I connected the multimeter. Serves me right for buying the cheap tools :). Lesson learned!

If you want a "battery charged" detector, just use a TL431:
https://dmohankumar.wordpress.com/2015/03/08/tl-431-shunt-regulator-design-note-11/

That looks cool! I think this would be more power efficient than the comparator. So many awesome components....how to know them all :)?


Thanks all for all the kind and fast responses on my first post :)
 

Offline Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1326
  • Country: ca
Re: LM393 triggering too soon
« Reply #9 on: June 01, 2023, 04:00:25 pm »
I think this was indeed the case. I noticed sometimes the LED would turn on/off (dont remember wich) when I connected the multimeter. Serves me right for buying the cheap tools :). Lesson learned!

Measure a 9V battery with your meter and write that number down.
Measure the same 9V battery with a 1M resistor in series with one of the leads. Use jumper clips to keep your fingers off to avoid adding your own resistance to the mix.
Then use ohms law to figure out the input impedance of your meter.
ie: If the battery measured 9.4V directly, but 8.55V via the 1M resistor, then the meter's input impedance is 10M which is perfectly acceptable.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf