My project the DIY drum kit is going to include quite a bit of 3D printing, which meant that I had to try out setting up OctoPrint (OctoPrint.org )on the BeagleBone black, which would give me a web enabled UI to control,3D print and monitor my printer.
I have been using OctoPrint for more that six months using a Raspberry Pi B+. Setting up OctoPrint on the Pi was pretty simple, which include flashing a modified image of Raspbain called OctoPi, but in case of the BeagleBone you will have to set it up manually using the steps at
https://github.com/foosel/OctoPrint/wiki/Setup-BeagleBone-Black-Rev-C-%28Jessie%29
Here are few points to remember
- You will need to upgrade your BeagleBone OS to the latest version of Debain , that is Debain - Jessie(image I use - Flasher: (lxqt-4gb) (BeagleBone Black/Green 4GB eMMC) )
- After you have flashed the latest image of Jessi run- sudo apt-get update , followed by sudo apt-get upgrade before you run the commands in the link above
- Once you've run the commands and setup OctoPrint to start automatically on boot,setup a user name and password when you first access the OctoPrint URL (http://BeagleBoneIPaddress:5000 ), this is important, and will prevent other folks on your network from accessing/messing around with your 3D printer.
- Now as part of the setting section of OctoPrint, you will have to select your 3D printer serial port and baud-rate as shown in the screen shot below(in my case I am using a Printrbot Simple Metal)
To setup a webcam for monitoring, you will have to run the following commands to install MJPG-Streamer
-First check if your webcam is detected by the BeagleBone
lsusb
I am using the Logitech HD Webcam (C270)
- Install the 3 libraries that MJPG-Streamer requires using the command
sudo apt-get install libjpeg62-turbo-dev imagemagick libv4l-dev
- Download the modified version of MJPG-Streamer from Shrkey github repo, and then extract it, and install
wget https://github.com/shrkey/mjpg-streamer/raw/master/mjpg-streamer.tar.gz
tar -xvf mjpg-streamer.tar.gz
cd mjpg-streamer
make
sudo make install
- Now, if you are using the same webcam as I am run the following command
./mjpg_streamer -i "./input_uvc.so -y YUYV" -o "./output_http.so -p 8088 -n -w ./www"
Note: if you are using a different web cam you may have to modify the above command to include the video format of your webcam. To check the video format run
v4l2-ctl --list-formats
If the above command is successful, you should have access to the video feed of you webcam at the url
http://BeagleBoneIPaddress:8088
- Now are part of your OctoPrint - webcam setting, setup the Stream URL and Snapshot URL
- Save and reboot the OctoPrint service using the command
sudo service octoprint reboot
Now you should see your webcam stream in the control tab as shown in the screen shot below.
Note:
If you want to webcam to start on reboot you will have to add the above ./mjpg_streamer command to crontab file.
There are a lot of feature and plugin that I still need to explore as part of Octoprint, i will update the blog if I come across something interesting..
Here are a STL files you can use to 3D print yourself a BeagleBone case
Suggested printer setting
Layer height - 0.2mm
Fill Density - 20 %
Top Comments