I am working on a self balancing vehicle project, similar to Segways. In order for the vehicle to self balance the bldc motors need to switch rotation direction quickly. Is there a way to switch rotation direction using purely Arduino code? I am using an MPU-6050 IMU, 36V 350W ESC normally used for e-bikes, and 36V 350W bldc motors normally used for Hoverboards.
The ESC I am using:
The bldc motors I am using:
I have seen videos using a relay to switch two of the three phase wires to switch rotation direction, but that method seems too slow for a self balancing vehicle.
Two things - with a hall-sensored motor the right ESC will be able to drive it at high torque at low speed
or stationary - this is essential for your project, a motor without hall sensors or an ESC without support for
them is no use. And clearly you need an ESC that doesn't stop you from rapid reversal of drive - an e-bike
controller is not going to work for this project I suspect as then specifically prevent rapid switching of
direction at high torque for obvious safety reasons.
You need an agnostic controller that isn't going to be implementing application-specific restrictions on
behaviour - just input or inputs controlling torque/speed/power and direction. Torque control is the most
flexible for creating what is in effect a home-brew servomotor, but that requires a motor controller with
current sensing and control loops built in.