a5:octopi-zero

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
a5:octopi-zero [2018/02/19 02:39] – created cedrica5:octopi-zero [2018/02/19 03:24] cedric
Line 1: Line 1:
 (work in progress Sam :) ) (work in progress Sam :) )
 ====== PIZERO OCTOPI ====== ====== PIZERO OCTOPI ======
- 
  
 This quick guide is an example of how you can you a **Raspberry Pi ZERO W** as an Octoprint controller. This quick guide is an example of how you can you a **Raspberry Pi ZERO W** as an Octoprint controller.
Line 7: Line 6:
 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. 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.
  
-{{:a5:ced_2018-02-18_16h26_img_0684.jpg?400|}}+{{:a5:ced_2018-02-18_16h26_img_0684.jpg?800|}}
  
 Detail Detail
Line 13: Line 12:
 {{:a5:ced_2018-02-18_16h09_img_0683.jpg?400|}} {{:a5:ced_2018-02-18_16h09_img_0683.jpg?400|}}
  
-SERIAL PORT+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 ==== 
 + 
 +  * Raspberry Pi official pizero case (comes with short camera cable https://www.kiwi-electronics.nl/image/cache/data/products/raspberry-pi/zero/cases/KW-1824-2-1000x667.jpg ) 
 +  * Raspberry **Cam V2** (comes with long camera cable : we don't need it here https://www.kiwi-electronics.nl/image/cache/data/products/raspberry-pi/camera/KW-1703-1-1000x667.jpg ) 
 +  * Raspberry **PI ZERO W** ( W for wireless ) 
 +  * 1x USB cable ( **USB2 to Micro USB** : for power - https://www.modmypi.com/image/cache/data/rpi-products/accessories/usb/microUSB-800x609.jpg ) 
 +  * 1x micro USB OTG adapter (http://img.dxcdn.com/productimages/sku_221801_1.jpg) ( to adapt the blue "data" cable to micro USB ) 
 +  * or alternatively, if you found one, a direct **MicroUSB to USBtypeB 2.0 cable** (not easy to find but exists) 
 + 
 +Everything can be put together in the case 
 +  - The Pi 
 +  - The Camera 
 +  - The little cable 
 + 
 +You should end up with this  
 + 
 +{{:a5:raspberry-pi-zero-w-840x485.jpg?600|}} 
 + 
 +Now - as covered in multiple other tutorials, simply find an image of Octoprint for Pi (https://octoprint.org/download/) flash it on a MicroSD card ( 16 GB or more recommended ) 
 + 
 +As the PIZERO doesn't know your network settings yet, mount the flash drive in a PC and edit the network config for your SSID and password. 
 + 
 +Then put it in the PIZERO and verify it gets an ip adress (eg : in your router) 
 + 
 +Try connecting to it with it's ip, or maybe http://octopi.local if proper dns resolution is in place. 
 + 
 + 
 +==== Serial port ==== 
  
 You should setup the Octoprint to use /dev/ttyAMA0 if the "auto" setting does not work. 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 You should hardwire the data rate at 250,000
  
-CAMERA+As Samuel points out, it is important you disable some error handling 
 + 
 +{{:a5:octo1.png?400|}} 
 + 
 +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. 
 + 
 +{{:a5:octo2.png?800|}}
  
 You should use the 4:3 setting in Octoprint. You should use the 4:3 setting in Octoprint.
Line 24: Line 66:
 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. 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 +Should you wish to change the resolution of the cam,  
-/boot/config.txt+edit /boot/config.txt
  
 Here are some settings you can try Here are some settings you can try
- +<code>
 #default : 640x480 10fps. Streams at 10Mbps which is already a lot. #default : 640x480 10fps. Streams at 10Mbps which is already a lot.
 +
 camera_raspi_options="-fps 10" camera_raspi_options="-fps 10"
  
Line 47: Line 90:
 # Notes: Using 16:9 aspect crops your field of view so you will see less # 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"  #camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95" 
 +</code>
 +
 +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
 +
 +
 +==== Final comments ====
 +
 +The Octoprint website is not very clear ; they "do not recommend" the PiZERO for a setup, but the related bug ( https://github.com/guysoft/OctoPi/issues/318#issuecomment-284762963 ) has been closed since a long time, and many people report this works fine for them. 
 +And so do I.
 +
 +**As long as you limit the bandwidth of the webcam**, which makes sense anyway for such a small and wifi device, I've never seen more than 17% cpu usage for streaming. You can even go lower than that by limiting FPS. 
 +
 +My experience has been very positive so far with a PizeroW setup as an octopi, it's also great to use with smartphone apps ( like "octoprint remote" and others ) by scanning the qR code.
  
 +I hope you enjoyed this little tutorial and that it inspired you to **think "out of the box"** and try things by yourself. :) 
  
 +**--CEDRIC**
  
a5/octopi-zero.txt · Last modified: 2020/12/25 02:13 by 127.0.0.1