Fighting with computers

Computers are not always friendly.

Sunday, April 28, 2013

LEDs getting smarter

Sometime ago, I used for a project a set of RGB LEDs that were networked and responded to a few commands sent through a shared bus. It was a lot of work but it was fun. A while ago, at a RepRap meeting, user fungus showed me how he was using new controllers for doing exactly that, controlling RGB leds through a shared bus (daisy-chain would be the exact term though). They are available either as a small PCB with the chip so you can solder your own LED, or with a built-in LED or in a long stripe of LEDs.

Other manufacturers just included the chip together with their RGB leds, so you can get a three pin RGB led that includes internal memory to be set at any desired color from a single-pin output of your favorite micro-controller. And my favorite during the last few years has been Arduino so I just downloaded the FastSPI library and try to make sense of it. Unfortunately it never is so easy, so this time I was forced to upgrade my Arduino to 1.0.4 (I was avoiding that and keeping the 023 version that worked nicely with my 3D printers firmware, I hope nothing will break now) as library was not compiling and I did not want to go through the effort of backporting the code to an old version of Arduino environment.

I did not find a simple example, but eventually got everything running fine with an Arduino UNO using just one output pin. Now I have to figure out what patterns may look cool and to code them.

Here you have my sample code I used for the video above (I am using digital pin 5 on Arduino for the data line):

// Sample code for WS2811 LED bars
// by misan

#include "FastSPI_LED2.h"
#define NUM_LEDS 60

struct CRGB { byte g; byte r; byte b; };
struct CRGB leds[NUM_LEDS];

WS2811Controller800Mhz<5> LED;

void setup() { LED.init(); }
int counter=0;
int MAX=16;     //keep power usage low

void loop() {
    leds[counter].g = random(MAX);
    leds[counter].b = random(MAX);
    leds[counter].r = random(MAX);
    LED.showRGB((byte*)leds, NUM_LEDS);
    counter = ( counter + 1 ) % NUM_LEDS;

Sunday, April 14, 2013

Running in circles with the extruders

While my Wade-type extruder works nicely in my old Prusa, I planned to use a smaller geared stepper motor for my new Prusa i3 3D printer. But the road to a reliable extruder that is lighter and smaller is paved with many different trouble.

The first problem was to source PG35L-048 motors that Josef Prusa was using for his compact extruder and shown in different youtube videos. Sourcing it in Europe was not easy but I was lucky buying some units from an Austrian supplier called Neuhold Elektronik. But my joy was brief, once I could not easily extract the gear of the motor and I ended up sawing it off, because the shaft of my motor was shorter than the version used by Prusa, so I had to adapt the 3D design of the extruder to fit my motor. I got that extruder eventually working, but in order to get consistent extrusion the motor needed a bit more current than its specs so it was overheating. An aluminium piece, part of a heat-sink of an Intel processor took care of the extra heat. Still, I was not impressed with that extruder performance, though part of the fault might be caused by a not so great hotend.

Once I saw that even Josef have moved away from that stepper, I bought a unit of the new one he was using from The motor was more or less the same price of a regular nema17 but delivered much more torque due to a 50:1 reduction gearbot. User OhmEye complained of some gears early failure on an extruder of his own design but once I got the extruder working it was all good. Or so I thought, till I noticed some banding on my prints. It ended up not to be a fault of the extruder but of my hotend that was incapable to handle speeds above 40mm/sec and it started to stutter.

This new motor did not overheat and it works ok, but I was not impressed with the results due to the additional delay introduced by the gear box, that did not allowed fast retracts.  

So I took an modified Wade extruder and I made a small change for it to fit the x-carriage part of the Prusa i3 and this is what is working the best for me. The added advantage is that you can do the hobbed bolt at home, which leads to a quite cheaper solution to the extruder.

It seems more people like it and it has become my most popular part in Thingiverse.

But I seem to have a problem leaving things that work alone, and I am testing yet another extruder right now. It is just a bit more compact but it uses nema 17 motors too.