Power Quality Analysis with the QA403: Proof of Concept

There are a lot of power quality analyzers on the market today. Most rely on current clamps, can measure hundreds or thousands of amps, and are more oriented for factory rather than consumer type products.

But power quality remains and important topic for consumer electronics, and with a bit of custom hardware (for safety) and software, the QA403 can perform a range of tasks related to power quality.

The board below is test hardware to allow safe measurement of AC voltages and currents by the analyzer. While the analyzer is isolated, to connect and measure AC voltages directly and safely you need thousands of volts of isolation. Most of this thinking by the safety folks contemplates things such as you are in your office making a measurement and a lightening strike happens to hit the power lines outside your office. Now, the board below isn’t ready for that since it doesn’t even have a case. But you can see the isolation barrier drawn in red. The pair of parts that straddle the isolation barrier are AMC1200 isolated opamps. These parts can withstand a 4.2 KV transient and survive. The part by itself straddling the isolation barrier is a Wurth 760390014 transformer, and it’s rated for a 3.1 kV transient. So, the pieces are there.

At the south end of the board are two IEC connectors. One connector comes from the wall, the other connector goes to the DUT. The white BNC connectors on the far side are for connecting to the QA40x analyzer. The left channel is voltage, the right channel is current.

The board above won’t be taken to production and so the precise details aren’t that important. What is potentially interesting to discuss is how we get line voltages and currents safely into the QA40x analyzer while preserving dynamic range.

The schematic for the board above is shown below:

The power from the wall enters at the lower left. Area 1 on the schematic is a capacitive drop off-line power supply. Here, the voltage is dropped by an X1 safety cap, and rectified by a zener, a schottky and big 470uF cap. From there it goes to a 5V LDO and an SN6505 push-pull driver that drives a transformer. Area 4 is where the transformer output is rectified, and then regulated. On the left side of the transformer we have a 5V supply derived from the line voltage. On the right side of the transformer we have a 5V supply that is derived from the line-side 5V supply. But it’s isolated. These are both used to drive the isolated opamps shown in area 5 (left side of opamp is non-isolated, right side supply of opamp is isolated).

Area 2 is the current sensing, done in a 0.01 ohm resistor. Areas 3 is voltage sensing. To the right of area 5 are difference amps as the opamp output is differential. Note the isolated opamps used have a fixed gain of 8, and a typical gain accuracy of 0.05%. Combined with 0.1% resistors, you are looking at measurements that are really tight right out of the box with little temp and/or ageing drift.

A proof-of-concept visualizer was written for the QA40x software. When charging a laptop, the visualizer output is shown as below:

The voltage waveform is about as expected: 121.5V, and a THD of about 0.7%. The dominant harmonic if the 5th (300 Hz). On the current waveform, we can see a pretty lousy sinusoid. This is characteristic of older style power supplies where nobody really cared about efficiency. These types of power supplies take their power when the sine is at the peak. As a result, you have a current waveform with poor THD: nearly 30%. We can also see the real and apparent power. Apparent power is what you get when you measure your supply voltage and current with a simple meter, and then multiply those values together. In this case, a DVM would report 121.5V and 0.356A, and that suggests the circuit is consuming 121.5*0.356 = 43.2W. But it’s not watts–it’s VA. The actual power that is doing the work of running and charging the laptop is 26.12W. That figure is determined by multiplying the V and I measurements together at every sample, and then taking the mean. And from that, you can determine your power factor (PF). That figure tells you how much power is being wasted. And in this case, with a PF of 0.604, about 40% of the power we purchase is wasted in this charger (when you pay for power, you pay for real power as consumers. But that price has the wasted power built-in. That is why electric companies are so obsessed with power factor).

And this is what Energy Star and all the other government and industry programs are all about–getting the efficiency up. And the way you do that is by making the current waveform look more like a sine that is in phase with the voltage waveform. This is commonly called “power factor correction” and it requires a ACDC converter that is quite a bit smarter than most “off line” converters in use today. And the more power you consume, the more it matters.

Someone that understands high-power electronics and efficiency is Tesla. Let’s take a look at a Model Y charging from a 115V wall plug. For the plot below, the current was set in the Tesla app to limit at 6A due to some issues in the test hardware that was built.

Here we can see the current waveform very much represents a sine wave. it’s not perfect, at 2.3% THD. But we can see the Tesla charger is taking current from the wall at nearly every point of the voltage sine. And as a result, the Tesla charger appears to be purely resistive. It’s not of course, but Tesla’s power factor correction is making the load look purely resistive through sophisticated algorithms. And when a load appears purely resistive its power factor hits 1.0 and its efficiency is thus 100%. The PF here is 0.988.

So, why use an audio analyzer for measuring power quality? There are a lot turnkey options out there today, and you might not need to. But most power quality analyzers rely on clamp-on current sensors. A front-end board as shown above can use shunt sensing, which has much lower offset errors, no drift and significantly better accuracy and noise performance versus clamp sensors. If you are designing consumer products with aggressive standby modes and large active loads, that will challenge the lower limits of what a clamp-on sensor can do. The QA40x also has an easy to use API that makes it trivial to capture waveforms and do whatever processing and logging you might need.

The QA40x also offer a large dynamic range–much larger than what you get from a scope. In the case of the Tesla charger, the peak power can hit 1.4 kW during charging, and just 40W or so when idle. In addition to the dynamic range win, the QA40x accuracy is quite a bit better than most scopes.


Is there any chance of offering this as another product ???

When I started looking into power line noise and its contribution to audio clarity etc, there was only FLUKE and such instruments at considerable cost. I could use something like this if you would make a one time run of a few. Like you did with a QA480.

R.N. Marsh

I too ask if there is a possibility of offering this product as another product. I would be very interested.

I used my QA403 to do a comparison of 12 different USB charging devices for a client. Was a fun and unique project.

Bet you found some that looked really crappy.

@Dave_MacKinnon what sort of measurements did you take?

I looked at noise content relative to the output current. I also measured (by other means) output current versus voltage and device temperature versus output current.

Dear Matt

If I build the board for my own use, is it possible to get the necessary software?


Hi @Krisz77, yes, for sure on the software, and I think a limited number of boxes will be built to help people evaluate the technique and then build whatever they need for their own use–perhaps even 480V three phase, much like the silicon vendors do with reference designs.

Below is the latest board, which should handle up to 12A and 240V

And it will go into a plastic case that has the openings CNCd.


The board achieves nearly 8mm creepage/clearance between the line and isolated outputs and the key parts doing the isolation are approved by regulatory authorities for this purpose. Now, in the US you don’t need UL certification to ship a line-powered product, and the silicon vendors make lots of evaluation boards (including line-powered) without any emission testing or safety approvals, and they seem to require the purchaser is someone “skilled” in the area of development. I understand their path for sales in the US, but not EU.

In any case, it will be another few weeks until the HW above can be evaluated. The aim is that the low-current performance is significantly better than clamp-based analyzers and thus take advantage of the audio analyzer’s dynamic range.

I have no idea on schedule for this as it’s a bit of a side project. But the software shown above is in the current builds, it just doesn’t show up. It could be enabled pretty quickly if you had hardware.

@matt any chance we could get Gerbers and bom if you are not going to produce this?

Hi @moto, sure thing. Schematics, gerbers, bom will all be provided. Once the REVC units come back, I’ll post the performance measurements.

Thank you Matt

So should I wait until you are ready? Or can I make my own?

Best regards


Matt via QuantAsylum Forum <notifications@quantasylum.discoursemail.com> ezt írta (időpont: 2023. aug. 11., P, 16:37):

Sorry, I just saw your reply Matt.

While on the subject, sorta, does anybody have any good ideas of how to measure common mode currents running along the AC mains cables?

Hi Matt

Have you new info?

Hi @Krisz77, yes, this works very well with a usable dynamic range from about 12Arms down to 4mArms or so. And that was the starting point of the curiosity–how good could the dynamic range be using fully isolated opamps. They looked good on paper for sure.

Cases came back:

The AC to DC conversion for the hot side of the project was previously done by a cap-drop line circuit, but in the end a dedicated ACDC module (RAC03-05SK) was used. It’s the large rectangle near the bottom with “AC” and “DC” text on the inside.

If you look at the text on the case, I think some will be built to help others evaluate how they might tailor the circuitry for their own evaluation.

Wow, beautiful case ! Count on me to buy final product !
@matt just one note, i see you used just simple divider to measure mains voltage. This is absolutely not enough voltage rated especially in Europe, where peak voltage across this resistor could be 350Vp-p easily. Also isolation distance of simple 0805 resistor is not enough for this range of voltages. There should be series combination of at least 3 resistors.

Hi @djrix, thanks for noting this. This would be a 300V system voltage (next highest group from 250V single phase), with category II installation, and so the rated impulse voltage would be 2.5kV (1.2/50us). Pollution is assumed degree 2 (occasional condensation) and that results in 1.5mm clearance up to 2000m, and given 0.6mm pad to pad spacing of 0805, a divider comprised of 3 0805 would give a total of 1.8mm clearance. Is this a correct application of the IEC? Do you think it would be preferable to use a single 1206 for the upper divider?

Overall, the design rules are primary/secondary clearance of >8mm, and line/neutral clearance of >1.5mm.

The TI AMC1200 (isolated opamp) offers 4250Vpeak isolation, and the Wurth 760390014 at the bottom of the board offers 3125Vrms isolation.

Any more feedback you have would be much appreciated.

Hi @matt , i´m far from calling myself professional :slight_smile: Main issue here is, that standart smd resistors have much lower working voltage allowed by manufacturer. 0805 is 150V , 1206 is 200V rated.
Vishay made special high voltage types, those are quite expensive though:

Three basic 0805 resistors will work for you, increased BOM price is negligible and PP time increase is even less neglgible :slight_smile: