scott.w12
Posts: 82
Joined: Sep 22, 2017 4:30 pm
Contact: Send private message

Rpi Zero & Octopi working!!!!

Dec 20, 2017 3:53 am

After several hours of trial and error, and searching (cursing) I have got the RPI Zero W to run Octoprint, while connected directly to the Einsy board!

First the MK3 needs the firmware upgraded to 3.1.1 RC2 B137.
https://www.prusa3d.com/drivers/

Then after the firmware is flashed, enable the setting for 2nd USART in the settings. This also disables the onboard USB port.
Note that this can only be done when there is nothing connected to the Einsy's USB port.

Now for the RPi Zero W.
Solder on the long pins as shown here:
original-prusa-i3-mk3-f30/pin-header-fo ... 12363.html

Then prepare a microSD card flashed with Octopi, and setup the wifi as described here:
https://octopi.octoprint.org/

Note that the SSID and password go inside the " ".

For good measure, I would recommend firing up the Pi before attaching it to the Einsy and verify it is working before putting it into the case.

At this point install the Pi on the Einsy, the spacer file to print is available on github:
https://github.com/prusa3d/Original-Pru ... -frame.stl

or from the printable parts zip file:
https://www.prusa3d.com/prusa-i3-printable-parts/

The Rpi should fire up and work on its own when the printer is powered up.

Now to make the two talk to each other.

On the RPi3 and Zero, the Bluetooth gets the higher performance serial port, and the GPIO gets bumped to a lesser performing setup. For more info check out:
https://spellfoundry.com/2016/05/29/con ... ding-pi-3/

To swap the ports used by the GPIO and Bluetooth, SSH into the Pi and edit the config.txt.

Code: Select all

sudo nano /boot/config.txt
Add the following to the bottom of the file.

Code: Select all

dtoverlay=pi3-miniuart-bt
Then disable the serial console.

Code: Select all

sudo nano /boot/cmdline.txt
Remove this part.

Code: Select all

console=serial0,115200
Reboot the Pi from the SSH session, or from Octopi.

Finally in Octopi, add an additional serial port in the settings.
/dev/ttyAMA0
Save, and refresh Octoprint. Select the new serial port, and connect!

I haven't hooked up the camera yet, but imagine that will be standard fare in Octoprint.

One word of caution. I am pretty certain that I remember hearing Josef mention in a video that there would need to be some modifications to Octoprint to make it compatible with the new additions introduced on the MK3. Power Panic obviously isn't going to work. Anyone remember this, or have extra insight?

ben.h3
Posts: 34
Joined: Dec 11, 2016 4:32 am
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 20, 2017 5:01 am

Thank you for this walkthrough. I tried for hours to get it working, but I think the Pi is dead. I will try this on my replacement.

User avatar
ido.d
Posts: 75
Joined: May 10, 2017 7:25 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 20, 2017 6:38 am

Thanks man for this info. I ordered my Pi zero right after ordering my MK3. The MK3 should be coming next week probably. I already have octoprint running, that wasn't difficult, but didn't know about the the bluetooth and higher performance serial port, so I can make these adjustments.

And I can print the spacer. Is PLA good enough? probably.

mike.c3
Posts: 30
Joined: May 30, 2016 8:10 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 20, 2017 10:54 pm

Thanks for the walk thru, one note, I had to Powercycle the Printer/Pi Zero W before it started to work.

I am up and running

gorkish
Posts: 38
Joined: Sep 23, 2017 3:02 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 20, 2017 11:35 pm

Thank you for the excellent and concise writeup. I am going to be getting this going tonight!

scott.w12
Posts: 82
Joined: Sep 22, 2017 4:30 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 21, 2017 4:42 am

Yeah, once you add the manual port in the settings it isn't immediately available to select from the drop down. Refreshing the browser was enough to make it show up for me.

Also note that you really should do a shutdown in Octoprint before switching off the power to the printer. While I haven't ever suffered corruption of an SD card in a Pi that had the power yanked, others have. When the power is cut, there is not enough time for the Pi to go through a proper shutdown. The green light on the Pi will go off wen it is full shutdown.

The camera is going to be a little trickier. I forgot the camera port on the Pi Zero is smaller than the larger Pis. So the meter long cable I have will not work. 30cm is the longest Pi Zero camera cable I can find, which will not be enough. Adafruit makes and adapter that could splice a regular Pi camera cable to a Zero cable.

I had previously been working on mounting a Pi Zero and camera to the left side Y axis pulley. I may go back to that idea, and wire the Pi into to Einsy, rather than directly. Might be cleaner than splicing together camera cables. Would also make the Pi much easier to access.

User avatar
ido.d
Posts: 75
Joined: May 10, 2017 7:25 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 21, 2017 6:34 am

scott.w12 wrote:
Dec 21, 2017 4:42 am
The camera is going to be a little trickier. I forgot the camera port on the Pi Zero is smaller than the larger Pis. So the meter long cable I have will not work. 30cm is the longest Pi Zero camera cable I can find, which will not be enough. Adafruit makes and adapter that could splice a regular Pi camera cable to a Zero cable.
Really? darn, I need to order a new cable than

perhaps something like this could help
Image

User avatar
TheSquall
Posts: 41
Joined: Jul 11, 2017 12:59 am
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 21, 2017 11:59 am

ido.d wrote:
Dec 21, 2017 6:34 am
scott.w12 wrote:
Dec 21, 2017 4:42 am
The camera is going to be a little trickier. I forgot the camera port on the Pi Zero is smaller than the larger Pis. So the meter long cable I have will not work. 30cm is the longest Pi Zero camera cable I can find, which will not be enough. Adafruit makes and adapter that could splice a regular Pi camera cable to a Zero cable.
Really? darn, I need to order a new cable than

perhaps something like this could help
Image
I bought one of those with a 30cm cable and a 1m standard cable. Testing it with the pi not in my mk3 works with no issues.

User avatar
Zaz
Posts: 213
Joined: Oct 15, 2017 12:57 pm
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 21, 2017 12:36 pm

But does it work with a pi zero camera cable? They are different, if I've understood things correctly.

pavlo.s
Posts: 48
Joined: Nov 30, 2017 3:31 pm
Location: Belgium
Contact: Send private message

Re: Rpi Zero & Octopi working!!!!

Dec 21, 2017 1:00 pm

Zaz wrote:
Dec 21, 2017 12:36 pm
But does it work with a pi zero camera cable? They are different, if I've understood things correctly.
The rpi0 side of the riboon cable is different, narrower, but you can connect this extention on the camera side:
https://www.raspberrypi.org/blog/zero-g ... connector/

Return to “User mods - OctoPrint, enclosures, nozzles, ...”

Who is online

Users browsing this forum: peter.s50 and 2 guests