Analog multipliers and watt measurement

Jim Thompson's mention of the MC1495 and MC1496 reminded me of other = analog=20 multipliers I have dealt with, mostly for watt transducers. The first = one I=20 encountered was built with an array of diodes and resistors, with=20 transformers to provide current and voltage signals, and a direct output = to=20 an analog 1 mA meter. It was included in some of their DB40 series=20 switchboard wattmeters, and also watt transducers. There were versions = for=20 single phase and also two and 2-1/2 element versions for three phase. I = used=20 the same basic circuit for a newer design that added a power supply and=20 op-amp output. I don't know exactly how it works, but it has to do with = the=20 logarithmic function of the diodes and the bias provided by the resistor =

network. It's been over 20 years since I worked on that design. Here are =

schematics.

formatting link
formatting link
formatting link

I was looking for more information on the circuit, which I think was=20 patented, but I only found newer designs. One that seemed interesting = was a=20 pulse width modulation system.

formatting link

Analog Devices has an IC that computes watts, VARS, and other quantities = for=20 power analysis:

formatting link

For power line frequencies, probably a PIC with ADCs could perform a=20 computed watt function, along with true RMS current, voltage, VARS, and = even=20 frequency and phase angle or power factor.

Paul=20

Reply to
P E Schoen
Loading thread data ...

formatting link
formatting link
formatting link

I was looking for more information on the circuit, which I think was patented, but I only found newer designs. One that seemed interesting was a pulse width modulation system.

formatting link

Analog Devices has an IC that computes watts, VARS, and other quantities for power analysis:

formatting link

For power line frequencies, probably a PIC with ADCs could perform a computed watt function, along with true RMS current, voltage, VARS, and even frequency and phase angle or power factor.

Paul \

Indeed, a 12F675 provides 4 10-bit ADC channels, and enough flash to accommodate all these calcs, you can bit bang to a serial output or a SPI input DAC. All in 8 pin DIP.

Reply to
Bruce Varley

The 10 bit resolution might be sufficient for the voltage measurement, but how about the current measurement in a general purpose instrument?

This may have to handle tens of amps of peak current or just a few mA, so apparently some range selection would be needed.

For an instrument that is going to monitor a more or less known load,

10 bits might even be sufficient.
Reply to
upsidedown

If you add a little noise to the current signal before you digitize it, you can do a utility-grade meter with an 8-bit mux'd ADC onboard an 80 cent uP, like an HC05 class part. I've done it with a 7-bit single-slope ADC, resolved a few watts out of 20,000.

John

Reply to
John Larkin

es for

..

d even

PI

It helps if you are picky about the probablity distribution of the noise you add.

J. Watkinson, The Art of Digital Audio, 2nd ed. (Focal, Stoneham, MA and Borough Green, Sevenoaks, U.K., 1988) gives a detailed review of the literature, in his discussion of A/D conversion, amongst a lot of other useful stuff.

Not enough people have read it.

formatting link

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

for

even

Playing with dithering requires quite high oversampling rates.

For example in properly dithered CD chains (44.1 kHz sampling frequency, 16 bits hence 96 dB theoretical SNR), in the "fade to noise", an audio test signal to the system can be lowered well below

-96 dB and the tone is still detectable, but only well below the maximum audio frequency (20 kHz). At 1 kHz, you might be able to detect the tone perhaps at -105 dB.

In the current channel of a TrueRMS meter it might be sufficient to sample the signal at say 200 Hz, if we could assume that the current waveform is sinusoid. Adding dithering noise and sampling at a few kHz will get some extra bits to the averaged low frequency samples.

However, with typical modern loads, the load current is far from sinusoid and require a significantly higher effective sampling rate. This might still require increasing the sample rate once more by a decade or more.

Thus, the sampling rate might have to be over 20 kHz, first to get rid of quantization error of the low bit count ADC with ditheration and downsample down to say 2 kHz and use these samples to multiply the corresponding voltage samples at 2 kHz to correctly represent the harmonics of the current measurements.

A very much doubt that a very small controller would handle it.

Reply to
upsidedown

_If_ it can be assumed that the current waveform is repeated identically at several cycles and the measurement values needs to be updated, say once a second, a lower sample rate would do. Sampling (with a short gate time) at a sampling frequency slightly off the mains frequency (say 204 Hz/244 Hz for 50/60 Hz), the waveform can reconstructed quite accurately in 1 s (just as in sampling oscilloscopes), when the sampling moves around the waveform.

Thus multiplying the current and voltage samples at this low sampling frequency and averaging the power for a whole second (instead of a single mains cycle) might be sufficient.

Wondering if this approach would be compatible with dithered oversampled ADC conversion ?

But if the cycles are not identical and a higher display update rate is required, this approach does not work.

Reply to
upsidedown

Your requirement is too stringent. It's the time averaged power that's being measured, i.e. one number and not an entire waveform. That relaxes the requirements a lot, but as has been pointed out, you have to do the dithering properly.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510
845-480-2058

hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

for

even

It only needs to be uncorrelated to the line frequency and span a couple of ADC bits. One meter I did, I used a triangle wave from a schmitt-gate oscillator, which has a pretty flat PD. We sold over 50K channels of that one.

Another meter, designed for residential metering in India, I used the uP code itself as a random noise source, just one bit of each opcode, out a port into an RC lowpass. That worked too.

I don't do meters any more. There's no money in it.

John

Reply to
John Larkin

for

even

An electric meter isn't trying to reproduce a waveform; it's only gathering statistics on it. The meter that I sold the most of sampled the AC line voltage:current pair at about 27 Hz. The dither signal was a (if I recall) roughly 3 KHz triangle wave.

Just simultaneously (or almost simultaneously) sample the voltage and current, multiply, and average to get power. The rate need not be high. The precise best rate is sort of fun to find.

If you want RMS current, just for fun, autozero the current samples, square, filter, square root. Math out the dither voltage, if necessary.

An HC05 is overkill; a small ARM would be gross overkill. I've done a

16-channel meter with an MC6803 (executes a NOP in 2 microseconds) and a software-driven single-slope ADC. Sold thousands of them.

John

Reply to
John Larkin

a=20

measurement,

instrument?

The transducers I mentioned were basically 1% accuracy class, and they = only=20 needed to work for voltage variations of about 20% (100-140V), and = current=20 from about 5% to 125% of nominal (usually 5A). For higher voltages and=20 currents, PTs and CTs were used. They generally drove analog switchboard =

meters, which had 270 degree round dials and about 2% accuracy. Mostly = for=20 visual indications on a panelboard.

The power analyzers were also about 1% or perhaps as accurate as 0.25%, = so=20 an 8 bit or 10 bit ADC would be sufficient if a microcontroller were to = be=20 used. Since such power analyzers sell for $5000 and more, cost is not = really=20 a major factor, so a higher precision 12 bit ADC would be overkill, but = the=20 PIC18F26K80 is only $3, so why not? Even more important may be = simultaneous=20 sampling, but apparently not available on PICs. But external devices = could=20 be used, or else just interpolate between readings. And most analyzers = have=20 multiple ranges of current and voltage.

Much of this type equipment is not very technologically advanced, and = many=20 designs from the 1980s are still being sold and many more, even from the =

1960s and 1970s, are still in use. It is a niche market with only a few=20 companies competing, and the customer base is fairly small. So there is = not=20 high volume and minimal chance of market flooding by Chinese copies=20 (although I have seen quite a few power analyzers).

Paul=20

Reply to
P E Schoen

for

even

Using the code itself as the source for analog dithering sounds like a brilliant hack, but I suppose you would have to be careful about WHICH bit you used, depending on how the opcodes were constructed for that particular microprocessor.

Reply to
Ralph Barone

for

even

Right. The MSB turned out to have an ugly waveform, so I used the next one down. I think... it's been a while. It drove a port pin every IRQ, and that drove an RC lowpass to make the dither. The result was a really ugly ratty triangle sort of thing. It worked.

A real pseudo-random sequencer would be sensible on an ARM or something, but the HC05 is a dog for many-bit math.

John

Reply to
John Larkin

Most uPs can sample successive analog inputs a few microseconds apart, good enough for 60 Hz power. Plus, you can always add RC lowpasses in the amp paths - you should anyhow - and skew them the right amount to correct for the ADC mux delay.

More important is that most uPs have cruddy ADCs, specifically have a bit of crosstalk from one digitized channel to the next. That can mess up low-power measurements. You can digitize a dummy grounded or otherwise DC channel between the CT inputs, to discharge things.

A mechanical disk meter is an amazing gadget, not easy to match with electronics. A 20 KW disk meter will accurately register just a few watts. That can be done with a 12-bit or even 8-bit uP ADC, but it's not easy.

John

Reply to
John Larkin

A PRBS can be just a shift reg plus an XNOR gate. Easy peasy.

Reply to
Bruce Varley

ities for

em...

a

and even

a SPI

,
?
,

The literature suggests otherwise.

But not as well.

Which is another way of saying that your designs are no longer competitive. In fact it is a commodity market, and justifies more thorough-going design optimisation than you are set up to do.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

quantities for

even

Literature? I've sold over 50,000 channels of power metering. My stuff was tested by serious people. It worked.

What the hell would you know about this? You can't even get a 2-fet oscillator to work.

We did mostly multichannel remote-readout boxes that did power and thermal measurements for utility end-use studies. That was a big fad for a while but tapered off. I was working with Metrocom to do residential metering, but they decided to become an internet company, the Ricochet thing, lost interest in metering, and died.

You don't know anything about this stuff.

John

Reply to
John Larkin

antities for

surem...

rm a

RS, and even

to

or a SPI

ent,

ent?

mA,

ad,

d

There's a big gap between "it worked" and it it worked as well as it could have. Knowing the literature is one of the ways to reduce that difference.

You are deceiving yourself with your usual enthusiasm. I certainly can get any number of examples of the Baxandall oscillators to work. The version I'm playing with in LTSpice is one that I invented in 1986 for the Metals Research GaAs crystal puller - the original circuit that had activated LVDT-based device that weighed the growing crystal had depended on components that has gone obsolete in 1986, and I'd put together something better which went into new production and was retro- fitted to a number of old machines, The point about the current project is to demonstrate how surprisingly good the circuit is (which I hadn't appreciatedback in 1986), not that it works.

The reason why I can claim that a square wave is a poorer choice for a ditherer than a triangular wave would be evident to you if you had read the relevant literature - an exercise that would seem to be quite beyond you.

I don't know the commercial details, but I did get the fundamentals right - Metrocom did contemplate the residential market but realised that it was going to be dominated by people who could afford to commission an application-specific integrated circuit (ASIC)for the job.

Back when I knew more about this kind of stuff, you needed to be able to sell roughly 100,000 parts to cover the cost of developing an ASIC and getting the masks made - and the residential market is plenty big enough to justify this kind of investment - but Metrocom doesn't seem to have had that kind of money, and it they had they wouldn't have spent it with you.

-- Bill Sloman, Nijmegen

Reply to
Bill Sloman

quantities for

and even

SPI

What literature is there about using an 8-bit uP to do ANSI C12-class power metering.

The dither wasn't a significant factor in my power meters. Things like ADC crosstalk and magnetic field pickups were much more serious problems.

WORKS?

formatting link

I sure don't need to look up simple stuff like that in "the literature." I invented power meter current dithering before I'd heard the word "dither", or the concept of noise smearing ADC quantization.

But what literature? About digitizing audio or RF? A power meter doesn't do that.

Why do you revere literature, namely authority, so much?

How come you always know how to do everything better than other people, but you actually do nothing?

Wrong, as usual. That's not what happened.

They were planning to use custom silicon... they had mountains of money. The problem was cultural, not technical.

John

Reply to
John Larkin

quantities for

perform a

VARS, and even

to

or a SPI

measurement,

instrument?

mA,

load,

As I noted, that's a different problem. Just because it's in a journal doesn't mean it makes sense in all applications.

Think about the math. Power metering is not audio.

One of the more

Very, very rare.

They weren't really interested in 60 Hz. They considered the electric meter as just an excuse to get their Ricochet RF technology into the home, which is one reason they did the metering badly. They finally abandoned metering and went straight to becoming a wireless Internet provider. They were so in love with their Ricochet technology that they couldn't see that it didn't scale. Cell phone networks and WiFi killed them.

All their engineers were ham radio/RF jocks. I think 60 Hz bored them.

And no, I talked to them a lot but didn't design anything for them. No money changed hands.

John

Reply to
John Larkin

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.