Measuring AC Voltage on multiple frequencies

From what I read it seems that it is not meant to be used as wattage meter just to measure peak voltage and peak current. I want to make circuit that measure watts continuously while music is playing.

I probably shouldn't worry about accuracy that much but I still have to test that on real power to see how it perform.
Protection wise I would like to implement something that if overvoltage happen that it doesnt destroy the circuit.

You already know, or can measure the resistance of the speakers. When you measure the voltage peaks, you can compute the current using Ohm's law. Then compute the instantaneous power from the volts and amps.

Speaker impedance is all over the place. If you want the actual power, need to measure voltage and current and relative phase and calculate real and reactive power.

1 Like

You are sampling a 32Hz signal at 13.3Hz rate and hoping that one of the samples will be at the sine wave max value and another at the min value. It may happen, it may happen once an hour, or it may never happen.

And that is why a true measurement will use a pure resistive load.

1 Like

I agree. There is no better way than to test with a pure resistor as the load!

Let see... 200V and 8 ohms...
I don't think they make 5000W resistors do they?

We use a bank of parallel connected 200 Watt resistors.

https://www.kwk-resistors.in/wp-content/uploads/2019/10/ALPHA_CAT29_00.pdf

A true measurement of what though? An audio amp tries to approximate to a voltage source, so if you measure the voltage across a resistive load the power is just Vrms^2/R. But so what, isn't that what you expect? If you just measure the resistance of your speaker with an ohmmeter you see the DC winding resistance which is somewhat less than the actual "impedance". Any voltage across that just makes it hot without contributing any audio power. The actual impedance is higher, because of the motional resistance which does contribute to sound power, the coil inductance, and various resonances in the cone and enclosure.

image

from The Truth About Speaker Impedance – Aperion Audio

This curve is the modulus of a measured speaker impedance so it doesn't say anything about the reactive and resistive parts - the site suggests that the nominal impedance of the speaker could be said to be 6 ohms but clearly if fed from a constant voltage the actual power input to the speaker will be a lot less at most frequencies, and the sound power out less still. The other thing is that the current may be up to 90 degrees out of phase with the voltage across the terminals, which can play havoc with the amp output stage.

I guess what I'm saying is that the peak output voltage into a resistive load or an actual speaker you should measure will be a bit less than the supply voltage, leaving enough headroom that the transistors don't saturate and distortion is within limits. What that translates to in terms of actual acoustic power depends entirely on the speaker.

Actually, a speaker is a motor with back EMF that has to be accounted for. That will be out of phase with the driving current. So measuring both will be very complicated!

1 Like

@Wawa I added current measurement to the code and tried measuring wattage and it works pretty good! even with arduino nano ADC. Only thing that I would like to improve is response time of the code. I get every around 390ms new measurements. If we could lower that too around 200ms that would be great! Not sure if ads1115 will improve the speed or I should use esp32 with faster clock speed?

I see a sample time of 75ms in my code. Maybe 100ms with the serial prints.
What else have you added to make this 400ms.

The long sample time is needed to sample down to 10Hz.
That 75ms can be reduced to 40ms, for frequencies from 20Hz.

The ADS1115 is a lot slower than the A/D of an Uno/Nano,
which will only affect top frequency, not bass.
Leo..

When I test your code without anything else I get around 390ms response.. and even when I lower sample time its still slow.. Not sure why.

EDIT: Tried the same code on esp32 and it works way faster! but accuracy is also way worse haha..

Most transformers will work differently at different frequencies.

I tried again your link and it seems to work both for current and voltage but I can't calibrate voltage measurements to match my dmm.. It seems that after it reach 7v it barely goes up.. any idea?

DMM vs My circuit measurements:

1.99v - 2.03v
3.40v - 3.43v
5.60v - 5.77v
6.75v - 6.84v
7.35v - 7.18v
8.03v - 7.41v
9.01v- 7.60v
9.53v - 7.70v

@Wawa Is it possible to implement in the code you sent True power calculation? so I can have apparent and true power measures?

Many hits for that on Google.
Here's one.

I would think that only works on a test tone, not for a complex signal like music.
Leo..

1 Like

@Wawa I added current measurements

I think that too.. I would really love to implement power factor in current setup.

Why don't you just measure supply voltage and current draw of the amplifier.
Class-AB (your amp) has a known efficiency curve, so output power can be calculated from that.
You should be able to look that up.
Leo..