├── imgs ├── uart.png ├── wifi.png ├── adduser.png ├── etcher.png ├── password.png └── debug_serial.png ├── LICENSE └── README.md /imgs/uart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/uart.png -------------------------------------------------------------------------------- /imgs/wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/wifi.png -------------------------------------------------------------------------------- /imgs/adduser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/adduser.png -------------------------------------------------------------------------------- /imgs/etcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/etcher.png -------------------------------------------------------------------------------- /imgs/password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/password.png -------------------------------------------------------------------------------- /imgs/debug_serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nhchiu/Klipper-on-Orange-Pi-Zero-2/HEAD/imgs/debug_serial.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Nathan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Install Klipper on Orange Pi Zero 2 2 | 3 | Due to the lack of Raspberry Pi at a reasonable price, I'm looking for some alternative SBC to run klipper on it. 4 | Orange Pi Zero 2 is a good choice. It has a quad-core CPU, 1GB of RAM, and built-in dual-band WIFI support. 5 | 6 | Here is how I get klipper running on the Orange Pi Zero 2. I mostly only cover the parts specific to Orange Pi Zero 2 here. There are plenty of tutorials for installing klipper out there, e.g. videos by [NERO 3d](https://www.youtube.com/playlist?list=PL7zrGeKp_8CRmVTuBaUQcHKlS9bJRU6vT) or [Teaching Tech](https://www.youtube.com/playlist?list=PLGqRUdq5ULsPpXumOwd87C-8LI_WXLz0n). 7 | 8 | Please refer to the user manual on [orangepi.org](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-2.html) for more detail about setting up the Orange Pi Zero 2. 9 | 10 | Also note that some part of this instruction have not been thoroughly tested and your mileage may vary. 11 | 12 | ## Prepare the Operating System 13 | 14 | The recommended OS is Debein from [orangepi.org](http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-Zero-2.html). 15 | I've tried several versions of [armbian](https://www.armbian.com/orange-pi-zero-2/) but couldn't get WIFI to work. 16 | 17 | I'm running the newest version of Debian server `Orangepizero2_3.0.6_debian_bullseye_server_linux5.16.17` as of the time of writing. 18 | 19 | ### Flash the SD card 20 | 21 | The process is basically the same as flashing Raspberry Pi OS. I recommend using the tool [belenaEtcher](https://www.balena.io/etcher/). It's available on Windows, macOS, and Linux. 22 | 23 | The installation is quite straight forward. Download the OS image and extract the `.img` file from the `.7z` file. Get the micro SD card plugged in to your computer. 24 | Finally, launch balenaEtcher, choose the correct image file and storage, press **Flash!**, and it will take care of all the rest. 25 | 26 | ![etcher](imgs/etcher.png) 27 | 28 | ### First Boot and Setup 29 | 30 | To do the setup, you have to access the Orange Pi either through SSH, or have a monitor and keyboard attached. 31 | 32 | 1. SSH through ethernet 33 | 34 | The Orange Pi has to be connected to the router through the ethernet port. 35 | 36 | Look up the IP address assigned to the Orange Pi in the setting webpage of your router. 37 | If you don't have access to the router's setting, you can use some port scanning tool like [Angry IP Scanner](https://angryip.org/) and scan for port 22 on the local network. 38 | 39 | Use your preferred SSH client to connect to the Pi: `ssh root@[IP address of your Pi]`. 40 | (If it asks for something about fingerprint, type `yes` and press `Enter`.) 41 | 42 | 2. SSH through debug serial port 43 | 44 | Use a 3.3V USB to TTL module to connect to the debug serial pins on the board. 45 | 46 | ![debug_serial](imgs/debug_serial.png) 47 | 48 | Find the serial port of the USB to TTL module on your PC (it depends on the OS you are using) and connect SSH through that port with baudrate 115200. 49 | 50 | #### Login and Setup the User 51 | 52 | 1. Login to user *root* with the default password *orangepi*. 53 | 54 | 2. Change the default password for better security by running `passwd`. 55 | 56 | 3. Update the system packages with `apt update --allow-releaseinfo-change && apt dist-upgrade`. 57 | 58 | 4. To prevent possible issues with scripts written for Raspberry Pi, create a new user *pi* by running `adduser pi` and set the password for it. 59 | 60 | ![adduser](./imgs/adduser.png) 61 | 62 | *Tip: By default Debian will not let you use a simple password. You can disable the password check by editing `/etc/pam.d/common-password` and remove the option `obscure`. You are responsible for the risk by doing so.* 63 | 64 | ![password](./imgs/password.png) 65 | 66 | 5. Give *pi* the permission to run commands as root by adding it to the group *sudo* with `adduser pi sudo`. 67 | 68 | 6. (Optional) Remove the default user *orangepi* with `userdel -r orangepi`. 69 | 70 | 7. Switch to the user *pi* by running `su -l pi` or reboot and login as *pi*. 71 | 72 | #### Connect to WIFI 73 | 74 | Run the command `nmtui-connect` and a list of available WIFI should appear. 75 | Select your SSID and enter your WIFI password. 76 | 77 | ![wifi](./imgs/wifi.png) 78 | 79 | If there is no WIFI showing up, it might be the WIFI driver is not working. Try another version of OS and do some searching. 80 | 81 | ### Install the Required Software 82 | 83 | We need to have [klipper](https://www.klipper3d.org/), [Moonraker](https://moonraker.readthedocs.io/en/latest/), and one of the clients ([Mainsail](https://docs.mainsail.xyz/), [Fluidd](https://docs.fluidd.xyz/), or [Octoprint](https://octoprint.org/)) installed to make it functional. 84 | 85 | There are two ways to do the installation: 86 | 87 | 1. Use [KIAUH](https://github.com/th33xitus/kiauh) (Recommended). 88 | 89 | Follow the instructions to run the script, and use the *Install* menu to install klipper, Moonraker, and one frontend. 90 | 91 | 2. Manual install. 92 | 93 | There is a good guide on [Mainsail's document](https://docs.mainsail.xyz/setup/getting-started/manual-setup). 94 | 95 | ## Setup klipper 96 | 97 | If the software installation goes well, the web interface should show up in your browser at `http://` . 98 | 99 | Now you can follow the [klipper documentation](https://www.klipper3d.org/Installation.html) to finish the configuration process for your printer. 100 | 101 | ### Connect to MCU through UART Pins 102 | 103 | You can use the UART pins on the 26-pin header to communicate with the MCU. 104 | 105 | ![uart](imgs/uart.png) 106 | 107 | 1. Enable the UART5 interface. 108 | 109 | Add the following line to the end of the file `/boot/orangepiEnv.txt`: 110 | 111 | ```txt 112 | overlays=uart5 113 | ``` 114 | 115 | 2. Edit the `printer.cfg` and use `serial: /dev/ttyS5` in the `[mcu]` section. 116 | 117 | 118 | ### Use Orange Pi as a MCU 119 | 120 | 1. Follow the instructions on [klipper's document](https://www.klipper3d.org/RPi_microcontroller.html) to flash the klipper_mcu. 121 | 122 | 2. Enabling SPI (Optional): 123 | Add the following lines to the end of the file `/boot/orangepiEnv.txt`: 124 | 125 | ```txt 126 | overlays=spi-spidev 127 | param_spidev_spi_bus=1 128 | param_spidev_spi_cs=1 129 | ``` 130 | 131 | 3. Enabling I2C (Optional): 132 | Add the following line to the end of the file `/boot/orangepiEnv.txt`: 133 | 134 | ```txt 135 | overlays=i2c3 136 | ``` 137 | 138 | ## Acknowledgement and Related Links 139 | 140 | - [Tutorial video by Michael ODonnell](https://www.youtube.com/watch?v=gle8Z2rA2ZA) 141 | --------------------------------------------------------------------------------