How to precisely control the BLDC motor speed using Arduino?

Hi guys :slight_smile: ,

Background:
My project requires me to build a customized design to spin a cylinder.

Equipment:
I have a question about controlling the BLDC motor speed using Arduino with an ESC powered by one 2S Lipo battery (7.4V nominal).

Firstly, I tried to get the motor to work by calibrating the ESC which uses the setting: neutral (1500us), full throttle (2000us) and full reverse (1000us), and it worked! Here, I use a function in the Servo library called writeMicroseconds.

However, my project doesn't require the motor to switch direction during the experiment. Therefore, I think I can re-calibrate the ESC to allocate more 'range' for one direction. However, I do notice one thing: it seems the motor doesn't react to small signal change such that if I put 1550us, the motor doesn't move. It starts to spin if I put 1600us.

If I do the math correctly, for such setting (neutral = 1500us, full throttle = 2000us, 2S Lipo = 7.4V), every 100us means 1.48V = 7.4/5. For no load condition, that means the resolution for such speed control is pretty large 1.48 * 3040~ 4499RPM

Question:
Here comes to my question:
I understand 50us is such a small number that corresponds 20k Hz. Is it possible to have a finer speed control resolution? By finer, I mean the resolution is in the order of 100RPM?

Thank you guys in advance! Your input would be greatly appreciated!

Are you running the ESC/motor in sensored mode? That's important.

You should get better resolution when you set up the ESC to run in Forward only mode. And you should be able to calibrate for a wider range of control, maybe 600 to 2400 microseconds which also might help a little.

I'm not sure that you'll get to 100rpm resolution though, certainly not at low speeds. But I've never used that motor/ESC combination so I'm only guessing.

Steve

Hi Steve,

Hope you have a great day so far!

To answer your question:

  1. Yes, I believe that the motor/ESC are running in sensored mode, because I read somewhere that the ESC I am using only works with sensored motor. I also tried to disconnect the sensor cable and the ESC doesn't work

  2. I will do the ESC re-calibration today and see if it works.

You'll have to turn off any hysteresis if the ESC has that, so it responds immediately to any change.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.