BQ Prusa Hephestos - z-axis scaled 10x down, how to fix from steps per unit?

Hi there!

I have a Prusa clone from BQ (a MK1-ish clone that uses a RAMPS board) and am trying to get it up and running. So far I have two main issues:

  • z-axis seems to be scaled down by a factor of 10. I am using the defaults in the RAMPS config sample (16 microsteps, 8 for rotation distance),
  • I can’t figure out the pins for the 20x4 LCD. I have been looking for sample configs for it, but I can’t find anything regarding RAMPS, and every time I add the [display] section klipper just stops working.

The Z-axis is the blocking issue here. I saved my M503 output, but every time I try to set the rotation to something that makes sense, I get an MCU step scheduling error.

# Marin M503 response from Hephestos 2.5.1:
# Send: M503
# Recv: echo:Steps per unit:
# Recv: echo:  M92 X80.00 Y80.00 Z4000.00 E100.47
# Recv: echo:Maximum feedrates (mm/s):
# Recv: echo:  M203 X85.00 Y85.00 Z3.30 E25.00
# Recv: echo:Maximum Acceleration (mm/s2):
# Recv: echo:  M201 X1100 Y1100 Z100 E10000
# Recv: echo:Acceleration: S=acceleration, T=retract acceleration
# Recv: echo:  M204 S4000.00 T1000.00
# Recv: echo:Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s),  Z=maximum Z jerk (mm/s),  E=maximum E jerk (mm/s)
# Recv: echo:  M205 S0.00 T0.00 B20000 X20.00 Z0.40 E5.00
# Recv: echo:Home offset (mm):
# Recv: echo:  M206 X0.00 Y0.00 Z0.00
# Recv: echo:PID settings:
# Recv: echo:   M301 P23.05 I2.00 D66.47
# Recv: echo:Filament settings: Disabled

In the meantime, so that other people with similar issues can find a usable answer, I’ve fixed the LCD by trawling through the aliases file in the source code:

[display]
lcd_type: hd44780
rs_pin: PH1
e_pin: PH0
d4_pin: PA1
d5_pin: PA3
d6_pin: PA5
d7_pin: PA7
encoder_pins: ^PC6, ^PC4
click_pin:  ^!PC2

Still no idea as to why the z-axis is 10x off…

Hello @rcarmo !

Here you find a guide to calculate the rotation distance:

https://www.klipper3d.org/Rotation_Distance.html

Referring to this,

rotation_distance = <full_steps_per_rotation> * <microsteps> / <steps_per_mm>
rotation_distance = 200 * 16 / 4000
rotation_distance = 0.8

Thanks, but that was not the problem. I was already trying to use 0.8 - the real problem was that when doing anything but homing, the printer was exceeding the limits of what the RAMPS can do, but it didn’t actually move when it did.

So I had to set a limit on Z axis speed. I can now print and have been going through the set up for extrusion tuning, input shaping, etc.

Again, in case someone else finds this via Google, here’s my complete config:

# Klipper config for BQ Prusa Hephestos (atmega2560 RAMPS with HD44780 display)

[display]
lcd_type: hd44780
rs_pin: PH1
e_pin: PH0
d4_pin: PA1
d5_pin: PA3
d6_pin: PA5
d7_pin: PA7
encoder_pins: ^PC6, ^PC4
click_pin:  ^!PC2

[stepper_x]
step_pin: PF0
dir_pin: !PF1
enable_pin: !PD7
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PE5
position_endstop: 0
position_max: 200
homing_speed: 50

[stepper_y]
step_pin: PF6
dir_pin: PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 40
endstop_pin: ^!PJ1
position_endstop: 0
position_max: 200
homing_speed: 50

[stepper_z]
step_pin: PL3
dir_pin: !PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 0.8
endstop_pin: ^!PD3
position_endstop: 0
position_max: 200
homing_speed: 3

[extruder]
step_pin: PA4
dir_pin: PA6
enable_pin: !PA2
microsteps: 16
max_extrude_only_distance: 100.0
# measured extruding 100mm of filament
rotation_distance: 31.825
nozzle_diameter: 0.400
filament_diameter: 1.750
# measured using test print
pressure_advance: 0.0048
heater_pin: PB4
sensor_type: EPCOS 100K B57560G104F
sensor_pin: PK5
min_temp: 0
max_temp: 250

[input_shaper]
# First pass. Printer needs to be moved to another location
shaper_freq_x: 33.333
shaper_freq_y: 21.739130435
shaper_type: mzv

# I don't heave a heated bed
#[heater_bed]
#heater_pin: PH5
#sensor_type: EPCOS 100K B57560G104F
#sensor_pin: PK6
#control: watermark
#min_temp: 0
#max_temp: 130

[fan]
pin: PH6

[mcu]
serial: /dev/ttyUSB0
#/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_AJ031CDW-if00-port0

[printer]
kinematics: cartesian
max_velocity: 300
max_accel: 3000
max_z_velocity: 3
max_z_accel: 100

# Common EXP1 / EXP2 (display) pins
[board_pins]
aliases:
    # Common EXP1 header found on many "all-in-one" ramps clones
    EXP1_1=PC0, EXP1_3=PH0, EXP1_5=PA1, EXP1_7=PA5, EXP1_9=<GND>,
    EXP1_2=PC2, EXP1_4=PH1, EXP1_6=PA3, EXP1_8=PA7, EXP1_10=<5V>,
    # EXP2 header
    EXP2_1=PB3, EXP2_3=PC6, EXP2_5=PC4, EXP2_7=PL0, EXP2_9=<GND>,
    EXP2_2=PB1, EXP2_4=PB0, EXP2_6=PB2, EXP2_8=PG0, EXP2_10=<RST>
    # Pins EXP2_1, EXP2_6, EXP2_2 are also MISO, MOSI, SCK of bus "spi"
    # Note, some boards wire: EXP2_8=<RST>, EXP2_10=PG0

# See the sample-lcd.cfg file for definitions of common LCD displays.

#*# <---------------------- SAVE_CONFIG ---------------------->
#*# DO NOT EDIT THIS BLOCK OR BELOW. The contents are auto-generated.
#*#
#*# [extruder]
#*# control = pid
#*# pid_kp = 19.487
#*# pid_ki = 0.764
#*# pid_kd = 124.227