Electrical – Controlling BLDC motor with Raspberry Pi

brushless-dc-motormotor controllerraspberry pi

I'm trying to figure out how to control the speed of a 400-watt, 3000RPM, 48V BLDC with Hall sensors with a Raspberry Pi 3. I've been able to find information where people will us an ESC like this between their rPi and the motor but these seem to always be connected to small motors like airplane motors and not the one like what I have. But then I've also seen controllers like this and then also little boards like this.

I would appreciate any direction someone might be able to provide. Thanks!

Best Answer

I would tend to use an ESC of some form independent of the pi rather than trying to do the speed control itself on the pi. The board you linked to will convert a PWM signal and a digital signal to speed and direction control, and give feedback as pulse per revolution, which would allow higher level control by the pi, or you could use a serial ESC and have that loop on the ESC too. (You could do the same with the hobby ESC and connect a hall sensor to the pi for second loop control, but the hobby ESC won't be as precise and a sensored ESC can be).

What's best depends on other requirements - you won't get vector control or precise low speed operation from a cheap pre-built ESC. You can get higher voltage ESCs, but I've built mine own rather than buying them, as they tend to get more expensive, and at those sort of prices you'd be better off with an odrive. If using something like the ESC board you linked to, you'll probably need to level shift both ways to convert your PWM to the 0-5V range, or you could use a digital potentiometer or DAC instead. Instead, I've tended to create such signals from arduino nano clone and connected that via USB through an isolator, and run any PID on the arduino instead, but that's because I assume I'm going to blow thing up.

I've done this for 480W motors with a simple Arduino + three half bridge based ESC, and serial control of that from pi.