Hardware Testing Methods
This document collects minimal test methods for common hardware modules, used to isolate individual hardware during troubleshooting and confirm whether the problem comes from configuration, wiring harness, the module itself, or the mainboard port.
The testing approach comes from mainboard and toolhead board test configurations: use manual_stepper DriveN to test drivers, use output_pin to test low-voltage outputs, use temperature_sensor to test temperature/ADC, use gcode_button to test input signals, and use adxl345 / lis2dw to test accelerometers.
All steps involving wiring, plugging/unplugging, organizing wire harnesses, adjusting jumper caps or DIP switches must be performed after the printer is fully powered off and the power supply is disconnected. It is forbidden to hot-plug driver modules, stepper motor wires, CAN wires, probe wires, fan wires, or accelerometer modules.
This document does not require customers to solder, disassemble power supplies, modify mains wiring, measure exposed high-voltage/high-current terminals, or use professional instruments such as oscilloscopes. For electrical testing involving heater cartridges, heated beds, SSRs, MOSFETs, or power input terminals, please contact after-sales support or a professional.
Start with the Tool, Judge Results According to This Document
First use the Klipper Quick Test to select the board and interface; you can add multiple test items to the list and merge the configurations. This document retains general examples and result judgment; for driver and CAN tests, see Peripherals and Driver Testing.
The tool's current output port test only generates on/off commands; the fan PWM example in this document is a manual configuration example, and fractional duty cycles can only be used when pwm: True is configured. The tool does not automatically execute any hardware commands.
Preparation Before Use
Back Up the Original Configuration
- Back up the current
printer.cfgand relatedincludefiles. - Create a new temporary
printer.cfg, and first write the basic minimal configuration below. - Then, according to the current test item, append the corresponding test configuration snippet after the basic minimal configuration.
- You can merge configurations for multiple test items, but verify them one by one during execution; when faults are difficult to locate, keep only one module under test to avoid mutual interference.
- After the test configuration passes, restore the original configuration and continue troubleshooting the whole machine.
Basic Minimal Configuration
All temporary tests share one basic configuration. For USB serial, fill in serial; for CAN connection, fill in canbus_uuid; uncomment one of them according to the actual connection and fill in the value. If both are commented out, the MCU cannot be connected. The single-item/merged configurations generated by the tool already include the basic section; do not append it again.
[mcu]
# serial:
# canbus_uuid:
[printer]
kinematics: none
max_velocity: 200.00
max_accel: 40000.00
The pins in the test configuration must be based on the actual mainboard, toolhead board manual, or manufacturer template. Do not directly copy the example pins to a different mainboard model.
Recommended Test Order
- MCU connection and mainboard temperature.
- Temperature sensor or ADC input.
- Low-voltage output ports, such as fans, RGB, buzzers.
- Input ports, such as endstops, probes, filament runout detection.
- Accelerometer.
- Stepper drivers and motors.
- CAN toolhead board communication.
MCU and Temperature Sensor Test
Test Purpose
Confirm that the MCU can be connected by Klipper, and verify whether the mainboard temperature, thermistor, or ADC input can display normally.
Test Configuration Snippet
Append the following snippet after the basic minimal configuration:
[temperature_sensor MCU_TEMP]
sensor_type: temperature_mcu
[temperature_sensor ADC1]
sensor_type: Generic 3950
sensor_pin: PF4
Test Steps
- Change
serialin the basic configuration andsensor_pinin the test snippet to the actual mainboard values. - After powering off, confirm that the thermistor connector is firmly plugged in and the wires are not damaged.
- Power on and restart Klipper.
- Check on the Mainsail / Fluidd temperature panel whether
MCU_TEMPandADC1display reasonable temperatures.
Result Judgment
| Test Item | Normal Result | Abnormal Behavior | Recommended 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 extremely low | After powering off, check the connector, wire order, and sensor model |
Only observe the temperature readings; do not heat the nozzle or heated bed for the purpose of testing temperature. If you suspect an abnormality in the heating circuit, SSR, MOSFET, or heated bed output, use the replacement method with a known-good module or contact after-sales support.
Low-Voltage Output Port Test
Test Purpose
Confirm whether 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, please fully turn off the printer and disconnect the power supply. Do not plug/unplug wire harnesses or touch exposed terminals while powered on.
Fan Output Configuration Snippet
Append the following snippet after the basic minimal 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 Judgment
| Test Item | Normal Result | Abnormal Behavior | Recommended Action |
|---|---|---|---|
VALUE=0.3 | Fan rotates at low speed | Does not rotate or jitters | Check fan specifications, port power supply, and PWM compatibility |
VALUE=1 | Fan rotates at full speed | Abnormal speed or abnormal noise | Replace the fan or cross-test the port |
VALUE=0 | Fan stops | Cannot be turned off | Check whether the configuration pin is written incorrectly |
Troubleshooting Abnormal Fan Risks
Some fans, due to internal driver design, back-EMF voltage, or abnormal wire order, may cause damage to the mainboard fan MOSFET, fan port, or MCU-related circuits. If an abnormal fan is found, stop using it immediately and do not repeatedly connect it to the mainboard fan port for testing.
- After powering off, confirm that the fan's rated voltage matches the fan port voltage.
- After powering off, check the fan's positive and negative poles, connector orientation, and wire harness appearance. If you find damaged insulation, pinching, burning, odor, or loose connectors, do not continue using it.
- Prefer cross-testing with a known-good fan and a finished wire harness.
- During powered testing, only adjust the speed via
SET_PINor the web interface, and observe whether the fan starts/stops normally, makes abnormal noise, overheats abnormally, or emits odor. - If the low-speed setting jitters abnormally or stalls, the high-speed setting has obvious abnormal noise, or the mainboard/port overheats abnormally after connecting the fan, power off immediately and stop using the fan.
- Do not use a multimeter to touch the exposed terminals of the fan port to measure output; if electrical testing is needed, please contact after-sales support or a professional.
RGB / LED Output Configuration Snippet
The following applies only to ordinary switch-type LED outputs, not to addressable LEDs such as WS2812/NeoPixel.
Append the following snippet after the basic minimal configuration:
[output_pin RGB]
pin: PA8
value: 0
shutdown_value: 0
SET_PIN PIN=RGB VALUE=1
SET_PIN PIN=RGB VALUE=0
For heating output ports such as HEAT0, HEAT1, and BED_OUT, it is not recommended for customers to control them directly with SET_PIN. Do not turn on the heater cartridge or heated bed output without thermistor protection configured; related troubleshooting should be completed through full heater configuration, temperature curves, replacement with a known-good module, or after-sales inspection.
Input Port Test
Test Purpose
Confirm whether input ports such as endstops, probes, filament runout detection, and toolhead board HV-IN can be recognized by Klipper.
Before checking the wire order of endstops, probes, filament runout detection, or input buttons, please fully turn off the printer and disconnect the power supply. When querying while powered on, only trigger the mechanical part of the switch; do not touch connectors, terminals, or exposed wires.
gcode_button Input Test
Suitable for testing HV-IN, door control, filament runout detection, or ordinary input pins on the toolhead board.
Append the following snippet after the basic minimal configuration:
[gcode_button IO0]
pin: ^PA1
press_gcode:
# Leave blank; used only for input state queries
QUERY_BUTTON BUTTON=IO0
- When the switch is not triggered, execute
QUERY_BUTTON BUTTON=IO0, which should returnIO0: RELEASED. - After manually triggering the mechanical part of the switch, execute it again, which should return
IO0: PRESSED. - If the state does not change, after powering off, check the wire order, connector, pull-up
^, andpinconfiguration.
Ordinary endstop testing usually involves whole-machine parameters such as motion axes, steppers, motor direction, and travel range. For minimal hardware testing, gcode_button is preferred, as it only verifies the input pin state.
Accelerometer Test
Test Purpose
Confirm whether the ADXL345 / LIS2DW accelerometer on the toolhead board or external module can communicate normally.
Before checking, re-plugging, or replacing the accelerometer wire harness, please fully turn off the printer and disconnect the power supply. Do not plug/unplug the sensor module or touch exposed pins while powered on.
Append the following snippet after the basic minimal configuration:
- 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 Commands
ACCELEROMETER_QUERY
Result Judgment
| Test Item | Normal Result | Abnormal Behavior | Recommended Action |
|---|---|---|---|
ACCELEROMETER_QUERY | Returns x/y/z data | Invalid adxl345 id or no data | After powering off, check the wire harness and verify cs_pin, spi_bus |
Peripheral and driver testing: For driver testing, CAN toolhead board testing, and a comparison table of common abnormalities, please refer to Peripherals and Driver Testing.
After Testing, Return to Whole-Machine Debugging
- Turn off test outputs and disable test motors; if wiring changes are involved, fully power off first.
- Restore the backed-up official configuration and include files, remove temporary test sections, and eliminate duplicate pins and section names.
- After starting Klipper, re-confirm temperature, endstop status, and motion direction, then continue with the Machine Debugging Guide.
Do not continue executing G28, leveling, PID, or printing procedures while kinematics: none is active. For temperature-controlled heating, restore the official configuration first and read Heating and Temperature Calibration.