cancel
Showing results for 
Search instead for 
Did you mean: 

EVSPIN32F02Q1S1 Incorrect Current Sense Gain on MC Workbench

dsturn
Associate

Hi there,

I am having issues spinning a BLDC motor using the EVSPIN32F02Q1S1 development kit, and after searching through the data brief and cross referencing the schematics with the values populated in MC Workbench, I found a discrepancy in the current sense gain.

In the image taken below of the Current Sensing tab from MC Workbench, the current sense gain is hardcoded to 3.33, and it cannot be changed. I am using MC Workbench version 6.1.2, and have imported the EVSPIN32F02Q1S1 board settings from MC Workbench.

dsturn_2-1695748614651.png

In this next image, taken from page 4 of the EVSPIN32F02Q1S1 databrief, if I am understanding correctly, the gain is simply the non-inverting op amp gain of 10k/3k+1 = 4.33, so it seems like MC workbench forgot to account for the +1.

dsturn_6-1695748778938.png

I tried manually going into the .ioc file and changing the gain to 4.33 but that didn't solve my issue, so I am still testing out other things to get the motor spinning, which I will likely make a separate post for if I am unsuccessful. Is this gain discrepancy a bug in MC Workbench?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Zied b.
ST Employee

Here is attached the calculations made for the gain, it seems correct, what is displayed on the WB is the Overall Gain which is 3.3:

Ziedb_0-1695803460505.png
I still have an idea of ​​a solution for your problem, it seems that you need to mount these 2 resistors to make FOC, and set them to 20k.

Ziedb_1-1695803637699.png

I also suggest this post which offers some solutions: Getting past Under voltage fault to start motor wi... - STMicroelectronics Community

Regards

If you agree with my answer, please accept it by clicking on "Accept as solution".

View solution in original post

3 REPLIES 3
Zied b.
ST Employee

Here is attached the calculations made for the gain, it seems correct, what is displayed on the WB is the Overall Gain which is 3.3:

Ziedb_0-1695803460505.png
I still have an idea of ​​a solution for your problem, it seems that you need to mount these 2 resistors to make FOC, and set them to 20k.

Ziedb_1-1695803637699.png

I also suggest this post which offers some solutions: Getting past Under voltage fault to start motor wi... - STMicroelectronics Community

Regards

If you agree with my answer, please accept it by clicking on "Accept as solution".
Cristiana SCARAMEL
ST Employee

Hello @dsturn ,

The Gain showed by MC Workbench is the overall gain of the amplification, considering the offset network attenuation and the "Non-inverting" amplifier.

In this case, the non-inverting amplifier gain is 4.33 (calculated by adding 1 to the ratio R52/R55). Since FOC needs to have the OpAmp output polarized at the middle of the supply voltage when current in the shunt is zero (1.65 V if VDD = 3.3 V), the MC Workbench takes this into account by adding two resistors of 20 kohm in position R39 and R104 (as report by above by @Zied b.).

This configuration has the effect to attenuate the input signal by a factor of (R39//R104)/( R39//R104 + R41) which is 0.77 --> 0.77 times 4.33 gives 3.33, which is the actual overall gain of the amplification.

In MC Workbench 6.1 there is no mention to this modification, while the modification is mentioned in version 6.2 when generating the project.

Thank you for reporting, a specific note will be added to the user manual to highlight this aspect.

If you feel a post has answered your question, please click "Accept as Solution"

Hi everyone, thank you for the information! I soldered the 20k resistors on and the motor spun as expected! Appreciate the help!