Motor driver current feedback

Hi, I came across simpleFoC recently and found it to be a fantastic platform!

One question I have is that I don’t see the current feedback sensing for the driver FET and am wondering whether this gonna actually achieve the optimal FoC performance.

Based on my understanding, there’s always a phase shift between the controller (MCU) generated driving voltage and the actual driving current to the motor due to motor wiring inductance. To achieve the max. efficiency FoC we need to monitor the current into motor in addition to the magnet position data to “perfectly” create the 90 degree phase offset.

But it seems to me there current sensing is not implemented in simpleFoC, both from HW and SW standpoint and we only compare the driving voltage’s phase to the motor position.

I suppose this efficiency difference gonna be small if the motor is >10ohm motor? Is removing the current sensing due to cost reduction considerations (e.g. MCU selection, # of ADC channels, etc)? Will it be implemented in any future release?

Thanks,
Jason

It is on @Antun_Skuric’s roadmap. Also I think @David_Gonzalez’s has been playing with current sensing on his janus/dagor drv83xx boards. I’m interested too.

I think I’m right in saying that current sensing works well at mid to high speeds on larger motors/higher currents. I’m not convinced it’ll work well on small gimbal motors at low speeds but I’m ready to be proven wrong!

I’m playing with a hoverboard controller (stm32 clone) that can drive two 250W motors and is wired up for current sensing. I’m a fair way from thinking about current control but might take a look in a few months.

Re. Shield. I think what your saying is that the l6234 driver has a couple of current sensing pins but they aren’t connected to the mcu. I suspct that’ll be for v2.0 version of the board!

Thanks Owen for your answers!

Yes, I am referring to the Arduino Simple FoC shield (ST L6234 driver) - the revision number is 3 from the schematic. I was curious whether the decision to short the sensing pin was due to limited arduino resource. I personally also think for low speed/small gimbal motors this would not show any big difference.

Thanks for pointing out it’s on Antun’s roadmap, I am looking forward to testing out these new libraries in the future.

Hey @spiceMonkey,

You are absolutely right with both of your claims.

  1. Simplefoc doesnt implement current sensing. This is mostly due to the fact that the library was at the beging intended for gimbal motors and the current measurement for such low currents is problematic. Not many boards implements current sensing for gimbal motors, so I decided to implement the FOC without it. This approach assumes that the current follows the voltage set to the windings blindly and that there is not inductance basically or any other coupling effects. What is in most of cases true enough.
    Another reason why I did not implement this loop was because the library was intended for Arduino UNO and its processing power doesn’t allow sample times under 1ms and that is too slow for current control loop.
    But both of those reasons are not true any more and I am definitely going to implement current control loop for the next release of the library.

  2. Arduino SimpleFOCShield doesn’t have current measurement. One of the reason is the simplicity, this board was meant to enable people to run FOC with gimbal motors and provide the minimal hardware combination possible to do so. Arguably current control loop is not needed to do it.
    The other reason is that L6234 doesn’t really support three phase current sensing but 2 and a half. It is intended for Back emf sensing not the FOC algorithm. YOu can see on the schematic that two ground pins of two phases are short-circuted. (because L6234 was meant to be used with square waves). So waht you could measure there is not three phase current but maybe a cumulative current value. This is something I want to implement with the next batch of the boards.
    This will enable the board to be torque controlled, and to limit the current.
    The last reason why it was not implemented before is because I wanted the baords to be easily manufactured by hand. I currently solder them myself. :smiley:

So in near future SimpleFOC library should support current control loop and the SimpleFOC shields will have a current measurement. :smiley:

2 Likes