Wiring INA3221 for Current Sensing in Custom Drone ESC

Hi everyone ! :grin:

I’m building a custom ESC (Electronic Speed Controller) for a drone project and I’m hoping to get some feedback on using the INA3221 chip for current sensing. I’m particularly stuck on the wiring configuration for the shunt resistors on the software EasyEDA.

According to the INA3221 datasheet, the recommended connection is on the high side of the motor phases. However, I’m interested in getting individual current readings from each phase for better control and monitoring.

Here’s my question:

  • is it possible for a three-phase to get current sensing on a drone ESC using the INA3221? Should I place the shunt resistors in line with each motor phase like here :

    Or follow the datasheet’s recommendation of high-side connection?

While the high-side connection seems more straightforward, I’m unsure if it would limit my ability to measure individual phase currents.

Any advice or insights from the community would be greatly appreciated! Perhaps someone has experience with a similar setup or can explain the advantages and disadvantages of each approach in the context of a drone ESC.

Thanks in advance!

Additional Information:

Motor type : Brushless DC - 5010-750 kv Motors

MCU : STM32F103C8T6
Drivers : L6387E

I’m looking forward to hearing from the community and learning the best way to approach this current sensing challenge for my custom drone ESC.

Here is the full schematic :

Hi @Nayel_Khouatra , welcome to SimpleFOC!

We discussed your question on Discord… INA3221 isn’t suitable for SimpleFOC unfortunately.

1 Like

Hi @runger ,

Yes thank you for you patience and sorry for the inconvenience.

Best regards,
Nayel

Perhaps a little side comment. F103 doesn’t have the processing power to spin a motor fast enough for a drone. Using SimpleFOC as “drone firmware” is perhaps very optimistic.

In addition, I see other purely low level design related problems with your schematics. It may be beneficial you look first at what others have done for drone ESCs, especially the control protocols, unless you plan on building your own entirely original drone technology stack, which is extremely bold and admirable. In short, the way you have done it won’t work at all with SimpleFOC even for a simple open loop motor spin, let alone closed loop drone control.

Unless I am missing the point entirely and have no idea what your end goal is, in that case, please ignore my musings.

Cheers,
Valentine

1 Like

You’re certainly right, Valentine, and we’re discussing the design in more depth in Discord at the moment :slight_smile:

1 Like

His pinout mappings, capacitors, resistors, some component selections, and in general the whole design is way off, he needs a lot of work to even get to something that won’t blow up when connected to power, let alone spinning a motor.

I’m really busy atm, so can’t spend more time on this.

Cheers,
Valentine

PS @runger which channel on discord?

1 Like

it’s in the #current-sensing channel…

Fully agree, but in the OP’s defence he did say the layout work was not yet completed.

1 Like

Hi @Valentine :grin:!

Thank you very much for your insight!

Do you have any suggestions for a good MCU to use for a drone? Additionally, if possible, could you point out some references or examples of ESC designs from others who utilize the SimpleFOC library?

We would love for you to join us on Discord on the current sense section; your presence would be greatly appreciated!

Best regards,
Nayel