Posted on by & filed under How To Make a Robot.

How To Make a Robot - Lesson 5 - Choosing a Motor Controller

Lessons Menu:

Now that the general shape, the actuators (or motors) and the brain for the robot have been chosen, it is time to make things move.

The first question many beginners have when building their first robot is “how do I control the motors?” After a bit of research, the word motor controller comes up a lot.

What is a motor controller and why do I need it?

Motor Controllers

A motor controller is an electronic device (usually comes in the shape of a bare circuit board without enclosure) that acts as an intermediate device between a microcontroller, a power supply or batteries, and the motors.

Although the microcontroller (the robot’s brain) decides the speed and direction of the motors, it cannot drive them directly because of its very limited power (current and voltage) output. The motor controller, on the other hand, can provide the current at the required voltage but cannot decide how fast the motor should turn.

Thus, the microcontroller and the motor controller have to work together in order to make the motors move appropriately. Usually, the microcontroller can instruct the motor controller on how to power the motors via a standard and simple communication method such as UART (a.k.a. serial) or PWM. Also, some motor controllers can be manually controlled by an analogue voltage (usually created with a potentiometer).

The physical size and weight of a motor controller can vary significantly, from a device smaller than the tip of your finger used to control a mini sumo robot to a large controller weighing several Kg. The weight and size of a motor controller usually has a minimal impact on the robot, until you get into small robotics or unmanned aerial vehicles. The size of a motor controller is usually related to the maximum current it can provide. Larger current also means having to use larger diameter wires (the smaller the gauge number, the larger the diameter).

Motor Controller Types

Since there are several types of actuators (as discussed in lesson 3), there are several types of  motor controllers:

  • Brushed DC motor controllers: used with brushed DC, DC gear motors, and many linear actuators.
  • Brushless DC motor controllers: used with brushless DC motors.
  • Servo Motor Controllers: used for hobby servo motors
  • Stepper Motor Controllers: used with unipolar or bipolar stepper motors depending on their kind.

Choosing a Motor Controller

Motor controllers can only be chosen after you have selected your motors/actuators. Also, the current a motor draws is related to the torque it can provide: a small DC motor will not consume much current, but cannot provide much torque, whereas a large motor can provide higher torque but will require a higher current to do so.

DC Motor Control:

  1. DC MotorThe first consideration is the motor’s nominal voltage. DC motor controllers tend to offer a voltage range. For example, if your motor operates at 3V nominal, you should not select a motor controller that can only control a motor between 6V and 9V. This will help you cross off some motor controllers from the list.
  2. Once you have found a range of controllers that can power the motor with the appropriate voltage, the next consideration is the continuous currentthe controller will need to supply.You need to find a motor controller that will provide current equal to or above the motor’s continuous current consumption under load. Should you choose a 5A motor controller for a 3A motor, the motors will only take as much current as they require. On the other hand, a 5A motors is likely to burn a 3A motor controller.Many motor manufacturers provide a DC motor’s stall current, which does not give you a clear idea of the motor controller you will need. If you cannot find the motor’s continuous operating current, a simple rule of thumb is to estimate the motor’s continuous current at about 20% to 25% of the stall current. All DC motor controllers provide a maximum current rating – be certain this rating is about double that of the motor’s continuous operating current. Note that when a motor needs to produce more torque (for example going up an incline), it requires more current. Choosing a motor controller with built-in over current and thermal protection is a very good choice.
  3. The Control method is another important consideration. Control methods include  analogue voltage, I2C, PWM, R/C, UART (a.k.a. serial). If you are using a microcontroller, check to see which pin types you have available and which motors are viable for you to choose. If your microcontroller has serial communication pins, you can choose a serial motor controller; for PWM, you will likely need one PWM channel per motor.
    Control Methods
  4. The final consideration is a practical one: Single vs. dual (double) motor controller. A dual DC motor controller can control the speed and direction of two DC motors independently and often saves you money (and time). The motors do not need to be identical, though for a mobile robot, the drive motors should be identical in most cases. You need to choose the dual motor controller based on the more powerful DC motor. Note that dual motor controllers tend to have only one power input, so if you want to control one motor at 6V and the other at 12V, it will not be possible. Note that the current rating provided is almost always per channel.

Servo Motor Control:

Hitec HS 645 MG Servo Motor

Since standard hobbyist servo motors are meant to use specific voltages (for peak efficiency), most operate at 4.8V to 6V, and their current consumption is similar, the steps for the selection are somewhat simplified. However, you may find a servo motor that operates at 12V; it is important to do additional research about a servo motor controller if your servo motor is not considered “standard”.

Also, most hobby servo motors use the standard R/C servo input (three wires which are ground, voltage and signal)

  1. Choose the control method. Some servo motor controllers allow you to control the servo’s position manually using a dial/switch/buttons, while others communicate using UART (serial) commands or other means.
  2. Determine the number of servos to be controlled . Servo controllers can control many servos (usually 8, 16, 32, 64 and up). You can certainly select a servo motor controller capable of controlling more servos than you will need.
  3. As with DC motor controllers, the control method is an important consideration.

Stepper Motor Control:

  1. Stepper MotorsIs the motor you selected unipolar or bipolar? Choose a stepper motor controller type accordingly, though a growing number are able to control both types. The number of leads is usually a dead give-away of the motor type: if the motor has 4 leads, then it is bipolar; should it have 6 or more leads, then it is unipolar.
  2. Choose the motor controller voltage range to match your motor’s  nominal voltage .
  3. Find out how much current per coilyour motor requires, and find out how much current (per coil) the stepper motor controller can provide.If you cannot find the current per coil, most manufacturers list the coil impedance, R . Using Ohms Law (V=IR), you can then calculate the current (I).
  4. As with DC motor controllers, the control method is an important consideration.

Linear Actuator Control:

Linear ActuatorsLinear actuators come in three main flavours regarding their control method.: DC, R/C, or position feedback.

Most DC linear actuators use a geared DC motor, so a DC motor controller is usually appropriate. However, some linear actuators take R/C servo input, so you would select a servo motor controller. Should an R/C controlled linear actuator operate at a higher voltage than the servo controller’s range, the actuator may include separate wires for the higher supply voltage required.

Other Actuators:

Many “miscellaneous” electromechanical devices such as muscle-wire, solenoids, or even powerful lights need to be controlled using motor controllers. Below are some questions to determine if your actuator might need a motor controller:

  • Higher current requirements: any device that requires over 0.1A usually needs its own controller
  • Higher voltage requirements: if the actuator operates above the microcontroller’s voltage (usually 5V or 3.3V), it usually cannot be directly connected to a microcontroller

For more information regarding actuator control and communications method, please visit the RobotShop Learning Center.

Practical Example

Solarbotics GM9

In the previous lesson, we had chosen the Solarbotics GM9 gear motors.

Below are this motor’s specifications:

  • Gear Ratio: 143:1
  • Unloaded RPM (3V): 40
  • Unloaded RPM (6V): 78
  • Unloaded Current (3V): 50mA
  • Unloaded Current (6V): 52mA
  • Stall Current (3V): 400mA
  • Stall Current (6V): 700mA
  • Stall Torque (3V) : 44.44in*oz
  • Stall Torque (6V) : 76.38in*oz

Applying the steps:

  1. The nominal voltage is 3V or 6V.
  2. There is no mention of continuous current, though the stall torque at both voltages is provided: 400mA and 700mA. If we take 25% of these values, the continuous current can be approximated at 100mA to 175mA. To be safe we can take the larger value.
  3. We have chosen a microcontroller that has many different pins including serial, PWM, analog and digital.
  4. Our little rover will be using two identical motors, so we can use a dual motor controller.

Given the above criteria, we are looking for a motor controller with the following specifications:

  • Voltage range can accommodate a 3V to 6V motor
  • Continuous current at least 350mA per channel (low power category)
  • Communication method is PWM, I2C or analog (or several of these)
  • Dual motor control is preferred.

By Looking at the Brushed DC Motor Controllers Comparison Table (imperial version), several motor controllers fit the criteria:

  • RB-Dim-19 (6-18V, 5A, dual.  Analogue and Serial interfaces with many safety features)
  • RB-Pol-16 (1.5-6V, 5A, dual.  Low cost controller with serial interface)
  • RB-Pol-22 (6-16V, 9A, dual,  PWM interface)
  • RB-Spa-397 (5-16V, 2A, dual,  serial interface)
  • RB-Ada-02 (4.5-36V, 0.6A,  dual. Arduino shield with PWM interface)
  • RB-Cri-15 (6-58V, 10A, single, PWM)
  • RB-Cri-14 (6-58V, 10A, single, PWM)
  • …  and many more.

There are a variety of other motor controllers which meet the criteria above which would work as well. In order to reduce this list, cost and features would need to be considered. For example, there is no need to consider a high current (10A) motor controller which is understandably more expensive than a 5A controller. We can also eliminate all single motor controllers. The one controller that stands out from the rest is RB-Pol-16 because of its lower voltage range; this means that, should we decide to power the motor at 3V, it would fall within this controller’s voltage range. The other controller of interest is RB-Ada-02 because it is made specifically for the microcontroller we selected (i.e the Arduino Uno). However, the one downside to RB-Ada-02 is that no additional shields can be installed afterwards. The Pololu dual motor controller was ultimately chosen because of its lower voltage range and price.

Pololu Low Voltage Dual Serial Motor Controller 5A 1.5V-6V

RobotShop - Robotics at your serviceFor further information on learning how to make a robot, please visit the RobotShop Learning Center. Visit the RobotShop Community Forum in order to seek assistance in building robots, showcase your projects or simply hang-out with other fellow roboticists.

Tags:

23 Responses to “How to Make a Robot – Lesson 5: Choosing a Motor Controller”

  1. kert

    Good article, but you left out a very significant bit : feedback/rotary encoders.

    If your DC motor controller does not accept encoder input, thats a significant factor.

  2. Carlos

    You are indeed right. Encoder inputs and the possibility to implement PID control systems id definitely an important factor when choosing a motor controller. Nevertheless, it was left out of the tutorial since it is a fairly advanced feature and might confuse beginners who will most likely not use it.

    It is also important to note that for small scale robots that do not move too fast, it is possible to read the encoders by using the main robot microcontroller. Since the robot is not doing much processing, taking also care of control algorithms and encoder readings is certainly a possibility.

    Rest assured that encoders will be covered in the upcoming tutorial about sensors.

    Thanks for the feedback!

  3. Abinesh

    thanks for your guidance.plz send lesson no. 6 to lesson no. 10 as soon as possible

  4. sachin

    thankyou for this great knoladge about robotics this is very fentestic and i want know more about it please give us more information and we are ready for it……………………….

  5. rod..

    i hope that on january 2011 the other tutorials will be done soon because we will report about robotics.. thank you for giving us insights on how to create robots… keep on informing the public!:) good job..

  6. Rohan

    It was really a useful lecture…
    When r u planning to launch lesson6????

  7. julian obeid

    first of all you guys don’t just get i do you?i was hoping on inventing a very very very…………simple robot without buying the tools required ,but where to find them!That’s why you guy are making it very complicated to understand how to do so!

  8. aditya

    hey i liked so many indians on this site…. these lessons are amazing!

  9. sudesh

    for 440v wic microcontroller support…. standard and cheaper one… m not able wic one i shd use…. cud u plz suggest….

  10. rakesh yadav

    its a lovely robotics site, i am waiting for the next chapter
    it would be better if u would supply the tutorial video too.
    thanks

  11. nasim naji

    perfect !!!!!!!!! you are great !!!!!!!!!

    but Microcontrollers are not simple for me.

  12. dedipyaman das

    Ok…. I am from India and I am not sure that i will get this parts here… so i was thinking if it is available everywhere or do i have to buy it from this site?

  13. uri

    Greetings to all, can you help me with something?
    I would like to build some FPV 4wd platform size 25 x 30 cm (without wheels), with 150 mm diameter wheels, which top speed would be around 8km/h.
    I am thinking to use four motors: PGHM-01 or RB-Pol-81
    is it possible to connect each side motors parallel together and use this controler: RB-Dim-23 or RB-Bat-23

    for controling platform I will use rc transmitter

Leave a Reply

  • (will not be published)