# Most accurate way to measure universal (AC) motor current?

I'm designing a control circuit for a universal (AC) motor (single phase, brushed). I've simulated the control circuit and it works as expected. Circuit below is controlled by a STM32G4 series microcontroller. I'm in the process of adding the current measuring capability to the circuit and I need some help in choosing the best method for my use case.

It is my first time designing a circuit to measure AC current so I'm not sure what the best way in this scenario is.

Requirements and info:

• Maximum RMS current: 10 A (everything above is considered as an overcurrent condition)
• Accurate current measurement is required over the whole current span (from 0 A - 10 A)
• Solution doesn't have to be the cheapest possible (still has to be reasonable)
• Measurement circuit doesn't have to be isolated since the circuit isn't either (but it can be)
• Phase control is used
• RMS current is calculated in software for each period (50 Hz) and can then be averaged over multiple periods if needed
• ICs with serial interface for reading current need to be avoided

Note: I'm not really sure what kind of accuracy is even possible but let's say that I'd like +/- 20 mA from 0 A - 3 A and +/- 100 mA from 3 A to 10 A.

What I've looked at so far:

My first idea was to use a simple shunt resistor and an integrated (STM32G4) operational amplifier. However, high-side sensing isn't suitable due to the very high common-mode voltage (230 VRMS). Low-side sensing could work but this would introduce a variable voltage drop in the triac's gate loop which would in turn affect triac triggering I guess.

Next idea was a hall-effect based current sensor such as TMCS1101 from Texas Instruments. Everything was fine until I've seen the RSS error graph which shows that for measuring currents lower than 2.5 A, error grows significantly.

Next idea is a SMT current sense transformer such as this one here. I've never worked with them before. What kind of accuracy is expected over a large span that I need (0 A - 10 A)?

What would be my best bet and what should I be cautious of?

Triac triggering circuit:

• ACS730 is quite popular Commented Mar 25, 2022 at 11:56

RMS current is calculated in software for each period (50 Hz) and can then be averaged over multiple periods if needed

That means you need to be sampling much faster than 50Hz, of course.

ICs with serial interface for reading current need to be avoided

Almost any external ADC you'd be using would have an SPI or I2C interface, and it's never really a problem. The interface is transparent. Your code just deals with the bytes that were transmitted. How they arrived at the MCU is irrelevant once you've set up the data transmission interface.

Low-side sensing could work but this would introduce a variable voltage drop in the triac's gate loop which would in turn affect triac triggering I guess.

You already have a large trigger sensitivity variation between the two half-cycles, since you only use a unipolar gate current. Typically the gate trigger currents differ by 50% between the two quadrants you'll be operating in.

Whatever variation would be added by a small shunt resistor will be irrelevant anyway since you're using a fairly high compliance voltage of 12V. If you want the gate current to be independent of A1 potential, use a current source instead of converting voltage to current using a resistor as you're doing now. Say three transistors + a resistor using VBE as a reference, or call it a day and use an LM334.

If you'll want to have a constant trigger sensitivity, then you'll either need to have two gate current setpoints and switch between them based on the polarity of the line voltage, or have a bipolar gate current that follows the polarity of the line voltage. I.e. A2-to-G polarity should be the same then as A2-A1. This also gives you the highest gate sensitivity.

The gate trigger setpoint may not be as big of a problem as it appears, since you can have a fairly fast gate current slew rate. It won't present an EMC problem if you keep the loop area small.

You can also use two back-to-back mosfets instead of a Triac, but those are a bigger hassle. Triacs are fairly robust.

I'd use a fairly small shunt resistor - with full-scale current voltage of 0.1V or even 0.01V. Then apply gain to it. The zero offset calibration can be performed on each line half cycle. The gain can be stabilized by thermally coupling one half of the gain ratio resistance to the shunt resistance. You can then do zero-current switching, essentially getting rid of inductive kick-back, and diminishing commutator arcing as well.

• I'm using the Snubberless version of ST's triac family. They work in Q1, Q2 and Q3 hence you need a negative power supply and unidirectional current for the most simple driving circuit. Gate threshold current is different in Q4 which is not applicable to the component I'm using, Q2 and Q3 threshold currents are the same as per datasheet. I'll probably use the same circuit but simplified and with a safe current margin to account for temperature rise. Thank you for giving me a few ideas. Commented Mar 26, 2022 at 14:48