2023-09-26 10:32 AM
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.
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.
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?
Solved! Go to Solution.
2023-09-27 01:41 AM - edited 2023-09-27 01:44 AM
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:
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.
I also suggest this post which offers some solutions: Getting past Under voltage fault to start motor wi... - STMicroelectronics Community
Regards
2023-09-27 01:41 AM - edited 2023-09-27 01:44 AM
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:
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.
I also suggest this post which offers some solutions: Getting past Under voltage fault to start motor wi... - STMicroelectronics Community
Regards
2023-10-03 05:53 AM
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.
2023-10-11 08:43 AM
Hi everyone, thank you for the information! I soldered the 20k resistors on and the motor spun as expected! Appreciate the help!