CAN Bus
In this tutorial, we will explore how to prepare the Aotenjo One board for CAN Bus communication and run closed loop angle control.
If you have both Aotenjo One V2.x and Aotenjo Master v2.x, please refer to the CAN FD Communication tutorial instead.
Why Use CAN Bus with Aotenjo?
We recommend using CAN Bus communication with Aotenjo boards when you want to control multiple Aotenjo One boards using a single Aotenjo Master board. Please refer to the Aotenjo Master CAN Bus tutorial for more details on the advantages of using CAN Bus with Aotenjo.
Prerequisites
In this tutorial, the following hardware is used:
- Aotenjo One Board
MCU: STM32G431CBU6
Version: Aotenjo One V1.4 - Diametrically magnetized disc magnet (included with Aotenjo One)
- ST-LINK V2 Clone
- BlackPill STM32 Board
- BE4108 75T Gimbal Motor
- Power Supply (12V)
- Soldering Kit
You need a ST-LINK V2 Clone to upload the firmware to the board. You can purchase a cheap clone ST-LINK V2 under $5.
CAN Bus Connection
Aotenjo One communicates via CAN Bus, allowing you to control multiple Aotenjo One boards using just four wires: CAN_H, CAN_L, VCC, and GND.
Keep in mind that a CAN Bus requires termination resistors at both ends of the network to prevent signal reflections.
In the setup shown above, the main CAN hub — Aotenjo Master — includes a built-in termination resistor. Therefore, you only need to enable termination on the last Aotenjo One board in the chain (e.g., the M0 unit) by soldering the termination jumper located on the top side of the board, as shown in the image below.