a5:octopi-zero

This is an old revision of the document!


(work in progress Sam :) )

PIZERO OCTOPI

This quick guide is an example of how you can you a Raspberry Pi ZERO W as an Octoprint controller.

The recommended setup is still to use a Raspi3, as it has more CPU power and full width USB ports, however I do believe a PiZero setup works quite well, and has the benefit to be extremely small, non invasive, and can even fit on the A3S/A5 screws in an elegant way.

Detail

What I do like about my own setup is that I can see not only the material beeing printed (to check if all is good), but also the spool moves, which looks great when doing timelapses with OctoPrint.

Additionnally, on the PWM and IO ports of the ZERO ; you can easyly add lighting LEDs and/or a button to cancel prints (topics not covered here)

Stuff you'll need

Everything can be put together in the case

  1. The Pi
  2. The Camera
  3. The little cable

You should end up with this

SERIAL PORT

You should setup the Octoprint to use /dev/ttyAMA0 if the β€œauto” setting does not work. You should hardwire the data rate at 250,000

As Samuel points out, it is important you disable some error handling

The communication between the LCD panel and the REPRAP board can spit out error message that could be interpreted by Octoprint as a print problem (which they are not) and would cancel a print.

CAMERA

You can of course put your camera wherever you see fit. I did put it next to the extruder, as it gives me a nice view of the current printing process, and it's not obstructing access to the printer.

You should use the 4:3 setting in Octoprint. By default, the camera streams at 640×480 which is very low resolution. The PiV3 is able to do up to 4000×2000. However, I don't recommend you go much higher than that, as Octopi is already streaming at a ridiculous 10Mbps for that resolution. Also, the focus of the V2 is not very sharp anyway, so it's a bit of a waste of bandwidth. YMMV.

Should you wish to change the resolution of the cam, edit /boot/config.txt

Here are some settings you can try

#default : 640x480 10fps. Streams at 10Mbps which is already a lot.

camera_raspi_options="-fps 10"

# Raspberry Pi Camera V2, half resolution, video mode, full field of view (4:3 aspect) at 10fps
# Notes: Streams at 30Mbps !
#camera_raspi_options="-x 1640 -y 1232 -fps 10 -quality 95"
#
# Raspberry Pi Camera V2, maximum resolution, stills mode, full field of view (4:3 aspect) at 15fps
# Notes: Very slow for streaming, large images. Less image processing, generally looks worse
#camera_raspi_options="-x 3280 -y 2464 -fps 15 -usestills -quality 95"
#
# Raspberry Pi Camera V1/V2, 1080P, partial field of view (16:9 aspect) at 30fps
# Notes: Using 16:9 aspect crops your field of view so you will see less
#camera_raspi_options="-x 1920 -y 1080 -fps 30 -quality 95"
#
# Raspberry Pi Camera v2, 720P, partial field of view (16:9 aspect) at 30fps
# Notes: Using 16:9 aspect crops your field of view so you will see less
#camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95" 

Don't listen to tutorials saying you to reboot the box after editing this file (?) simply do a service restart webcamd (as root) Then reload you browser window.

Hardware setup

in progress

a5/octopi-zero.1518970130.txt.gz Β· Last modified: 2020/12/25 02:13 (external edit)