SimpleFOC stepstick

Stepstick MAX is fully assembled now. STM32 is running fine, but I haven’t gotten the driver to run yet. The charge pump pin shows a 100KHz square wave, so it is awake, but fault pin reads 0 despite the pullup resistor, so it’s not happy about something. According to the datasheet, the fault conditions are thermal (above 165C), undervoltage (VM below 4V) and overcurrent. But everything is cool, VM is 7.5V from my usual 2S lipo, and I can’t measure any shorts between the output pins and VM or ground or eachother. I also double checked that fault isn’t shorted to ground. No clue what’s wrong.


While testing on a Gooser4 the other day, I made a dirt cheap magnetic encoder for my NEMA23 steppers using a 3x4mm cylindrical magnet, two 49E linear halls and some 3D printed bits. It only clicks into some holes in the motor by friction, but stays on surprisingly well, and I’ll give it some hot glue for extra security. These motors run cool, so no worries about it melting.


So far I’ve gotten it to hold within ±1/800 of a revolution while harassing it, using some fancy lookup table calibration and direct angle PID without cascaded velocity PID. That’s ±5 micrometers with the 4mm ballscrews on my CNC, so maybe good enough, but hopefully I can improve it further.

Success! I never was able to measure any shorts, but I decided to try reflowing it again just for the heck of it, and it worked. Connectors are a bit melted now, but that’s ok.

I had given up on my closed-loop CNC project due to the wires running between the RP2350 brain and the motor driver step pins picking up noise and causing spurious step interrupts, but stepstick can plug into my original GRBL board which should hopefully have better grounding.

I have to use HybridStepperMotor with 3 channels for now due to my incorrect choice of timer channels (can either use two complementary pairs or three non-complementary channels, whereas StepperMotor needs four non-complementary). I could write some code for the dual complementary stepper scheme I had in mind, but since I only spent a few bucks on bare boards I’ll probably just order the new version I made with the proper arrangement. And the old ones are still perfectly usable for 3-phase brushless motors.

1 Like