AlkaM's blog View Details
Archive for December, 2017
Posted by AlkaM | Dec 13, 2017 @ 08:10 PM | 21,995 Views

Its been a while since I put up a DIY electonics blog post. I live in Canada so I try to spend my summer outdoors. This next one took me a little while to get right, I made the first revision around June of this year and made a mistake with my original schematic. I built the board and programmed it and everything seemed to work but I could not get a motor to spin up. Thinking this was a software problem I then devoted the next two months adjusting and tinkering with startup parameters and motor profile settings.. It was not a software problem. I had completely screwed up the op amp gain resistors circuit and no amount of changing settings would fix that. A sharp knife and some small wire did fix my problem and after that i was able to get a motor spinning.
I haven't tested much yet but this is a stripped down simplified version of the "steval-stspin32" demonstration board. It has the same pinout for the user keys and potentiometer and the firmware example will run on my board without much modification. I did have to play around with dead time and pwm and foc rates to make my board run and start up stable.
I used the bull running 1700 kv motor that came in another nucleo kit because the motor was already profiled. If using an unknown motor you will have to create a new profile for that motor and recompile the firmware. That's the problem with FOC. You can't just hook up an unknown motor.. and profiling a motor is not a simple thing.

I will include the gerber and diptrace files again like my other posts also a working firmware binary for the bull running 1700kv motor. There is a lot of potential for this little chip as it contains the gate drivers, voltage regulators and mcu all in one. The stspin32f0A is probably a better choice for rc as it has a wider voltage range ( down to 2s lipo).

Simple FOC speed control board using stspin32f0 (1 min 13 sec)