Generating 3D-printable pieces directly from EAGLE PCB designs

I while back, I made this PCB that acts as a big daisy-chainable two-digit 7-segment display using the WS2803D and discrete LEDs. The pic to the right is a shot of the first use of these PCBs: a big sign that says “4561”.

It works great, interfaces easily with AVR/Arduinos, and is cheap to build.

One thing that’s not great about it is the amount of light leakage from the LEDs — if you put some kind of light diffuser in front of it, you see all kinds of reflected and refracted bits of light. Here’s a shot of a clock I made out of these boards with white gaffer tape as a diffuser:

Look at all those random patterns of light…it’s shameful.

Today I figured out a simple way to 3D print a light mask for this board using design elements straight out of EAGLE! Here are the high-level steps:

1. In a new layer in your EAGLE board layout, draw the stuff you want to 3D print.
2. Do a series of conversions to get that EAGLE layer turned into an OpenSCAD script and then a STL for printing.
3. Print, jam on board, enjoy a better looking display.

Here’s a shot of the light mask applied to the left two digits of the clock:

Full directions after the break. Continue reading

Here’s some huge wallpapers made of math

I don’t feel like writing a big post explaining all of it, so the summary is that I spent a few hours playing with colorspaces, Hilbert curves, and image generation, and produced some stuff that looks kind of neat.  I’ve posted everything in one big wad, and you’re welcome to poke at this ugly undocumented code if you like. I also posted prior Python art scraps.

All the images in this post are shrunken down — the full size loss-less PNGs are on the github with the code. This is the kind of thing it kicks out:

Basically, I walk a 3D color space via a 3D Hilbert curve, mapping it to a 1D scalar. I then walk that 1D scalar on a 2D Hilbert curve, rendering each color in place in an image. Here’s an example of a 1D sequence of colors walked:

From there, I fiddled with the various outputs in Paint.NET to make pretty pictures, e.g.:
(Original here) I was able to render the above one at a ridiculous resolution (8192×4608), so it looks awesome spanning four monitors.

Others:

Check out the github dump for more.

Using Nylon trimmer line with a PrintrBot and Gaffer’s Tape

People have been experimenting with Nylon trimmer line for a while, and I wanted to give it a shot, since nylon is tougher, more flexible, smoother for moving parts, and can handle higher temperatures.  I found a few small tips which I believe are novel, specifically that (1) gaffers tape makes a fantastic print surface while preserving inductive level sensing, (2) minimum print time per layer is the key to getting good prints with Nylon at high temperatures & speeds, and (3) dickbutt is the best test model in the world.

Summary of findings for the impatient:

• Trimmer line usedRino-Tuff Universal 0.065 in. x 275 ft. Trimmer Line (Home Depot).
• Print surface: Gaffer’s Tape. It makes an excellent surface — the nylon adheres quite well, but the tape can be peeled off to help free parts like painter’s tape can for PLA.  No alcohol or glue necessary. I haven’t seen anyone online using it for nylon, so maybe I discovered something new?
• Get the right size: Make sure your filament is less than the rated size for your printer, not merely close (2.0mm didn’t work in my 1.75mm printer, but 1.65mm did).
• Don’t trust the size on the label: My “1.65mm” filament was actually a fairly consistent 1.40mm.
• Cura print settings — after experimenting, I arrived at the following settings (Cura profile INI here):
• Temp: 230 C
• Speed: 40 mm/s
• Fan: off!
• Minimum layer time: 10 s (essential!!)
• Retraction speed: 10 mm/s (slower than default)
• Retraction amount: 1 mm (less than default)
• Retraction combing: on
• Travel speed: 160 mm/s (much faster than default)
• Bottom layer speed: 10 mm/s (slower than default)
• Heated drying unnecessary: Drying of the filament may help, but I found I didn’t need to given the right printer settings (sufficiently high temperature).
• Be systematic in your experimentation for print settings!

More details after the break.

Fixing a PrintrBot with open source parts

I really like my PrintrBot. It’s compact, reliable, and straightforward to build.

Unfortunately, when I started getting ambitious with experimentation, I got into trouble. Basically, I started experimenting with things. First, it was printing with Nylon trimmer line. I was too impatient to dry the line as instructed, so it clogged everything up like crazy. That left me without a nozzle until I could figure out a way to clean it, and while I eventually did, it led me to wanting backup nozzles. That’s when I started to discover how odd-ball the PrintrBot is compared with most 3D printers. It doesn’t take the nozzles that 95% of other printers do…instead of an M6-threaded male nozzle, it takes an U.S. 1/4″-20 female nozzle (see here for a comparison).

This made me look into fabricating my own nozzles, because there aren’t third-party ones out there, and hell if I’m going to pay PrintrBot \$8 a pop plus shipping for a bit of machined brass.

Unfortunately, the PrintrBot’s hot end assembly is also fairly proprietary, and also has an annoying flaw — the heater wires aren’t well protected, so if you tighten too much when swapping nozzles, they’ll break. This is double bad, because the hot end gets hot enough to melt normal solder, so you can’t even repair the break. Picture:

So it looked like I’d need a new heating element. Unfortunately, this is another area where PrintrBot is very far from standard — nobody else uses this kind of heating element, and the PrintrBot store wants \$59 for a replacement.  Meanwhile, the standard (as defined by cheap imports from China) is a small aluminum block with a heater cartridge and thermistor mounted inside of it (see right) that costs next to nothing. These hot ends are fully metric, with M6 threading for both the nozzle and shaft.

I happened to have one of these, so I had an Apollo-13-air-scrubber style problem: how do I get the Reprap-style M6-threaded heating element to graft onto the U.S. sized PrintrBot nozzle assembly?

I tried several combinations to no avail, until I realized that I could re-tap the M6 hole in the Reprap-style heating block to 1/4-20. Then I could thread the entire PrintrBot hot end tube through it, reassemble it per usual, and be back in business! So that’s what I did…with just a minute with a 1/4-20 tap and a bench vice, I converted the heating block to be PrintrBot compatible:

To keep it tight, I used teflon table on the nozzle, and tightened the heating block against the nozzle itself. This has a bonus effect of heating the nozzle most effectively.

To hook up the connections, I just attached Dupont pins to the thermistor (female) and heater cartridge (male). The pins hook up fine, but I didn’t have the fancy PrintrBot-type connector housings. No matter – a bit of tape keeps them secured.

In the end, it worked! The only issue I had was that it had trouble staying at temperature — the heating block leaks heat like crazy, especially when the fan is on.  To fix this, I wrapped it in a bit of PTFE threadlock tape, then a layer of Kapton tape to hold it:

With this done, I remounted it, recalibrated a bit, and was kicking off prints!

Side note: I also found an easier way to fabricate nozzles than the link I provided earlier. I just got some brass cap nuts, as the original directions prescribe, but instead of building a makeshift lathe, I just started by drilling the hole, then “milled” away excess material from around the outside of the hole freehanding with a dremel cutting disc. Knocked out a 0.5mm nozzle in about 5 minutes.

3D crap

I got a 3D printer (a PrintrBot Simple Metal model 1403), and it’s been great.  I don’t have time to write much, so I’ll share highlights:

• I’m on Thingiverse here. I’ve already put up a bunch of crap, including a customizable omni wheel design.
• I’ve been learning OpenSCAD, a free tool that lets you write code to generate 3D solids.
• There’s no arc function in OpenSCAD, and the solutions I found online were inefficient or only worked for certain inputs, so I wrote a new one.  See below:
```module arc(r,a1,a2,ir=0) {
// normalize to 0..360 (even for negatives)
a1n = (a1 % 360 + 360) % 360;
a2n = (a2 % 360 + 360) % 360;
difference() {
circle(r);
if (ir != 0) circle(ir); // if inner radius given, subtract it away

// get the a1 to interpolate to, adding a revolution if going the long way
a1next = a2n>a1n ? a1n + 360 : a1n;

polygon([
[0,0],
[cos(1.00*a2n + 0.00*a1next)*2*r,sin(1.00*a2n + 0.00*a1next)*2*r],
[cos(0.66*a2n + 0.33*a1next)*2*r,sin(0.66*a2n + 0.33*a1next)*2*r],
[cos(0.33*a2n + 0.66*a1next)*2*r,sin(0.33*a2n + 0.66*a1next)*2*r],
[cos(0.00*a2n + 1.00*a1next)*2*r,sin(0.00*a2n + 1.00*a1next)*2*r],
]);
}
}

// test array
for (a = [-360:60:360], b = [-360:60:360]) {
translate([a,b,0])  linear_extrude(height=10) arc(25,a,b);
}
```

The Pandaphone

I was looking for a gift for my friend’s son, who’s about a year old.  I realized that everything I was looking at was just various enclosures with chips that made sound and light…that’s the kind of crap I can do!

So I built a theremin-type thing. It plays notes based on how close you are to its ‘eyes’, which are an ultrasonic distance sensor, and the nose is a small speaker.

Video:

Build log after the break.

TerrorBytes Countdown Clock

The masses have spoken! After my wildly successful debut as a blog post writer, Tyler and I have collaborated to create a post so exciting that we may just increase our readership to tens of people!

This project started as an idea of Tyler’s. He, my husband, and I all volunteer as mentors for a high school robotics team, the TerrorBytes. The team participates in the FIRST Robotics Competition, which has very strict rules about building times and deadlines. This makes it beneficial to have a countdown clock. Last year, Tyler made one online that we would display at meetings. It was not ideal because it relied on internet and we didn’t have internet that was reliable. Tyler came up with the idea for a physical sign based on an AVR chip and some jumbo 7-segment displays.  The result is the TerrorBytes countdown clock!