Op Amps

This has got to be simple for someone who knows.

I'm a beginner in all this but I've found Livewire software that allows me to simulate my circuit including blowing up components.

I'm trying to detect a voltage dropping below battery voltage in a car. Rightly or wrongly I thought an Op Amp (741) with the voltage I want to monitor going to the + input and the full battery voltage going through two resistors as a potential divider giving me the voltage I want the op amp to switch at, going to the - input. The output is going to the input of an opto isolator via a current limiting resistor. I'm powering the op amp directly from the battery voltage.

Simulating this in Livewire gives me exactly what I want. When the monitored voltage on the + input drops below the voltage supplied to the - input via the potential divider I get an positive output from the op amp. Playing around with this I've found that if I drop the battery voltage that powers the op amp by as little as half a volt below the voltage on the + input, Livewire shows both the op amp and opto isolator as destroyed. In reality this situation should never arise as there is theoretically no way the monitored voltage can get above the battery voltage but half a volt seems a very fine margin.

Would the op amp be destroyed in reality by having half a volt higher voltage on one of its inputs than the voltage than the voltage that is powering it or is this just a glitch in Livewire?

Reply to
Periproct
Loading thread data ...

wo

to

pto

red

ia

Is that a typo? You should get a low voltage out when +in is lower than -in. Might be 1 or 2 volts, assuming the "- supply" to the amp is simply ground in your circuit.

a

I don't know from experience, but according to the datasheet (National Semiconductor version):

"For supply voltages less than =B115V, the absolute maximum input voltage is equal to the supply voltage."

Regards,

Mark

Reply to
redbelly

Is that a typo? You should get a low voltage out when +in is lower than -in. Might be 1 or 2 volts, assuming the "- supply" to the amp is simply ground in your circuit.

Yes, that was me getting it backwards.

I know the op amp should be powered from positive and negative rails but seems to work fine with just my battery and ground supply.

I don't know from experience, but according to the datasheet (National Semiconductor version):

"For supply voltages less than ±15V, the absolute maximum input voltage is equal to the supply voltage."

Now I feel stupid. I though I'd read the data sheet thoroughly but I must have missed that bit. I guess I'll have to find a way of dropping the voltage I'm monitoring a shade 'just in case'.

Thanks for clarifying that

Reply to
Periproct

Good morning, Periproct. Where to begin?

First, most of what you need to know about an IC is usually in the manufacturer data sheet. If you hunt around at supplier websites, you will probably find a link to the datasheet there. After you have some familiarity, you'll find yourself going directly to the manufacturer's website for the data sheet. One you'd look for is:

formatting link

The LM741 data sheet states that, for supply voltages less than +/-15V, the absolute maximum input voltage is the supply voltage (Note 4). Abs max means the manufacturer doesn't guarantee the chip will survive anything beyond this.

Most ICs are set up so that all inputs are made to operate between the supply rails. Due to the way they're made, there's a hidden connection between inputs and the substrate of the chip, which acts like an SCR if supply rails are exceeded at an input. This latchup will cause high continuous power supply current to flow inside the chip, even if the input is removed. This is called parasitic latchup, it destroys the IC, and is avoided at all costs.

If you consider that all wires have inductance and are inherently noise pickups, and there's trace capacitances just about everywhere, it's trivially easy to get ringing or noise on signal lines that bring inputs past the supply rails in an electrically noisy automotive environment. Given enough of a pulse, a microsecond is all it takes.

As a practical matter, parasitic latchup is a current-driven event. If you can limit the voltage and then limit the current if you get an excursion above or below the supply rails, there isn't enough current to trigger the SCR. Here's one way to avoid this (view in fixed font or M$ Notepad):

| | VCC | + | 1N4001| | - VCC | ^ 220 + | Vin | ___ |\\| | o----o-|___|--|-\\ | | | >- | - .-|+/ | 1N4001^ | |/| | | | === | === VCC | GND | GND + | | | | | .-. | | | | | | | | | | '-' | | | | | o--' | | | .-. | | | | | | | '-' | | | === | GND | (created by AACircuit v1.28.6 beta 04/19/05

formatting link

Now, the LM741 isn't really made for automotive applications, anyway. It's made for split supplies (e.g. +/-15V). You generally have to keep your inputs more than 2V away from the power supplies (that means between +2V and +10V for a single 12V power supply). If you don't operate the inputs within that range, the op amp may not operate correctly, even if it won't smoke itself. Also, the output is also not made to go to the supply rail, so the output will typically go between

1V and 10V for a 12V supply with a 10K load resistor to GND.

Another series of op amps was made to operate on single supplies. The LM324 (quad) and LM358 (dual) op amps became popular because they are made to operate on single supplies, the IC will still operate properly with the inputs going all the way down to GND, and the output can go down to GND with a pulldown resistor at the output. This will give you a lot more latitude for automotive and single-supply applications. Both these ICs are available everywhere -- the LM324 is even sold at Radio Shack.

The LM741 is a bit of a relic, and has only a couple of manufacturers left. The LM324 and LM358 are made by many manufacturers, and cost significantly less in part because of volume. They're truly gumball parts.

Also, you should know that there's another type of IC similar to op amps, that's made specifically for comparing two voltages and giving a "1" or "0" output. They're called comparators, and are made for high gain, and fast transistions between output logic states. The single supply equivalents to the above op amps are the LM393 and LM339 comparators. For most comparators, you need a pullup resistor from the output to the power supply. Using op amps as compators can be a problem with most optoisolators, because the slow transitions can mean intermediate voltage levels may be read as a "1" or a "0". However, they do have some advantages, particularly if you can live with lower speed. They're made to operate in a linear mode, are less susceptible to oscillations, particularly if you design in a little hysteresis, and may be able to sink more current than a comparator. For instance, if you're driving a relay, they can be very useful because relays always operate in the millisecond time range, and power supply glitches from the relay turning on and particularly off can result in oscillation, causing relay chatter.

Still, let's see if there's a safe way to use a 741 as a voltage comparator driving an opto for your automotive application, following all the rules for the 741:

| | VCC VCC | + + 4N28 | VCC | '----. o | + R2.-. LM741 | | | D| 10K| | | |/ | - | | VCC V ~ .-| | ^ R1 '-' + - ~ | |>

| Vin | ___ | |\\| | | | | o----o-|___|-o--------|-\\ ___ | | o | D| 10K | | >---o-|___|---' | | - R3.-. .---|+/ | R7 | | ^ 10K| | | |/| | 680 o | | | | | GND | | === VCC '-' | ___ | | GND + | o---|___|--' | | === | 1M | R4.-. GND | R6 | 10K| | | | | | | | '-' | | | | | o--------' | | | R5.-. | 10K| | | | | | '-' | | | === | GND | (created by AACircuit v1.28.6 beta 04/19/05

formatting link

Let's assume for the sake of discussion that you want input voltages from the power supply rail down to GND, with your comparator switching point to occur at 1/2 the supply voltage, or 6V (based on a +12V supply). Let's start out by ignoring R6. So, with no input, R2-R3 and R4-R5 bias both inputs at 6V, or 1/2 the power supply voltage. But there is an input, limited by the two diodes to -0.6V and 12.6V (under normal conditions, 0 to 12V). This is summed at the inverting input, so the voltage there will be 4V to 8V. As the input voltage goes past

6V, the output state of the op amp will change.

Now, let's look at R6. Assume for a minute that the 741 output is high (12V, for the sake of discussion). Then the reference voltage at the non-inverting input will be 6.03V. Now, the voltage at the - input slowly goes up past 6.03V, and the output goes down to 0V. The reference voltage will then snap down to 5.97V because of the voltage divider. This ensures that the transition between logic "1" and logic "0" takes place quickly, without oscillations. This can be very helpful if you get a glitch on the 741 power supply or GND because of the current drain from the opto.

The output of the 741 (which is actually current limited at 20mA, you don't absolutely have to have R7 but it's good form) will then drive the opto, giving you your clean comparator signal.

The extra resistors and diodes seem like a little much, but they are there for good reasons. And it's possible to do this a little more elegantly, but this basic circuit is easy for newbies to understand, and will work.

I hope this has been of help. If you have further questions, please feel free to post again.

Good luck Chris

Reply to
Chris

Some opamps have esd (static electricity zap protection) diodes from their inputs to their V+ terminals, and most opamps have inherent substrate diodes from inputs to V-.

So if you apply a voltage to an input pin that's more positive than V+, current can flow through the diode. If the thing driving in+ has a huge current capability, that could damage the amp.

But where will you get the reference voltage from? If it's some dinky voltage reference chip, or a zener, or a forward-biased led or something, it probably can't dump enough current to hurt the amp.

You could always add a series resistor to the pin in question to limit the current. If the ref is derived from the battery itself, as you note, it just doesn't happen.

Some opamps, like an LM324, can tolerate inputs way above the + rail. An LM324 (crappiest opamp on the planet, maybe) gets very weird if any of its outputs are pulled even gently below V-.

I wouldn't power any IC directly from a car battery. Nasty transients happen in cars, including excursions to high + or - voltages, that tend to wipe out unprotected ICs.

John

Reply to
John Larkin

"Periproct" Said

----------------------------------------

Ordinarily you should apply a scaled down version of the monitored voltage to the input of the op amp. For instance you could use 1.2 volts from an IC voltage reference or a 5 volt zener diode with an appropriate voltage divider to get 1.2 volts. Now apply a scaled down version of the 12 volts you're monitoring to a voltage divider so that a 1.2 volts input to the op amp is actually 12 volts on the input of the voltage divider or 1/10 of the monitored voltage. If your monitored voltage is greater than 12 volts the op amp will swing positive and if the monitored voltage is less than 12 volts the output will swing negative, or to ground if you're not using a negative power supply. In this way the op amp input voltage can never exceed its power supply value.

If you're worried about having to use dual power supplies simply use a comparator, which is more fitting for this application, instead of an op amp.

Use a large value decoupling capacitor (e.g. 1000 uf) across the op amp power supply fed through, let's say, a 47 ohm resistor or better still a small choke and this will help filter out any nasty transients from the cars electrical system.

Dorian

Reply to
Dorian McIntire

If I was serious about something like this, I'd use an isolation diode to the + 12V, then say, that 47R, then about an 18V transzorb, then the cap. That way, when the battery droops, it at least won't pull the charge out of the cap. And everybody's heard of the dreaded Load Dump. ;-)

Cheers! Rich

Reply to
Rich Grise

And I'd use a comparator instead of an opamp, of course. :-)

Cheers! Rich

Reply to
Rich Grise

Thanks to everybody who took the time to reply. I really appreciate you all taking the trouble.

I'm a great fan of this Livewire software I've found. Really easy to use and the fact it will 'blow' a component helps an amateur like me. Unfortunately it doesn't include a comparator in its component library.

I'll be taking on board all your advice and eventually I'll get my little circuit up and running.

Reply to
Periproct

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.