I decided to tell "the whole world" about the problem I encountered when building my project, and how I managed to solve it.
And today we will talk about brushless motors, stroke controllers and how to control them.
What is a brushless motor, I will not paint for a long time (you can see the Wiki yourself), but in 2 words, this is a 3-phase DC motor.
And this miracle is set in motion thanks to a special regulator, which sequentially switches the windings with a certain frequency.
By controlling the switching frequency of the windings we control the speed of rotation of the rotor.
Well, I hope everything is understood here, we go further.
First problems
Were purchased 2 sets of engine + regulator, waited about a month, came.
')
I was seized by an attack of unbridled fun about this, but, unfortunately, it was not for long ...
Having considered these wonders of technology, I decided to connect them to a power source, and then the first disappointment, quiet clap (as from short-circuits) and silence, the LEDs are off, there is no squeak (and it should be), only the cooler on the regulator turns, the trouble is ...
He ran to the nearest Hobby store, and the kind consultant delivered a verdict: burned out!
With the second the same story, in general, guys, no luck, both defective ...
Well, at least the cat was glad:
I had to fork out and buy a regulator from them for the price of both sets (deadlines were pressed).
I bought it, hooked it up, everything squeaks, it burns, it works, it’s right that the soul is happy! (it is highlighted in the photo):
Problem number two
Now it's time to turn the engine.
And you need to twist not with a servo tester or a radio control unit, but with a microcontroller, or rather with such a handkerchief:
Shoveling tons of sites, rereading hundreds of forums and answers to my question, so how do I manage to manage this regulator only one thing: "... man and there is a simple PWM ...", "... PWM to help you ...".
He fought for 2 days, until he came across a random post, that the controller has protection, and it starts functioning only when a 1.5 ms signal is applied to its PWM input.
Okay, that will be done.
Then I picked up an ordinary resistor through the ADC, and empirically picked up the extreme values of the PWM controller.
Now everything is spinning, noise, beeps and just happy.
PS This is the code to control 2 engines at once.
And the last problem, food ...
Here I will tell you a little, namely, 3 wires go from the regulator:
The central block, in order Black - minus, Red - plus and White - control wire .
And the snag is that, unlike servos, these are not power inputs, but outputs, i.e. eat from them.
Why am I doing this, besides the fact that having connected the controller as a servo, I almost burned the ports on the laptop, because at that time the board was powered by USB.
But fortunately, my old man's protection worked and everything worked for a restart ...