M3-CRETE Software Setup
These development notes describe the current software reference and limited motion-check preparation for qualified technical teams. They are not a complete installation, controls-validation, cybersecurity, commissioning, or safety procedure.
Finish Part 1 (Frame) and Part 2 (Wiring) first. The motors and the control board must already be wired and checked. For this guide, keep the big power supply and the pump turned off — we only need the small power for the board and the Raspberry Pi. Motors can move on their own during testing, so keep your hands and tools away from moving parts.
What you need
- A Raspberry Pi 5 (the small computer that is the printer's brain).
- A microSD card, 32 GB or bigger, plus a way to plug it into your computer (a card reader).
- The BigTreeTech Kraken control board, already wired to the 4 Z motors (from Part 2).
- A USB cable to connect the Pi to the Kraken board.
- A touchscreen for the Pi (optional but recommended).
- A home Wi-Fi network, and another computer or phone with a web browser.
Words to know
- Raspberry Pi
- A tiny computer. It runs the printer's main software.
- Klipper
- The program that tells the motors exactly how and when to move.
- Moonraker
- A helper program that lets web pages and screens talk to Klipper.
- Mainsail
- The web page you use to control the printer from any browser.
- KlipperScreen
- The app that runs on the printer's own touchscreen.
- BTT Kraken
- The control board. The motors plug into it.
- Firmware
- A small program that runs on the control board itself.
- Flash
- To copy a program onto a board or a card.
- Config
- The settings file that tells Klipper about this machine (its motors, board, and limits).
Part 1 — Put the software on the Raspberry Pi
We will copy a ready-made printer operating system, called MainsailOS, onto the microSD card. MainsailOS already includes Klipper, Moonraker, and Mainsail.
Install Raspberry Pi Imager
On your computer, download and install Raspberry Pi Imager from raspberrypi.com/software. It is the tool that writes the operating system to the card.
Pick the device and the operating system
Put the microSD card into your computer. Open Raspberry Pi Imager and:
- Choose Device: Raspberry Pi 5.
- Choose OS: scroll to Other specific-purpose OS → 3D printing → MainsailOS, and pick the 64-bit version. (If you do not see it, download the MainsailOS file from docs.mainsail.xyz and use Use custom.)
- Choose Storage: your microSD card.
Set up Wi-Fi and turn on remote access
Before writing, click the gear / edit settings button. This part saves a lot of trouble later. Set:
- Hostname:
m3crete(this becomes the web address). - Enable SSH and set a username and password. (SSH is a way to type commands into the Pi from your computer. Write the username and password down.)
- Wi-Fi: your network name and password.
- Country / time zone: your own.
Then click Write. Wait for it to finish. This takes several minutes.
Part 2 — Turn it on and open the dashboard
Boot the Pi
Put the microSD card into the Raspberry Pi. Connect the touchscreen if you have one. Power on the Pi. The first start takes a few minutes while it sets itself up.
Open Mainsail in a browser
On your phone or computer (on the same Wi-Fi), open a browser and go to:
http://m3crete.local/
You should see the Mainsail dashboard. It will show an error like "Klipper not ready" — that is normal for now. We fix it in the next parts.
Find the Pi's IP address (check your router, or the Pi's screen) and use that instead, like http://192.168.1.50/.
Part 3 — Put firmware on the control board (Kraken)
The Kraken board needs its own small program (firmware). We build it on the Pi, then copy it to the board's microSD card.
Connect to the Pi with SSH
On your computer, open a terminal (on Windows, use "PowerShell" or "Windows Terminal"). Type this, using the username you chose, then press Enter and type your password:
ssh [email protected]
You are now "inside" the Pi. The commands below are typed here.
Build the firmware
Type these two lines, one at a time:
cd ~/klipper
make menuconfig
A blue menu opens. Use the arrow keys and Enter to set these options (leave everything else as it is):
- Micro-controller Architecture → STMicroelectronics STM32
- Processor model → STM32H723
- Bootloader offset → 128KiB bootloader
- Clock Reference → 25 MHz crystal
- Communication interface → USB (on PA11/PA12)
Press Q to quit the menu, then Y to save. Now build it:
make
When it finishes, the new firmware file is at ~/klipper/out/klipper.bin.
Copy the firmware to the Kraken
- Take the Kraken's microSD card out and put it in your computer. Make sure it is formatted FAT32 and is empty.
- Copy
klipper.binonto the card and rename it exactly tofirmware.bin. - Put the card back in the Kraken. Turn the board off, then on. Wait about 15–30 seconds — the board flashes itself.
Take the card out and check it on your computer. If the file is now named FIRMWARE.CUR, the board flashed correctly. Put the card back in the Kraken.
Connect the board to the Pi
Plug the USB cable from the Kraken into the Raspberry Pi. Make sure the board has its own power (the logic power, not the big motor supply yet).
Part 4 — Install the M3-CRETE settings
Now we add the M3-CRETE config (the settings for this exact machine) and the touchscreen app. One script does it all.
Download and run the installer
Back in the SSH window (inside the Pi), type these lines one at a time:
cd ~
git clone https://github.com/sunnyday-technologies/M3-CRETE-FIRMWARE.git
cd M3-CRETE-FIRMWARE
bash install.sh
The installer will:
- Put the M3-CRETE config into place (it backs up any old one first).
- Install KlipperScreen for the touchscreen.
- Find your Kraken board automatically and fill in its address.
- Restart everything.
If you do not want the touchscreen app, run bash install.sh --no-screen instead.
Part 5 — Check that everything is talking
Look for "Ready"
Go back to Mainsail in your browser (http://m3crete.local/) and refresh the page. At the top it should now say Klipper: Ready. That means the Pi and the board are talking. 🎉
The most common cause is the board address. In the SSH window type ls /dev/serial/by-id/ and copy the line that has "Klipper" in it. Then in Mainsail open printer.cfg, find the serial: line near the top, and paste your line after serial: /dev/serial/by-id/. Click Save & Restart.
Part 6 — First motor test (the 4 Z motors)
This is the moment of truth: making the four Z motors move. We test them one at a time, gently, at low power. Full tuning and the homing setup are covered in Part 4 (Validation).
Stand clear of the machine. A motor can spin a belt or move the gantry. Keep the big motor power supply and the pump off. Have your hand near the printer's power switch so you can cut power fast if something looks wrong.
Wake up the motors
In Mainsail, find the Console (the box where you can type commands). Type:
ZHOLD
All four Z motors should now "hold" — try to turn one by hand and it should resist. To let them go free again, type ZRELEASE.
Jog each motor, one at a time
Type these, one at a time. Each one nudges a single motor a small amount:
ZJOG MOTOR=0 DIST=5 VEL=3
ZJOG MOTOR=1 DIST=5 VEL=3
ZJOG MOTOR=2 DIST=5 VEL=3
ZJOG MOTOR=3 DIST=5 VEL=3
Watch each motor. You want to see two things:
- It moves. If a motor does nothing, check its wiring and that its driver slot is correct.
- It moves the right way. A positive number (
DIST=5) should raise that corner. If a corner goes down instead, that motor's direction needs to be flipped — note it down for Part 4.
To send a corner back down, use a negative number, like ZJOG MOTOR=0 DIST=-5 VEL=3.
If all four motors wake up and move, your software is installed and working end-to-end. Setting the motor power, tuning the built-in stall sensing, and homing all four corners to the top is the next guide: Part 4 — Validation. Do not run a full G28 yet — only the commands above.
Quick checklist
Print this page and tick the boxes as you go.
- Raspberry Pi Imager installed on my computer.
- MainsailOS written to the microSD card, with Wi-Fi, SSH, and hostname set.
- Pi boots and Mainsail opens at
http://m3crete.local/. - Klipper firmware built on the Pi (
make menuconfig+make). - Firmware copied to the Kraken as
firmware.bin; it becameFIRMWARE.CUR. - Kraken connected to the Pi by USB and powered (logic power).
- M3-CRETE installer run (
bash install.sh). - KlipperScreen shows on the touchscreen (if used).
- Mainsail says Klipper: Ready.
ZHOLDmakes all 4 Z motors hold.- Each motor jogs and moves the correct direction (note any that need flipping).
If you get stuck
- Read the firmware notes in the repo: M3-CRETE-FIRMWARE on GitHub.
- Ask a question on the M3-CRETE Discussions page. Build reports help everyone.
- For Klipper basics, see klipper3d.org and docs.mainsail.xyz.
Part 4 — Preliminary Motion Checkout. Review the limited current, direction, sensorless-homing, and Z-alignment observations and the professional verification work that remains. It is not safety qualification or permission to print.
M3-CRETE is an experimental open-hardware reference, not a finished certified appliance or construction machine. It is intended for qualified technical users, R&D labs, supervised institutional programs, and experienced builders. Any AC mains wiring, control-box integration, grounding, disconnects, or emergency-stop power work must be done by qualified personnel or a licensed electrician where required. Hardware is published under CERN-OHL-W-2.0; this guide is CC BY 4.0.