# BLDC motor current sensing for load torque

I would like to control 14V BLDC motor of battery powered drill. What I want to do remake the drill to nut runner (torque wrench), so I need to sense a motor current which is proportional to motor torque. My controller will include microcontroller. Here are some questions:

1. How battery voltage discharge can affect motor current measurement depending on the same load (for example I would like to wrench the same nut ant the same torque Nm)? Does it will affect my current reading and the current will increase?
2. Could I sense the BLDC motor current directly on the battery high side or do I need to sense it on all three the motor phases?
3. Is it enough to sense only current to create closed loop torque control, or do I need some additional parameter for torque control based on the different battery discharge levels?

UPDATE:

Okay, for now this is more clear. Please correct me if I am wrong: I do not need to sense voltage of the battery for any calculations or compensation. The only thing I have to sense is motor current, because the current is proportional to the torque. The battery discharge will not have any impact for the current measurement, depending on the same load torque. So shortly, I will get the same current readings when the battery is fully charged and the same current readings when the battery is discharged let say to 60% of full voltage.

What I plan to do is to create relationship table between current readings and torque (Nm) of a load, and save these values in a microcontroller memory. So when the torque wrencher reaches knowing current value, controller will know that the bolt or nut is wrenched with a fixed known torque and motor stops.

UPDATE 2:

The things with current and voltage sensing seems ok. But I forgot another thing - temperature of motor. What impact to the torque (current) will have temperature changes in motor? What is the relationship between temperaute and current of BLDC motor?

• If you know the RPM of the motor, no load, at a fixed voltage, you can derive the speed/torque relationship (torque constant is proportional to the inverse of the V/RPM constant) – Ocanath Feb 12 '20 at 19:16
• A practical suggestion: don't try to do this yourself. It seems like your end goal is to have an electronic 'torque wrench'. Unless having your own BLDC torque control electronics that you have designed is the true end goal, get yourself an off-the shelf solution. I recommend this driver: odriverobotics.com – Ocanath Feb 12 '20 at 19:38

How battery voltage discharge can affect motor current measurement depending on the same load... Does it will affect my current reading and the current will increase?

Torque is directly proportional to current, independent of battery voltage.

Could I sense the BLDC motor current directly on the battery high side or do I need to sense it on all three the motor phases?

Yes, you can sense battery current on the high (or low) side. In a battery powered application sensing the low side may be easier. Sensing phase current could be more accurate, but is also more difficult.

Is it enough to sense only current to create closed loop torque control, or do I need some additional parameter for torque control based on the different battery discharge levels?

To control torque you must use PWM. If you sense battery current then the motor current will be higher at lower PWM ratio, by the same proportion eg. if PWM ratio is 50% then motor current will be double battery current. This occurs because during PWM 'off' time the controller recirculates back-emf current back into the motor. This current never reaches the battery leads, so to get the true motor current you must multiply your battery current measurement by the inverse of PWM ratio.

1. battery discharge usually relates to voltage drop, so with a lower voltage the current will have to increase to deliver exactly the same torque.

2. Before discussing what you can measure I think you need to decide a control scheme for the motor. This is an example of a scheme, to answer your question you need to be able to affect all 3 phase currents to control the motor, thing is how do you plan to do that? you got a micro controller, do you have MOSFETs or some sort of switch to change the current on each phase. The equation for the torque looks like this

E is the voltage per phase, I is each current, w is the angular speed which is 2pifrequency.

$$T=\frac{EuIu+EvIv+EwIw}{w}$$

you sorta need to make the control scheme more clear to advance any further in this project.

1. In theory with just the current, considering the voltage is constant in all phases you could do a closed loop. Sadly, with a battery this is not true so you should also monitor the voltage so it doesn't drop below a certain level to ensure proper functioning.
• For the motor driver I would like to use MP6535: monolithicpower.com/en/documentview/productdocument/index/… . It seems I need to add aditional circuit for the all three phases current sensing and a circuit to measure phase voltages. Also, as you mentioned in your torque equation, I need to know rotation speed. – Tom Jan 20 '20 at 11:27
• The torque, at least to a first order should be independent of the voltage and proportional to current only. The available power (speed x torque) and the max speed are limited by the battery voltage. – John D Jan 20 '20 at 15:26
• Tom you do not need to measure the voltage on each phase, since the battery is providing it, just monitor the battery voltage so it doesn't drop below a level you set that will limit your torque as John indicated. – Juan Jan 21 '20 at 1:04

In six step commutation with PWM speed control, the effective applied voltage to the motor, V_APPLIED is:

V_APPLIED = VBATT * D

where D is the duty cycle.

The resulting phase current, I_PHASE will be:

I_PHASE = (V_APPLIED - V_BACK) / R_PHASE

where R_PHASE is the phase-to-phase resistance and V_BACK is the back EMF voltage from the motor. In theory, you could solve for D and do current control (which is torque control) without sensing current. But in practice, you can't use this equation to do open-loop torque control because very small errors in back emf calculation or battery voltage sensing will result in large errors in torque output.

1. How battery voltage discharge can affect motor current measurement depending on the same load (for example I would like to wrench the same nut ant the same torque Nm)? Does it will affect my current reading and the current will increase?

This question is not super clear. Motor current will be directly proportional to torque. If you use phase current sensing plus a closed loop to control torque, you don't necessarily need to know battery voltage.

1. Could I sense the BLDC motor current directly on the battery high side or do I need to sense it on all three the motor phases?

No and no. The motor current is not the same as the battery current. But you only need to sense one of the three phases, not all three.

1. Is it enough to sense only current to create closed loop torque control, or do I need some additional parameter for torque control based on the different battery discharge levels?

If you sense phase current, it won't be necessary to sense battery voltage. You may be able to fine tune your loop to close more quickly if it knows RPM and battery voltage. But it should not be strictly needed.

There is one more thing I should add. You can implement closed loop control by placing the current sense resistor on the low side of one of the switching FET's. It doesn't have to be on the phase conductor. Your sampling needs to be designed to read the current sense value at the right time when the FET is on. Ideally, the sampling should also be synchronous to the PWM frequency, but not all processors support this.

• For BLDC current sensing, you need current sensors on 2/3 of the phases minimum, not just one. However, there are advantages to having one on each of the 3 phases. – Ocanath Feb 12 '20 at 19:41
• @Ocanath you can get by with one sense resistor between the bottom of the H bridges and GND, but you need to have good control of when you read the value. This is not theoretical. I have seen it done. That is why I know it is possible. – mkeith Feb 13 '20 at 21:57
• Ah, you meant that you tie the three low-sides together to one side of the sense resistor and the other to ground. I have not personally done this before but I have seen it before in application notes/datasheets. I was confused by the wording in your answer, 'you only need to sense one of the three phases, not all three' – Ocanath Feb 13 '20 at 22:06
• Well, that is kind of true, too, if you assume that all three phases will have the same phase current, then you don't need to sample all three of them. There aren't too many reasons why the phase current would be different in the different phases. – mkeith Feb 13 '20 at 22:22
• Sure there are, if your motor is stalled. For a given phase, if you're stalled, at any given motor position you might have a high or low current. If you only have one current sensor on only one phase, how would you know? Doing one phase works OK if you're trying to estimate motor current while it's spinning, but not if it's exerting torque at 0 speed. – Ocanath Feb 13 '20 at 22:29