0
\$\begingroup\$

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!

\$\endgroup\$

3 Answers 3

1
\$\begingroup\$

I recommend not to control the motor directly through the Raspberries' own PWM ports because that requires tight real-time and 400W isn't forgiving if something fails with that.

It might be doable, 50 rps is just at the border of what you could do with a realtime process and one CPU core dedicated to that. Don't even think to use a Raspberry Zero, B+ or similar single-core board for that, you would need multicore.

OR you put a dedicated motor controller IC on a custom hat (I guess there are some you could simply buy) and control that one with any Raspberry or other small Linux box. That is the way I recommend.

\$\endgroup\$
1
\$\begingroup\$

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.

\$\endgroup\$
1
  • \$\begingroup\$ So it seems like the best solution is probably to go with the board and just use PWM output from the Pi into the 0-5v speed control. Which is great. However, if the Pi only outputs 3.3V then do I need to run that output through a voltage booster then to the speed control? Also, most of these boards are 12V-36V 500W. Is that just something it says but can really handle 48V or I need to find a higher voltage rated board? \$\endgroup\$ May 21, 2018 at 16:15
-1
\$\begingroup\$

I made my own sensor-ed BLDC controller from arduino ( 16Mgh single core ) and 3 power bridges. I've tested to over 7000 RPM and I'm sure it can manage a lot more then that. I'm sure the 1Ghz single core of a RPi0 is more then capable of handling your brushless motor even with the burden of may other operating system tasks.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ By itself sure, but if running Raspberry Pi OS I doubt it. If the motor has 8 poles and spins at 3000 rpm the time between commutation steps is ~833us. For smooth running that needs to be controlled within a few percent, eg. 10us. Can you guarantee that a RPi0 'with the burden of may other operating system tasks' will have a latency of less than 10us? The results of bad commutation could be disastrous. \$\endgroup\$ Sep 15, 2021 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.