a5:octopi-zero

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
a5:octopi-zero [2018/02/19 02:46] cedrica5:octopi-zero [2020/12/25 02:13] (current) – external edit 127.0.0.1
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.
  
-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 compact (no external camerano external power, less cables, etc) 
 +This setup is "non invasive" (can be easily removed), and it 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 ;
  
 {{: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) 
 +  * 3d Printed Bracket (not the same as shown in the photos, original author never released its design). https://www.thingiverse.com/thing:3464621 
 + 
 +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 (eg http://dabbletron.com/how-to-run-octoprint-on-a-raspberry-pi-zero/ ), 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 (  
 + **found in /boot/octopi-network.txt** ) for your internal LAN's SSID and password. 
 + 
 +Then put it in the PIZERO, boot it and verify it gets an ip adress (eg : in your router) 
 + 
 +Beware the **PIZERO has two USB ports and you need them both** 
 + 
 +{{:a5:8858432-14028092-ced-pizero.jpg|}} 
 +The one at the side of the case (right on the picture) is the "power" one, you simply connect it with a micro usb cable to the USB thumbdrive port on the A5/A3S : it'll power the pi. You can also power it with a USB powerbank for your tests (no fan noise :) ) 
 + 
 +The second cable, located in the center, is the **data port**. This one will send Octoprint's instructions (GCODE) to the printer, in the same way your laptop would do. The Pizero only has MicroUSB ports, so you need connect this one with an **OTG adapter** to the "blue" data cable (USB2.0 TYPE B, the square port).  
 +You can find a micro USB to USB2.0 TYPE B cable, they do exist in china. (I'm waiting one myself.) 
 + 
 +Once it's powered up (there a little green led flashing that you can see barely at the back of the case) **try connecting** to it with it's ip, or maybe http://octopi.local if proper dns resolution is in place. 
 + 
 + 
 +==== Serial port ====
  
  
Line 19: Line 61:
 You should hardwire the data rate at 250,000 You should hardwire the data rate at 250,000
  
-As Samuel point sout, it is important you disable some error handling+As Samuel points out, it is important you disable some error handling
  
 {{:a5:octo1.png?400|}} {{:a5:octo1.png?400|}}
Line 26: Line 68:
  
  
-==== CAMERA ====+==== 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 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?400|}}+{{:a5:octo2.png?800|}}
  
 You should use the 4:3 setting in Octoprint. You should use the 4:3 setting in Octoprint.
Line 36: Line 78:
 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
Line 61: Line 103:
 #camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95"  #camera_raspi_options="-x 1280 -y 720 -fps 30 -quality 95" 
 </code> </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 ==== ==== Hardware setup ====
  
-in progress+//in progress 
 + 
 +Basically : I'm using a 3D printed mount, then use two screws from the vertical rods to tighten it. 
 + 
 +I then find a proper viewing angle, then glue it for good. 
 + 
 +more details later :)// 
 + 
 +==== 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. :) 
  
-j+**--CEDRIC**
  
a5/octopi-zero.1518968791.txt.gz · Last modified: 2020/12/25 02:13 (external edit)