AC power control without touching AC power

2015-11-04 10.49.30bIn this article I’ll show a simple 3D design for a servo mount to control a light switch for about $3, plus some electronics to drive it with a neat little interface. This article explains how I used it to regulate my air conditioner, but the basic bracket allows control of any U.S. standard wall switch.

I just moved into a new office and there’s a window-mounted air conditioner. There’s a remote control to set the target temperature, but the unit isn’t smart enough to turn off at night. Instead, there’s a physical wall switch so you can turn it off with your actual physical hands, like a barbarian.

2015-11-02 16.00.07b

I’m not going to put up with a hot office in the morning, nor will I let the unit blow cold air all night and weekend when nobody’s around.  Instead, I will Build Some Crap.

Details after the break. Continue reading

How to make a ton of clear LEDs into diffuse LEDs

2015-11-01 02.41.35.mp4_snapshot_00.03_[2015.11.03_16.22.52] - labeled

Step 1: Make a rock tumbler out of some threaded rods, bearings, a motor, and a spaghetti jar:

2015-10-29 16.34.04b

Step 2: Get sand. If you don’t live in a beach/desert, you can probably get some for free from a landscaping supply place. (They charge per ton, so when you ask for a cup, they will think you are a crazy person and just give it to you.)

Step 3: Chuck the LEDs and sand into the thing and run it overnight.

That’s all.

Here’s what not to do:

  • Use an orbital sander to wiggle the jar. It’s super load loud and doesn’t do much.
  • Add water. This just gives you corroded LEDs that arent even diffuse.
  • Run it with so much power that centrifugal force sticks everything to the sides and it vibrates itself off your desk overnight.
  • Run it with so little power that it stalls.
  • Fail to own a variable power supply so that your only choices are 12V and 9V (see above).
  • Make your first shaft coupler out of gaffer tape. I ended up designing and 3D printing a simple shaft coupler.
    2015-10-29 20.45.18b


Generating 3D-printable pieces directly from EAGLE PCB designs

2015-10-24 19.52.06-design2

NOTE: Everything involved in this post is available for download here.

2015-10-24 19.46.08bI 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:

2015-10-24 01.10.03c

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:

2015-10-24 19.58.30b

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.:
denty-rainbow-small(Original here) I was able to render the above one at a ridiculous resolution (8192×4608), so it looks awesome spanning four monitors.



(Original here)


(Original here)

Check out the github dump for more.

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

2015-06-30 14.20.20bPeople 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.

Continue reading

Fixing a PrintrBot with open source parts

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

2015-05-29 00.41.14 fixUnfortunately, 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:

2015-05-29 00.41.14 flaw2015-05-29 extruderSo 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:

2015-05-29 00.19.29c

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:

2015-05-29 00.24.47bWith this done, I remounted it, recalibrated a bit, and was kicking off prints!

2015-05-29 00.26.43bSide 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

2015-04-24 23.09.21cI 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() {
        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; 
            [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);

2015-04-25 15_41_57-arc.scad_ - OpenSCAD