support for simpleFOC library (brushless motors)
-
FYI
I just searched forklipper simpleFOC
and there seems to be a lot of people interested in klipper supporting BLDC motors.
There is one klipper fork for open loop BLDC support, but it uses a different driver than simpleFOC.
But no official FW so far. -
What does Odrive use for their brushless motor control? I believe looking at the docs for them and Duet, they are going to be supporting Odrive
-
I guess, we will not see simpleFOC integrated in Duet3d, but I want to mention that we can also drive stepper motors with these drivers.
In open loop it can run with velocity control. A feature frequently asked on this board is infinite rotation which would be possible with sFOC.
It's also possible to communicate via serial interface to set the target velocity on the fly.
It would require post-processed gcode, though. -
@o_lampe we're doing something similar to FOC in RRF 3.5 on the Expansion 1HCL board. This type of motor control is computation-intensive unless the speeds are low, so it's best done using a dedicated or semi-dedicated processor, such as we have on the 1HCL board.
In the future we may make a board similar to the 1HCL but with bridge outputs and sensor inputs for 3-phase BLDC motors. It wouldn't be difficult to run SimpleFOC or something similar on a 1HCL board modified to provide the required hardware.
Using a BLDC motor to control an axis of a 3D printer or CNC machine requires a reduction gearbox, and to counteract backlash in the gearbox you need a second encoder. All of this usually makes it less attractive than using a stepper motor, unless the machine is very large; in which case an integrated AC servo such as Clearpath is probably more appropriate.
-
@dc42 I would also add current sensing, since that is the only way to have low power consumption, but still good starting torque.
I've played around with simpleFOC and small BLDC motors. Their torque can't compare to same size stepper motors, but the FOC algorhythm makes them run really smooth.
I will still build a screw-extruder with both motor types (hollow shaft is mandatory) and report in the appropriate thread. -
New proposal
Over at the simpleFOC forum, I started a discussion about using dual-core features of the Cortex M0 MCU ( and other dual core MCUs)
Since they don't use it yet, it is obvious, why they disencouraged me to implement their sFOC algorithm in a toolboard. There is just too much else going on to keep the FOC-loop running smooth.But if we could keep the FOC-stuff on the second core, there is plenty of headroom for CAN and temp-control a.s.o.
Does RRF use both cores on their M0-toolboards?
-
@o_lampe said in support for simpleFOC library (brushless motors):
I don't think any of the current Duet3D toolboards use a multi core mpu. Some of the 3rd party boards (like the ones from Mellow/Fly) use the rp2040 mcu (which is dual core), but on those boards the 2nd mcu is already used to handle the CAN-FD interface.
-
@gloomyandy The CAN-FD traffic is so high-demanding? What a pity...
The SAMMY-C21 MCU is dual core. Maybe they're using the second core for CAN-FD too, but IIRC it is HW-implemented...
-
@o_lampe said in support for simpleFOC library (brushless motors):
The SAMMY-C21 MCU is dual core.
Are you sure? I don't see anything that says it is dual core?
-
@gloomyandy Maybe I'm wrong? I was under the impression, all Cortex M0+ MCUs are dual core...