2018-05-23 07:57 AM
Hello,
I am working on running a 250W Hub motor with the following setup:
STM32F446 Nucleo
X-NUCLEO-IHM08M1
3 Hall sensors
unfortunately the Motor Profiler fails to profile the motor I am using and so I measured and entered all Parameters - as good as I could - manually into the Motor control workbench.
Now when I try to start the motor with the Monitor in Workbench, I usually get a short movement of the motor which stops abruptly with an over current fault. This seems technically impossible as I use a power supply limited to 3A, while my current limit in ST software is set to 10A. Sometimes the fault doesn't appear but the motor makes squeaking noise and draws around 0.5-1A from the supply.
Does anyone have an idea what my fault could be?
Maybe wrong motor parameters? Or a fault related to the current sensor?
Many Thanks,
#motor-control-mcsdk5.0.3-mcsdk-foc-hall-sensored2018-05-29 06:53 AM
I managed to get the motor profiled by taking it out of its case (it had integrated planetary gears in the hub). The Motor profiler could also perfectly spin it in both directions. Now back with MCSDK 5.0.3 and the settings from the profiler I keep getting over current faults.
When turning the voltage down from 25-42 to around 10-20V, The motor sometimes spins, sometimes squaks, and sometimes just stalls the motor in one position.
Any clues, where this comes from?
Many thanks,
Martin
2018-05-29 07:59 AM
One more thing: When the motor was spinning, the Motor Control Workbench still showed Speed=0
2018-06-03 06:52 PM
Martin, how did you get the F446RE working in Motor Profiler?
I can get WB to generate code for the F446RE/IHM08M1 but the code will not turn the motor. In fact I cant get any code to work for this board combo. The 6-step test code will start the motor and it ramps up slowly then eventually gives up at some high speed and just starts cogging. The FOC code does nothing but trip out on a speed error, no matter what I build the code from.
The only code that works is the 6-step test code for the SPIN3202. This runs the motor fine with speed control from the pot.
The pity is that I purchased the F446RE/IHM08M1 because ST documentation says the F446RE is supported in WB and one would naturally expect support in MP.
Attempting to add the F446RE to MP, any changes I make to the configuration files do not appear in the application, and it seems I need a precompiled hex file for this combo too.
Any help appreciated.
2018-06-05 01:31 AM
I used the F303 for profiling. Made the same assumptions as you and then ordered an extra board after realizing only very few boards are supported by motor profiler.
2018-06-06 01:40 AM
I realized that the Motor Profiler does a really lousy job.
When profiling the same motor multiple times in a row it gives many different values for the motor parameters.
Electrical values only change slightly with the worst change in inductance: 0.4-0.7mH
The mechanical values change a lot:
Friction between 1 and 44 uNms
Inertia between 17 and 416 uNms²
The program already warns that it's optimized for motors with resistance >1Ohm and inductance >1mH and that for my motor the measurements could be 'not strictly accurate' but I didn't expect it to be that bad... Has anyone else experienced this?
When going into play mode after profiling I could see pretty clear that all the profiled values had their flaws since the motor response was one out of the following three:
- motor turns faster than the input. When going to 0 speed I get a speed feedback error.
- motor speed oscillates around the input value for a few seconds before reaching a state with less than 20rpm oscillation.
- motor revs up super fast and triggers over current and speed feedback faults.
And about configuration of the power board: The instructions say to remove Jumpers JP1 and JP2. But if I do so, profiling fails with the motor only twitching a bit. With them in place I get the above mentioned results. Maybe a ST engineer wants to look over the configuration and see if there's any more flaws?
2018-06-06 07:57 AM
After dismounting C3,5,7 I get more consistent results for mechanical values.This should probably go into the configuration of the board. Before profiling your motor prepare your board for FOC as mentioned in one of the manuals. Don't just follow the steps ST provides
2018-06-06 08:06 PM
Martin, I finally got my motor working thanks to this thread and ideas from you. I am using an 'el cheapo' Chinese motor because I don't want to fry my expensive motors. The ultimate application is for 3 to 5kW 42V specialized UAV motor using FOC for a research project. The test motor is an A2212 14 pole 1000KV. It is made for trapezoidal control but nothing is perfect and should work with FOC (which it does).
On the IHM08M1 I have JP1 and JP2 ON, JP9 OFF, JP3 ON, J5 and J6 in 3SH position.
The control board is set to Nucleo F446RE. I create the project using WB and build under Eclipse.
I had to change a lot of things. The default startup parameters do not work. The FAQs offer solutions to this, once you have found them. The default DIO ports are incorrect and need to be changed to suit the board. Other small changes need to be made too.
The motor runs, but not as well as I expected. Startup still takes longer than using 6-step. Minimum speed is higher than 6-step at which it stops and raises a speed error. There seems to be more vibration also which is speed dependent, ie. there are speed ranges where vibration is felt. I replace the cheap bearings with precision bearings which did not help and my next task is to balance the rotor. At slow speed the speed tracking is unreliable and there is much hunting. Playing with pid terms changes this but I cannot optimize it. Auto-restart seem to do nothing.
Ultimately I would like to see the same performance as commercial 6-step controllers for UAV use, ie. start/stop on demand, braking options, auto restart after a forced stop, etc. in addition to the smooth operation and rapid speed response promised by FOC control.
The Motor Profiler will not work with this combination at all - pity.
This was not the smooth introduction to MCSDK that I was expecting. If I had not invested much time and effort into studying 5000 pages of F4 documentation I may have quit and moved to another platform. It took a long time just to get the motor to run at all.
For sure I can write the code to do the other things I want to evaluate, but first I have to learn the inner workings of the SDK, get the simple app working, then find the time, and this is not my research project, just part of it. Test apps that do more than just run the motor and stop as soon as they are unhappy don't cut it. Developers need test apps that cover more complex functionality, that they can build on to properly evaluate the product for their purpose. We really do not have the time to become expert ST motor control engineers merely to ascertain whether the product is our proper solution.
I will keep working with this and post anything I find out here.
2018-06-11 08:18 AM
John! Glad to hear that this thread helped you.
Do you remember which DIO pins were configured in the wrong way? I thought I checked them all but still don't get the desired results when using the F446RE. With the F303RE it seems to work quite fine so a wrong pin configuration seems likely.
Also which FAQs exactly helped you?
Martin
2021-06-27 06:25 PM
The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK).
Best regards