DC motors controller for mobile robots with ROS support

The motors controller is designed to control up to four brushed DC motors. It uses 32-bit ARM-based microcontroller. The device is suitable to control drives of mobile robots with two or four wheels. There are also implemented a lot of other features, so the device can be used for other purposes as well.

The project differs from other motors controllers mainly because it has ROS (Robot Operating System) support and it's able to calculate and provide odometry data (relative position and orientation of mobile robot) based on encoders measurements. The additional software is provided like a C++ API and user application (GUI) to configure and diagnose the controller.

Features of device:

  • up to 4 brushed DC motors,
  • up to 4 quadrature incremental encoders (inputs: A, B signals) with a logic level equal to 3,3 V or 5 V,
  • the motors power supply should be in the range of 6-24 V DC,
  • continuous current up to 8 A per motor,
  • peak current up to 20 A per motor,
  • communication by USB (HID),
  • two control modes:
    • closed, speed loop with PID controller,
    • open loop,
  • separate tunings for every motor
  • configurable watchdog to automatic motors shutdown in case of communication breaks
  • many safety features: overvoltage protection, overcurrent protection, deadman's switch
  • two modes for different mobile platform types: two-wheeled (channels can be connected parallel) and four-wheeled
  • odometry calculations what mean relative position and orientation based on incremental encoders measurements
  • 4 digital outputs (DO) up to 1 A each, for example, to control the external brakes
  • 4 digital inputs (DI) which can be configured as an emergency stop button, deadman's switch, speed limiter, or as general purposes input
  • low power consumption, especially in standby mode
  • graphical user interface (GUI) to configure and diagnose device
  • C++ API to handle, configure, tuning and diagnose device
  • available software module in ROS framework (Hydro/Indigo/Jade/Kinetic)
  • dimensions: 70 x 70 x 20 mm
  • weight about 200 g

A diagram of the device is shown below and it contains encoders interfaces, the microcontroller module, a power stage, digital inputs, and outputs.

The block diagram of motors controller

The block diagram of motors controller

Drive controller ROS node

The below diagram shows the structure of ROS node for device. This node subscribe data like a set velocity: linear and angular, states of digital outputs. The node publishes following informations: odometry data (relative position and orientation), states of digital inputs and supply voltage. The node code was published on GitHub: https://github.com/mdrwiega/md_drive_controller .


The structure of ROS node for device

Electronic design

The hardware part was designed in open-source software KiCad, which was used in creation of visualization placed below.


The device visualization from KiCad

Tests of device

The device has been tested on multiple robots, especially on the four-wheeled robot presented in another post.
The precision of the odometry system has been confirmed with the motion capture system OptiTrack equipped with six cameras.

10 thoughts on “DC motors controller for mobile robots with ROS support”

    1. Michał Drwięga

      thanks for the comment. Unfortunately, the software is still in the development stage and it’s not reliable enough.
      Best regards

    2. Damn, I was thinking the same. Could there be an interface for individual motor control (to use omniwheels) or better, could it be compatible with omniwheels (the kinematics model has to change)?

    3. Michał Drwięga

      Thanks for comment and good suggestion. I haven’t implemented that mode yet. Currently, there is an interface for control each motor separately, so the omniwheels kinematics model could be implemented in dedicated ROS driver.

    1. I want to buy this… please update and share some videos of this controller… you work is very great.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.