Cubemars - 17 Year Motor Manufacturer info@cubemars.com +86 13755649079
English
English
中文简体
日本語
Deutsch
Français
한국어
Español
Pусский
Quick Registration
Create your CubeMars account

 

Video Center
TABLE OF CONTENTS
Preparation
Step 1: Core Hardware Wiring
Step 2: Switch the Motor to MIT Control Mode
Step 3: Configure the Control Logic
Step 4: Run the Test and View the Results
Frequently Asked Questions (FAQ)
Explore More CubeMars Robotic Drive Solutions

Tutorial:Control CubeMars AK45-36 Motor with Arduino

Jay / Jun 17,2026

In robotic development and research projects, how to quickly and reliably control high-performance brushless joint motors is a key challenge for developers. 


This tutorial will guide you through how to use an Arduino development board together with an MCP2515 CAN module to achieve precise joystick-based control of the CubeMars AK45-36 KV80 robotic joint motor.


Through this tutorial, you will learn the fundamentals of hardware wiring, MIT control mode configuration, and control logic implementation, enabling you to easily integrate CubeMars motors into your robotics projects.

 

Preparation


Before starting, please make sure you have the following hardware and software ready:


Hardware:

  • CubeMars AK45-36 KV80 motor

  • Arduino development board (such as Arduino Uno)

  • MCP2515 CAN module

  • Dual-axis joystick module

  • DC power supply and jumper wires


Software:

  • Arduino IDE

  • mcp_can library (installed in advance)

 

Step 1: Core Hardware Wiring


Correct wiring is the foundation of stable communication. You only need to focus on the following three key connections:


  1. MCP2515 and Arduino (SPI Communication): Connect the MCP2515 module to the Arduino through the standard SPI interface pins (CS, SO, SI, SCK, etc.).

  2. CAN Bus Connection (to Motor): Connect the CAN_H and CAN_L pins on the MCP2515 module to the corresponding CAN_H and CAN_L lines of the AK45-36 motor.

  3. Joystick and Power Supply:Connect the joystick X-axis signal pin to an Arduino analog input pin (such as A0).

  4. Finally, connect the motor to a suitable DC power supply.(Note: Do not reverse the motor power connection and CAN signal wiring).

 

Step 2: Switch the Motor to MIT Control Mode


For dynamic control applications such as joystick tracking, we strongly recommend using MIT control mode.

This mode allows position, velocity, and torque commands to be transmitted simultaneously within a single CAN message, providing extremely fast response.


Configuration Steps:


  1. Use the official CubeMars USB-to-CAN module to connect the motor to a computer and open the upper computer software.

  2. Set the motor CAN ID (for example, 0x01) and baud rate (must match the Arduino code, usually 1 Mbps).

  3. Click "Enter MIT Mode".


At this point, manually rotating the motor shaft should produce noticeable resistance, indicating that the configuration has been completed successfully.

 

Step 3: Configure the Control Logic


In the Arduino environment, implementing joystick-based motor control is straightforward and mainly consists of three steps:


  1. Read Input: Use an Arduino analog input pin (such as A0) to read joystick values in real time.The typical range is 0–1023.

  2. Map Data: Use a mapping function (such as map) to linearly convert the joystick input values into the target position or velocity range supported by the AK45-36 motor.

  3. Send CAN Messages: Use the CAN communication library to package the converted target data into a standard MIT mode CAN frame and send it to the corresponding motor CAN ID.


Tip: To obtain the complete Arduino example code, data conversion functions, and communication protocol documentation, please visit our official download center.

 

Step 4: Run the Test and View the Results


After completing the configuration, power on both the motor and Arduino. Move the joystick, and you should see the motor shaft smoothly rotate forward and backward following the joystick movement.


Watch the video below for a complete hands-on demonstration and detailed explanation.

 

Frequently Asked Questions (FAQ)


Q1: The motor does not respond after power-on. It does not rotate when moving the joystick?


A: Please check whether the motor has successfully received the Enable command. In MIT mode, the motor is disabled by default. You must first send a specific CAN message to enable the motor before it can respond to control commands.

 

Q2: The motor shakes or responds slowly during joystick control? 


A: This is usually related to CAN bus communication quality. Please ensure that CAN signal wires are not bundled parallel with the motor power cables. If the communication distance is long, enable the 120Ω termination resistor by switching the DIP switch on the MCP2515 module.

 

Explore More CubeMars Robotic Drive Solutions


The AK45-36 is just one member of the CubeMars high-performance motor family. Whether you are developing a quadruped robot, humanoid robot, robotic arm, or other robotic platforms, CubeMars provides compact and high-performance actuator solutions tailored to your needs.


[Learn more about CubeMars AK45-36 specifications and dimensions]


Related Articles
CubeMars Powers the University of Minnesota's Agricultural Quadruped Robot Dog
CubeMars Powers the University of Minnesota's Agricultural Quadruped Robot Dog
Discover how the University of Minnesota's Ag Robotics Lab uses CubeMars actuators to build a quadruped robot dog. Navigating complex terrains for below-canopy crop monitoring, bridging the gap left by drones.
Jul 06,2026
CubeMars RI80 Powers Transgrid's Transmission Line Inspection Robot
CubeMars RI80 Powers Transgrid's Transmission Line Inspection Robot
See how Transgrid uses CubeMars RI80 motors and NASA-inspired bogie systems to master power line obstacle climbing. Delivering high load capacity and stable motion for safer grid maintenance.
Jun 29,2026
KLEIYN Quadruped Wall-Climbing Robot Powered by CubeMars
KLEIYN Quadruped Wall-Climbing Robot Powered by CubeMars
See how the KLEIYN robot uses CubeMars motors and an active waist joint to master wall climbing via reinforcement learning (RL) and CGCL, achieving 150mm/s on narrow walls.
Jun 18,2026
Leave Message
User name
Anonymous
E-mail *
Name *
Phone
Comments
Verification code
captcha
Warm prompt
Warm prompt
Please Sign In
Sign In
Sign Up
Forgot Password?
Warm prompt