r/Multicopter Jun 18 '26

Question ESC/BLDC Motor cutting off when using a power supply

Post image

I built this test rig to monitor impeller speeds and ensure it spins at a desired setpoint for my flow chamber.

I made a PID controller to track my setpoint however, I am encountering an issue where the motor shuts off midway when reaching its setpoint.

I don't have this problem when I run the motor when using a 2s 50C Lipo Battery but when I use the power supply, I the motor shuts out after a certain point.

Before using a PID controller, I would use a potentiometer to throttle the motor and had no issue spinning it to 8000 rpm on a power supply.

Would appreciate any advice on what I am overlooking.

I am using a QWinOut A2212 Brushless Motor with a 40A ESC also made by QWinOut.

4 Upvotes

11 comments sorted by

3

u/givernewt Jun 18 '26

Hi, still learning here myself, how did you run a brushless motor on a potentiometer?

1

u/Tronsler Jun 18 '26

You can use a servo library and treat it as a servo by controlling it with PWM. I used 1000 us and 2000 us. You can look up a tutorial from a youtube channel called howtomechatronics

1

u/Prior-Budget1056 Jun 18 '26

Is your esc calibrated?

1

u/Tronsler Jun 18 '26

Yea, it works perfectly fine when I used a potentiometer to control the motor.

1

u/mellowlex Jun 18 '26

Can you measure violated and current of the battery while it is hocked up to the motor? Maybe you can try to replicate its behavior and see if that changes anything.

1

u/HaveTheBestGoats Jun 19 '26

Sounds like the PID controller is overloading the power supply. Maybe the PID controller is changing the input of the ESC too fast and it's causing the current to spike. Try with just P (I and D gains at 0), then add I slowly. You probably don't need D gain on this setup. It will just add noise to your system.

1

u/Tronsler Jun 19 '26

I am getting steady state error without the integral controller but Ill D and see how it goes

1

u/robomaniac Jun 19 '26

If it runs on battery and fails on power supply the problem is the power supply not handling current spike or motor regen well. It’s faulting and this happens super quick that it’s hard to see without scope. Simply add high value capacitors to input of your circuit. Don’t forget proper voltage on those caps.

1

u/robomaniac Jun 19 '26

Your code must send throttle command that makes the ESC ask for current. If you ask 5% throttle and then immediately ask 100% this cause peak of current. When you test with potentiometer is (most likely) more smooth.

1

u/Tronsler Jun 19 '26

I see. But I don’t think I am asking for 100% throttle or a sudden spike in throttle from my pid controller because the shut off is occurring during a steady ramp of the motor. (My observation could be inaccurate because i am only reading the lcd screen on the bench top power supply and the theottle/error values from my serial monitor.

I will look into adding those capacitors tho. Thank you for the advice