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\$
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\$
  • \$\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\$ – Brock Harris May 21 '18 at 16:15
0
\$\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\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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