Klipper and the RPI-zero, Low Cost Remote Printer Control!
HTML-код
- Опубликовано: 10 фев 2025
- Got an old RPIzero you picked up awhile back to hit the limit for free shipping? Put that thing to use and get a great light weight, low cost klipper interface in the process. (helpful links and commands at the bottom)
If you like what you see and want to help support the channel
/ nero3dp
www.buymeacoff...
Looking for a great first 3d printer? Grab an Ender 3 V2 from the affiliate link below, get a great deal on a machine AND help the channel out in the process.
www.banggood.c...
Need filament or a printer? Purchase anything from MatterHackers with the link below and a portion of the sale goes to supporting the channel
www.matterhacke...?aff=7543
I NOW HAVE A TWITTER, follow me @ / 3dpnero
Resources:
-community.octo...
-github.com/Kev...
1. Swapping ports used by GPIO and Bluetooth
sudo nano /boot/config.txt
Move the cursor to the very end and add:
dtoverlay=pi3-miniuart-bt
2. Disabling the serial console
sudo nano /boot/cmdline.txt
Look for following string (text) and delete it
console=serial0,115200
3. Raspi-config stuff
sudo raspi-config
Go to 'Interfacing Options'
Then P6 - Serial
Then No
Then Yes
Then go down to finish and reboot.
4. Rebuild your Klipper MCU firmware, unselecting "Use USB for communication (instead of serial). Flash updated firmware to your board
5. Update your printer.cfg:
serial: /dev/ttyAMA0
For those curious about the initial changes in SSH, the Pi has two types of UART... Hardware, and software. By default the Pi uses the hardware UART for Bluetooth, and leaves the software UART available on the GPIO parts. Those commands enable the HARDWARE UART on the GPIO pins, so that Klipper has direct hardware access instead of emulated UART via software. This is especially important on a Pi Zero W, as it's already low on processing power, and software UART would cause further issues.
Also, hardware UART guarantees 115200 baud; Pi a with Bluetooth have a (bad) habit of making the Bluetooth modem perfect frequency, while the software UART is a few Hz off. Sadpanda.
how can I make these commands work on orange pi zero?
This video will save people lots of time searching the internet for the info and give a simpler build. Great job.
I've come back to this video 5+ times to learn how to do UART connection.
Thank you,
Great video! There are so many 3D printing channels out there, but very few actually get into the nitty and gritty details behind great setups.
Great video!
With a little tinkering to the printer.cfg file i was able to get my SKR Mini E3 V1.2 with BL-touch and an Ender-extender 300 kit set up with Klipper and Mainsail. This video helped tremendously.
The actual MainsailOS install part was easy, but the part where i had some digging to do was at 9:41 . Needed to ensure that i am choosing the correct UART on the board (SKR documentation lists which pins are which UART port) and then following the instructions in the Klipper Printer config file comments section. Once that part was done it was copy, paste, adjust for externer300 size, rename, print a test. Worked out perfectly and i got rid of a lot of the cable mess!
Will be doing it for my RatRig once it comes in, and going the UART route as well! (unless there is a good reason not to?) Thank you, Thank you, Thank you!!!
Great video, your production quality has gone up since many months ago
Just a note on the connection between the pi and printer board, in this case both use 3.3V for logic, but for example ramps 1.4 and other arduino based boards usually use 5V for logic, so you will need to add some sort of a voltage devider so you don't fry your pi.
Otherwise great idea and I'm definitely giving it a try
It's worth pointing out I think that you can make the Pi Zero work entirely over USB too so that you can preserve the ability to use the display. You can even power the device via the USB port too.
All you need to do is place a jumper wire from the 5V power line (can be taken from many jumpers on the printer board) and place it to the USB power line, which is also probably attached to a jumper. Then the Pi powers and communicates via USB and all you need is a micro > USB A adaptor and then a standard USB cable. I've got it working this way even with a Pi Zero that doesn't come with wifi. The USB port on the Zero connects to a micro>A adaptor and then plugs into a small USB hub. The Pi and Wifi dongle then plug into the hub.
Super helpful, thanks! Just followed the steps for the new Pi Zero 2, and I'm happy that it worked with the same steps!
did you have any issues regarding powering 2W from TFT port? I'm planning the same setup.
Oh my god! How mutch headache could I had prevented if I rewatched your guide!
Thanks a bunch . Works great on my SKR1.3 now... very clear instructions.
Fantastic idea to simplify the V0 further. Not using a cam myself, but would love to see a short tutorial setting up mainsail with a pi-camera in the V0 standard setup :)
Would just need to plug it in and it should self identify. Then make sure its enabled in the mainsail settings page
Ya know, you keep this up and your going to have a bonafide RUclips channel. 😄
It already is bona fide, i.e., you are not dreaming watching it.
I'm not sure you follow what I was saying, and I'm not sure that means what you think it means. But, it's all in good fun, so meh...
Would love to see this done for ender 3 v2 with input shaping. Also thanks for the video, have been searching for setup on rpi zero w for while now
I've run a printer with a Pi Zero W and a Logitech C720 and Klipper with no problems with Mainsail. I'm currently running a printer with a Beaglebone Black which also has a single core 1GHz processor, and it works great with the C720 and Mainsail. Even with PA and input shaping enabled it pretty much always show 30-40% idle in top while printing and streaming video.
One thing to note, the Pi cam I tested used noticeably more processor than the Logitech camera. I would not recommend using a Pi camera.
Did the zero worked with the input shapping?
You rock Nero!
Your audio is on point
Thank you very much, fantastic video, works perfect on a Creality V4.2.5
Most USB2 full hd webcam are MJPG encoded, which is basically a bunch of jpg files back to back. MJPG steamer can forward those with almost zero cpu overhead, if you set it up correctly.
How would I do that?
@@FilmFactry Check the docs for input_uvc, avoid any option that says it "disables MJPG." Basically, don't use -r, -y, or -f, and use -e of you want to lower the frame rate.
@@LucasHartmann Thank you. I want to run an endoscope as a nozzle cam:-)
@@FilmFactry I guess you may be out of luck then. 1080p webcams are usually MJPG, but endoscopes (at least the 3 I own) are mostly 480p and give uncompressed YUYV images. There is no avoiding CPU overhead with these.
So we can used klipper on pizero. Geeat way reduce cost to harvest klipper for benefit. Yessss.
Thanks! Great stuff, works for the Octopus v1.1 board on fluidd
I liked the smash button. A correction however, it's AM0 > zero not O ;)
Correction to your correction it's AMA0 not AM0 :-) (Not wanting to be a grammar nazi here but trying to avoid an error source for people who see your helpful correction)
Great video as always 👍
Awesome vid as always. Cheers!
If only I saw this video 2 months ago!
Nero thank you so much for the awesome vidsyou make full of great information, I finally managed to get my pi Zero w connected to skr 1.4 turbo via uart cable, was a pain to get setup and stacks of reading , but thank you it's awesome
how you did. it got error.
@@robo909 don't use mainsail it works better with fluidd, if you still have issues let me know
I have a BTT E3 BTT board I had it running on klipper with a PI4 but I got some zero2 w. I just can't get this to work. I get a serial connection closed error. I have rebuilt and reflashed MCU. I changed the MCU to your number5 instruction. IDK what's is going on. But I will keep at it.
Unfortunately I'm dead in the water. I had 2 different pi zero 2 w hook upto the tft pin on my board and noticed after about an hour no more green light on the pi and the 5v pin on the pi is only 4.8. I'm waiting on new SD cards because I think the pi's might be dead now
Just what i need. Thanks for another great video. Btw, for this setup, a fresh install and setup is required?
yes just save your config before do it.
Ok, thanks.
Excellent video. I was going to upgrade one of my printers to 32 bit, but Klipper sounds the way to go! Can you post a link to the pi mount?
print one bro its like 10 faces. I will happily receive an .stl from you afterwards... :)
Can I run one board off of the uart tx/rx pins, and then run another board off a USB port? or would changing that file and removing the serial section disable serial over USB?
I would recommend to always show how to change that default password. Default passwords are bad.
Normally I would agree with you, but on a secured internal network, its not an issue.
Thanks!
Great guide!
"simple. You just need to find on your board, where the available TX, RX, 5V and GND connectors are"
I tried for multiple hours now for readable schematics for an aquila Motherboard. I want to use the screen port but how can i find out where which Pin is?
The funny thing is that the reason this works is that TFT is not a screen - LCD is a screen. TFT is an entire self contained host computer that ordinarily would send Marlin GCODE over that serial connection. This is the reason why with very limited software like Marlin a TFT may be able to connect to wifi, respond to touch, cache gcode etc. while Marlin could never do all that on its own
I also had to modify the country code is at the end of the config file for mainsail
Correct, forgot to mention that is required on the RPIzero sometimes
I have a Raspberry Pi Zero without wifi, but I've managed to install a ESP8266 over it (you have to remove the flash memory from a ESP12F, though. The firmware for the ESP8266 is loaded into it via SPI from the Raspberry Pi at boot). I will try this.
Would you make a video some time about Arc welder and speed printing with voron?
So if we're connecting the MCU to the Pi via UART, then we're gonna power the Pi from the MCU itself. What if I want to power the Pi independently from the MCU?
In my case I want to power a "Pi Zero 2 W" through it's dedicated micro-USB power port, but communicate with the MCU throught UART instead of the second micro-USB port?
Do I just connect the RX, the TX and GND as you say near the end of the video?
Hey here's a question. If you use UART for power and comunication, how would you then calibrate input shaping using an accelerometer ?
Would you have to power the Pi with an USB (therefore having to reconfigure a lot of stuff), then calibrate input shaper, then reconfigure it back to use UART ?
EDIT : Ah nvm, they're different pins for the accelerometer...
Nice video! How can i do this on the creality 4.2.2 board? I do not find any datasheet / wireplan for the board. :/
"make menuconfig"
select "Enable extra low-level configuration options" and select
serial on USART3 PB11/PB10, which is broken out on the 10 pin IDC
cable used for the LCD module as follows:
3: Tx, 4: Rx, 9: GND, 10: VCC to gpio rpi zero
Did you manage to get this working?
👍👍😎👍👍 THANK you so much for this excellent tutorial
Simple question. I.e. anycubic trigorilla board has No rxd txd port .. is it possible to use the Pi Zero USB port Connected to the printer USB port?
Great video, keep them coming. Where is the SKR mini V2.0 available? I can only find a V1.1 online.
Aliexpress. Amazon etc. Search skr mini e3 v2
Can this be done on the original Ender 3 main board? I am in India and its difficult to get any other boards at fair price.
If you connect a Raspberry to the printer via USB, you do nothing other than establish a UART connection via USB. The UART protocol is only packed once into the USB protocol and then transmitted where it is converted back to UART.
If you can get your hand on a Raspy Zero 2W then you will have the same CPU as a Raspberry 3B. But there are weaknesses in WIFI when you connect a full HD camera. It should print well.
what would i use on the creality Ender 5 Plus Silent Mainboard, V2.2? Im not seeing TFT pins.
You said because this is an SKR board, you have to go through all the SD card thing.
I was googlimg around and could not find if this is only one time thing, or will I habe to this for every update.
Also are there boards that can be flash over uart?
The more serious downside from powering the Raspberry Pi from the controller board in the printer is the higher chance of uncontrolled shutdowns of the Linux running on the Pi when someone just switches off the printer. If the timing is wrong, you'll interrupt some I/O to the linux file system on the SD card and have some corruption happen. The Pi uses so little power why not just leave it turned on with its own small little wall wart?
This board was kind of designed with the voron v2.4 in mind, which means klipper will the firmware a lot of using and there's quite a few of us that have been running machines with pi zeroes powered off of skrs to run the machines with zero issues for awhile now.
I understand the issue you are bringing up, but so far in our experiences with similar setups its not really an problem
Can you tell me, if I did flash by usb from raspberry, may I connect already flashed board via UART with correct baud rate?
I just want to know about the printer that was on the bench next to you at 1:12!
Those are both voron v2.4`s
I definitely like that smash button
Hello..I've followed your instructions to install klipper on ender3 v2 via Raspi 4 .. I maybe done something wrong .. cause the result now is as follows:
When I made make ..for klipper config then ..ls /dev .. it answered ((ls: cannot access '/ dev / serial / by-id /': No such file or directory) )
Hello,
Thank you for this video.
My SKR MINI E3 V3.0 has a flaky micro-USB port and am considering changing to a Klipper setup.
By chance, can I still run Octoprint with a Klipper mod on my SKR controller? I've been using Octoprint/R-Pi 3B for years now.
Any input for btt skr mini e3 v3.0 (marlin setup right now) to btt p2 (klipper)? I have the touch screen tft35 v3.0.1 and an esp wifi card for the screen(wasn’t able to figure that out to work). Goal is WiFi to the computer to print but still want the screen working if possible. Problem I ran into was the usb micro broke off the main board. Then the usb on the screen started pulling off but saved that one. New to all of this so go easy on me.
nice thanks
Hi, please tell me, my clipper on raspberry zero w worked fine , then suddenly stopped connecting to local , although the printer turned on the light and was ready to print, I decided to reinstall everything again , but my rapsberry does not give me an ip address at all, connects and makes all the settings , but the address is not visible anywhere else , there is no one in the information about my connections at all , although rapsberry connects to it , if config does not give information
Is there a way to use this with a PanelDue also, and if then how?
hi, is it possible to add a touchscreen LCD to the Pi Zero 2 W with the SKR Mini? I'm currently stumped at this part of the hardware installation. Please help me!
do you not need a Raspberry Pi Zero W and not a non Wi-Fi version? As i have version V1.3 non wi-fi, i guess this won't work as the USB port will be connected to my main board?
I am curious about how to do this but on an Orange pi 3 lts to skr mini e3 v3. And without using the TFT port. What about I2C on pi and skr??
My Ender-3 V4.2.2 controller board does NOT have an available serial port. It does not have native USB serial, but uses a CH3xx USB-Serial chip. However I don't want to have to perform surgery on the board to bypass that, so can I still use the RPi zero USB to connect to the printer? It would mean not changing the serial settings on the pi as you showed. I'd need a USB cable between the printer and the Pi, but I can live with that, if the extra CPU load of the UDB serial driver isn't a problem.
Thanks for making this video. I found it very helpful and already followed along to clean up one of my Klipper/Ender builds. I have a ender with a board I need to connect via USB to the GPIO. Would the process more or less be the same but keep the standard menu config on the MCU?
Helo. Did you notice that the stepper motors on the tmc2660 are much louder on the clipper ?
Anyone got a link to the mount? Can’t find any other clean mounts that keep the zero nice and visible
I have a pi zero (non-W) laying around, would I be able to use it using an otg cable and a wifi adapter, or wouldn't the adapter be picked up by klipper?
edit: The wifi adapter and the web interface work fine. Now I'll just have to wait for my printer.
I have a problem on pi zero w. No input shaper and I get most of the times 100% load that halt printing. Miniuart, overclock and cooling. Fluidd and mainsail have the same problem. Connecting on uart
FYI - Latest releases from Mainsail appears to have removed the "console=serial0,115200" from the '/boot/cmdline.txt' serial console
I cant seem to get this to work on pi 4 and btt skr mini 3e v3
Thank you for this great tutorial!
Is there a way to make this work on a stock X1?
If yes how?
Thanks!
Great video, thank you!
Do you have experience with PSU control boards and klipper?
Does mainsail or fluid support my tp-link hs110 wifi switch?
Octoprint has a plug-in for it and it allows it to use m81 to controll it. It also has a few safety features that i don't want to lose.
So in order to add a display it just has to be screen compatible with the raspberry pi right? Just curious because I'm looking to add an skr mini e3 v3, a pi zero wh and another 3.5" display to my ender 3 (soon to be a wannabe voron switchwire)
how long does it take to flash the board? ...and does the board needs to be connected to "stepper motors, sensors, external power supply, etc..." or is it enough to have the power from the Pi?
if you power the raspberry externally, and connect to the printer via usb, should you skip the sudo ssh stuff?
I am wondering if i can use ICSP (MOSI MISO) instead of UART TX RX to communicate and power PI zero. I have creality board V2.2 and i am not able to find TX RX pinouts
I have done the exact same thing on the RPI 3B and an SKR 1.4 Turbo, and it does not work. I don't know what i'm doing wrong, i followed all the steps, triple checked every connection, and still can't get a connection.
When I insert the SD card into my Ender 3 Max the screen stays blank (so it did something), but the firmware file doesn't get renamed and the pi can't connect to the printer. Flashing the original Marlin firmware back to it worked without any problem.
I have also tried other names because the config file suggested that it can't be the name of the last flashed firmware, still no success.
Any suggestions what the problem could be?
i'm trying this on the mks robin nano v1.2 via de wifi tx and rx pins, but i cant get it to work. if i disconect a tmc driver, klipper says that it cant find it, but if everyting is plugged in, it keeps saying that the printer is not ready or standby. really weird that it can see if there is a tmc driver missing, but won't connect
Can I use the pi0 instead of the w with ethernet?
I tried octoklipperpi,MainSail, even Simplypi
No communication happened
So it most be something in serial port
Cause on octoprint ..it said
Printer communication
Couldn't write to send to pot
I'm trying to do this on a Tenlog Hands 2, and it will not connect via UART. I have tried all the ports, and switching the Tx and Rx around. Still nothing. Any suggestions?
Great video, could this be done with a pi pico?
No. Pi pico is a completely different type of board.
Will you be making an updated video using the Pi Zero 2 W?
Working on Pz2 stuff right now, but this method is unchanged on the zero 2 and works just fine (already tested)
@@CanuckCreator I’d like to see the performance difference when using advanced features that require more processing power such as input shaping or accelerometer support as well as using a camera via the pi’s usb port.
Orange pi zero 2 with btt skr mini e3 v3 using uart?
Hello, I tried this method with my Pi Zero W and an SKR Mini v1.1 to try to get around an issue I was having with the serial connection. I've established klipper settings well enough that with a pi 3b+ connected via usb to the board, the pi established connection with the MCU. But with the same pi card in a pi zero W, I have not been able to get it to recognize the MCU via USB or UART... I have tried a different pi Zero W and it also didn't work, so it appears to be an issue with the platform, not the individual board.
any information about mks robin nano v2 connection? i've connected wifi module back tx and rx pins no connection. And then retried usb tx and rx pins and no connection again. i think i'll go pi4 again :)
You don't happen to have a Sovol SV01 that you can show us the connections on do you? Sovol is pretty bad about documentation. (and customer service for that matter.)
I do not
What happens if i have this setup and i connect the printer to a computer via the USB port? I understand that the bulk of the computation is done in the pi and it just uses the board as a slave but what would happen if i connect the printer to the PC with pronterface?
This is brilliant! Stupid question: is it possible to use the USB connection instead of UART? The reason being, I'd like to still have a TFT and wouldn't mind running an extra cable for its PSU. It seems it should be more even straightforward; just following your guide minus skipping some of the steps for UART config. Would that work?
Yup. Just follow the standard klipper install instructions on yhe klipper github.
Going with uart and this method is for those that want compact. Cheap solution with one cable only. Or those that wanna free up the one free usb port on the rpi zero for example
@@CanuckCreator Thank you very much!
looking at the latest "generic-bigtreetech-skr-mini-e3-v2.0.cfg" the directions say to use "USB communication." Does this change anything else for the rest of the tutorial?
Having a hard time trying to do this on my skr mini e3 v1.2 I flashed Successfully But klipper won’t connect..
Hey, I have just setup my V0 like this. But now I have some problems. First the part cooling fan runs all the time, second I can not heat the bed or hot end, ans last every time I modify the config the mcu get a error. Did I do something wrong or do you think my board is broken? And I wanna say thanks for your great content and for inviting me i the world of voron :-)
Hi ! Did you ever tested the new Zero 2 W ? What about the capabilities of the neew board ? It's cheap, small and low power board.... Is it useful even with a webcam (FullHD) ?
Shouldn't webcams with integrated encoding work? Like Logitech c930?
I dont have one on hand to test, with just a basic Picam2 i went from 20% max cpu load to over 80% at all time with occasional timeout errors
After that .. flahed klipper file to the printer...no communication happened even more the LCD turned black.. I decided to flash the printer and LCD BACK to.. Jyers .. ..nothing happened
The printer cannot be communicated nether seen by LCD !!!
Hello ! My name is Jean. Question? the connectivity of PI zero with an MKS sgen-lv1.0 is it the same for the RX and TX? thank you .
They just released the pi zero 2 W. Will you be looking into this?
Oh yes! I just started collecting stuff for my V0 build, it would be so nice
What little printer is that?
Can I run klipper on a Raspberry Pi zero and MKS base 1.5?
This configuration means the RPI isn't gracefully shutdown when you power off the printer. Any concerns about corrupting the SD card?
Have had zero issue on any of the machines im running where the RPI is tied into the main power switch.
This is a very good point that I think needs more visibility. The raspberry pi mounts the file system from the SD card. If power is suddenly removed while cached writes have not been done or completed, you can corrupt the file system. When you shut down Linux, it goes through a procedure to flush writes and unmount the file system before powering down. It may have worked so far, but it only takes one instance to corrupt your file system.