Jump to content
Electronics-Lab.com Community

Re: Alun's low voltage alarm


Recommended Posts

Hi Alun,
I'm glad that you are learning here. 8)
You have a very good idea to use the sagging supply voltage to help with hysteresis. I keep thinking of circuits with a regulated supply, but this application uses a non-regulated battery supply.
Circuits with slowly changing inputs that use comparators almost always oscillate at a high frequency as they go through their linear region. Hysteresis fixes it as explained in the datasheet for the LM393 in the link you posted.

post-1706-14279142170938_thumb.gif

Link to comment
Share on other sites


Yes, with an unregulated supply you get feedback in the form of a voltage change when the load changes. With a low voltage alarm you get negative feedback from the power supply which increases the stablity and reduces oscillation. But with a low voltage cutout you have positive feedback from the supply which causes instability and oscillation.

A regulated supply uses DC voltage amplifier with negative feedback to stableise the supply, thus the supply voltage no longer changes with the load so feedback from the supply is removed. Adding a feedback resistor to introduce more negative feedback either way because it will make it less senertive to other loads, ie if a light is turned on it will cause a voltage drop and the increased will prevent it from triggering the circuit. Aldo I would recommend adding a 100nf capacitor from the + pin to ground to further reduce the noise.

Link to comment
Share on other sites

A capacitor will have no affect at DC or slowly changing power supply voltages but at high frequencies the capacitor will form an RC filter with the potential divider and the circuit won't react. This is usefull because if a load like an audio amplifier or DC motor draws a varying current an AC voltage will appear on the power suplly line, and the circuit will ignore this AC voltage and won't falsely trigger.

Link to comment
Share on other sites

And with the capacitor the voltage on this non-inverting input will alter more slowly but as it has a very high gain the output will still saturate quickly enough. I still don't see how this makes a difference.

Link to comment
Share on other sites

Hi Alun,
For an opamp that switches fairly slowly, the capacitor probably won't make much difference. But for a high-speed comparator that oscillates when linear, you need it to switch with the positive feedback as quickly as it can.
You can still filter noise from the supply by making the upper resistor of the divider two resistors and adding the filtering at their junction.  8)

Link to comment
Share on other sites

Well Iv'e done a simulation and the capacitor dosen't affect it much except for high frequencies. But you might be better off just useing two resistors and adding a capacitor in paralell with one as you said for  stability.

Link to comment
Share on other sites


Wait a minute, Alun. We're not finished discussing it yet!  :o

How about using an ordinary, cheap 741 opamp, with its pinout shown on the schematic.
Your choice of an all-Cmos opamp would probably (its datasheet doesn't spec output current with less than a 15V supply) limit its output current with a 12V or less supply.
I don't think a 741 opamp would need a Mosfet to drive a little relay and LED (but even a 741 opamp doesn't spec its output current with less than a 30V supply). Due to this question about output current, use half of an LM358 dual opamp.


I don't know about output currents, I mentioned the cmos op-amp because of it's rail to rail swing. What about the affect of loading the opamp? Woundn't this affect the hysteresis?

What bout useing a bipolar PNP transistor to drive a relay? I thought of a FET because it won't load the op-amp but bipolar transistors are cheaper, but you would need to connect a couple of diodes or a potential divider to ensure it turns off properly because some op-amps might not bring the base up close to  +V.


The resistor powering the 20mA zener diode should be changed to 300 ohms when using a 12V supply, or a 5mA BZX79C6v2 zener diode could be used with the existing 1K resistor.
A revised parts list is also required and a corrected note about its range of adjustment.


Or you could go for a proper voltage reference?


I would use a 1M feedback resistor for about only 30mV of hysteresis, instead of your 100K resistor providing a whopping 292mV of hysteresis, plus a percentage of how much the battery voltage drops when the relay loads it down.  ;D


30mV sounds a bit small to me. ;D

Can't the output from a zener diode change by more than 30mV by varying the current through it and teperature changes?

Doesn't this depend also on the nature of the load and power supply?

An amplifeir run from a lead acid battery coud cause the voltage to alter by more than 30mV, so could a moter in a small power tool, and both of these devices could superimpose an AC waveform >30mV on the supply.
Link to comment
Share on other sites

Hi Alun,
This topic got moved and only its best parts were deleted!
Did you notice that your fix for the original project got hijacked?  :o
Let's watch and see if the project's schematic is corrected with it. It is too bad that it uses an open collector comparator instead of an opamp so it can't easily have just a single resistor added for hysteresis.

Don't forget that the original project has a low-current piezo buzzer and LED for a load, not a relay. So I think that an ordinary opamp is fine.

In their LM393 datasheet, National Semi recommends hysteresis of only a few mV, my recommended 30mV is more to make certain and your 300mV is much too high.

A 6V zener operating at its tested current is actually a pretty good voltage regulator. Lower voltage zeners are much worse. Its voltage would change very slowly when the battery runs down, it is almost temp-stable at that voltage and won't be affected much by load current changes.  ;D

Link to comment
Share on other sites

The pin numbers weren't wong but the +/- signs were. This is very confusing especially for a newb. I think the circuit on this site should be corrected for this reson.

Link to comment
Share on other sites

Well I've sent the following message in the contact form:

Hi Mike, audioguru found a problem with the low voltage alarm project on the electronics-lab web-site.

http://www.electronics-lab.com/projects/sensors/023/

The +/- inputs on the comparator were the wrong way round even though the pin numbers were correct and it kept calling the LM393 quad comparator chip  a OP-AMP chip. I have corrected the problem for you and audioguru and I have been discussing this on the forum in the following threads.

http://www.electronics-lab.com/forum/index.php?topic=2994.0
http://www.electronics-lab.com/forum/index.php?topic=2974.0

Could you please correct the project on the web-site.

Thanks in advance,

Alun Jones.

I hope he sorts it out for us.

Link to comment
Share on other sites

Hey Alun,
The project has its "opamp" called a comparator (but not a quad) and its + and - input polarities corrected now.

I forgot to mention that the LM339 quad comparator is low-power, so doesn't have enough output current to work in this circuit. A typical "piezo buzzer" is the 23.4mm diameter AL256, which draws 12mA from a 12V supply. When you add the LED that is drawing 10mA in this circuit with a 12V supply, the resulting total output current requirement of 22mA is nearly 4 times more than the minimum 6mA current output of an LM339. He, he.  ;D

post-1706-14279142173975_thumb.gif

Link to comment
Share on other sites

Yes MP,
The LM339 has a flea-power output that is guaranteed to sink a current of only 6mA with a saturation voltage of no more than 1.5V.
The factory has already sorted them for you by passing the 6mA ones, but you can test a bunch yourself and you might find some that sink 16mA.

They are tested with only a 5V supply because the schematic shows a 100uA current source feeding the base of the output transistor that doesn't change with increases of the supply voltage.

Of course the output current depends on the beta of the output transistor which I calculate to have a minimum beta of 61 to provide a 6mA output current. Typically, the beta is 161 to provide a 16mA output current.

How much current do you think it can handle?  ::)

post-1706-14279142174558_thumb.gif

Link to comment
Share on other sites

audioguru,
The data sheet gives a spec of 6 mA as a "minimum" guaranteed for a 1 volt reference. Typical is 16 mA. When a data sheet gives such a wide range between typical and minimum and gives no spec of a maximum, then, as a normal practice, the device requires bench testing to see what can be expected. This is also true when you do not expect to use the input reference values used in the data sheet. The data sheet only used a 1 volt input to test, so this is not of much help, either. My bench tests show the  "Typical" spec to be even light "Typically". These are robust comparators and handle TTL levels very well. I see sink currents to 20 mA with no problem.
Did you actually bench test some of these or are you only "theorizing" as usual?
Perhaps they only send the 6 mA ones to Canada.  ;D

MP

post-555-14279142175288_thumb.jpg

Link to comment
Share on other sites


....as a normal practice, the device requires bench testing to see what can be expected.

You don't believe what is stated in datasheets and you operate ICs above their ratings.
If the ICs improved over the years, don't you think that the manufacturer would uprate their minimum spec's? Circuits that I design and have seen operate components within their ratings.


The data sheet only used a 1 volt input to test

Only? It has a minimum voltage gain of 50,000 so any more input voltage won't make any difference.


These are robust comparators and handle TTL levels very well. I see sink currents to 20 mA with no problem.

The datasheet shows an application driving only two TTL inputs. A TTL input has a max current of 1.6mA at 0.8V and the LM339 guarantees 4mA at 0.7V, which is only two TTL inputs plus a pullup resistor.


Did you actually bench test some of these or are you only "theorizing" as usual?

Many years ago I designed LM393's (same as an LM339 but dual instead of quad) driving only two TTL inputs as per spec without any failures. Recently I designed a circuit and assembled hundreds of LM393's driving 5.33mA (within spec) relay coils without any failures.


Perhaps they only send the 6 mA ones to Canada.

He, he. It doesn't matter, I design and use parts within their ratings for assurance that every circuit will work. Where are you?  ::)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
  • Create New...