Translate

Saturday, 2 April 2016

Arduino Audio Wattmeter.

Many, many moons ago I needed something to measure audio power in a hurry. So I lashed up a quick and dirty audio power meter.

It was nasty....

... very nasty, but did the job at the time.

It was simply a switchable 4 or 8 ohm load (actually 4.7 or 8 ohms)  which was rectified, and used to drive two meters, each measuring full scale at 10 watts. The fan was driven from rectified audio. Most unpleasant.




Anyway, the load was good, as was the fan, but I needed some sort of better instrument, so a plan was dreamt up. Measure the peak voltage across the load, do a bit of maths and get the results displayed on a 1602 display, driven by an arduino. Great ....


So audio comes into the load (R1 & R2), and is rectified by a bridge. There's a small bit of smoothing on the output, so we can get a steady-ish DC. This is divided by a voltage divider, R3 and R4 and the resultant is fed to the arduino's A-D converter. Couple of things to note here, the load is switched, either 8.0 Ohms, or 4.7 Ohms, by S1. This also lets the arduino know which load is selected. S2 is a "BTL safety switch". It completely isolates the left and right channel. It also stops the arduino reading the right channel. If you're testing a BTL(bridge tied load) amp, or any type of amp which may not take kindly to commoning up of the negative poles of the speaker, best click this across. It also grounds the second analogue input to prevent spurious readings. A PWM signal is output from D6, and is used to drive a FET to run a fan. I chose a stupidly large FET here, you can pick something more sensible. I just happen to have a bucket of them. 

This will only give accurate results when feeding in a sine wave.

That's it really....

 Dummy load salvaged from the old unit...

Front panel coming together.

... sizing it all up....

... starting the wiring...

Looking good until I noticed that I'd mistakenly picked up a 16x1 display instead of a 16x2!... and the 16x2 requires a slightly smaller opening. Drat! ... some hot melt later will have to do (and it was all going so well ...)

Rectifier board and PWM FET

Rectifier was a little overkill! Still I had two identical, salvaged from a switched mode PSU.











Setting up ready for calibration...

Apply 28.28VDC accross the outputs of the two bridge rectifiers, and with the unit set to 8 Ohms, adjust each pot until the display reads 50.0W. Easy... (Why 28.28V ? 20 VRMS into 8ohms is 50Watts. 20*1.414 = 28.28Vpk... see here for more)





All calibrated and ready for action!
Top line on the display reads left channel, bottom reads right. The three readings are instantaneous power, average and peak.











And last, but by no means least... the code....

No comments:

Post a Comment