Jeff.Miller@samba.acs.unc.edu (BBS Account) (08/11/90)
There are some things that are not absolutely clear in my mind about your project but let me cover most of the bases: I think what you are trying to do is a bit more complicated than myou think. It sounds to me like you want to measure the power of a load driven by AC. And it sounds like your waveform is non-sine. This is a classic problem, and when ever it comes up you have to think about RMS and true RMS and Average Power and all that other muck. There are two approaches I see for accurate results for you. One is to do most of the "calculation" in the analog domain. I think you can get away with using an analog multiplier chip to multiply the wavform obtained across the lamp (rep'ing th voltage across it) by the waveform obtained across the sense resistor. The output of this multiplier (you can use a transconductance amp, check National's databook for the 13600, connected as a four-quadrant multiplier, or Burr Brown and others make special multiplier chip) is a strange waveform. I believe the "area under its curve" represents true power through the load, as this waveform is built by multiplying I*E. Now comes the problem of interpreting the waveform. If it was a simple sine wave, your task would be easy. Just use the peak detector/integrator I will describe below to find the peak value and then use a voltage divider to find the so-called average power. But if you are using a triac or whatver to control power to your load it won't be. You must either feed this wavform into a "True RMS to DC Converter" chip, like those from National or Burr Brown (they are very expensive) and apply the DC output to your A/D converter, or sample this wavform at several dozen points per cycle or half-cycle and let the computer integrate it. You may be tempted to say, well, with some arrangement of capacitors, and voltage dividers, and "bleed resitiors" or something, I should be able to, like, model what is happeneing to the lamp, and get an integrated DC voltage representing the tru power in the lamp. It has taken me quite some time to accept that this simply can't be done very acurately. And I think the reason _deos_ have to do with the fact that the old RC business has little to do with sine waves. It can be done somehow (after all, they do it in the converter chips) but probably involves a pretty strange interaction between active components. The other way to handle this problem is to sample both the voltage and current waveforms at several dozen points per wavform and let the computer do the instantaneous multiplications as well as the additions. This might be practical if your computer is fast enough. Here is a circuit you might find usefull no matter what happens. It is the "ultimate rectifier". Adding the capacitor make sit the perfect peak detector. It is nice because the op-amp swamps the .7 volt diode drop. |\ | \ | \ | \ | \ sig-------|+ \ d | \--|>|----------|-----| | / | | | -------|- / | / | | | / | \ | | | / | R / - C | | / | \ - | | / | / | | |/ | | | | | gnd gnd |_____________________+ The value of R (and C when present) varies with application, you trade ripple for response tiame. Hope I answered some questions. -cornhead