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 II

From the previous post, the CTC Dual Extruder is now connected to a Cubietruck running Octoprint, together with the GPX plugin.

At thingiverse you get all sorts of models, or things. Downloading the STL file and passing it on to the printer didn't work, so here's how I did it:

On my client PC I have ReplicatorG installed - I'm running Linux Mint and it installed properly on my laptop.

Loading the STL on ReplicatorG, you get to set up some basic variables such as extruder temperature and so on - and then you get the chance to generate a gcode file.

This is ideal, because Mark Walker's GPX plugin for Octoprint understands gcode and converts it to x3g for the printer!

So now I'm on my PC, there's a generated gcode file - all I have to do is upload it to Octoprint on Cubietruck using the WebUI and initiate the print job!

Print estimates, statistics and more are all visible on Octoprint - and going a step further, why not plug a USB Webcam to Cubietruck as well and stream all the action...? :)

I'll keep at this, hopefully with both extruders, different materials... let's see!

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!


 






3D Printing

Recently I've decided to buy a 3D printer. Completely unaware of all the complexities behind 3D printing, I set out to choose one.

Although 3D printers have been around for a while now, buying one can be a challenging task, from price tag to print area size, print detail, print speed... etc etc etc etc.

First of all, there are a couple of websites which help a lot:



  • https://www.3dhubs.com/
  • http://www.thingiverse.com/
Between these two, you should find everything you need to get started.

So, since my budget wasn't that high, I eventually decided to buy a CTC Dual Extruder Printer.

https://www.3dhubs.com/3d-printers/ctc-3d

The reviews are mixed everywhere, there's people complaining about reliability, customer service and then the success cases... oh well, I decided to take a gamble.

I got it from ebay, shipped from Hamburg, and about a week later, I had it in my study!

I still have pretty much everything to learn from 3D printing, but after printing a couple of models, I'm actually pretty pleased with the quality, functionality and practicality of it...! :)

There are quite a few youtube videos out there about this printer, basically it's already pre-assembled, all you have to do is screw in the extruders head and set up the filament spool.

A couple of advices with this: take your time. Read and watch as much as you need to feel comfortable with the device.
If you feel the need to peel stuff off - don't! Make sure you're supposed to.

I'm still to try out the second extruder, different materials, etc. etc. etc. - but so far, one weekend in and I've been having quite a lot of fun with this printer!