cancel
Showing results for 
Search instead for 
Did you mean: 

STM Motor Control 6.3 - current sensing issue

kaps
Associate II

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

 

 

 

9 REPLIES 9
cedric H
ST Employee

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

Hello Cedric,

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

Steffen

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.

calka
Associate

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

GuiOtt
Associate

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

 

luki_10
Associate

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

 

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

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

 

Hello Lukas,

Nothing needs to be changed. The resistor network setting the gain of the 3 OPAMPs must remain the same. The difference is internally, instead of connecting PB0 to OPAMP3 as in the schematic we connect it to OPAMP2.

2 Here is the complete equation of the current sensing including the network attenuation.

cedricH_0-1729518744748.png

Hope it helps.

Cedric