Advice on using single shunt with simplefoc library

We are able to control torque of BLDC using voltage control method using esp32 but we are experiencing jerks whilst running so if we use foc current method will the jerks get minimized and thereby achieve max torque. In our hardware design we have implemented single shunt resistor, is it advisable to proceed with single shunt resistor configuration for torque control using foc current method


Please, can you specify which BLDC controller you are using? Regarding current control, you will need at least 2 shunt resistors to control the motor. Look into SimpleFoC documents you will get all the info.


We are using basic driver IR2101 with H-bridge MOSFETS and the three mosfet pairs before connecting to common ground it is connected with a 2.5 miliohm shunt resistor

Well do check, I think IR2101 doesn’t have deadtime adjustment, that might be the reason for the jerking of the motor. Try to reduce the drive PWM frequency and check how it works. Regarding the shunt resistor, for checking the current flowing in the motor you need at least 2 shunt resistors.

Do share pic/schematics of hardware and you will find some help in the forum.


I tried reducing the PWM frequency from 10kHz and 5us(dead time) to frequency of 8kHz and deadtime to 6us still there is jerking in the motor. I speculate it is due to false switching of hall states and will the jerking be removed by using current sense. I also have attached schematics for your reference.

First, make sure your controller works as expected - make sure the gates are switched correctly and your bootstrap capacitor on ir2101 is suited for the mosfet you chose. This is probably impossible without an oscilloscope.

Second thing to check is hall sensor readings with and without powering the motor - even if it works with MCU internal pullup resistors, you should configure it with external pullups since phase currents going to the motor can create false readings.

I made ir2101 work fairly well without any current sensing, and no jerkiness and I don’t think that the right way to go further is to add additional sensing before figuring out the cause of the jerky behavior.

Hey @Waseem,

Please note also that SimpleFOC does not support single-shunt current sensing at the moment.

You will need 2 shunts for low side sensing, or at least 2 shunts for inline current sensing.