Menu
andipanda.dev

Graber i3: Independent Z-Axis Motor Control on RAMPS 1.4

After installing a bed probe on my Graber i3, calibration became much easier. I could now obtain repeatable measurements and adjust the bed position based on actual values rather than relying only on my own judgment.

However, there was another aspect of the printer's design that I wanted to address: its two Z-axis motors.

They are responsible for moving the X-axis gantry vertically, and how well they work together affects the nozzle's position relative to the bed surface.

Two Motors, One Driver

My Graber i3 uses a RAMPS 1.4 board.

In the standard configuration, both Z-axis motors are connected to two sockets controlled by a single driver.

This arrangement allows both sides of the gantry to move together, but it doesn't provide independent control.

If one side of the gantry ends up slightly higher than the other, it's impossible to correct the position of just one motor through software with this wiring.

You have to level the gantry manually or compensate for the difference by adjusting the bed.

I wanted to be able to adjust each side independently.

The Unused Second Extruder Channel

RAMPS 1.4 is designed to support two extruders.

But my printer only has one, so the second extruder channel, E1, was unused.

I decided to use it for the second Z-axis motor.

All I needed to do was change the motor connections: leave one motor on the original Z channel and connect the other to E1.

This gave each motor its own driver and separate control signals.

The best part was that I didn't need to buy any additional electronics for this upgrade.

Everything I needed was already available on the RAMPS 1.4 board.

Configuring Klipper

By this point, the printer was already running Klipper, so the remaining task was to update its configuration.

The primary Z-axis motor is defined in the stepper_z section, while the second is defined in stepper_z1.

For the additional motor, I used the control pins assigned to the E1 channel on RAMPS 1.4.

During normal movement, both motors continue to operate together as a single Z axis.

However, they can now be controlled independently during calibration procedures.

It's worth mentioning that this capability isn't exclusive to Klipper. Marlin also supports independent Z-axis drivers and automatic alignment.

I was simply already using Klipper when I made this modification, so I continued working with it.

Aligning the Gantry

Why separate the motor controls in the first place?

Even if both motors receive identical commands, that doesn't guarantee that the left and right sides of the gantry will always remain at exactly the same height.

A slight misalignment can develop due to mechanical characteristics or a change in one motor's position while the power is off.

As a result, the X axis may become tilted relative to the bed.

Previously, this difference had to be corrected manually.

Now I had the ability to adjust each side of the gantry separately.

Klipper provides the Z_TILT_ADJUST procedure for this purpose. It uses measurements from the bed probe to determine and correct the gantry's tilt.

This gave the previously installed probe another potential use.

However, it's important to understand the difference between gantry alignment and bed surface compensation.

Z_TILT_ADJUST corrects the relative positions of the gantry's two sides, while BED_MESH_CALIBRATE compensates for variations in the bed surface during printing.

These are two different tasks, although both can affect first-layer quality.

What the Upgrade Achieved

The main result was that the two Z-axis motors were no longer controlled by a single driver.

Each motor now had its own control channel, making it possible to adjust the two sides of the gantry independently.

At the same time, I kept the printer's existing electronics and made use of capabilities already built into the RAMPS 1.4 design.

For me, this was another example of how a small modification can expand the capabilities of old hardware without significant expense.

Of course, independent motor control doesn't eliminate mechanical play, misaligned guides, or other mechanical issues.

So my work on the Graber i3 didn't end there.

What's Next

The next stage was replacing the stepper motor drivers.

The old drivers worked, but the printer was still fairly noisy.

I wanted to reduce motor noise without replacing the entire control electronics.

That's the upgrade I'll cover in the next article.