Torque Control of a Brushless Motor With Arduino Uno

by FrancescoL33 in Circuits > Arduino

1166 Views, 1 Favorites, 0 Comments

Torque Control of a Brushless Motor With Arduino Uno

motor.png

An example on how to handle Torque control of a Brushless Motor with Hall Sensors using Arduino UNO, a Brushless DC Motor with the part number of “DB56C036030-A” from Nanotech and Solo UNO as motor controller. To make it work, I also use the Library for communication between Arduino and Solo, more info here.

The idea of this example is to lock the shaft of the motor by hand and by code increase the torque of the motor gradually in order to feel how the force is increasing every time.

Schematic

image_2021-06-28_22-27-12.png
  • The piano switch for Solo UNO is from pin 1 to 5: Down, Up, Up, Up, Down.
  • The pin “~3” of Arduino UNO is connected to “S/T” input of SOLO, which in our configuration will define the Torque reference, this reference is calculated based on the maximum current that SOLO can feed into the Motor.
  • Pin “~9” of Arduino in which will define for SOLO the current limit and it’s connected to “P/F” input of SOLO for protection purposes.
  • Correctly calibrated the Hall sensors windings to ABC outputs of Solo

The Code

This is the example file.

Conclusion

So the thing that is happening is, in the code is hardcoded desired torque in Amps, then it will convert it to a PWM duty cycle on pin “~3” for each reference, the PWM duty cycle will remain constant as long as the reference has not been changed. In Arduino UNO, the PWM section has a 8 bits counter and this means to go from 0% to 100% duty cycle we have 255 steps, which will define the resolution of Torque control, the frequency of PWM pulses is not important and anything above 5kHz it's ok, both pin ~3 and ~9 are on 31kHz.