Renesas
Motor Current Sensing and Shunt Placement
-
Question 1 of 12
Why does a motor controller need to measure current?
Reveal answerIn a permanent magnet motor, current sets torque. To control torque, the controller has to know how much current is flowing in each phase. Without that reading, the motor can’t hold a steady speed when the load changes. Current readings also protect the system. A stalled motor or a short circuit shows up first as a sudden jump in current.
The Renesas Flexible Software Package, or FSP, includes a Motor Current Controller module built around this measurement. It uses the measured current, the target current, and the rotor angle to calculate the voltage for each phase (FSP v6.6.0, rm_motor_current, Overview).
-
Question 2 of 12
What are the main ways to measure motor current?
Reveal answerThere are three common options. A shunt resistor is a small, precise resistor in the current path. It is cheap and accurate but wastes a little power. A Hall-effect current sensor measures the magnetic field around a wire. It is isolated and wastes almost nothing, but it costs more and drifts with temperature. A current transformer is also isolated, but it can’t measure DC.
Most low-voltage motor drives use shunts. The MCK-RA8T1 User’s Manual shows a reference inverter that measures current with 10-milliohm shunt resistors in each phase (R12UZ0133EJ0100, Section 5.1.2, p. 23).
-
Question 3 of 12
Where should the shunt resistor go?
Reveal answerThere are three choices. A low-side shunt sits between the bottom switch and ground. Its signal stays near ground, so it is easy to measure, but it only sees current while the bottom switch is on. A high-side shunt sits on the supply line. It catches more faults but sits at full supply voltage, which needs a special amplifier. An in-line shunt sits in the motor wire and sees current all the time, but its voltage jumps with every switching edge.
The RRA70180/RRA71180 current sense amplifier datasheet compares high-side and low-side sensing. It notes that a high-side amplifier’s input voltage follows the supply voltage (R13DS0011EU0100, Section 5.2, p. 12).
-
Question 4 of 12
How many shunts do you need?
Reveal answerOne, two, or three shunts can all work. A single shunt measures total current, and firmware works out each phase from it. Two shunts measure two phases, and the third comes from the rule that all three add up to zero.
Iu + Iv + Iw = 0
Three shunts let firmware choose the two best readings each cycle. More shunts cost more but make the measurement easier and more reliable.
The MCI-LV-1 User’s Manual describes an inverter board that supports one-, two-, and three-shunt setups. Jumpers on the board switch between modes (R12UZ0092EJ0120, Table 4-3, p. 9, and Section 5.1.2, p. 11).
-
Question 5 of 12
How does a single-shunt design figure out each phase current?
Reveal answerWith one shunt, the current you measure changes during each PWM cycle. It matches a different phase depending on which switches are on. Take two readings at the right moments and you capture two phase currents. The third comes from the add-to-zero rule.
The 1-shunt sensorless vector control application note explains this method. It shows where the two readings are taken and calculates the remaining phase as Iv = −Iu − Iw (R01AN6840EJ0121, Section 7.11.1, pp. 49–50).
-
Question 6 of 12
What limits single-shunt designs?
Reveal answerEach reading needs a short window for the signal to settle and the converter to capture it. When two phases switch at nearly the same time, that window gets too short. This happens most often at low speed and near full output. A reading taken in too short a window is unreliable.
The 1-shunt application note solves this by shifting timing. When two switching edges are too close, it delays the later one. If that delay would run past the end of the cycle, it limits the output voltage instead (R01AN6840EJ0121, Section 7.11.3, p. 51).
-
Question 7 of 12
How do you choose the shunt resistor value?
Reveal answerA larger resistor gives a bigger, easier-to-read signal. It also wastes more power as heat. Start with the highest current you need to measure.
Signal voltage = current × resistance
Power loss = current² × resistanceAt 10 A, a 10-milliohm shunt gives 100 mV and wastes 1 W. A 5-milliohm shunt wastes only 0.5 W, but the signal drops to 50 mV. Pick the smallest value that still gives a clean, accurate reading.
The RRA70180/RRA71180 datasheet walks through a full example for a 40 A design. It limits shunt power to 900 mW, picks a 0.5-milliohm resistor, and estimates the error at about 0.75% (R13DS0011EU0100, Section 6.3, p. 14).
-
Question 8 of 12
Why does circuit board layout matter?
Reveal answerShunt resistors are tiny, often a few milliohms. The copper traces leading to them can add almost as much resistance. A Kelvin connection fixes this. It uses separate sense traces that connect right at the resistor’s own pads. Run those two traces close together and away from noisy switching circuits.
The RRA70180/RRA71180 datasheet gives layout guidance. It recommends short, matched Kelvin traces to the shunt’s sense pads, routed over a solid ground plane and away from switching nodes (R13DS0011EU0100, Section 6.7, p. 17).
-
Question 9 of 12
How do you correct for amplifier error?
Reveal answerMotor current flows in both directions. To handle that, the amplifier output sits at half of its range when no current flows. Real parts are never perfect, so that zero point drifts a little from board to board. The fix is simple. At startup, with the motor off, take many readings and average them. Then subtract that value from every reading during operation.
The FSP Motor Driver module does this automatically. It measures and corrects the offset on each current channel, averaging 500 samples by default (FSP v6.6.0, rm_motor_driver, Configuration).
-
Question 10 of 12
When should you take the current reading?
Reveal answerTiming matters. Right after a switch flips, the signal rings and settles. With center-aligned PWM, the timer counts up and then down. At the bottom of the count, the bottom switches are all on and no switching is happening. That is the cleanest moment to read current. Tying the reading to the timer makes it land at the same spot every cycle.
The 3-shunt sensorless vector control application note uses this approach. It syncs the converter with the general PWM timer, or GPT, at the bottom of each cycle (R01AN6839EJ0121, Section 8.2, p. 51).
-
Question 11 of 12
How do you protect against sudden overcurrent?
Reveal answerSoftware checks current once per cycle, which may be too slow for a short circuit. Hardware protection is faster. A comparator watches the shunt signal and trips when it crosses a set limit. Its output connects directly to the PWM shutdown input. The outputs turn off without waiting for the processor.
The MCK-RA8T1 User’s Manual shows a board that raises an overcurrent signal at 21.4 A. That signal goes to a timer input that shuts down the PWM outputs (R12UZ0133EJ0100, Section 5.1.3, p. 24). The 3-shunt application note uses the port output enable for GPT, or POEG, to switch the outputs off when that signal goes low (R01AN6839EJ0121, Section 8.2, p. 51).
-
Question 12 of 12
How do you plan the measurement range and resolution?
Reveal answerStart with the amplifier formula. It shows what voltage the converter sees for a given current. One Renesas board uses a 10-milliohm shunt, a gain of 20, and a 1.65 V midpoint.
Output voltage = current × 0.01 × 20 + 1.65 V
The output can swing 1.65 V up or down, so the board can read about ±8.25 A. A 12-bit converter splits its range into 4,096 steps. With a 3.3 V range, each step is about 4 mA. A 16-bit converter has 65,536 steps, so each step drops to about 0.25 mA.
This formula comes from the MCI-LV-1 User’s Manual (R12UZ0092EJ0120, Section 5.1.2, p. 11). For finer readings, the RA6T2 datasheet lists a 16-bit converter with built-in programmable gain amplifiers, or PGAs (R01DS0400EJ0150, Features, p. 1, and Table 1.8, p. 4).