PDA

View Full Version : ADC on high voltages

Graham Stabler
02-20-2007, 09:04 PM
I'm thinking of using the delta-sigma method of doing ADC as demonstrated in the counter application note and else where for measuring a volage between 0-90v. Obviously I need to reduce this voltage otherwise everything will go pop.

Is my best bet a potential divider along with a zener diode so that the range is 0-3.3 and cannot go above?

Graham

Mike Green
02-20-2007, 10:45 PM
Your best bet is a voltage divider along with a buffer using a simple op-amp. Close second best is using just a voltage divider. If you want to protect the circuit, I'd put an instrument fuse in series with the 90V input lead and a Zener rated at 100V (or whatever you want) across the voltage divider.

Graham Stabler
02-20-2007, 11:21 PM
Really I'm probably just worrying about nothing as there is little chance of my supply going above its designed voltage and the potential divider will provide enough current limiting for slight over voltage. I like the idea of the op-amp though especially if I can find one that will swing close to the rails.

thanks

Graham

cgracey
02-20-2007, 11:38 PM
If you have a passive voltage divider, it will limit current to the point where the VDD/VSS diodes on the I/O pins will clamp the voltage to within .4V of the supplies. I wouldn't drop ~90V across an 0603, though. Maybe two series'd 1/4 watt·through-hole·resistors would be safer.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

Chip Gracey
Parallax, Inc.

Graham Stabler
02-20-2007, 11:47 PM
Is the ADC going to be affected by the impedance of the divider? If for example I used resisters in the mega ohm range?

Graham

BTX
02-21-2007, 12:30 AM
I suggest too, a zener, like a 3.6V, in parallel with the GND resistor, to avoid fried the propeller if you get some day that R open, if you want to use some high values of R's I suggest a high impedance input op-amp too. Why to use resistors in the mega-ohm range ? Does the source have high impedance output ??.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.

Alberto.

Tracy Allen
02-21-2007, 05:27 AM
A little circuit analysis can help here. to demystify how to choose the resistors based on the input voltage range required. The attached diagram starts with the circuit diagram, showing reference directions for current and voltage on the input resistor and the feedback resistor. When the ADC is operating properly, feeback is going to maintain the voltage at the summing junction at Vx=1.65 volts. That is the input threshold of the Prop and I will assume the ADC is operating there in quasi steady state, without concern for errors in the threshold, or noise, transient behavior, out of range inputs etc.
http://forums.parallax.com/attachment.php?attachmentid=45550
The main constitutive equation comes from Kirkoff's current law. The sum of currents at the summing junction is zero. The average current consists of i1 from the signal source, plus a contribution when the bpin is high, minus a contribution when bpin is low. The contributions from bpin are weighted by a fraction H high and h low. The total duty cycle is H + h = 1.

That leads to equation 1, and then with a little algebra to get rid of h, directly to equation 2. At that point there is no assumption about the souce of signal current. It could be a true current source such as a photodiode, or it could be as is often the case a voltage in series with a resistor, or it could be a high voltage, for example, -90 volts in series with a high resistance.

Note that the value of the capacitor does not enter into the equations. 1 nf is recommended, but it is not critical. The little box with a * is a direct connection from the summing junction to the apin. All connections in the feedback loop have to be short and direct.

Note that the balance point is H = 0.5, 50% duty cycle, when the input signal current is zero. If the input current increases in a positive direction, the duty cycle decreases, H decreases and h increases in proportion. The relation between H or h and the input current is linear. When H=0, the input current is i1 = 1.65/R2, and that is the saturation point. The ADC will not operate for higher currents. On the other end, the limit is i1 = -1.65/R2.

Equation 3 is written for a voltage V1 in series with a resistor, R1. This is the voltage difference between the input signal V1 and the voltage Vx=1.65 at the summing junction, divided by the input resistance. Equation 4 solves for V1.

Again, if V1=1.65 volts, there is no steady state input current and the duty cycle is 50%, H=h=0.5.

V1 can vary within non-clipping limits that are found by solving with H=0 and H=1. Or, to accomodate a particular maximum input voltage, solve for R1 and R2.

Suppose R1 = 150 kohms and R2 = 100 kohms as suggested in AN001.
http://forums.parallax.com/attachment.php?attachmentid=45551 from AN001
Solving for the input voltage when H=0 and H=1, it is a total span from 4.125 volts down to -0.825 volts. That covers the full scale of 0 to 3.3 volts, with a margin above and below. It is probably not good to push the duty cycle too near 0% or 100%, but with a 32 bit counter and a high frequency you can probably push it pretty close. You would probably calibrate the system with a known input voltage, which covers the effects of resistor tolerance, threshold variation etc.

To get V1 = -100 volts input, with R2=100 kohms, plug in H=1 and solve for R1. I come up with 6.16 megaohms. At -90 volts, it will be within range, duty cycle H<1.

I too would highly recommend an input clamp in addition to the Prop's built in substrate diodes. When the ADC is operating properly, the feedback will hold the input at 1.65 volts, but if the -90 volts is present when the prop is turned off, the current of about 15 microamps will flow through the 6 meg resistor. That is not much, but can you be sure someone won't short circuit the resistor?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

Post Edited (Tracy Allen) : 2/20/2007 9:39:56 PM GMT

Graham Stabler
02-21-2007, 06:28 AM
BTX, the 90v supply is for micro electrical discharge machining. The powers supplied to the part being cut are very small and I want minimal drain in measuring the average gap voltage. Also with a 90v drop accross them even a few mA would be a quite a it of dissipation for the resisitors.

Tracy,

Wow thanks for that. I also now understand delta-sigma from your description of the analysis. I just realized that saying 0-90v was not a good idea, I meant 0v to 90v. Its not negative.

Graham

Tracy Allen
02-21-2007, 06:39 AM
Hi Graham,

It doesn't much matter if it's positive or negative 90 volts. The range is symmetrical around 1.65 volts. With +90 volts, it will be driven to a duty cycle with more percent of time low, whereas with -90 volts it would be larger percent high.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

Graham Stabler
02-21-2007, 08:36 AM
I realized that, I just thought that for future reference I should avoid writing 0-90v

Graham

Tracy Allen
02-21-2007, 01:06 PM
A source for high ohm, high voltage precision resistors is Electronic Goldmine. They always seem to have nice ones in stock at great prices.

www.goldmine-elec-products.com/products.asp?dept=1127 (http://www.goldmine-elec-products.com/products.asp?dept=1127)

The confusion about -90 volts was my bad memory of your original question. Still it does emphasize that the circuit is bipolar.

If the range only has to be unipolar, an op-amp circuit like Mike suggested could ground reference the signal and scale it into the full range. There are lots of op amps that will go rail to rail at the inputs or the outputs or both, and operate well at 3.3 volts. I use the LT1490 a lot, and the LTC2055 for highest precision. The venerable LM10 is good, too, and even has an internal reference amplifier that can provide an offset if for example you only need to cover a part of the range like 30 to 90 volts.

There could also be a resistor to ground in the original circuit, which would provide additional protection. For example, a voltage divider is formed with a 6.49 megaohm resistor to +90 volts and 150k ohms to Vss, that has a Thevenin equivalent of 2.2 volts with a source resistance of 146kohms and could be connected to the ADC input. Then if the substrate becomes disconnected, nothing really bad will happen. Also with that arrangement, the 90 volts can not provide parasite power via the substrate, as might happen if the Propeller goes into RCSLOW mode running at microamps. In that case its probably best to leave the ADC pins as low outputs when not in use, to avoid parasite power.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com (http://www.emesystems.com)

QuattroRS4
02-23-2007, 06:52 PM
While not necessarily related to the High Voltage aspect of your post - I came accross this while looking for something else and thought you may want to follow it up ...

Quattro

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'