Self-balancing robot with brushless motor

Hi, I'm new on the forum, I've searched everywhere a solution to build a robot with a brushless motor. I also saw here on the forum, but in previous threads there is no conclusion.

I want to use a MPU6050 sensor to control the balance and a Bluetooth Serial Controller APP or remote RC to make the remote control.

My main problem is to write the program to control the esc through the sensors because i have just started to program arduino.

Sorry for my english and any errors :smiley:

Hey, what do you mean with "handle the esc" ?

hauken_heyken@hotmail.com:
Hey, what do you mean with "handle the esc" ?

Sorry, control the esc...

Using an unsensored BLDC is going to be problematic. ESCs don't handle high torque/low speed with unsensored
motors.

I want to make a one wheel skateboard and I would like to use a powerful brushless motor like this https://it.aliexpress.com/item/Free-Shipping-Racerstar-5065-BRH5065-200KV-6-12S-Brushless-Motor-Electric-RC-Motor-With-Gear-For/32786701273.html( why that connector? Is this a sensored motor? Excuse me, but I've never used a sensored brushless motor)

Your link took me to the Italian version of the site.

Same item on the global site so the description is in english.

So, it is sensor-ed.
I wish aliexpress would also include a recommended ESC.

Yes the motor is sensored - the 5-pin connector will be the 0V, 5V and 3 hall-sensor output signals.

An ESC or motor controller that supports a hall-sensored BLDC can drive that (once you've figured out
the phasing of the sensors relative to the main windings). Such a setup can deliver full torque at
stationary which is what you want for a servo-loop controlled system like a balancer.

MarkT:
Yes the motor is sensored - the 5-pin connector will be the 0V, 5V and 3 hall-sensor output signals.

An ESC or motor controller that supports a hall-sensored BLDC can drive that (once you've figured out
the phasing of the sensors relative to the main windings). Such a setup can deliver full torque at
stationary which is what you want for a servo-loop controlled system like a balancer.

arduino can control the esc with servo library, right?
Can you write a example code for loop servo balance, please?

Cosmo99:
arduino can control the esc with servo library, right?

Yes it can.

Can you write a example code for loop servo balance, please?

That is not how this forum works.
You can have others write code for you on the Gigs & collaboration forum. That is where you go to pay others to do work for you.
Here we help you with questions and problems you have with the code you wrote.

Do you have the motor?
Do you have an ESC for it? (see p.s. below)
Have you looked for code for self balancing examples on your favorite search engine?

p.s. which ESC are you using? I could not find a recommendation for this motor in my brief search attempt.

vinceherman:
Yes it can.That is not how this forum works.
You can have others write code for you on the Gigs & collaboration forum. That is where you go to pay others to do work for you.
Here we help you with questions and problems you have with the code you wrote.

Do you have the motor?
Do you have an ESC for it? (see p.s. below)
Have you looked for code for self balancing examples on your favorite search engine?

I know that this isn't a collaboration forum, but on internet I can not find a useful example for me, I will search better. I'm sorry.

vinceherman:
p.s. which ESC are you using? I could not find a recommendation for this motor in my brief search attempt.

I found this esc

or this

I do not see connections for the sensors on either of those, so I suspect that they would drive the motor like a sensorless motor.
As I understand, sensorless has less low RPM abilities that seam to make balancing applications behave better.

Note that this observation about the preference for sensored motors is only based on reading. I have never made a balancing robot.

vinceherman:
I do not see connections for the sensors on either of those, so I suspect that they would drive the motor like a sensorless motor.
As I understand, sensorless has less low RPM abilities that seam to make balancing applications behave better.

Note that this observation about the preference for sensored motors is only based on reading. I have never made a balancing robot.

In the description is write "sensored"

I've read that for reverse the motor rotation is sufficient to reverse the signal from Arduino to esc, is correct? How can I reverse the signal with Arduino?

vinceherman:
I do not see connections for the sensors on either of those, so I suspect that they would drive the motor like a sensorless motor.
As I understand, sensorless has less low RPM abilities that seam to make balancing applications behave better.

Note that this observation about the preference for sensored motors is only based on reading. I have never made a balancing robot.

Without sensors you cannot hold the motor still with closed loop control, meaning essentially no position control,
cannot balance...

However if the motor controller can get information about the position from the encoder and
translate that to output phase, you get closed loop control back again. Since you have an encoder
or tilt sensor for balancing anyway this can be done but you have to be more into the details
of motor control, you have to understand phasing a 3-phase motor for instance.

Cosmo99:
In the description is write "sensored"

I've read that for reverse the motor rotation is sufficient to reverse the signal from Arduino to esc, is correct? How can I reverse the signal with Arduino?

You need an ESC capable of driving forwards and backwards. Something designed for this application and not an ESC intended for a quadcopter. Almost any land vehicle ESC is going to have this capability, except for bike/motorbike ones.

I'm not convinced that a sensored motor is essential. Gimbals work to hold position with simple 3-phase BLDC motors without sensors. They're basically being driven like stepper motors with an extremely high microstepping ratio. They jerk when they switch on. I don't know if this is a problem for a balancing bot. If you must avoid the jerk, then there's no alternative to using a sensored motor and controller.