Before we start the instruction we would like to talk a little bit about Brushless motors here. Brushless motors inherit their names due to their internal structure of not having brushes despite simple DC motors ( Brushed DC motors), this evolution makes these motors much more versatile and reliable than DC motors in specific fields. About these motors and their structures, we will publish some articles soon.
Brushless motors are mainly categorized into two main categories:
- BLDC motors, known as BRUSHLESS DC MOTORS
- BLAC or PMSM motors, known as BRUSHLESS AC motors or PERMANENT MAGNET SYNCHRONOUS MOTORS
The mentioned categories have differences in their internal structures as well as their use cases, but here we just want to focus on how to drive them and get them into action, you have to notice that since these motors have different internal designs so their control methods will be different, but using SOLO you can drive and control both of these families.
SOLO features two methods for driving and controlling these motors:
- Open-Loop Control
- Closed-Loop Control
Don’t worry if you don’t know these fancy words! We will educate you enough about them so you would be able to get your things done, also if you don’t want to know about them just skip the next paragraph and go directly to the main topics for controlling your brushless motors in open-loop or closed-loop mode.
To give you a simple description about what is the difference between open-loop and closed-loop control, one can imagine, in Open-loop control, you just send the spinning command to the Motor without checking whether or not the motors are obeying your commands, but in closed-loop control, after sending a command ( like asking the motor to increase its speed) you keep constantly checking the motor’s speed and you make sure the speed asked has been achieved!
For a lot of people out there it might be hard to conceive the difference, but I would give you an example:
Imagine it’s late at night and you’re coming back from your friends’ party and you want to open your house door lock, but the lights are out! So how you would find where to insert the key?
You will have two options:
- The first option is you poke the key in all the possible directions until you find the proper hole, not the smartest way but it might work!
- The second option is you use your second hand, find the hole by moving it along the lock and with the other hand, you lead the key inside!
That’s the difference between open-loop control and closed-loop control in a very simple language, but also this doesn’t mean that the open-loop control is dumb! Actually most of the devices out there are using this method because it’s cheaper and easier! But of course, the Closed-Loop methods are more advanced and reliable than their Open-Loop counterparts.
But for now, we will start with open-loop control and then we will make it more interesting by going through the closed-loop control of Brushless motors, in this article we chose ARDUINO UNO as the medium between the user and SOLO, but you don’t necessarily need an ARDUINO to drive you brushless motor, you can use any control board which is able to generate PWM or Analog voltage outputs because SOLO can be commanded with all of them
As mentioned before SOLO is capable of driving and controlling various types of Brushless motors like BLDC or PMSM motors. The simplest way to control the speed of a brushless motor with SOLO is shown Below using the ARDUINO UNO module.
SOLO UNO to Arduino UNO wirings [PWM control]
SOLO MINI to Arduino UNO wirings [PWM control]
SOLO BETA to Arduino UNO wirings [PWM control]
– The “DIR” Pin is a 3.3V input, and it’s NOT 5v tolerant, to apply a 5V input you MUST use a resistor with a value between 1kΩ to 2.2kΩ, as can be seen in the diagram above.
As you can see, the configuration is very simple and all you need to do are brought to you in the following.
Open-Loop Configuration of SOLO
- Connect your BLDC or PMSM motor to pins “A”, ”B” and “C” of SOLO, The order of connection is not important and it can only affect the direction of rotation of the motor which you can control through “DIR” pin in SOLO.
- Connect pin number “3” and “5” of ARDUINO (or any other pins which are capable of generating PWM) to pins named “SP/TR” and “PW/FLX” of SOLO respectively.
- Provide the +5V supply to your ARDUINO module from “+5V” and “GND” pins of SOLO
- Connect a generic digital output pin from ARDUINO ( in this case pin “7” of ARDUINO) to the “DIR” pin of SOLO for controlling the direction of rotation of your brushless motor.
- Push “P5” switch in the Piano switch of SOLO to “UP” position to go to Open loop
- Depending on the type of your Brushless motor put switches “P1” and “P2” in PIANO Switch of SOLO in one of the following conditions:
- Motor Type: Normal Brushless Motors ( nominal speed < 8000 RPM) then “P1” Position DOWN and “P2” Position UP
- Motor Type:Ultra-Fast Brushless motors ( nominal speed > 8000 RPM) then “P1” Position UP and “P2” Position UP
In the table above “Ultra-Fast Brushless motors” is referring typically to small-sized motors for drones or hobbyists which are capable of reaching up to 50000rpm.In the case of the selection of Ultra-Fast mode, SOLO will operate with a switching frequency of 80kHz, which in the case of Normal mode the switching frequency of SOLO will be 20kHz.
- Supply SOLO with your external power supply depending on the recommended voltage for your Motor. SOLO can support any input supply voltages from +8V to +59V with an output current of 32A (max 100A).
Now you have set all the wirings correctly, and SOLO will be ready to get commands and run your motor, Now you need to send the Speed, Power, and Direction commands to SOLO as below.
Controlling the Speed of Rotation
To control the speed of rotation of your Brushless motor using SOLO in this mode, you need to apply two PWM pulses with a fixed frequency (anything from 5kHz to 100kHz is fine) and the desired Duty-Cycle to “S/T” and “P/F” inputs of SOLO to change speed and power of the motors. So in simple language by controlling the Duty-Cycle of your pulses you will be able to command to SOLO to increase or decrease the speed or power of your motor as can be seen here:
As you can see in IMG3, while the frequency of PWM pulses are all the same, the Duty-Cycle of the pulses is different.
The mentioned two inputs for SOLO functioning as below:
- “S/T” input is in charge of receiving the speed command, so for duty-cycle of 0% your motor will be stopped and with duty-cycle of 100% of the input pulse, your motor will be moving with its maximum speed.
- “P/F” input is in charge of defining the maximum power to your motor and as a result the amount of power consumption from your batteries. so you need to send a PWM pulse with fixed frequency and fixed duty cycle to this input. To find the best value for your motor you need to try different combinations. For example, you can start with duty-cycle of 30% and try to increase the speed, if the power is enough you can go all the way up to your maximum speed, otherwise, you need to increase the duty cycle of “P/F” to increase the power of the motor.
Controlling the Direction of Rotation
as mentioned above the “DIR” pin in SOLO is for defining the direction of rotation of your motor, So by using ARDUINO for instance if you give to “DIR” pin 0V (logic 0) it will rotate in one direction and if you change it to +5V (logic 1) your motor will reverse its direction.
In the following there’s a tutorial aiming to guide you fully through your experience with running your brushless motor with ARDUINO using SOLO:
Read more about SOLO ARDUINO Environment Here.