Overview of Features

Please note that this document is sourced from the following link: https://github.com/VoronDesign/Voron-Hardware/tree/master/Klipper_Expander/Documentation

Welcome to your new Klipper Expander! This document outlines the common features of the board that you are likely to use.

Basic

First we will go through the basic functionality of the board that most users will be looking for.

Indicator LEDs

There are 3 status indicator LEDs on the board:

  • 5v Status near the USB port indicates that there is 5V present and feeding the board (D6)

  • Board Ready near the IC indicates that the board is communicating with Klipper (D1)

  • Vin status indicates that there is power present on the Vin and GND feeding the board through the screw terminals (D7)

  • 4 indicator LEDs (D2-D5) near each of the MOSFETs and screw terminals, these indicate if the MOSFET is enabled

Switch (RST)

There is one switch, labeled RST. This resets the board

I2C Header (PF0, PF1)

Contains a 3.3V I2C bus for connecting displays, and other sensors such as enviromental sensors and breakout expanders. This plugs into J2

Both SCL and SDA pins are pulled up to 3V3 with a 4.7k resistor

Example display configuration:

[display]
lcd_type: sh1106
i2c_bus: i2c1a

Power In

Vin and GND are for feeding power to the Mosfets, this can be any voltage under 50V

Fuse

The fuse is a micro blade type fuse and should be chosen to the maximum draw of all of the MOSFET fed devices.

For example, if you are running a 40W heater, 2 5W fans and 1 2W fan, you will need a total of 62W of power. At 24V, this would translate to 62W/24V = 2.58A. The closest fuse might be a 5A fuse, which is recommended you should use.

Maximum power should not exceed 12A as the MOSFETs are each rated to a maximum of 3A.

Mosfets (PA0, PA1, PA2, PA3)

4 x 4 3A Amp mosfets for controlling LED's, Heater, Fans, and other accessories Connected to pins PA0, PA1, PA2 and PA3

Example configuration:

[output_pin mosfet0]
pin: expander:PA0
value: 0
shutdown_value: 0

You may need to change expander: to match your expander mcu name

Thermistors (PA5, PA6)

2 thermistor inputs that use a 4.7K pullup resistor (Klipper default) Connected to pins PA5 and PA6

Example configuration for a standalone thermistor (Not tied to a bed or hotend):

[temperature_sensor t0]
sensor_type: ThermistorType
sensor_pin: expander:PA6
gcode_id: T0
[temperature_sensor t1]
sensor_type: ThermistorType
sensor_pin: expander:PA5
gcode_id: T1

You may need to change expander: to match your expander mcu name

Neopixel header (PB1)

Header for using neopixels. There is a single power input pin (NPV) that you can supply with the voltage your strip needs (5V/12V) and it passes it to the three pin header (Vin, Data, Ground) Connected to J1, which has a NPV supplied voltage, GND and PB1

Example configuration:

[neopixel Pixel]
pin: expander:PB1
chain_count: 1
initial_RED: 0.9
initial_GREEN: 0.3
initial_BLUE: 0.0

You may need to change expander: to match your expander mcu name

Setup

For setup instructions, check Here.

Advanced

Here are some more advanced features and details about the board

Boot Jumper

This jumper needs to be installed to put the board in DFU mode to flash it with the klipper firmware. The board will show up as "Device in DFU Mode" to lsusb and then should show up in dfu-util --list

SWD header (PA13, PA14, RST)

This header is used if you SOMEHOW manage to brick the device beyond a BOOT jumper reset.

GPIO (PA7))

The GPIO header J12 (PA7,3V3,GND) is available for creative uses.

Examples of what this can be used for include external mosfet, relay or a door open sensor

PA7 is connected directly to the STM32 with no pullups

Testing

Included configuration file will allow you to startup the Expander without another MCU to validate all features are functional.

You will need the following devices:

  • Power supply (5V is easiest)

  • 4 x devices for MOSFET that will work at Power supply voltage

  • Neopixel with appropriate dupont headers (WS2812b for 5V or WS2811 for 12V)

  • Display (like this one: Adafruit OLED Display)

  • 2 Thermistors with dupont or JST headers

  • Raspberry Pi or another computer running Klipper

Use the Example configuration supplied in this repository

# This configuration will allow you to run a Klipper Expander standalone, with no other MCU
# This is helpful for testing

[printer]
kinematics: none
max_velocity: 500
max_accel: 3000

[mcu]
serial:  /dev/serial/by-id/usb-Klipper_stm32f042x6_1F00200014434E5333333920-if00

[output_pin mosfet0]
pin: PA0
value: 0
shutdown_value: 0

[output_pin mosfet1]
pin: PA1
value: 0
shutdown_value: 0

[output_pin mosfet2]
pin: PA2
value: 0
shutdown_value: 0

[output_pin mosfet3]
pin: PA3
value: 0
shutdown_value: 0

# Status LED lights when klipper connects
[static_digital_output onboardLED]
pins: !PA4

[neopixel Pixel]
pin: PB1
chain_count: 1
initial_RED: 0.9
initial_GREEN: 0.3
initial_BLUE: 0.0

[display]
lcd_type: sh1106
i2c_bus: i2c1a

# Other Pins
# GPIO = PA7

[temperature_sensor t0]
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA6
gcode_id: T0

[temperature_sensor t1]
sensor_type: ATC Semitec 104GT-2
sensor_pin: PA5
gcode_id: T1

When the Expander starts up you should see:

  • All 3 Status LEDs light up

  • None of the MOSFETs light up

  • Neopixel will be orange

  • Display will have a typical 3d printer interface

Other steps:

  • Run a M105 to get temperature readings

  • Execute the test.gcode file to cycle through the MOSFET pins

Debugging

Sometimes problems happen, here is how you can fix them

Basic troubleshooting:

  • Set in DFU mode and reflash

  • Remove unused sections in printer.cfg

  • Disconnect devices and test

Last updated