Coding Chase - Projects

My 3D Hub

Thank You For Donating:

Ikeeki (linux-sunxi@irc.freenode.net)
Computer Troubleshooters Brasil

Sunday 21 June 2015

Cubietruck and a CTC Dual Extruder Printer - Part I

So, recently I bought a 3D printer - the CTC Dual Extruder. This device is actually a Makerbot Replicator 2 clone.

I've only had it for about 2 days, haven't changed firmwares or anything (it seems most experienced users recommend the Sailfish firmware) and for the time being, don't plan on messing with that.

And to be fair, the pre-installed firmware seems to be quite complete, so I'll keep it for as long as it suits my needs.

The printer has an SD card slot and a USB port. I started by using the SD card, but soon decided it would be preferable to move on to USB.

And what if you could WiFi it...?

Turns out, you can!

The CTC printer is USB connected to my Cubietruck and accessible over WiFi - or even from the internet, given the proper network configuration...!

To achieve this, I needed to set up octoprint on Cubietruck.


1) connecting the CTC dual extruder 3d printer to Cubietruck (Cubian)

cubie@Cubian:~$ sudo dmesg -c

connect the printer to cubietruck, on USB

cubie@Cubian:~$ dmesg

[  255.900873] ehci_irq: port change detect
[  255.905231] ehci_irq: port change detect
[  255.969149] ehci_irq: port change detect
[  256.206068] ehci_irq: port change detect
[  256.261515] The port change to OHCI now!
[  256.564307] usb 2-1: new full-speed USB device number 2 using sw-ohci
[  257.278351] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.294415] cma: dma_alloc_from_contiguous(): returned d1078c80
[  257.300276] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.314439] cma: dma_alloc_from_contiguous(): returned d1078ca0
[  257.320294] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.334443] cma: dma_alloc_from_contiguous(): returned d1078cc0
[  257.340297] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.364339] cma: dma_alloc_from_contiguous(): returned d1078ce0
[  257.370194] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.384427] cma: dma_alloc_from_contiguous(): returned d1078e00
[  257.390279] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.408925] cma: dma_alloc_from_contiguous(): returned d1078e20
[  257.424778] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.430357] cma: dma_alloc_from_contiguous(): returned d1078e40
[  257.444711] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.454701] cma: dma_alloc_from_contiguous(): returned d1078e60
[  257.460552] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.484272] cma: dma_alloc_from_contiguous(): returned d1078e80
[  257.490176] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.504485] cma: dma_alloc_from_contiguous(): returned d1078ea0
[  257.510341] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.524444] cma: dma_alloc_from_contiguous(): returned d1078ec0
[  257.530302] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.554409] cma: dma_alloc_from_contiguous(): returned d1078ee0
[  257.560397] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.574399] cma: dma_alloc_from_contiguous(): returned d1078f00
[  257.580256] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.604411] cma: dma_alloc_from_contiguous(): returned d1078f20
[  257.610266] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.624412] cma: dma_alloc_from_contiguous(): returned d1078f40
[  257.630265] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.654296] cma: dma_alloc_from_contiguous(): returned d1078f60
[  257.660154] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.674425] cma: dma_alloc_from_contiguous(): returned d1078f80
[  257.680281] cma: dma_alloc_from_contiguous(cma ef0ab1c0, count 1, align 0)
[  257.708866] cma: dma_alloc_from_contiguous(): returned d1078fa0
[  257.713053] cdc_acm 2-1:1.0: ttyACM0: USB ACM device
[  257.721023] usbcore: registered new interface driver cdc_acm
[  257.728303] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

2) cubietruck - install octoprint with GPX plugin



 sudo usermod -a -G tty cubie
 sudo usermod -a -G dialout cubie
 log out / log in

 cubie@Cubian:~$ groups
 cubie tty dialout sudo audio video gpio

 sudo apt-get install python-pip python-dev python-setuptools python-virtualenv   git libyaml-dev
 sudo apt-get clean

 cd
 mkdir ~/.octoprint

 git clone -b devel https://github.com/markwal/OctoPrint

 cd OctoPrint
 git rev-parse HEAD (mine is at commit
3857e7e0b04d7c72ab5d11df952fc21d61aa78ca)

 virtualenv --system-site-packages venv
 ./venv/bin/python setup.py install

 git clone https://github.com/markwal/OctoPrint-GPX
 cd OctoPrint-GPX
 git rev-parse HEAD (mine was at 64586f1e18188acbea0e22828a479c216cff287d)
 git submodule update --init
 ../venv/bin/python setup.py install
 cd

 ~/OctoPrint/venv/bin/octoprint

the output should show something like this:

(...)
2015-06-21 10:40:55,832 - octoprint.plugin.core - INFO - Found 6 plugin(s) providing 6 mixin implementations, 3 hook handlers
2015-06-21 10:40:55,852 - octoprint.plugin.core - INFO - Initialized 6 plugin(s)
2015-06-21 10:40:55,855 - octoprint.plugin.core - INFO - 6 plugin(s) registered with the system:
|  CuraEngine (bundled) = /home/cubie/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_973_g3857e7e-py2.7.egg/octoprint/plugins/cura
|  Discovery (bundled) = /home/cubie/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_973_g3857e7e-py2.7.egg/octoprint/plugins/discovery
|  GPX (0.3.1-9.g64586f1) = /home/cubie/OctoPrint/venv/local/lib/python2.7/site-packages/OctoPrint_GPX-0.3.1_9.g64586f1-py2.7-linux-armv7l.egg/octoprint_GPX
|  Plugin Manager (bundled) = /home/cubie/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_973_g3857e7e-py2.7.egg/octoprint/plugins/pluginmanager
|  Software Update (bundled) = /home/cubie/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_973_g3857e7e-py2.7.egg/octoprint/plugins/softwareupdate
|  Virtual Printer (bundled) = /home/cubie/OctoPrint/venv/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_973_g3857e7e-py2.7.egg/octoprint/plugins/virtual_printer
(...)

In the web browser, at http://<cubian_ip>:5000, login in and add a new device on the left panel:
select Serial Port /dev/ttyACM0 > Baudrate 115200 > everything else auto > Connect
... and you should get a Machine State: Operational :)

Now from here, you can create startup scripts - in my case, I just use screen and run the octoprint command on a detached terminal.


The base for this set up is this guide from Octprint, for the Raspberry Pi

https://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian

...and Mark Walker's work on the GPX Plugin, essential for connecting this printer with Octoprint

https://github.com/markwal/OctoPrint-GPX


As for doing some 3D printing with this set up: check out the next post!


 






7 comments :

  1. Hi there,

    I've been setting up my own CTC with octoprint on a Pi, I was wondering if you would mind sharing your profile settings, specifically, volumes, speeds and Nozzle offsets.

    Many thanks

    Adam

    ReplyDelete
  2. Hi, I've posted today and included my current octoprint configs. I've recently upgraded the firmware to from stock to Sailfish but as far as octoprint is concerned, no changes there.

    As for nozzle offsets, speeds and volumes, I can say that it depends quite a bit on the prints themselves, however I usually went with 100/40 or 50/20, meaning travel feedrate/feedrate. Smaller parts usually going with the slower settings, using the heat bed at either 60/110 for PLA/ABS in order to prevent warping of the parts.
    I've obtained a lot of valuable information on this printer on 3dhubs.com, especially in the CTC forum section:

    https://www.3dhubs.com/talk/CTC-LTD

    As for modding, I've actually only added the LEDs, external fans and remote control with Octoprint.

    I'm currently looking into Sitall and once that is done, probably print a few upgrade parts for the printer, if I feel like it.

    ReplyDelete
  3. Thank you for that, its not the print speeds, but more the correct settings for the printer profile, could you share what yours looks like please?

    Here's Mine : http://puu.sh/mn9Kh.png

    I think the real problem is my GCode Start Script, that would be really helpful.

    Thanks in advance!

    Adam

    ReplyDelete
  4. Hi, regarding octoprint settings, have a look at http://wickwire2099.blogspot.pt/2015/12/ctc-3d-and-sitall.html, posted here last month.

    As for slic3r, I'm using the settings/gcode scripts described on this guide:

    http://www.3duniverse.org/2014/01/05/using-slic3r-with-a-flashforge-creator/

    ReplyDelete
  5. Awesome, just waiting on a cubietruck arriving for this same job, didn't fancy tying up a pi so thought what else is out there

    ReplyDelete
  6. I bought another 3D printer since then, a Geeetech Prusa i3X which after some hiccups finally got to work properly a couple of months back, so I remodeled the workbench in the office and placed both printers on the bottom deck of the workbench. I'm currently running separate octoprint instances, one for each printer: the old faithful CTC is now running octoprint off of a cubieboard A10 and the Prusa is running octoprint off of a raspberry pi B model. I ended up ethernet cabling both embedded devices and hooking up one webcam to each device, streaming the video capture over the LAN.

    ReplyDelete
  7. If we need to tweak steps per mm then on this printer running sailfish. Do we just change the values on the GPX plugin for that machine? My E steps is incorrect so im under extruding at the minute. I've been told that x3g printers dont use the frmware embedded values and that the x3g file itself provides the steps per mm when printing.

    ReplyDelete