DC motors controller for mobile platforms with support for ROS framework

May 11, 2016
Posted by Michał Drwięga

The motors controller was designed to control up to four brushed DC motors. It’s based on 32bit microcontroller Kinetis. The basic purpose of device is control drives of mobile robots both two wheeled and four wheeled. However, there are implemented a lot of features so device can be used for other purposes too. The project differs from other motors controllers mainly because it has ROS (Robot Operating System) support and it’s able to calculate 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 control unit.

 

Features of device:

  • up to 4 brushed DC motors,
  • up to 4 quadrature incremental encoders (inputs: A, B signals) with logic level equal to 3,3 V or 5 V,
  • motors power supply should be in range 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 of safety features: i.e. overvoltage, overcurrent, 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 brakes,
  • 4 digital inputs (DI) which can be configured as an emergency stop, deadman’s switch, speed limiter or as general purposes input,
  • low power consumption, especially in stand-by 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.

 

The diagram of device is shown below and it contains encoders interfaces, a 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 .

 

drive_controller_node
The structure of ROS node for device

 

Electronic design

The electronics of device was designed in opensource software KiCad. Moreover, it was used to generation of visualization placed below.

mdmc4v1_main_v2_white_1

The device visualization from KiCad

Tests of device

The device was tested in robot described in following topic: Four wheeled mobile robot with Raspberry Pi. The precision of odometry system was confirmed with motion capture system OptiTrack with six cameras.

 

4 thoughts on “DC motors controller for mobile platforms with support for ROS framework

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

    • 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)?

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

Leave a Reply

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

  • Polski
  • English