Skip to main content

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.

Safety Boundaries

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​

  1. Back up the current printer.cfg and related include files.
  2. Create a new temporary printer.cfg, and first write the basic minimal configuration below.
  3. Then, according to the current test item, append the corresponding test configuration snippet after the basic minimal configuration.
  4. 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.
  5. 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
Configuration Tip

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.

  1. MCU connection and mainboard temperature.
  2. Temperature sensor or ADC input.
  3. Low-voltage output ports, such as fans, RGB, buzzers.
  4. Input ports, such as endstops, probes, filament runout detection.
  5. Accelerometer.
  6. Stepper drivers and motors.
  7. 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​

  1. Change serial in the basic configuration and sensor_pin in the test snippet to the actual mainboard values.
  2. After powering off, confirm that the thermistor connector is firmly plugged in and the wires are not damaged.
  3. Power on and restart Klipper.
  4. Check on the Mainsail / Fluidd temperature panel whether MCU_TEMP and ADC1 display reasonable temperatures.

Result Judgment​

Test ItemNormal ResultAbnormal BehaviorRecommended Action
MCU temperatureDisplays near ambient temperature or slightly higherCannot connect to MCUCheck serial, firmware, and USB/CAN connection
ThermistorDisplays near ambient temperatureADC out of range, extremely high or extremely lowAfter powering off, check the connector, wire order, and sensor model
Note

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.

Power-Off Operation

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 ItemNormal ResultAbnormal BehaviorRecommended Action
VALUE=0.3Fan rotates at low speedDoes not rotate or jittersCheck fan specifications, port power supply, and PWM compatibility
VALUE=1Fan rotates at full speedAbnormal speed or abnormal noiseReplace the fan or cross-test the port
VALUE=0Fan stopsCannot be turned offCheck whether the configuration pin is written incorrectly

Troubleshooting Abnormal Fan Risks​

Fan Risk

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.

  1. After powering off, confirm that the fan's rated voltage matches the fan port voltage.
  2. 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.
  3. Prefer cross-testing with a known-good fan and a finished wire harness.
  4. During powered testing, only adjust the speed via SET_PIN or the web interface, and observe whether the fan starts/stops normally, makes abnormal noise, overheats abnormally, or emits odor.
  5. 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.
  6. 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
Testing Heating Outputs This Way Is Not Recommended

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.

Power-Off Operation

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
  1. When the switch is not triggered, execute QUERY_BUTTON BUTTON=IO0, which should return IO0: RELEASED.
  2. After manually triggering the mechanical part of the switch, execute it again, which should return IO0: PRESSED.
  3. If the state does not change, after powering off, check the wire order, connector, pull-up ^, and pin configuration.
Why Not Use Ordinary Endstop Configuration

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.

Power-Off Operation

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]
cs_pin: gpio13
spi_bus: spi1
axes_map: x,y,z

Test Commands​

ACCELEROMETER_QUERY

Result Judgment​

Test ItemNormal ResultAbnormal BehaviorRecommended Action
ACCELEROMETER_QUERYReturns x/y/z dataInvalid adxl345 id or no dataAfter 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​

  1. Turn off test outputs and disable test motors; if wiring changes are involved, fully power off first.
  2. Restore the backed-up official configuration and include files, remove temporary test sections, and eliminate duplicate pins and section names.
  3. 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.

Loading...