Converting +/-50V source to 0-5V via diff amp?

I'd like to monitor a slowly changing 1V to 50V source via the ADC on a PIC16F876A. I was originally going to use a 10:1 voltage divider (0.1% resistors) to bring the voltage down to 0.1V-5V and apply that to the ADC. Then I realized I would eventually accidently hook up the source "backwards" and blow the PIC.

I was considering using a difference amp (AD628) for the job. Not only would I not have to worry about GND problems, it would drop the comon mode voltage that might be riding on the long leads from the diff. amp. to the voltage source.

But, while using a 10V supply and a 2.5 Vref gives me an output of

2.6V-7.5V for a "correctly" connected source (SRC POS to +IN of amp and SRC NEG to -IN of amp), which I would either divide-by-2 before going to the PIC or change the amp's default 0.1 gain, what happens if the source is connected "backwards"?

Does the amp just output zero volts (or whatever its min. voltage swing is, IIRC, 30mV) because I'm using a unipolar supply for the amp? Or do I end up zapping the amp?

I'd like to avoid using a bipolar supply for the amp as I don't need the neg. voltage for anything else.

And while it would be great to be able to monitor the source no matter how it was connected, I can't have the the PIC's ADC cover a +/-50V source with high enough resolution. I need 10-bits available at the DAC for a 50V range, minimum.

Adding a 12-bit ADC would do the job but I'd like to keep this as simple as possible and I think I can if the diff. amp. setup described above just drops to zero volts (almost) when the source is connected "backwards". I could then use a amp output of less than 2.5V as an indicator that the battery pack was connected backwards and sound a klaxon, flash a strobe, send out a flare, whatever, to let me know.

Thanks for your help!

-- remove SPAMMENOT for e-mail responses --

Reply to
John
Loading thread data ...

Ahhhh...OK, I see now. When the source is zero volts and is connected "backwards", the amp output starts at 2.5V (my Vref) and drops towards 0V as the source voltage drops towards -50V.

I just have to make sure that my 10V supply and Vref work with the amp's specs. Finally making sense of Figure 31 on page 15 of the AD628 spec sheet, it looks like with a Vs of 10V and a Vref of 5V, the amp can deal with a +46V to -38V source.

So, I can use that .1% res. voltage divider across my +/-50V source to bring it down to +/-25V. With a Vs of 10V and a Vref of 5V, the amp outputs 2.5V to 7.5V for a +/-50V source. I'll just divide the amp's output again to bring it with range of the PIC's ADC.

Sounds kind of kludgy though....any higher rated (common mode voltage) diff amps out there? Heck, is using a diff amp the right thing to do here.

Thanks!

-- remove SPAMMENOT for e-mail responses --

Reply to
John

See

formatting link

and

formatting link

and use resistive voltage divider to scale the input down.

Reply to
Fred Bloggs

Hmm...cool. :-) But, wouldn't I exceed their voltage ratings (+/-44V) when the connections were "reversed"?

"Correct polarity" voltages from voltage divider:

50V -----+ | .-. | |100K | | '-' +-------- 5V | .-. | |11.1K | | '-' | 0V -----+-------- 0V

"Reversed polarity" voltages from voltage divider:

0V -----+ | .-. | |100K | | '-' +-------- 45V | .-. | |11.1K | | '-' | 50V -----+-------- 50V

-- remove SPAMMENOT for e-mail responses --

Reply to
John

If you're using a simple diode in series with your divider and the voltage across the diode will be around 0.4V (schottky one) the error measurement you'll get will be

0.6V instead of 1V and 49.6V instead of 50V. If this is ok, then a simple diode could solve your backward connection (if you didn't found the appropiate connector)

greetings, Vasile

Reply to
vasile

Hey- thanks for catching that!- and here after all this time, I still can't even get simple resistor networks right. You're the man- quite quick and clever, very impressed here. I can see you're going to go places. Please tell us how you eventually solve this state of the art problem, We all will be in your debt! Anxiously awaiting your teachings...

Reply to
Fred Bloggs

Where does the 0V in the first diagram and the 50V in the second diagram get connected to.

The ground of the PIC processor.

I think this will be a problem.

Reply to
Donald

In message , dated Sun, 3 Sep 2006, Fred Bloggs writes

Fred - his second diagram is just upside down. Don't be too hard on him.

To the OP: The best solution is to make it impossible to connect the supply the wrong way, by using a non-reversible connector. If you can't do that, you can either connect a diode in series (if the 0.6 V drop doesn't matter), or put a fuse in series and a diode across the input after the fuse, if you can tolerate an interruption if the polarity is reversed.

--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK
Reply to
John Woodgate

Or use a barrier (back to back zeners across the inputs) to protect the device.

Reply to
Homer J Simpson

I'm just fed-the-@!#*()-up with these people jumping right into electronics when they haven't even passed Electricity I.

Anyway- he doesn't need anything except a rotated T, assuming input impedance >> 10K and forgetting about CMR which can usually be handled with good layout, and there are no "negative" voltages in this circuit: View in a fixed-width font such as Courier.

. . . . Va >------. . | . [120k] . | . +---------+----> IN . | | . [120k] [15k] . | | . Vb >------' | . --- . /// . . . . Va Vb IN . . 50 0 5 . . 0 50 5 . . . .

Reply to
Fred Bloggs

Back to Electricity I review for you...there are no negative voltages in the circuit, only negative differentials.

Reply to
Fred Bloggs

In message , dated Sun, 3 Sep 2006, Fred Bloggs writes

I quite agree about that, especially when they contradict you! Maybe we should just not attempt to answer their questions, but send them all directly to sci.electonics.basics.

--
OOO - Own Opinions Only. Try www.jmwa.demon.co.uk and www.isce.org.uk
2006 is YMMVI- Your mileage may vary immensely.

John Woodgate, J M Woodgate and Associates, Rayleigh, Essex UK
Reply to
John Woodgate

Back to Safety I review for you - ever worked in a plant where they make explosive/flammable products?

If Boeing had put those on the fuel tank wiring TWA Flight 800 probably wouldn't have exploded.

Reply to
Homer J Simpson

There is no source in the circuit that is negative wrt GND. This has nothing to do with "safety."

That damned thing exploded because of four factors: 1) the polymide insulation of the exterior tank was deteriorated and shorted to tank fuel gauge circuit, 2) no provisions for preventing O2 entry into the tank (even to this day) despite extant technology and products for just this purpose, 3) corrosion product buildup on the tank interior fuel gauge terminals lowering arc breakdown immunity to several hundred volts, terminals were exposed, and 4) lengthy runway delay on hot day required pilot to run A/C for passengers, condenser heat rejection significantly heated tank exacerbating fuel vapor O2 mixture situation. Your diodes, unless grossly over-sized, would have sizzled off an explosion in any case. To this day, the FAA has not required an O2 block on the center tank ventilation channel.

Reply to
Fred Bloggs

A proper barrier can sink any excessive voltages:

formatting link

Intrinsically safe barrier types Intrinsically safe barriers are used to interface between electrical devices in a hazardous location, and electrical devices located in the safe area (associated apparatus). The two types of barriers are passive barriers and galvanically isolated barriers.

Passive barriers In the passive intrinsically safe barrier, zener diodes are connected in parallel with the input, while a resistor and a fuse are connected in series with it (Fig. 2). Under normal operating conditions, the barrier passes electrical signals in both directions. It is designed to withstand a fault voltage of up to 250-Vac.

Reply to
Homer J Simpson

Hmmm- that's to protect the electronics from faulting in some hazardous way. If you located that in the fuel gauge, then when the fuse opens, the terminals arc. If you located it upstream of the harness short, it again does no good. Then there was always the possibility of arcing through deteriorated internal tank harness insulation. The explosion was an "unanticipated" event in a complex system designed with little to none fault analysis of this type performed. And the FAA will set no requirement because the expected cost of the estimated disaster frequency is less than the cost of retrofit.

Reply to
Fred Bloggs

Outside of the fuel tank.

Unless it's your ass in one of those seats. Hell, they could dump 20 lbs of crushed dry ice in each unused tank for pennies per flight and enhance safety, but then they always were a tombstone agency.

Reply to
Homer J Simpson

Never contradicted Fred, just had a question because it seemed that the voltages would be too high for the device he recommended. I did put a question mark after my statement, not sure if I was correct. :-)

I could have certainly posted my question to sci.electronics.basics but thought the topic of getting a +/-50V signal down to 0-5V, perhaps using a diff amp, was a bit beyond the basics....sounds like I was wrong. Getting voltage dividers right though is certainly EE101.

-- remove SPAMMENOT for e-mail responses --

Reply to
John

Thanks. I can't use a polarized connector for this but I think you're right, a diode in series or use the fuse/diode rev pol protection would be the simplest, easiest thing to do. Or use Fred's divider circuit.

-- remove SPAMMENOT for e-mail responses --

Reply to
John

Can't use a polarized connector so I'm leaning towards the inline diode (I measured a .208V-.212V drop with the 11DQ05's I have) or a fuse/diode protector circuit.

Thanks!

-- remove SPAMMENOT for e-mail responses --

Reply to
John

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.