Phase current sensing problems
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-12 12:22 AM
I am measuring the phase current signal, in between i see sudden spikes and the motor halts. I am testing at 60V battery input. It is hall based system and FOC.
It is a custom board and i have not configured the motor pilot, 2 questions if you can answer it will be helpful
a. If i am reading the phase currents at the middle of the low side pwm then it shall be consistently reading the same value but why suddenly it reads invalid value i do not understand i mean the spike.
b. If it is low inductance value should i mandatorily switch at 20KHz at present i am doing at 15KHz. What best i can do to identify the root cause.
Please advise based on the inputs i can move forward.
Solved! Go to Solution.
- Labels:
-
FOC
-
MC Workbench
-
STM32 Motor Control
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 7:29 AM
To Bring up a new board, the first advice I have is to enable the Motor Pilot support with the data log support, and enable the open loop support.
Runing your motor in open loop will allow you to check the quality of your current sensing.
This is fully described in the documentation accessible from the workbench :
Did you start from a schematic provided by ST ?
Regards
Cedric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-12 6:36 AM
Please help me for recommendation of current sensing filtering i have to for low side current sensing, i assume it is low pass filter and if i am switching at 15KHz and max rpm is 700 and number of poles is 23. The output from the shunt resistor is connected with the internal opamp of STM32G4 controller.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-12 8:47 AM
Hello @STuser2,
For Phase current sampling strategy, refer to User Manual documentation available through "Workbench tool">About>Documentations>Documentation>"User manual" tab, "Current sampling" link.
Best regards.
GMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-12 9:40 PM
I have made the following changes in the code
#define MAX_MODULE 15000
so the maximum voltage applied is 15000/32767*60V = 27.4 V
The switching frequency i have reduced to 10KHz from 15KHz
i have noticed improvement and the motor is running but some issues still bother me
a. In between there are current spikes and there is audible noise for motor when this happens, i know it is invalid switching. I took the cube monitor data the same is observed. How do i resolve this issue?
b. What will be the impact of the PWM change i have done. I dont here any audible noise at 10KHz. Can i continue with it? Please advise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 5:44 AM
Hello @STuser2,
As stated in the following post: How to write a Motor control post to get a respons... - STMicroelectronics Community
Could you at least tell us if you use the MCSDK and if yes, which version.
Regards
Cedric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 6:58 AM
Thanks for the reply, i started with 6.2.0 MCSDK and keep checking for the updates on MCSDK and if i find anything new i am adding without affecting the overall functionality but i can say not major changes MCSDK base version is 6.2.0 what i used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 7:29 AM
To Bring up a new board, the first advice I have is to enable the Motor Pilot support with the data log support, and enable the open loop support.
Runing your motor in open loop will allow you to check the quality of your current sensing.
This is fully described in the documentation accessible from the workbench :
Did you start from a schematic provided by ST ?
Regards
Cedric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-06-13 8:39 AM
Yes i have started with the schematic of B-G431B-ESC1 kit but making necessary changes as required for the application. I feel some issues with respect to current sensing i will try to increase the shunt resistor and see for improvements. At present i have 2.2 mOhm and 2.2mOhm in parallel, i will remove one 2.2mOhm and check it.
I have enabled the open loop voltage mode, the biggest concern i find in open loop is the motor runs at very slow speed but most of the issues observed are at high speed. But thank you for the advice i try improving the current sensing hardware.
