Adding current sesining to simple foc mini

Hey,
I’m using a simple foc mini boards to control 4 bldc gimbal motors (gm 4108) with teensy 4.1. A fairly precise torque control is important so I wanted to add current sensing, but I’m rather green when in comes to designing electronic circuits so I’d appreciate some help, I came up with 2 solutions I’d like feedback on, though if you know of any better ones I’m open to suggestions:

  • ACS712: widely available on breakout boards hall effect sensor, would be very easy to use but offers lower accuracy and slower bandwidth, the 5 micro seconds rise time also seems like it could cause problems.
  • INA4181 with some cheap shunt resistor connected inline: would be more difficult to use but seems to offer much better accuracy. I’m also somewhat unclear on the bi-directionality of the sensor, to my understanding If I power the sensor with 5 volts I should set the reference voltage to 2.5 V and know that at 0A the output of the sensor will be 2.5 .

My gut is telling me to go with INA4181, that way I could buy 2 ICs and 8 shunt resistors and measure 2 phases of each motor. The way I think it should be set up is having both ICs powered by 3.3V and set the reference to 3.3/2 using a voltage divider (is a simple voltage divider enough here?) and put the shunt resistors between the board motor phase output and the motor phase input.
Is my thinking correct? Sorry for any obvious mistakes I’ve made and thanks in advance.

Hey @Gingerbread,

The latency is definitely there, but in my experience, especially with gimbal motors its almost negligible. Where I can see the most if I set the torque to 0Amps, then I feel a bit more resistance with the ams712 then I do with ina240 for exmaple. This is mostly due to the lag of the sensor.

But I’ve not really seen any difference when it comes to the performance of the motion control.

Also, in terms of the precision, I did not really have much issues with the acs712, but yeah it is much less flexible than a regular current sense amp with a well chosen shunt.

It all depends on your use case, and how precise you need it to be. :slight_smile: