<p>I am building a 3D printer from scratch, the bed will only move on Z and the head will stay at the top of the printer and move X and Y.</p>
<p>How do I modify the Marlin firmware to have the bed lower as it prints instead of lift like most printers.</p>

To understand normal commands from a basic printer slicer, all movement commands in g-code are written to be away from the base layer as positive. Note that
technically
a "lower the bed" printer does violate Orthonormal coordinates unless you either swap X and Y while retaining 0 in the front-left corner or put 0 in the front-right corner, going left for +X (e.g. inverting that motor axis too) and back for -Y.
Hardware
To
invert
the movement direction of an axis without rewriting the firmware there are two main ways, from mos invasive to easiest:
Mount the actuator "upside-down" as that flips the rotational normal vector.
use a left-hand-threaded rod and nut. This does not flip rotation but how rotation affects the bed.
alter the stepper cables by "crossing" one of the phases leads. The motor rotates reversed to its commands now.
Firmware
In Marlin, you can also just flip the direction of the motor via
```
configuration.h
```
by altering the line from
```
false
```
to
```
true
```
:
```
```
#define INVERT_Z_DIR true
```
```