Coding Chase - Projects

My 3D Hub

Thank You For Donating:

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

Wednesday 30 December 2015

IoT Projects - ESP8266 [CTC-3D Printer Upgrade] ||

So, after having an ESP8266-01 control my CTC-3D printer LED lighting and Fan cooling, I decided to improve the solution further.

Moving more to ABS than PLA on prints, the fans stopped being that necessary - but what stood out as being a lot more interesting would be to actually turning the printer on or off.

Using the same principles as before, I replaced the Fan part of the solution and added the printer power cord to the available relay.

As an extra, I left cubietruck to manage Octoprint and the remaining solutions in previous posts and set out to build a nice embedded cluster:

  • 4 boards (even cubieboard A10 boards will do for this, but one might consider a cheaper alternative as the Orange Pi perhaps);
  • 4 webcams, in my case, the Hercules Twist HD as it molds perfectly to the case;
  • placing each webcam on the top corners of the printer case, pointing to the heat bed;
  •  Using cubietruck as the manager of the video solution and controlling each of the 4 boards as video feeds;

And since using the command line to issue MQTT commands wasn't actually that practical, I started working on a web platform to manage the solution.

I spent some time working with MEAN.js which I found to be brilliant by the way, integrated MQTT.js and socket.io into the base boilerplate as well as the live video feeds from the webcams.

In the end I got exactly what I wanted:

  • the ESP8266-01 connects to CloudMQTT, a cloud-based, free MQTT broker (moved to it after everything was confirmed to be working properly using mosquitto locally);
  • the MQTT broker is accessible by the MEAN.js web app (which later got published to heroku);
  • the web app uses MQTT.js to subscribe to CloudMQTT and socket.io to perform realtime UI updating if necessary (if I decide to use sensors in the future);
  • the webcams stream the video to the web app.
Using the app, either desktop or tablet or mobile, I'm able to work it:
  1. turn the printer on/off, which saves some power;
  2. turn the lighting on/off, in case there's poor lighting in the room;
  3. use a slicer remotely, like slic3r, generate gcode and upload it to Octoprint;
  4. run the prints remotely and accompany the status using the webcams.
 Some screenshots from the development phase, the web app is very crude, just the buttons and the video streams, just one stream being replicated at the time.

In spite of travelling over the web, the response time with MQTT is lightning fast, basically feels as if a local physical switch is being used...!



 
 As an alternative to MEANjs, there's also meteor.js but I haven't actually looked into that one, apparently it would have saved me some time integrating MQTT an socket.io - perhaps on my next project!
 

CTC-3D and Sitall

I've been rather busy lately but thought I'd document a few relevant pointers regarding 3D printing in general and my CTC-3D printer in particular.

First off, documenting my Octoprint settings for the CTC-3D (at least the relevant bits):










Also, while using the stock firmware + octoprint, I was using ReplicatorG as my slicer software.

After upgrading the firmware, I also moved to Slic3r. ReplicatorG is quite old and not being maintained anymore, apart from the Sailfish variant I guess - whereas Slic3r has many more options and also the possibility of exporting configs, which means I can easily use it on another machine to generate the gcode without having to set it up all over again.

Using slic3r, I just had to make sure to select Makerbot (sailfish) flavor gcode in the settings once I changed firmware.

Second, the fact that after being successful in printing with PLA and ABS using just painter tape, I decided to test printing on glass.

I decided to go with Sitall Glass since the Ebay supplier claimed it can be used without any other adherent substances like ABS goo, glue stick, painter tape, etc. - as a reference, this is seller.

Testing primarily with ABS, I found that the prints would detach from the glass plate mid-print and went on to investigate.

Other than that, the glass seems like it will do the job nicely, it is easily washable and as opposed to the painter tape, the prints won't get line marks on the bottom surface, where the tape strips meet on the plate.

I got myself an infrared thermometer, based on the youtube video below, which was very helpful


What I found out is that, as with in the video, the actual thermistor (thermal sensor) readings on the plate differ significantly from the measurements with the thermometer.

Isolating the printer case side/front panels didn't get it to 110ºC as required by the glass, as I also found out that the stock thermistor underneath the heat bed won't allow such temperatures. Also, the CTC-3D stock firmware is limited to 120ºC max.

After some investigating, two possible solutions were found:

  1. upgrade from stock firmware to sailfish firmware in order to be able to set higher heatbed temperatures, thus increasing the real bed temperature as well, and closer to 110ºC
  2. replace the heatbed thermistor sensor by another one, in order to reduce the temp difference between the one being measured and the actual temp on the bed.

I then set out to replacing the thermistor, based on a 3DHubs user advice as well as upgrade the stock firmware to the Sailfish firmware, in order to be able to set higher heatbed temperatures.

Upgrading the stock firmware wasn't without its hiccups, but no big deal:

[revised from my own post on 3DHubs]

I've recently upgraded my CTC to Sailfish 7.7 (r1432) - I followed the [sailfish firmware install] tutorial, used replicatorg-0040r33-Sailfish-linux.tgz from the thingiverse link as I'm using linux and it worked ok.

A member [on 3DHubs] helped me locate the reset button - it is a hole near the USB port in the back of the printer.

To upgrade the firmware, under linux 64bit, I had to install libusb-0.1-4 : i386 because RepG was reporting errors in the console regarding this lib not being found.

Once RepG was ok, doing the firmware update was as follows in my case:

Used RepG to scan serial devices and got /dev/ttyACM0 detected (the printer)

Machine > Machine Type (Driver) > The Replicator Dual (Sailfish)
Then Upload New Firmware > Makerbot Replicator 1 Single & Dual (v1.5) > Sailfish 7.7 (r1432)


/home/wickwire/Downloads/replicatorg-0040r33-Sailfish/tools/avrdude -C/home/wickwire/Downloads/replicatorg-0040r33-Sailfish/tools/avrdude.conf -cstk500v1 -P/dev/ttyACM0 -b57600 -D -Uflash:w:/home/wickwire/.replicatorg/firmware/mighty_one-Sailfish-v7.7.0-r1432.hex:i -pm1280
avrdude: stk500_recv(): programmer is not responding


As RepG does a few retries before it timed out again in the log, I just pressed the reset button with a pen tip and it started flashing.

I was done in a few seconds (the terminal reported flashing success) - powered down, powered up and the LCD on the printer was working. Going through the options on the LCD to printer info I got the Sailfish info.

Did a factory reset using the printer LCD screen options, rebooted the printer, then checked the printer nozzle offsets and stuff as the guide mentions and all was ok, didn't change anything.

Printed a sample part as follow up using slic3r and being careful to update it to use makerbot (sailfish) instead of makerbot(makerware) and it worked properly.

At this point, the firmware upgrade was OK and printing with ABS on the Sitall glass works, provided I use hairspray for strong adhesion.

The infrared thermometer still registered a 95ºC max temperature on the glass, as I'm still to replace the thermistor.

Removing the heatbed was easy enough and this is what it looks like underneath:



The thermistor is highlighted in green on the photo. To replace it, I was advised to use a 100k ntc, so based on what I was looking at, I went with this model from Ebay (there are several available, mostly for Prusa and RepRap printers, but those are slightly different than what is used on this heatbed).


I'll update the blog with my findings once these parts are delivered.