This project is quite similar to the OctoGoatBox except we are not going to run OctoPrint as our 3D printer web frontend, instead we are going to use a newer server software called RepRapWeb by Andrew Hodel. Hence the name "RepRapBox".
Andrew provides a ready-to-install SD card image for the Raspberry Pi, however the same reservations I had about running OctoPrint on the RPi apply here (basically, lack of processing power when using the older single-core 700MHz armv6 RPi's; the newer quad-core armv7 RPi 2 is a much more capable machine and should be able to run either RepRapWeb or OctoPrint just fine, but I have not tried it yet).
About the RepRapBox
Basically, the RepRapBox is a dual core Allwinner A20 Android TV Box running a derivative of Debian Wheezy armhf and the RepRapWeb 3D printer frontend/server. We are going to repurpose the generic mass-manufactured Android TV Box hardware into a small Debian Linux server running RepRapWeb by booting a custom version of Debian Wheezy armhf with a specially compiled Linux kernel, from an SD card. And we'll connect this small RepRapWeb server to our LAN either through WiFi or through Ethernet, and to our 3D printer's Arduino using the usual USB serial connection (at 250 000 baud).
- Allwinner A20 Android TV Box with 1GB RAM (check the Discussion tab in the OctoGoatBox page for recommendations).
- 8GB (or larger) SD Card or microSD card with adapter, class 10.
- (Optional) Inexpensive webcam to monitor our 3D prints.
It is assumed that your work environment includes a local network with an accessible WiFi/Ethernet router. The RepRapBox first needs to be connected to the Ethernet network and then we can configure its WiFi interface. Or alternatively you can access the /etc/network/interfaces file in the ext4 partition on the SD card and configure the WiFi interface there.
Choice of Linux distribution
We are going to use Bananian, which is Debian Wheezy armhf with a significant amount of customization for A20 hardware. I also tried Linaro/Ubuntu 14.04 armhf, it works but requires more customization and is much higher maintenance than Debian / Bananian and in this particular setup there is no obvious advantage to using Ubuntu vs. Debian. YMMV.
In theory just about any webcam with a Linux driver would work here. In practice the choice boils down to two options:
- If you need high-quality video you need a webcam with compressed MJPEG video format support. These are a little bit more expensive.
- If you only need 320x240 video support (for e.g. monitoring your prints), an inexpensive (about $5) webcam with basic YUYV video format support will do OK.
Check the Discussion tab in the OctoGoatBox page for recommendations.
Important: this HOWTO expects you to have a more than basic grasp of the Linux command line. You will be required to SSH into a headless Linux server and to find out the DHCP address of the RepRapBox from your local LAN router/DCHP server. If you are not familiar with these actions it is recommended that you either get a more knowledgeable person to help you, or give up on setting up an RepRapBox for the moment. A more detailed, hand-holding style guide will possibly be available at a later date.
1. Download Bananian. https://www.bananian.org/download
2. Follow installation instructions to flash SD card.
3. It should boot right up (green light blinks) and get a DHCP address from your LAN router if connected with an Ethernet cable. SSH into it, user/password root/pi. Change root password.
4. Next apt-get install mc, usbutils, wireless-tools, wpasupplicant, build-essential and any other packages your life depends on.
5. Fix /etc/environment and /etc/default/locale to avoid stupid messages about LC_ALL not set, etc
6. Add user pi with password raspberry
7. Git clone and install development branch of RepRapWeb as explained in GitHub ReadMe file.
8. Insert USB WiFi dongle and check that it is correctly detected and driver loads (dmesg, lsusb, lsmod). Your Android TV Box almost certainly already has an internal WiFi interface so you can just check what driver it is using.
9. Edit /etc/network/interfaces so Banana Pi connects through WiFi interface by default.
10. Configure Wifi router so Banana Pi gets same local IP address every time.
Example 1 : Banana Pi running RepRapWeb, inexpensive webcam
This combination works more or less out of the box. The WiFi dongle is a TP-Link TL-WN725N V2 which has a Realtek RTL8188EU chip that is supported by its specific driver in the Linux kernel, but most other USB WiFi dongles work just as well.
The power supply is a generic 5V @ 2A wall power brick with a mini-USB connector. The inexpensive 640x480 USB webcam is directly recognized by the Linux uvc driver and provides low-quality uncompressed (YUYV) video at 320x240 - good enough for monitoring your prints.
Example 2 : Generic Allwinner A20 Android TV Box running RepRapWeb, Logitech webcam, connecting more than one 3D printer
The advantage of the generic Android TV Box is that it includes an internal WiFi interface and you get a case and a power supply included (as well as an infrared remote and an HDMI cable, both of which we are not going to use) for more or less the same price as a "naked" Banana Pi.
The more expensive USB webcam outputs a high-quality compressed MJPEG video stream which is directly relayed to the network interface by our mjpeg-streamer daemon. This results in low CPU load (usually < 5%).
Contrarily to OctoPrint, a single instance of RepRapWeb allows the control of two or more 3D printers.