PDA

View Full Version : Multi-Voltage ADC Nuttiness.

Constantin
03-07-2013, 01:58 PM
Hi all,

I have a conceptual question regarding a voltage-sampling circuit I've previously discussed. The circuit is designed to have a wide inout range of 115-230VAC.

Below is a slightly modified version, the voltage source is actually a transformer with a no-load voltage of 9.2V @ 230V input. I am considering improving the resolution of the ADC output by bypassing one of the resistors on the transformer leg whenever the system detects that it is attached to a 115VAC circuit.
307
I propose doing this by shorting resistor #2 with a MOSFet solid state relay like this clare unit (http://www.clare.com/home/pdfs.nsf/www/CPC1006N.pdf/\$file/CPC1006N.pdf). Besides a drop resistor for the LED inside the SSR, I presume it would also be a good idea to feature a pull-down resistor on the input side of the SSR to prevent accidental engagement?

The above (if it is a workable solution) would effectively add a bit to the resolution at 115VAC, right? My circuit simulation tool suggests that this is a workable solution but I also wonder if there would be any kind of damaging inductive kickback from the transformer secondary... that said, since the relay would be either permanently on or off, the damage potential from switching should be pretty minimal.

FWIW, the maximum current through the resistor proposed being shorted is on the order of 150uArms. The maximum Vrms voltage through the resistor is 18VAC. Under maximum 115VAC conditions (i.e. 115VAC x 1.25 safety factor) the current going through the relay peaks at 470uA.

Jp3141
03-07-2013, 07:34 PM
Still working on the Power Meter :-)

-- shorting the 36k won't give precisely a gain change of 2:1 -- you go from a loop impedance of 36k+36k+4.7k/2 (74.35k) to 36k+4.7k/2 (38.35k), ora a ratio of 1.94:1 -- this gives a 3 % error which will require calibration.

I couldn't look up the Clare relay, but a) relays only have kickback on the energizer coil, not the output switch, and b) SSRs don't have any anyway. I suspect there is a small amount of capacitive feedthrough in the SSR -- you should check that the open switch capacitance between the contacts has an impedance >> 36k (for 0.1 % error, you need 1/(2.pi.f.C) >> 36k*1000, or C << 73 pF.

Constantin
03-07-2013, 11:30 PM
Hi JP and thanks again!

Yes, still filing away... want to make this thing as powerful as possible. I realize that the addition of the relay will require a separate calibration but the modeling results are so promising that it was hard to pass up. On the current side, I'm still wondering if using an op-amp as suggested by Atmel in their power meter article makes sense - the reason I waver is that the current signal is much less predictable and it would likely make more sense to use a dedicated ADC with a high resolution instead. Anyhow, I designed the relay in, I can always decide not to activate it... Thanks again!

Constantin
03-09-2013, 05:28 PM
Had another thought... what if the resistors were of differing values, such that once the relay closes that the resistance is virtually 1/2...

316

I have also reduced the values of the resistors to allow faster sampling via the ADC, hence the resistors on the coil shrank also. That may induce a bit more phase lag, I guess but since I have to calibrate for phase error anyway...

Does the above make sense? FWIW, the on-resistance of that SSR is less than 15 Ohms, so I didn't bother modeling it other than as a dead short.

Jp3141
03-09-2013, 11:11 PM
If you use 0.1 % resistors, then that's better; if you don't, then the values don't really matter since you'll calibrate. However, using cheap resistors doesn't guarantee stability (over time, temperature), so don't use 5 % surface mount ones.

A lot of these decisions depend on the performance you are trying to achieve; the cost (vs. design time tradeoff) target; frequency of calibration; and if you are trying to mass produce or just hand build a couple.

Other Q's: unless you have long wires between the controller and the SSR, it won't accidentally engage (and it is relatively slow anyway).

The opamp can increase dynamic range, but again introduces more calibration points. I don't think you'll achieve 0.1 % anyway over time and temperature variations, so if you care more about resolution than accuracy, it can help.

Constantin
03-10-2013, 05:10 AM
If you use 0.1 % resistors, then that's better; if you don't, then the values don't really matter since you'll calibrate. However, using cheap resistors doesn't guarantee stability (over time, temperature), so don't use 5 % surface mount ones.

I totally hear you. Given the miniscule price difference between 1% and 5% 0805 resistors, I only use the 1% variety in general. As for the critical resistors, they are all 0.1% units that have a 25PPM/C drift. Lower PPM resistors are pretty expensive, however, so no 10PPM units for me! Total production would max out at a couple of hundred, if I'm lucky. But accuracy matters, hence the low-drift resistors.

The reason I am considering the lower value resistors is that I'd be that much closer to not really needing extensive additional calibration. On the other hand, the secondary coil is limited to 16mA on this transformer. Loading up the secondary coil will allegedly have a thermal drift effect that I'd rather avoid. So I'm sticking to the older values for now.

I'll drop the pull-down resistor for the SSR - I thought it simply wise to pull down by default, as my recollection from the Arduino Atmel AVRs was that the state of a GPIO pin could not be guaranteed to be one way or the other on startup /reset - Pin states (high, low, Z) were only defined once setup(), etc. had completed. So by having the pull-down there, you could pretty much rest assured that the SSR would be off unless the Teensy was driving it high. But the distance is pretty short - maybe 2 inches, total, in terms of trace length.

As for the op-amp, I hate the thought of literally throwing away 1/5th of the ADC range just because the LEM current sensor module limits its output from 0.5-4.5V. An op-amp could help here but between board space available, and the many components associated with the op-amp (i.e. there is no such thing as a fixed 0.6 Gain op-amp, as best as I can tell) I may just have to live with that. But it pains me!