Hello, I am very beginner on this area of programming.
I am wondering if I can use SimpleFOC on my bldc (DJI M3508) that are connected to MCP2515 through CAN communication via it’s specific speed controller (DJI C620). The datasheet did mentioned that it supported FOC, but I just can’t past on how to use the SimpleFOC using the BLDCDriver3PWM when I am using a CAN ?
I am sorry if the question sounds funny, but I just can’t wrap the concept inside my head.
CAN bus communications are not directly supported by the SimpleFOC library, but you can find many threads on the forum from people who have made developments to handle CAN bus communication using different microcontrollers.
The C620 is already a fully finished ESC with its own software running FOC. You don’t need SimpleFOC for this ESC board, and it’s also not clear if it is open, and you could replace the software on it.
So to use this board you just need CAN communications to send it commands. You don’t need SimpleFOC or the BLDCDriver3PWM.
Note the C620 also has. PWM interface, so you can drive it with a PWM signal. You could use a standard RC-Receiver, probably, or use another MCU and the analogWrite() function to set a speed on the ESC.
Does that mean rather than to have it in my code, I just need to configure it through its software ? I do know that C620 gives option to control through CAN or PWM (but cannot use both at the same time). I am coming from a pure programming background, so I thought that FOC is a thing that you need to program ?
The FOC runs on the motor driver, in this case the C620… so if you want to program the motor control yourself, you need to use a different driver, or get your own software onto the C620.
If you’re happy with the FOC performance of the C620’s native software, you just need to configure it via CAN, and use it via CAN or PWM. In this case you don’t have to worry about the motor control yourself. You just set a speed.
Understood, seems like there is not much of choice there. Thank you for the explanation, it’s hard to play with M3508 + C620 since the documentation is very limited and the community itself is mostly from China region.