Turbo Resin is an open-source firmware for SLA resin printers.
This is the implementation of a firmware based on the Reverse engineering of the Anycubic Photon Mono 4K
Drivers:
- Read the touch screen
- Display on the touch screen
- Use the LVGL UI library
- Control the stepper motor
- Read/write to external Flash
- Read/write to external EEPROM
- Drive the LCD panel
- Read from USB flash drive
- Control the UV light
- Z=0 detection
- Being able to flash firmware via USB
Printing features:
- Better Z-Axis motion control for faster prints with fast deceleration
- Z=0 calibration
- Read .pwma files from USB flash drive
- Support multiple exposure (like RERF but configurable)
- Print algorithm
- Support more file formats to support various slicers
- Add support for other printers
- Build-plate force feedback for speed optimization. Following the work of Jan Mrázek
- Over-expose structural region of the print to add strength while letting edges be normally exposed
The first set of printers we'd like to support are the AnyCubic, Phrozen, Elegoo, and Creality printers.
Thank you!
As of now, there's no official distribution to flash the firmware via a USB stick. You'll need:
- A probe like JLink or ST-Link V2 ($11)
- A 3mm hex screwdriver
Install the Rust toolchain. Following instructions of the installation section of the Rust Embedded Book, run the following:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup component add llvm-tools-preview
cargo install cargo-binutils
# Ubuntu/Debian
sudo apt install -y gcc-arm-none-eabi gdb-multiarch libclang-dev openocd
# macOS
brew install armmbed/formulae/arm-none-eabi-gcc openocd
You are ready for building and flashing the firmware.
If you are using vscode, replace saturn
with the printer of your choice in
./.vscode/settings.json
Configure the PRINTER
, PROBE
, and FLASH_WITH
variables in the Makefile.
PRINTER
can bemono4k
orsaturn
.PROBE
can bejlink
orstlink
.FLASH_WITH
can bejlink+gdb
, oropenocd+gdb
, orprobe-run
. Pick the one that works for you.
Connect your JLink or ST-Link V2 probe to the SWD header on the printer board. Pinout is shown in Reverse engineering the Anycubic Photon Mono 4K Part1 You can also come and ask for guidance on our Discord channel.
make start_probe
: Starts the JLink or OpenOCD gdb server. You must run this in a separate terminal when usingFLASH_WITH=jlink+gdb
orFLASH_WITH=openocd+gdb
prior to other commands.make start_probe_rtt
: Show the logging statement emitted from the board.make run
: Compile the code and flash the boardmake check
: Check that the code is valid. (runscargo check
under the cover).make build
: Builds the firmware to be flashedmake flash
: Flashes the compiled code to the boardmake attach
: Provides a GDB console to the running code on board. Executec
andctrl+c
to break into a running target.make attach_bare
: Provides a GDB console to the running code on board, but doesn't assume that the code running on the board is the one that was just compiledmake restore_rom
: Flashes back the original firmware. But you must dump the original firmware first. The instructions are shown when running this command.
Turbo Resin is licensed under the GPLv3, except for the USB Host stack, which is license under Apache 2.0 or MIT at your choice.