Progress with my 3D Printer

I’ve started to do more complex prints over the past few days and I was running into problems with my prints.  After a little back to basics trouble shooting I think I’m getting the hang of the machine.

My Leapfrog Creatr came with a test print in the bed when it arrived, and for the first few weeks I found myself downloading STL files from the Thingiverse and printing them no real problems. But the prints were small and quick to print.  Over the last few weeks I’ve been designing parts I would like to print and every time I tried to print a large (>80mm) part it would lift from the bed.

Here are the two things I’d recommend you do:
1) PLA only requires a bed temperature of 60 degrees C, lower it from the default 90.
2) Level the bed as soon as you get your machine! (It was level when it left, but is it when you crack the shipping box!?)

After doing these, I’m starting to get really great results! Now I’m able to do bigger and longer prints without worrying too much if they are going to go wrong.

The first of these was a box for my Carambola i2c IO board (which has been converted to a Raspberry Pi controller, but that is another post!).

Here are the results:

RPi Heating Controller - Top section with Raspberry Pi mounting holes

RPi Heating Controller – Top section with Raspberry Pi mounting holes

Top of the box with the Raspberry Pi fitted:

RPi Heating Controller - Top section with the Raspberry Pi mounted

RPi Heating Controller – Top section with the Raspberry Pi mounted

The top and bottom:

The RPi Heating Controller - Two halfs with PCBs installed.

The RPi Heating Controller – Two halfs with PCBs installed.

The box assembled:

RPi Heating Controller - Assembled - top view front

RPi Heating Controller – Assembled – top view front

The side with access for power and Ethernet:

RPi Heating Controller - Assembled - view of the power and comms

RPi Heating Controller – Assembled – view of the power and comms

The output connector side:

RPi Heating Controller - Assembled - View of the output connectors

RPi Heating Controller – Assembled – View of the output connectors

All good.. at last I can call this one done!

Mis-adventures in OpenWRT (TL-WR741ND)

While waiting for a long 3D print job to finish, I got to installing OpenWRT on a TP-Link router I have here in the office… The long and short of it, I managed to brick the device. Even thought the TL-WR741ND is supported by OpenWRT, I managed to flash the wrong image on to it.

So what to do next.. It was cheap and I was going to scrap it and forget about it, but I couldn’t let it go!  I popped to cover and read about console access over on the OpenWRT site.

I dug out one of my USB FTDI cables and got soldering…

TP Link TL-WR741ND with cover off

TP Link TL-WR741ND with cover off

Simple enough to connect to a serial lines back to the FTDI break out board. TP4 is TX, TP5 is RX and ground is taken from the bare copper trace.

Tap points for UART

Tap points for UART

Got a serial terminal program up and running on my lab PC, set to 11520,n,8,1.  Turn on the power and bingo, console data coming thick and fast! Cool.. except the Linux image I had flashed didn’t want to boot.  Corrupt image file, the boot loader was stuck in a loop.

How to stop uBoot from cycling all the time and get access to the CLI?
Tried the ESC key a few time, no joy.. Reading around the web someone else suggested the ~ key.. still no luck.  I found a post about another TP-Link router and mention of the keystroke “tpl” to get to the uBoot CLI.  Typing really fast then the “Autobooting in 1 seconds” message came on the console, bingo the boot loop stopped and I had a CLI.

Serial uBoot debugNext, how to get a new image flashed? Well that is quite easy with uBoot.. One can flash an image from a TFTP server. So armed with the correct image and a running TFTP server, this is what I did on the console:

ar7240> setenv serverip <TFTP server IP>
ar7240> setenv ipaddr <Temp IP address on my network>
ar7240> tftpboot 0x80000000 orig.bin
ar7240> erase 0x9f020000 +0x3c0000
ar7240> cp.b 0x80000000 0x9f020000 0x3c0000
ar7240> bootm 0x9f020000

Reboot, and we’re good…

Raspberry Pi – RGB LED conversion

I was looking at the cost of an Arduino and Ethernet shield and thinking that they are quite expensive compared with a Raspberry Pi.  So time to update my Arduino RGB LEDs project to run on a RPi.

As noted all over the web the Raspberry Pi only has one PWM channel on the GPIO.  But there is a cool software PWM workaround called Pi-Blaster that does the business and opens up 8 channels of PWM, over kill for the 3 channels I need.

Initial trial with two PSUs:

RPi RGB Led controller trial with 2 PSUs

RPi RGB Led controller trial with 2 PSUs

Modify the driver board with a bigger 7805!:

Driver board regulator mod

Driver board regulator mod

Powering the RPi from the new PSU (I know I could have injected 5V back in through the GPIO header, but I have run out of 0.1″ sockets!):

Power to RPi

Power to RPi

The finished project:

RPi RGB Led controller

RPi RGB Led controller

The MQTT Python code:

#!/usr/bin/python
#
# rgb_mqtt_listener.py
# listen on MQTT queue for RGB light values
#

import os
import mosquitto

#define what happens after connection
def on_connect(rc):
        print "Connected"

def on_message(msg):
        print "OK " + msg.payload;
        hex_red = int(msg.payload[:2], 16);
        hex_green = int(msg.payload[2:4], 16);
        hex_blue = int(msg.payload[4:6], 16);
        print ("R:%d, G:%d, B:%d" % (hex_red, hex_green, hex_blue) );
        val_r = ( hex_red / 255.0 );
        val_g = ( hex_green / 255.0 );
        val_b = ( hex_blue / 255.0 );
        print ("R:%0.2f, G:%0.2f, B:%0.2f" % (val_r, val_g, val_b) );
        pwm_r = "echo 23=%0.2f > /dev/pi-blaster" % val_r;
        os.system(pwm_r);
        pwm_g = "echo 24=%0.2f > /dev/pi-blaster" % val_g;
        os.system(pwm_g);
        pwm_b = "echo 25=%0.2f > /dev/pi-blaster" % val_b;
        os.system(pwm_b);

#create a broker
mqttc = mosquitto.Mosquitto("python_sub")

#define the callbacks
mqttc.on_message = on_message
mqttc.on_connect = on_connect

#connect
mqttc.connect("mqtt.server.ip.address", 1883, 60, True)

#subscribe to topic test
mqttc.subscribe("rgblight", 2)

#keep connected to broker
while mqttc.loop() == 0:
        pass

The code listens on my Mosquito server for traffic on the “rgblight” topic.

Changing the colour of the strip is simple:

mosquitto_pub -h <mqtt server> -t "rgblight" -m "ff0000"   # Red
mosquitto_pub -h <mqtt server> -t "rgblight" -m "00ff00"   # Green

The Raspberry Pi is much quicker at processing the MQTT requests which I guess is to be expected, 16MHz vs 800MHz!

My new 3D Printer – Leapfrog Creatr

After much research into 3D printers, I finally took delivery of a Leapfrog Creatr on the 21st of November.

Here are a few pictures of the un-boxing!

Speaking of box, the shipping box is first class, solid and well packed.

The shipping boxThe printer, just out of the shipping box:

Printer out of the shipping boxI got the dual head version of the Creatr:

Print heads and tableOf course with a 3D printer goes a Thingiverse account.  You can check out the parts I’ve made and download the STL files.

I’m using Repetier-Host and Slic3r to drive the printer.  I’ve got it set up on a Ubuntu machine.  LeapFrog don’t have a Linux version for download on their site, so if you are looking for all the settings, please drop me a line, or I might post a zip file soon.