Archive:PrinterBot

From The Munich Maker Lab's Wiki
Revision as of 21:08, 8 April 2015 by Organom (talk | contribs)
Jump to navigation Jump to search
 
PrinterBot

Release status: Beta [box doku]

Description 3d Printers multiple octoprint machine
Author(s)  Ricardo Gomes (organom)

Lab pc to run multiple instances of OctoPrint and connect to the 3d printers.

Hardware

 VoomPC-2 Enclosure [1]
 Point of view nvidia ion mini-itx board - QuadCore Atom 1.6Ghz
 2 x HP 2Gb ddr2 800 ECC
 M1-ATX [2]
 19V 3.4A laptop charger (from the free to use shelf)
 8gb SanDisk usb pen as main disk  -- only class 4 device :(


Board detail:

PrinterBot-0.jpg


Installing debian:

PrinterBot-1.jpg

 user: mumalab
 ip: 192.168.0.25


Installing Octopi:

 sudo apt-get install python-pip python-dev git
 sudo apt-get install python-setuptools
 git clone https://github.com/foosel/OctoPrint.git
 cd OctoPrint
 sudo python setup.py install
 sudo usermod -a -G tty,dialout mumalab

Test Run:

 mkdir ~/.octoprint
 ~/Octoprint/run

Open http://192.168.0.25:5000 to check if it works

Creating n-home folders for the octoprint instances:

 numInstances=9
 for ((i = 1; i<=$numInstances; i++)); do cp -rf .octoprint .octoprint$i; done
 rm -rf .octoprint

Creating script to boot the instances:

Edit /home/mumalab/octoprintInstances.sh

 #!/bin/sh
 OCTOPRINT_HOME=/home/mumalab/OctoPrint
 numInstances=9
 die () {
   echo >&2 "$@"
   exit 1
 }
 [ "$#" -eq 1 ] || die "Action start, stop or restart needs to be provided as argument."
 for i in $(seq 1 $numInstances);
 do

echo "Octoprint$i - $1" $OCTOPRINT_HOME/run --daemon $1 --port 500$i --pid /tmp/octoprint$i --basedir ~/.octoprint$i

 done

Creating startup script:

Edit /etc/init.d/octoprintInstances

 #! /bin/sh 
 ### BEGIN INIT INFO
 # Provides:		octoprintInstances
 # Required-Start:	$remote_fs $syslog
 # Required-Stop:	$remote_fs $syslog
 # Default-Start:	2 3 4 5
 # Default-Stop:		
 # Short-Description:	Octoprint multiple instances script
 ### END INIT INFO
 case "$1" in
   start)
       echo "Starting instances:"
       su mumalab -c '/home/mumalab/octoprintInstances.sh start'
       ;;
   restart|reload|force-reload)
       echo "Restarting instances:"
       su mumalab -c '/home/mumalab/octoprintInstances.sh restart'
       ;;
   stop)
       echo "Stopping instances:"
       su mumalab -c '/home/mumalab/octoprintInstances.sh stop'
       ;;
   *)
       echo "Usage: $0 start|stop" >&2
       exit 1
       ;;
 esac
 exit 0

Adding to the startup

 cd /etc/rc2.d/
 ln -s /etc/init.d/octoprintInstances S01octoprintInstances
 
 

Creating customized dev entries for the printers:

 TODO

Instances costumization:

 TODO

Issues

 One of the capacitor from m1-atx was damaged and was causing weird issues on bootup of the system 
 --> Capacitor replaced and the system went back to normal.
 The initial installed cpu fan was too big leaving almost no space from the case ceiling, what was causing the cooling not to work properly 
 --> Replaced with a smaller fan.
 Ethernet card is not recognized and seems not to be working at all.
 Some errors regarding not shielded usb ports (causes the system to sometimes hang when connecting usb devices)

.