accessory:add-on_boards:stepperboard

The Stepper Motor Controller Board is mainly designed to control up to 6 stepper motors and can help to interface with peripherals through CAN bus and several GPIO pins. Most adaptable application with this board is 3D printer or CNC machine that usually uses 3~4 stepper motors. Different type of machines require different hardware functions, unsupported function in this board could be extended when small and lower power micro controller board is connected to CAN bus or USB port if required.

  • On board DC step down power supply to provide 5V to ODROID-M1S
  • 6x step motor driver module support
  • 1x CAN-FD bus support
  • 1x ADC channel
  • 2x GPIO inputs
  • 1x MOSFET output

MainsailOS

  • This is a reference Image that is installed mainsail for ODROID-M1S and stepper board
  • The sample of printer config file is included as '/home/odroid/printer_data/config/sample-odroid-m1s.cfg'
  • Based on Ubuntu 20.04 LTS

Form Factor Board dimension : 90 (L) x 65 (W) x 16 (H) mm
Power input 1x terminal block (7.62mm pitch)
* ODROID-M1S will be powered via this terminal.
I/O 6x Step motor connector
* Step motor driver module is required.
1x CAN bus
1x ADC input
1x MOSTFET output
2x GPIO input (internal pull up)
View when stepper motor drivers are fully loaded

Tested TMC stepper motor driver:
Tested CAN bus devices for 3D printer:
STEPPER UART# FUNCTION GPIO name GPIO PIN#
CH ADDR
X 0

RX: gpiochip0/gpio16
TX: gpiochip0/gpio17
0 ENABLE gpiochip0/gpio12 J2 / 27
DIR gpiochip2/gpio16 J2 / 29
STEP gpiochip2/gpio15 J2 / 31
Y 2 ENABLE gpiochip3/gpio13 J2 / 5
DIR gpiochip0/gpio14 J2 / 7
STEP gpiochip0/gpio13 J2 / 33
Z0 1 ENABLE gpiochip2/gpio14 J2 / 18
DIR gpiochip2/gpio13 J2 / 16
STEP gpiochip2/gpio7 J2 / 12
Z1 3 ENABLE gpiochip3/gpio11 J3 / 13
DIR gpiochip0/gpio18 J2 / 15
STEP gpiochip2/gpio9 J2 / 26
Z2 1

RX: gpiochip2/gpio3
TX: gpiochip2/gpio4
0 ENABLE gpiochip3/gpio20 J3 / 11
DIR gpiochip2/gpio5 J2 / 35
STEP gpiochip0/gpio11 J2 / 28
Z3 2 ENABLE gpiochip3/gpio20 J3 / 11
DIR gpiochip3/gpio12 J3 / 14
STEP gpiochip3/gpio21 J3 / 12
X-MIN gpiochip2/gpio6 J2 / 36
Y-MIN gpiochip3/gpio14 J2 / 3
HB gpiochip2/gpio10 J2 / 32
ADC1 analog3 J2 / 40

In order to load and run this board, board_stepper is required to add to the line start with overlays in /boot/config.ini. For example,

...
overlays="board_stepper"
...
This board requires all dedicate pins on GPIO pin header, therefore adding other device tree overlay file that uses GPIO pin on the GPIO pin header will cause a problem.

CAN bus on this board will help you to communicate with other board with CAN interface, you would need to correctly configure its communication protocols. This link will help you to verify the CAN bus set up and communication, https://wiki.odroid.com/internal/accessory/add-on_board/canfdboard#setting_can_network

This section introduce how Klipper configuration 'printer.cfg' is added or modified when a 3D printer runs with this board on top of ODROID-M1S. Please be noted that other configurations for stepper motors and sensors are also necessary and configured for the parts installed to the 3D printer.

Heatbed can be controlled via dedicated pins, but the heatbed must be not connected to the connector directly since on-board MOSFET is not capable to drain the current. One must install one high current external MOSFET or SSR that is compatible to the heatbed.

[heater_bed]
heater_pin: gpiochip2/gpio10
sensor_pin: analog3

One may need to add or change the Klipper configuration file 'printer.cfg' in order to control the stepper motors as many as installed to 3D printer. This board have two endstop connectors for X and Y-Axis while Z-Axis is missing. Therefore the endstop pins for Z-Axis must be dedicated properly with the endstop sensor attached to the printer. This example is supposed that you have a toolhead with endstop that is controlled by a CAN controller and wired to this board through CAN bus.

[stepper_x]
step_pin: gpiochip2/gpio15
dir_pin: gpiochip2/gpio16
enable_pin: !gpiochip0/gpio12
endstop_pin: gpiochip2/gpio6
...
[stepper_y]
step_pin: gpiochip0/gpio13
dir_pin: gpiochip0/gpio14
enable_pin: !gpiochip3/gpio13
endstop_pin: gpiochip3/gpio14
...
[stepper_z]
step_pin: gpiochip2/gpio7
dir_pin: !gpiochip2/gpio13
enable_pin: !gpiochip2/gpio14
endstop_pin: probe: z_virtual_endstop
...
[stepper_z1]
step_pin: gpiochip2/gpio9
dir_pin: !gpiochip0/gpio18
enable_pin: !gpiochip3/gpio11
endstop_pin: probe: z_virtual_endstop
...
[stepper_z2]
step_pin: gpiochip0/gpio11
dir_pin: !gpiochip2/gpio5
enable_pin: !gpiochip3/gpio20
endstop_pin: probe: z_virtual_endstop
...
[stepper_z3]
step_pin: gpiochip3/gpio21
dir_pin: !gpiochip3/gpio12
enable_pin: !gpiochip3/gpio20
endstop_pin: probe: z_virtual_endstop
...
[probe]
pin: !CAN:PA5

TMC2209 is tested stepper motor driver and their configuration can be added in order to set up the configuration through UART pins. Since 1 UART channel can manage up to 4 TMC2209 stepper motor drivers, we need 2 UART channels for 6 stepper motors and each motor driver have assigned UART address although their UART communication pins are shared.

[tmc2209 stepper_x]
uart_pin: gpiochip0/gpio16
tx_pin: gpiochip0/gpio17
uart_address: 0
...
[tmc2209 stepper_y]
uart_pin: gpiochip0/gpio16
tx_pin: gpiochip0/gpio17
uart_address: 2
...
[tmc2209 stepper_z]
uart_pin: gpiochip0/gpio16
tx_pin: gpiochip0/gpio17
uart_address: 1
...
[tmc2209 stepper_z1]
uart_pin: gpiochip0/gpio16
tx_pin: gpiochip0/gpio17
uart_address: 3
...
[tmc2209 stepper_z2]
uart_pin: gpiochip2/gpio3
tx_pin: gpiochip2/gpio4
uart_address: 0
...
[tmc2209 stepper_z3]
uart_pin: gpiochip2/gpio3
tx_pin: gpiochip2/gpio4
uart_address: 2
...
  • accessory/add-on_boards/stepperboard.txt
  • Last modified: 2023/12/02 10:05
  • by tobetter