I found this project and community yesterday while exploring ways to improve my cnc setups. I have ordered a Nucleo-64 board and some high-power pololu stepper drivers that should deal OK with driving some steppers at 4.5A/48V, to have a play. I have a couple of cnc machines using steppers that run normal open-loop style and one that uses the hbs86h closed-loop driver/stepper/encoder system; all controlled by linuxcnc.
It seems to me that FOC allows us to convert a stepper motor to a very inexpensive servo system by adding an encoder and changing the control method; this would be an amazing upgrade to be able to do at such a low cost. I think the hbs86h use FOC, but they are a nightmare to tune as the software is proprietary, mostly in Chinese, runs only on Windows and doesn’t work for all of the drivers.
Can anyone recommend the best way to interface a SimpleFOC system with Linuxcnc? The easiest by far for me would be step/dir interface, requiring minimal extra hardware and making it a true modular drop-in replacement - using existing parallel port & breakout boards, and existing stepper motors, basically just having to replace the stepper driver. ODrive does this for BLDC motors, where you can set up the drive over serial link to interpret a step pulse as a position setpoint, and have lcnc drive it as in position or velocity mode as needed.
Basically I’m hoping there’s a way to drive a SimpleFOC system using a pulsestream. Is this possible, or is there only interest in a serial interface? Setup and tuning over serial is fine as there’s no realtime requirement, but the motion control would need to be a pulsestream.
Would it work to read a step input pin during the arduino main loop? Has anyone tried this, or implemented it?
Thanks in advance for any help!