Has anyone got any expereince or tips for driving two separate motors, but directly connected to each other? I have an application where two motors are needed to meet the required torque, as one single larger motor does not fit within the required space, and two are needed to balance the CoG of the system.
I’ve used SimpleFOC a lot with multiple motors (using the same or separate drivers/MCUs) but always indepedant motors that aren’t directly mechanically connected to each other to drive the same load.
Aside from making sure the motors are identical and specifying the sensor offset and direction before initFOC(), I assume the main consideration is to ensure that the position of both sensors/drivers matches (or the difference is known) so that there is minimal ‘fighting’ between the two motors, and that they are driven in the same mode and direction synced as closely as possible.
For motor drivers that can control more than one motor, is there a way to link one sensor to both motors, or an existing reccomended way to control two motors that are mechanically connected to each other to drive the same load?
Are the motors facing opposite directions? If not, then then probably the easiest solution would be to orient them identically, so you can use a single BLDCMotor and two drivers. After calling loopFOC, call driver2.setPwm(motor.Ua, motor.Ub, motor.Uc);
If they are facing opposite directions, then the sensor direction will be opposite, so each will need its own BLDCMotor. I think you could safely link the same sensor object to both motors. Both will call sensor->update(), but I don’t think it will do any harm aside from wasting a bit of time.
I’d start by running one motor while the other is disconnected. Once you get that running well, disconnect it and set up the other motor. Then try running them together in torque control mode, and finetune the zero angles until current consumption is minimized.
Separate velocity PIDs would probably fight eachother nomatter what, so if the final application uses velocity or angle mode, it would probably be better to only call motor.move on one of the two, and then copy current_sp, voltage.q, voltage.d to the other motor and call loopFOC on both.
Yes. Make sure to swap one of the phases on one to reverse direction if they are facing each other. You can attach as many as you want on a shaft, but the resistance obviously will drop in parallel. Sensoring is a bitch though, mechanically speaking. Also the connection must be mechanically absolutely rigid, no flex or slip.
The setup above is a dual reduced driver capable of about 2kg-m stall torque (2000 N-cm).
Cheers,
Valentine
1 Like