Brushed DC torque c...
Clear all

[Solved] Brushed DC torque control - Arduino template

Forum 1
New Member
Joined: 3 weeks ago
Posts: 1
Topic starter  

Hello, do you have an example code for the torque control of Brushed DC motor (with and/or without incremental encoder)?. 

Chief Member Moderator
Joined: 2 years ago
Posts: 395

Hi @atrach,

The example code that you can convert for your DC motor controlling the Torque can be the below one:

In this example you need to do a couple of things:

  1. Put the motor type on DC brushed 
  2. put the feedback mode on sensorless
  3. put the control mode on Torque mode:
  4. Now you can give the desired torque ( current ) set point using the following command:
    SetTorqueReferenceIq(float yourdesireCurrentInAMPs);

Some notes:

- if you put SOLO in Torque Mode while DC brushed motors are utilized, SOLO will control the current of your DC motor with internally built-in PI controllers, you just need to set the desired value (set-point) and the "IM" parameter in the Motion terminal monitoring section will show you the amount of current in your motor in terms of Amps.

- The Torque control on DC brushed motors with SOLO is done in a sensorless manner, so there will be no need to have any type of sensors like Encoders.

Let me know if you need further clarifications.


If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.