How to control speed or torque of your Brushless Motor with Arduino using SOLO (closed-loop)

SOLO features outstanding options for its users and one of them is enabling them to control the speed or torque of their BLDC, PMSM, BLAC motors in a sensorless closed-loop manner with cutting edge technology of Field Oriented Control, but what’s more interesting is SOLO is probably the simplest motor controller to do FOC with! You can do FOC without even writing a single line of code! With two Potentiometers! In this article, we are going to explain how to apply FOC to your brushless motor with Arduino and SOLO. it’s highly recommended that before proceeding with this article you also check our article about how to control the speed of your brushless motors using ARDUINO and SOLO in an open-loop manner which is the simplest way to run SOLO.

If you have no technical knowledge about these terms we are mentioning like FOC or even closed-loop or open-loop control, it’s not important at all, just follow the following procedures and you’ll have your Brushless motor spinning like a charm.

With SOLO you can have either Torque or Speed control, but what are the differences?
In a simple language, the Torque control is like you want to directly control how much Torque is generated on the shaft of your motor! To simplify even more, you can imagine that The higher the Torque the more forceful your motor will spin. Torque Control is used in TRACTION units, Electric cars or Electric Scooters and so on.

On the other hand, Speed control is used when you want to control the rotational speed of the shaft of your motor! In some applications like Drones, it’s more important to have a constant speed on the propellers to keep the motion steady.

One might ask, Ok then, what’s the difference between Speed and Torque Control? Actually this is a very valid and tricky question to ask, and to answer that, we can say, the speed is a phenomenon resulted from Torque! Meaning that in electrical Motors, by injection current into the windings of your motor, you generate mechanical Torque on the shaft of your motor, now depending on the load on the shaft of the Motor and the amount of generated Torque you will have Speed as the result. So in practice, if we consider a fixed load on the shaft of your motor ( like a robot on a flat plane with a fixed weight), if you increase the Torque your robot will move faster and vice versa!

Anyway, Regardless of the type of Control, you choose ( Speed or Torque ) the wiring of your Brushless motor controller with ARDUINO will be

SOLO UNO to Arduino UNO wirings [PWM control]

SOLO MINI to Arduino UNO wirings [PWM control]

SOLO BETA to Arduino UNO wirings [PWM control]


arduino uno and solo beta wiring

– 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.


In Closed_loop configuration with SOLO, you only need one pin of ARDUINO which is capable of generating PWM and one Digital I/O pin which can output a logical 0 or 1 ( 0V or 5V ) outputs. As you can see in IMG1, the configuration in Closed-Loop mode is very simple and all you need to do are as follows:

Closed-Loop Configuration of SOLO

1. 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.

2. Connect pin number “3” of ARDUINO (or any other pins which is capable of generating PWM) to pins named “SP/TR”.

3. Provide the +5V supply to your ARDUINO module from “+5V” and “GND” pins of SOLO

4. 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.

5. Push “P5” switch in the Piano switch of SOLO DOWN, this will put SOLO in Closed-loop mode

6. 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

“Ultra-Fast Brushless motors” is referring typically to small-sized motors for drones or hobbyists which are capable of reaching up to 50000rpm or more. In the case of selection of Ultra-Fast mode, which in practice are motors with very low inductance, SOLO will operate with switching frequency of 80kHz, which in case of Normal mode the switching frequency of SOLO will be 20kHz.

7. Now you can Select between “Torque” or “Speed” control using “P4” switch in Piano Switch as below:

    • Control Mode: TORQUE control then “P4” Position UP and the Tuning is NOT Required
    • Control Mode: SPEED control then “P4” Position DOWN and the Tuning is Required

As you can see in the table above, you just need to select a proper position of “P4” for having Torque or Speed mode selected, in the current version of SOLO, Torque control needs no Tuning since SOLO does all the jobs for you, in case of Speed controller you need to tune a little bit two potentiometers which are named “Kp” and “Ki”. in the following you can see 2 videos one is dedicated for explaining the Torque control and how tune SOLO for that, while the other one is dealing with the Speed control and how to tune the Kp,Ki gains of SOLO for that.

Please notice that, in the following videos, the SOLO version in use is from the early versions and the configuration of Piano Switch pins are different with SOLO UNO mentioned in this article.


Closed-loop Sensorless Speed Control Video

Closed-loop Sensorless Torque Control Video

Now you have SOLO configured completely, so depending on the control Mode you’ve selected, you can increase or decrease the Speed / Torque of your Brushless motor by variation of your PWM duty-cycle (from 0% to 100%) or your analog voltage amplitude (from 0V to 5V) from the minimum value to maximum value.

Please notice that in case you use PWM for commanding SOLO, the frequency of your PWM can be anything between 5kHz to 100kHz as can be seen here
How to control speed or torque of your Brushless Motor with Arduino using SOLO (closed-loop) 1
Share This

Share This

Share this post with your friends!