Skip to main content

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.

Safety Boundary

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

  1. Backup the current printer.cfg and related include files.
  2. Test only one hardware type at a time to avoid multiple modules affecting the diagnosis.
  3. After the test configuration passes, restore the original configuration to continue troubleshooting the entire machine.
Configuration Reminder

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.

  1. MCU connection and motherboard 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 sensors.
  5. Accelerometer.
  6. Stepper driver and motor.
  7. 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

  1. Change serial and sensor_pin to the actual values for the motherboard.
  2. After powering off, confirm the thermistor connector is securely plugged in and the wiring is intact.
  3. Power on and restart Klipper.
  4. Check the MCU_TEMP and ADC1 readings on the Mainsail / Fluidd temperature panel to see if they display reasonable temperatures.

Result Evaluation

Test ItemNormal ResultAbnormal BehaviorSuggested 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 lowAfter power off, check connector, wiring, and sensor model
Note

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.

Power Off Operation

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 ItemNormal ResultAbnormal BehaviorSuggested Action
VALUE=0.3Fan spins at low speedDoes not spin or shakesCheck fan specifications, port power supply, and PWM compatibility
VALUE=1Fan spins at full speedAbnormal speed or noiseReplace fan or cross-test port
VALUE=0Fan stopsCannot turn offCheck if configuration pin is incorrect

Abnormal Fan Risk Investigation

Fan Risk

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.

  1. After power off, confirm the fan's rated voltage matches the fan port voltage.
  2. 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.
  3. Prioritize cross-testing with a known good fan and complete cable assembly.
  4. During powered testing, only adjust speed via SET_PIN or web interface, and observe whether the fan starts/stops normally, makes abnormal noise, overheats, or emits odor.
  5. 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.
  6. 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 Not Recommended for This Testing

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.

Power Off Operation

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
  1. Execute QUERY_BUTTON BUTTON=IO0 without triggering the switch; it should return IO0: RELEASED.
  2. Manually actuate the mechanical part of the switch, then execute again; it should return IO0: PRESSED.
  3. If the state does not change, power off and check wiring, connector, pull-up ^ resistor, and pin configuration.
Why Not Use a Regular Endstop Configuration

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.

Power Off Operation

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

Test Command

ACCELEROMETER_QUERY

Result Evaluation

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

Loading...