Notifications
Clear all

Rpi Zero & Octopi working!!!!  

Page 1 / 7
  RSS
HackMonkey
(@hackmonkey-2)
Trusted Member
Rpi Zero & Octopi working!!!!

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:
https://shop.prusa3d.com/forum/original-prusa-i3-mk3-f30/pin-header-for-pi-zero-w-install-t12363.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-Prusa-i3/blob/MK3/Printed-Parts/stl/rpi-zero-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/configuring-gpio-serial-port-raspbian-jessie-including-pi-3/

To swap the ports used by the GPIO and Bluetooth, SSH into the Pi and edit the config.txt. sudo nano /boot/config.txt Add the following to the bottom of the file. dtoverlay=pi3-miniuart-bt

Then disable the serial console. sudo nano /boot/cmdline.txt Remove this part. 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?

Publié : 20/12/2017 4:53 am
AZGLi
(@azgli)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

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.

Publié : 20/12/2017 6:01 am
Ido
 Ido
(@ido)
Trusted Member
Re: Rpi Zero & Octopi working!!!!

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.

Publié : 20/12/2017 7:38 am
Mike C
(@mike-c-2)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

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

Publié : 20/12/2017 11:54 pm
gorkish
(@gorkish)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

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

Publié : 21/12/2017 12:35 am
HackMonkey
(@hackmonkey-2)
Trusted Member
Topic starter answered:
Re: Rpi Zero & Octopi working!!!!

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.

Publié : 21/12/2017 5:42 am
Ido
 Ido
(@ido)
Trusted Member
Re: Rpi Zero & Octopi working!!!!


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

Publié : 21/12/2017 7:34 am
The Squall
(@the-squall)
Eminent Member
Re: Rpi Zero & Octopi working!!!!



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

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.

Publié : 21/12/2017 12:59 pm
Peter
(@peter-12)
Estimable Member
Re: Rpi Zero & Octopi working!!!!

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

Publié : 21/12/2017 1:36 pm
Sulya
(@sulya)
Trusted Member
Re: Rpi Zero & Octopi working!!!!


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-grows-camera-connector/

Publié : 21/12/2017 2:00 pm
Peter
(@peter-12)
Estimable Member
Re: Rpi Zero & Octopi working!!!!

Ah, I see. Thanks for the link. 🙂

Publié : 21/12/2017 2:31 pm
gorkish
(@gorkish)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

Well I got everything "working" after my dumb self initially installed the pi upside down on the mount. I can say that is a real pain in the ass not to have an access door to the back of the electronics case. Hopefully someone will design an improved enclosure soon. It would also be nice to have a shutdown button to make safe power off easier and faster to accomplish.

Anyway Octoprint can connect and communicate however the connection is very unreliable. I see checksum errors sending basic commands, and eventually the print crashed. I think this occurs when a corrupt command makes it through with a checksum that passes (the gcode checksum algorithm is very basic and collision is easily possible). Some people were getting crazy extrusions or other strange behavior, so it's not just me.

So some work still needs to be done. I am not honestly sure if it is the Einsy firmware or some configuration of OctoPrint that needs the tuning, although I suspect the firmware is the first issue. I am holding for additional feedback at this point.

Publié : 21/12/2017 4:17 pm
Mike C
(@mike-c-2)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

Have you tried to print anything yet? I was having horrible issues with stalls midprint.

Publié : 21/12/2017 6:27 pm
gorkish
(@gorkish)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

Yes I did try to print through OctoPrint with Pi Zero W directly attached and had major trouble. The serial communication does not yet appear to be reliable. I do not have a lot of time to debug if the issue is related to issues on the serial comms of the Pi or the Einsy, but I did set the configuration as noted earlier regaridng swapping the bluetooth and hardware UARTs. I had seen elsewhere something about disabling the bluetooth serial profile entirely but, again, I havent had time to debug and I don't want to keep my printer offline that much as I have a lot in the queue to get printed.

Publié : 21/12/2017 7:22 pm
anddy.a
(@anddy-a)
Active Member
Re: Rpi Zero & Octopi working!!!!


Have you tried to print anything yet? I was having horrible issues with stalls midprint.

Looks like a few people are having this problem (me included).

https://shop.prusa3d.com/forum/original-prusa-i3-mk3-f30/failed-print-xyz-motors-appear-stopped-filament-st-t12454.html

Octoprint doesn't handle extra errors and such, so it looks like you've either got to disable one of the mk3's new features or use something else like repetier-server.

I'm going to try repetier-server for the first time today or tomorrow, I'd like to keep the crash detection on.

Publié : 21/12/2017 7:58 pm
lignumaqua
(@lignumaqua)
Eminent Member
Re: Rpi Zero & Octopi working!!!!


I'm going to try repetier-server for the first time today or tomorrow, I'd like to keep the crash detection on.

Don't bother, Repetier-Server suffers from the same bad data problems as Octoprint. Seems like this is a fundamental serial comms problem between the Pi and the Einsy.

Publié : 21/12/2017 11:17 pm
gorkish
(@gorkish)
Eminent Member
Re: Rpi Zero & Octopi working!!!!

Correct; disabling the stepper error detection will have no effect on this issue. If you carefully watch the octoprint terminal during a print (or look at the log I posted) you will see the einsy requesting command retransmits because of checksum mismatches. The crashes and other problems are happening mainly because every once in a while a corrupted gcode command will happen to have a valid checksum and the printer will dutifully execute it. The checksum in this case is a very simple algorithm that produces a checksum number in the range 0-255, and in the case of thousands of errors occurring over the flaky serial link, some lines are bound to have corruption and still pass the checksum test.

Publié : 22/12/2017 12:58 am
HackMonkey
(@hackmonkey-2)
Trusted Member
Topic starter answered:
Re: Rpi Zero & Octopi working!!!!

The cable adapter shown is the one I am looking at to connect a regular camera cable to a Zero camera cable, haven't got it yet though.

I didn't have any issues while running Octoprint externally on a RPi 2. I did have a stall while using the Zero connected to the Einsy. Later that day I had a stall and a layer shift while printing from the SD card, and the Pi was powered off. I would have thought the Einsy would have detected the shift, I wasn't using stealth mode.

So I am guessing there is probably still some work to be done on the Einsy firmware in general.

It is a little discouraging the Prusa has been silent on this. I can understand if it isn't ready, but they are releasing the STL for the spacer, and included the pinout in the most recent Handbook update. The Handbook makes it should like you just slap the Pi onto the Einsy and go, but that isn't the case.

Publié : 22/12/2017 6:39 pm
Protoncek
(@protoncek)
Reputable Member
Re: Rpi Zero & Octopi working!!!!

Hello to all!

i've got my new rpi (after i burnt one) and regarding Linux i'm pretty much newbie... as a result, i'm stuck at adding "/dev/ttyAMA0". ... where to add this line? I guess because of this line is missing (somewhere) in octoprint i don't have any serial ports available...
Thanks!

Publié : 23/12/2017 11:28 am
Sunnyday
(@sunnyday)
New Member
Re: Rpi Zero & Octopi working!!!!

I followed the instruction but I still cant get it work

Publié : 24/12/2017 4:46 am
Page 1 / 7
Partager :