How to Install Klipper with a Sonic Pad on an Ender 5 with a 4.2.7 Mainboard
Hello Makers,
A few days ago, a customer brought several printers to update them, including 3 CR10 Smart and an old Ender 5 with a very outdated board. We performed maintenance on them, and the customer purchased a Sonic Pad, requesting that all of them be equipped with Klipper firmware. Updating the CR10 Smart printers was not an issue; it was easy and fast from the Sonic Pad screen. However, to our surprise, the Ender 5 with that outdated board was not appearing. The solution was to replace the board with the latest one, which was the 4.2.7 version. But again, this board was not directly compatible with the Sonic Pad.
So, our ordeal began as we searched through countless blogs and couldn't find good documentation to install Klipper on this board with this printer.
Almost ready to give up, it occurred to me to install it as an Ender 3 V2, thinking it would be easy to edit values later.
I thought that until I did it, and it worked, but to my surprise, all the axes were inverted and showed incorrect values, crashing against the corners opposite to the endstops.
How did I solve this?
Here's the solution:
The first step was to configure the Sonic Pad screen as an Ender 3 V2 with a 4.2.7 board (Photo 1).
To modify the direction in which a motor homes in Klipper, you'll need to edit the Klipper configuration file, usually named printer.cfg. Here are the general steps to do it:
Locate the configuration file: This file is usually located in the directory where Klipper is installed on your 3D printer. You can access it through an SSH connection via the IP address where it's connected.
Edit the configuration file: Open the printer.cfg file with a text editor. You can do this on your computer using a simple text editor like Notepad++ or Sublime Text, or even on your printer's filesystem if you use a text editor integrated into Klipper's web interface. (Photo 2)
Find the section of the motor you want to modify: In the printer.cfg file, look for the section that defines the configurations of the motors of your printer. Typically, you'll see configurations like stepper_x, stepper_y, stepper_z, etc.
👇
[stepper_x]
[stepper_y]
Here's how I changed it:
[stepper_x]
step_pin: PB9
dir_pin: PC2
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA5
position_endstop: 235
position_max: 235
homing_speed: 80
[stepper_y]
step_pin: PB7
dir_pin: PB8
enable_pin: !PC3
microsteps: 16
rotation_distance: 40
endstop_pin: ^PA6
position_endstop:235
position_max: 235
homing_speed: 80
For the Z axis, I only increased the speed, but I'll include it here anyway:
[stepper_z]
step_pin: PB5
dir_pin: !PB6
enable_pin: !PC3
microsteps: 16
rotation_distance: 8
# endstop_pin: probe:z_virtual_endstop #enable to use bltouch
endstop_pin: ^PA7 #disable to use bltouch
position_endstop: 0 #disable to use bltouch
position_max: 255
homing_speed: 240
Save the changes: Once you've made the necessary modifications, save the printer.cfg file.
Reload the Klipper configuration: If you're editing the printer.cfg file directly on your printer's filesystem, you may need to reload the Klipper configuration for the changes to take effect. This can be done by restarting the firmware or using specific Klipper commands to reload the configuration.
Now, the Z axis was inverted, meaning that it homed downwards. If I inverted it in the code, when I printed, it would move upwards instead of downwards. So, the solution here was to invert the wires of the stepper motor. That is, if they were previously positioned as ABCD, I now placed them as DCBA (Photo 3). I did this by removing them from the same DuPont connector with a sharp-edged clamp.
That's how I solved the problem of the Ender 5 with a 4.2.7 board.
If you have any questions, leave them in the comments section below, and I'll try to address them as soon as possible.
Best regards,
Sebastián Lozano
Comments