Hardware Testing Methods
This document includes minimal testing methods for common hardware modules, used to isolate individual hardware during troubleshooting and confirm whether the issue originates from configuration, wiring, the module itself, or the motherboard port.
Testing ideas are derived from motherboard and toolboard test configurations: use manual_stepper DriveN to test drivers, output_pin to test low-voltage outputs, temperature_sensor to test temperature/ADC, gcode_button to test input signals, and adxl345 / lis2dw to test accelerometers.
All steps involving wiring, plugging/unplugging, cable management, adjusting jumper caps or DIP switches must be performed with the printer completely powered off and disconnected from the power supply. Hot-plugging driver modules, stepper motor cables, CAN cables, probe cables, fan cables, or accelerometer modules is strictly prohibited.
This document does not require customers to solder, disassemble the power supply, modify mains wiring, measure exposed high-voltage/high-current terminals, or use professional equipment such as oscilloscopes. For electrical testing involving heater cartridges, heated beds, SSRs, MOSFETs, or power supply inputs, please contact after-sales support or a professional.
Preparation Before Use
Backup Original Configuration
- Backup the current
printer.cfgand relatedincludefiles. - Test only one hardware type at a time to avoid multiple modules affecting the diagnosis.
- After the test configuration passes, restore the original configuration to continue troubleshooting the entire machine.
Pin assignments in test configurations must be based on the actual motherboard, toolboard manual, or manufacturer template. Do not directly copy example pins to different models.
Recommended Test Sequence
- MCU connection and motherboard temperature.
- Temperature sensor or ADC input.
- Low-voltage output ports, such as fans, RGB, buzzers.
- Input ports, such as endstops, probes, filament runout sensors.
- Accelerometer.
- Stepper driver and motor.
- CAN toolboard communication.
MCU and Temperature Sensor Testing
Test Purpose
Confirm that the MCU can be connected by Klipper, and verify that motherboard temperature, thermistor, or ADC input can be displayed normally.
Minimal Configuration
[mcu]
serial: /dev/serial/by-id/usb-Klipper_xxxxxxxxxxx
[temperature_sensor MCU_TEMP]
sensor_type: temperature_mcu
[temperature_sensor ADC1]
sensor_type: Generic 3950
sensor_pin: PF4
Test Steps
- Change
serialandsensor_pinto the actual values for the motherboard. - After powering off, confirm the thermistor connector is securely plugged in and the wiring is intact.
- Power on and restart Klipper.
- Check the
MCU_TEMPandADC1readings on the Mainsail / Fluidd temperature panel to see if they display reasonable temperatures.
Result Evaluation
| Test Item | Normal Result | Abnormal Behavior | Suggested Action |
|---|---|---|---|
| MCU Temperature | Displays near ambient temperature or slightly higher | Cannot connect to MCU | Check serial, firmware, and USB/CAN connection |
| Thermistor | Displays near ambient temperature | ADC out of range, extremely high or low | After power off, check connector, wiring, and sensor model |
Only observe temperature readings; do not heat the nozzle or heated bed for testing purposes. If you suspect issues with the heating circuit, SSR, MOSFET, or heated bed output, use a replacement method with known good modules or contact after-sales support.
Low-Voltage Output Port Testing
Test Purpose
Confirm that low-voltage output ports such as fans, RGB, and buzzers can be controlled by Klipper.
Before connecting or replacing low-voltage loads such as fans, RGB, or buzzers, completely shut down the printer and disconnect the power supply. Do not plug/unplug cables or touch exposed terminals while powered on.
Fan Output Configuration
[output_pin FAN0]
pin: PA0
pwm: True
cycle_time: 0.010
value: 0
shutdown_value: 0
Test Commands
SET_PIN PIN=FAN0 VALUE=0.3
SET_PIN PIN=FAN0 VALUE=1
SET_PIN PIN=FAN0 VALUE=0
Result Evaluation
| Test Item | Normal Result | Abnormal Behavior | Suggested Action |
|---|---|---|---|
VALUE=0.3 | Fan spins at low speed | Does not spin or shakes | Check fan specifications, port power supply, and PWM compatibility |
VALUE=1 | Fan spins at full speed | Abnormal speed or noise | Replace fan or cross-test port |
VALUE=0 | Fan stops | Cannot turn off | Check if configuration pin is incorrect |
Abnormal Fan Risk Investigation
Some fans, due to internal drive design, back EMF, or abnormal wiring, may cause damage to the motherboard fan MOSFET, fan port, or related circuitry. If an abnormal fan is found, immediately stop using it and do not repeatedly connect it to the motherboard fan port for testing.
- After power off, confirm the fan's rated voltage matches the fan port voltage.
- After power off, check the fan's positive and negative terminals, connector orientation, and wiring appearance. Do not continue use if damage, crushing, burning, odor, or loose connectors are found.
- Prioritize cross-testing with a known good fan and complete cable assembly.
- During powered testing, only adjust speed via
SET_PINor web interface, and observe whether the fan starts/stops normally, makes abnormal noise, overheats, or emits odor. - If the low-speed setting causes abnormal shaking or stalling, or the high-speed setting causes significant noise, or the motherboard/port overheats after connecting the fan, immediately power off and stop using the fan.
- Do not use a multimeter on exposed fan port terminals to measure output. For electrical testing, contact after-sales support or a professional.
RGB / LED Output Configuration
[output_pin RGB]
pin: PA8
value: 0
shutdown_value: 0
SET_PIN PIN=RGB VALUE=1
SET_PIN PIN=RGB VALUE=0
Heating output ports such as HEAT0, HEAT1, BED_OUT are not recommended for direct control using SET_PIN. Do not energize heater cartridge or heated bed outputs without thermistor protection configured. Relevant diagnostics should be performed through complete heater configuration, temperature curves, replacement of known good modules, or after-sales support.
Input Port Testing
Test Purpose
Confirm that input ports such as endstops, probes, filament runout sensors, and toolboard HV-IN can be recognized by Klipper.
Before checking the wiring of endstops, probes, filament runout sensors, or input buttons, completely shut down the printer and disconnect the power supply. During powered queries, only actuate the mechanical part of the switch. Do not touch connectors, terminals, or exposed wiring.
gcode_button Input Testing
Suitable for testing HV-IN, door sensors, filament runout sensors, or general input pins on a toolboard.
[gcode_button IO0]
pin: ^PA1
press_gcode:
# Leave empty, only for input state query
QUERY_BUTTON BUTTON=IO0
- Execute
QUERY_BUTTON BUTTON=IO0without triggering the switch; it should returnIO0: RELEASED. - Manually actuate the mechanical part of the switch, then execute again; it should return
IO0: PRESSED. - If the state does not change, power off and check wiring, connector, pull-up
^resistor, andpinconfiguration.
Regular endstop testing often involves motion axes, steppers, motor direction, and travel limits, which are machine-wide parameters. Hardware minimal testing prefers using gcode_button to verify only the input pin state.
Accelerometer Testing
Test Purpose
Confirm that accelerometers such as ADXL345 / LIS2DW on a toolboard or external module can communicate normally.
Before checking, re-plugging, or replacing accelerometer wiring, completely shut down the printer and disconnect the power supply. Do not plug/unplug sensor modules or touch exposed pins while powered on.
- ADXL345
- LIS2DW
[adxl345]
cs_pin: gpio13
spi_bus: spi1
axes_map: x,y,z
[lis2dw]
cs_pin: gpio12
spi_bus: spi0_gpio4_gpio3_gpio2
axes_map: x,y,z
Test Command
ACCELEROMETER_QUERY
Result Evaluation
| Test Item | Normal Result | Abnormal Behavior | Suggested Action |
|---|---|---|---|
ACCELEROMETER_QUERY | Returns x/y/z data | Invalid adxl345 id or no data | After power off, check wiring, verify cs_pin, spi_bus |
Peripheral and Driver Testing: For driver testing, CAN toolboard testing, and a common anomaly reference table, please refer to Peripheral and Driver Testing.