Configuration Tutorial

※Klipper Expander Board Usage Instructions

The Klipper expander board requires an input of 12V or 24V to operate normally; the USB cable is only for data transmission. Please ensure the power connection is correct to avoid affecting the device's normal operation.

Here are the indicator light descriptions on the expander board:

  • [D1] Connection Status Light: Indicates whether the expander board is successfully connected to the main control board.

  • [D2-D5] Switch On Indicators: Displays the switch status of the expander board.

  • [D6] 5V Status Light: Indicates the status of the 5V power supply.

  • [D7] VIN Supply Status: Indicates the status of the input power (VIN).

Please check the device's operating status based on the indicator lights.


Connect the Expander to the Host Computer

Before you begin, ensure that the Klipper Expander is properly connected to your host computer via USB.

Step 2: Retrieve the Serial ID

You need to find the serial ID for the expander. You can do this by running the following command in your terminal:

ls /dev/serial/by-id/

Look for the line that corresponds to your expander (it should contain Klipper_stm32f042x6), and note the full serial path.

Create the Configuration Files

You will need to create the configuration file for the expander.

  1. Download the klipperExpander.cfg file and upload it to the Klipper configuration folder.

  1. Open your printer.cfg file and add the following line to include the expander configuration:

[include klipperExpander.cfg]

Fill in the Serial ID

In the klipperExpander.cfg file, you will need to replace the serial field with the ID you retrieved in Step 2. The line should look like this:

[mcu expander]
serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_slipper-if00     # Replace with your actual serial ID
restart_method: command

Step 5: Compile and Upload the Configuration

Compile the configuration files as usual. By default, the firmware has already been burned, so you should be ready to go.


※Example of klipperExpander.cfg

Here’s an example configuration for your reference, including comments for clarity:

[mcu expander]
serial: /dev/serial/by-id/usb-Klipper_stm32f042x6_slipper-if00     # Serial connection for the MCU expander
restart_method: command                                               # Restart method for the expander

[heater_fan exhaust_fan]            # Exhaust fan for the printing chamber
## Exhaust fan - In E2 OUT Position
pin: expander:PA0                            # Signal interface pin
max_power: 1.0                      # Maximum speed for the fan
shutdown_speed: 0.0                 # Shutdown speed (do not change)
kick_start_time: 5.0                # Kick start time (do not change)
heater: heater_bed                  # Associated device: heated bed
heater_temp: 60                     # Temperature at which the fan starts
fan_speed: 1.0                      # Fan speed

[fan_generic controller_fan]         # Controller fan for the electrical compartment
## Controller fan - FAN2 Connector
pin: expander:PA1                            # Signal interface pin for controller fan
# cycle time: 0.50                   # Cycle time for the fan (commented out)

[output_pin mosfet2]                 # Output pin for MOSFET 2
pin: expander:PA2                      # Signal interface pin for MOSFET 2
pwm: true                               # Enable PWM control
cycle_time: 0.010                      # Cycle time for PWM signal
value: 0                                # Initial value for the output
shutdown_value: 0                       # Value when shutting down

[output_pin mosfet3]                 # Output pin for MOSFET 3
pin: expander:PA3                      # Signal interface pin for MOSFET 3
pwm: true                               # Enable PWM control
cycle_time: 0.010                      # Cycle time for PWM signal
value: 0                                # Initial value for the output
shutdown_value: 0                       # Value when shutting down

# Status LED lights when Klipper connects
[static_digital_output onboardLED]
pins: !expander:PA4                   # Pin for the onboard LED

[neopixel expanderPixel]              # Neopixel configuration
pin: expander:PB1                      # Signal interface pin for Neopixel
chain_count: 1                         # Number of Neopixels in the chain
initial_RED: 0.9                       # Initial red value for Neopixel
initial_GREEN: 0.3                     # Initial green value for Neopixel
initial_BLUE: 0.0                      # Initial blue value for Neopixel

[temperature_sensor Box]              # Box temperature sensor (requires an additional temperature sensor)
sensor_type: ATC Semitec 104GT-2      # Thermistor type
sensor_pin: expander:PA6                       # Modify to the corresponding PIN (required)
min_temp: 10                           # Minimum temperature for sensor
max_temp: 100                          # Maximum temperature for sensor

# Other Pins
# T0 = PA6                              # Temperature sensor T0 pin
# T1 = PA5                              # Temperature sensor T1 pin
# GPIO = PA7                            # General purpose input/output pin

Last updated