Skip to main content
Associate II
July 4, 2024
Question

STM Motor Control 6.3 - current sensing issue

  • July 4, 2024
  • 4 replies
  • 5158 views

Hello Community,

I have a problem with the STM Motor Control Workbench 6.3. I have hardware for FOC motor control. For the current measurement, I am using three shunts with differential current measurement, integrated op-amps, and an external resistor network for the gain. I tried to configure this hardware with the STM Board Designer, especially the current sensing:

 

board_designer.PNG

 

The creation of the board is fine, but when trying to open it in Motor Control Workbench, I get this error message:

error_message.PNG

 

  • Motor Control: MC Workbench 6.3
  • Microcontroller: STSPIN32G4

The board file is attached.

Has anyone else encountered the same issue?

Best regards,

Steffen

 

 

 

    4 replies

    cedric H
    Technical Moderator
    July 5, 2024

    Hello Steffen,

    Please attach your board description (as a Zip to pass policy security) and also the log file mentioned in your screenshot.

    Thanks

    Cedric

    kapsAuthor
    Associate II
    July 5, 2024

    Hello Cedric,

    I attached it as .7z (.zip is not possible).

    Steffen

    Associate II
    July 17, 2024

    I have a similar problem, the MC Workbench version is the same. If I take the Evalboard EVSPIN32G4 board and would like to set "Current Sensing" - "Sensing Type" to Differential, I do not have this option, despite the fact that the EVSPIN32G4 board has such functionality in the configuration - it is configured.

    Associate II
    July 17, 2024

    It is possible to configure the Single Ended mode, working with only two operational amplifiers, although three are used in the EVSPIN32G4 diagram.

    Visitor II
    July 22, 2024

    I've the problems already described too.

    Single ended option only

    only two op-amp selectable

    and the Motor Control Workbench (version 6.3) returns the "

    Errors
    • RCSConnect: ThreeShunt_RawCurrents_Differential_InternalGain Global NO OPAMP for Phase V

    I'm using the EVSPIN32G4 board definition

     

    Please see attached screenshots for details

     

    Visitor II
    October 16, 2024

    We are facing the exact same problem even with the newest version of MCSDK (6.3.1) Is there any solution or statement on this? I checked the EVSPIN32G4 several times in the Board Designer and the pins are correct in regard to the schematic. 

    What can be a solution here to get three shunt current sensing without this error? Is this a problem with the MCSDK?

     

    Best regards

    Lukas

     

    cedric H
    Technical Moderator
    October 16, 2024

    Hi all,

    Our current sensing implementation with 2 ADCs for the STO-PLL or STO-CORDIC requires that at least one phase is connected simultaneously to 2 ADCs. It allows to be able to sample 2 phases in the same clock cycle. This is what we call the shared phase. When we use amplified current, the dynamic switch is done at ADC level. When we use OPAMP, we switch at OPAMP level. 

    In the case of EVSPIN32G4, the OPAMP output does not allow to fulfill the condition of the shared phase at ADC level. 

    The option that remains is to use 2 OPAMPs, but in this case, it is not a true differential schematic anymore because we can switch only the high side of the shunt from one phase to another one and not the low side. That's why the only working option is to use the ThreeShunt_RawCurrents_SingleEnded_ExternalGain. 

    Regards

    Cedric

    Visitor II
    October 18, 2024

    Thank you very much for your reply,

    That makes sense. 

    Two short questions in this regard:

    1: What needs to be changed in the hardware using the example of EVSPIN32G4? Which resistors need to be replaced or not placed to use ThreeShunt_RawCurrents_SingleEnded_ExternalGain? Should R47, R48 and R49 be removed?

    luki_10_0-1729244945479.png

    2: How is the Offset Network Attenuation calculated?

    luki_10_1-1729245024849.png

    Best regards

     

    Lukas