Do 3d printed PLA parts really biodegrade? Photos after 1 year inside a fish tank filter.

[Note: This post was featured on Hackaday on 3/8/2016]

I believe they said it best in Anchorman:

“They’ve done studies, you know. 60% of the time, it works every time.”

There was a great post on reddit today entitled “What happens to PLA that has been sitting in water for 3.5 years? – An accidental experiment” making the case that PLA does *not* break down in water.

However, my experience is that PLA really does break down under some conditions.  So, what’s the deal?  Turns out, I have an accidental science experiment of my own!

1) The case *for* biodegradability:

In March 2015, I 3D printed a filter basket from PLA for use with my fish tank filter. I wasn’t happy with the first one, so I replaced it a week later with a slightly shorter one.  I never threw out the first one, so that set the stage for an interesting science experiment.

Here they are, side-by-side, a year later.

PLA after 1 Year (left) vs 1 Week in fish tank (right)

PLA after 1 year in fish tank (left) vs 1 week in fish tank (right)

The one on the right is just dirty – no breakdown at all. The one on the left, though, has become faded, porous and brittle, and parts of the honeycomb walls are starting to crumble.

closeup of degraded PLA

closeup of degraded PLA

That being said, this is just about the most conducive environment possible for PLA bio-degradation.  After all, a fish filter is *designed* for optimal biological breakdown — lots of fresh oxygen-rich water circulation, high levels of nitrifying bacteria, and a constant temperature of 80F/26C — so this degradation should come as no surprise.

2) The case *against* biodegradability:

Lest you think the case is closed in favor of biodegradability, I have some conflicting evidence.  At about the same time last year, I printed and installed this end cap for a filter spray bar. As you can see, it is dirty but undamaged after a year in the fish tank:

PLA dirty but undamaged after a year underwater

PLA dirty but undamaged after a year underwater

So, what’s the difference?  In terms of materials, this one is a different brand of PLA, and obviously uses a different pigment.  All of these prints are from cheap generic PLA from ebay so I can’t say anything about their purity, chemical composition, or additives.

There are also environmental differences between the two results.  This cap spent its year in the tank near the surface of the water, exposed to light, with lower levels of bacteria and a generally lower water flow rate.

Conclusion: PLA sometimes breaks down in water

Based on my experience, it’s hard to make any definitive statements about whether a particular 3d printed part will break down with exposure to water, and if so, how quickly.  Clearly, it *can* break down, but at least *sometimes* it does not.

Further investigation is needed to say how environment factors (temperature, light, biological activity) and/or chemical makeup of the filament (brand, pigments, processing additives) influence these different results.

Further Reading

That sums up my experience with PLA in a bacteria-friendly aqueous environment.  You might want to check out this post on Lazy Gecko Blog to see a different experience in a very different environment.

3D Printable Rocket Nozzles Part 2: The 3D Model

In Part 1 of this post, I presented the math behind a rocket nozzle.

Here, in part 2, I’ll show you how I turned that math into a 3d model!

First, the fun stuff… I posted my code to Thingiverse at http://www.thingiverse.com/thing:280483 where you can play with it live via the Thingiverse customizer.

How does it work? Well, first, I built an OpenSCAD script, using the math from Part 1 to build a 2D shape like this:

full2dNozzle(Rinlet = Rinlet, Ain = Ain, Rthroat = Rthroat,
             Rexit = Rexit, Aout = Aout, pct = pct);

2dNozzle

This shape is actually two half-nozzles, one a conic nozzle and one a parabolic nozzle. Here, the inlet arc is 1.5 * Throat Radius, and outlet arc is .382 * Throat Radius, as shown in Part 1.

Once I have defined a function ‘full2dNozzle’ to draw the 2d shape, it is a one-liner in OpenSCAD to twist and extrude it into 3d:

nozzle

rotate_extrude() rotate([0, 0, -90])
         full2dNozzle(Rinlet = Rinlet, Ain = Ain, Rthroat = Rthroat,
                 Rexit = Rexit, Aout = Aout, pct = pct);

3D Printable Rocket Nozzles Part 1: The Math

nozzle3

This is part 1 of a multi-part post about rocket nozzles.

I have been kicking around some rocket nozzle ideas for a while now, and now that I have a 3d printer, I actually have fabrication capabilities at my disposal. Granted, plastic filament is not a very practical material for rocket nozzles, however I have never practicality get in the way of good fun.

I was going to wait a while before posting my work, but I see people collaborating online at github/thingiverse/reprap forums working on a similar project, so I figured I’d draw a line in the sand and share what I’ve got so far.

In part 1, I will lay out the sketches of the nozzle that I set out to build — a de Laval converging-diverging nozzle using G.V. Rao’s geometry — and develop the equations that describe such a nozzle.

Rocket Nozzle Anatomy

The idea behind a converging-diverging nozzle is that exhaust gases will accelerate through the converging cone, reaching mach 1 — the speed of sound — as they pass through the throat. Once past the constriction, the gases will expand and further accelerate and become supersonic. The final velocity reached depends on gas thermodynamics and the exact geometry of the nozzle, but today’s rockets routinely achieve exhaust velocities of several times the speed of sound.

The geometry underlying the nozzle is fairly simple — a cone, two arcs, and a parabola, as described by G.V. Rao in 1958. See section 2.4.1 and 2.4.2 for some excellent bedtime reading about Dr. Rao’s results: http://www.scribd.com/doc/58809639/13/Bell%C2%A0nozzle

Geometry

In order to model this nozzle in OpenSCAD, I first needed to determine up a few key points mathematically, so I threw together a more detailed sketch suitable for reasoning about the trig:

Transition Setup

Here it is again, with the details worked out for the cone-to-throat transition:

Cone to Throat Transition

And here are the details for the inlet cone itself:

Inlet Cone

The arc transitioning out of the throat is set up the same as the arc in, just with a different radius.

Throat Expansion

The arc out of the throat needs to join smoothly with the parabolic expansion section. Mathematically, that means that both the arc and parabola are tangent to the same line at the transition point. I admit, I was stuck here until I saw github user buback note that a quadratic bezier curve forms a nice parabola. I adapted the algorithm he found to use a trapezoidal approximation of the curve.

Exit Parabola

The last bit of math is to find point P1…

Finding Control Points

And that’s it! If you followed this far, you paid attention in High School Trigonometry! Wish you paid more attention? Khan Academy has great free tutorials!

In Part 2 I will use all of this math to design an OpenSCAD script to build 2d and 3d models of the nozzle!

2dNozzle

nozzle3

Mounting a USB datastore in VSphere ESXi

When I first started working with VMWare VSphere ESXi, I was surprised to discover that it does not support mounting a USB drive as a datastore. OK, maybe not that surprised given EMC’s business model, but still…

My solution:

  1. Mount the disk in a helper VM
    • Create a helper VM running Linux
    • Configure the VM to pass the USB device through to the guest
    • Mount the USB device in linux, say in /mnt/usbdrive
  2. NFS Export the disk from the helper VM
    • Enable NFS in Linux (eg yum install nfs-utils)
    • Export the disk via a line in /etc/exports like:
      /usbdrive 1.2.3.4/32(rw,sync,no_root_squash)
  3. Mount the NFS storage in the hypervisor
    • Enable NFS in ESXi
    • Create a new datastore from network storage

USB Storage on VMWare Infographic

Caveats:

  • This configuration is best used for administrative tasks like backing up/restoring/moving VMs. I don’t recommend running a live VM in this configuration.
  • Due to the risk of deadlock, it is far better to put the helper VM on a different VSphere instance.
  • Make sure to remove the VSphere datastore before powering down the helper VM. If you don’t, the datastore will hang and can’t be removed until you reboot the hypervisor.

Tuning a Terastation 3400 for NFS Performance on VMWare

A few weeks ago, I worked on setting up a Buffalo Terastation 3400 to store VMWare ESXi VM images.

For flexibility reasons, I wished to use NFS instead of iSCSI, however I discovered that performance was absolutely dismal. Initially, I was only getting 6MB/s write throughput via NFS on ESXi. However, mounting the same NFS mount from a Linux VM on the same ESXi instance, I would see 40MB/s!

After a couple of days of fruitless efforts and a call to Buffalo Tech Support, I finally found a solution.

1) Make sure the Terastation NFS is in kernel mode, otherwise it won’t work at all with ESXi.

2) Upgrade the firmware. Don’t believe the TS web GUI when it says its firmware is up-to-date.   Mine said it had the latest, however when Buffalo USA Tech Suppport sent me to their website, I found a much newer version available.

In my case, this upgrade boosted write performance from 6MB/s to 40MB/s.

3) Changing from RAID 5 to RAID 10 decreased my usable space, but boosted write throughput to approx 70MB/sec

 

Resize an IDE drive in VMWare VSphere using Linux

I needed to increase the size of a hard drive in a Windows XP VM on VMWare VSphere ESXi 5, but discovered that VSphere does not support resizing IDE drives.

While it is possible to convert the drive to SCSI and then resize, that creates may render the drive un-bootable due to SCSI device drivers on XP.

I discovered an easier way, assuming you have a Linux VM available:

  1. Prepare XP for resizing
  2. a) run chkdsk /f and restart. This cleans up any minor disk corruption that may interfere with later steps.
    b) Stop your VM, then edit your XP VM settings. Add a new, larger drive to your VM. Choose “IDE” in advanced options. (If the VM is not stopped, you won’t see IDE as a choice)

  3. Temporarily give the drives to the Linux VM
  4. a) With XP stopped, edit the Linux VM to add two new drives, using the EXISTING XP drive images.
    b) As root on the linux box, run dmesg. You should see the new drives like this:


    [1087836.865331] vmw_pvscsi: msg: device added at scsi0:1:0
    [1087836.867284] scsi 2:0:1:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2
    [1087836.870663] sd 2:0:1:0: Attached scsi generic sg2 type 0
    [1087836.870904] sd 2:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 GB/16.0 GiB)
    [1087885.031428] vmw_pvscsi: msg type: 0x0 - MSG RING: 6/5 (5)
    [1087885.031435] vmw_pvscsi: msg: device added at scsi0:2:0
    [1087885.031612] scsi 2:0:2:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2
    [1087885.031829] sd 2:0:2:0: [sdc] 16777216 512-byte logical blocks: (8.58 GB/8.00 GiB)

    You can see here that sdb is the new 16 gig drive, and sdc is the 8 gig drive.

  5. Use linux to migrate data and repartition
  6. a) as root on the linux box, run:
    dd if=/dev/sdX of=/dev/sdY &
    where X is the drive letter of your old drive, and Y is the drive letter of your new drive.
    BE CAREFUL NOT TO CONFUSE DRIVE LETTERS or you WILL destroy your data.

    b) You can check your progress periodically via:
    # pkill -USR1 dd
    465913+0 records in
    465913+0 records out
    238547456 bytes (239 MB) copied, 6.09248 s, 39.2 MB/s

    c) run gparted /dev/sdY to repartition your drive. Right-click resize, then click apply. (This step may fail if you skipped step 1a…)

  7. Finalize VM configuration
  8. a) Edit your Linux VM one last time, removing both XP drives
    b) Edit your XP VM and remove the old drive. Make sure the new drive is listed in IDE slot 0:0

  9. Restart windows
  10. a) Power up your XP VM. Say yes when Windows prompts you to reboot due to system updates.
    b) That’s it!

A Single-Board Birdhouse

birdhouseA few years ago, I made about a dozen birdhouses and gave them out as gifts. I was recently asked for the plans, and had to admit that there were none — I pretty much made everything up on the fly. Pictured is my attempt at retroactive plans drawn from memory…

Construction is very easy:
– The entire birdhouse comes from a single 1×4 or 1×6
– All cuts are for length only – no ripping required
– All angled cuts are 45 degrees.

The design is very forgiving with respect to dimensions, so a hand saw would work just fine if you don’t have access to a miter saw.

The only real trick is securely attaching the roof, since it is difficult to fasten to the end-grain of the sides. If I were making them again, I’d use a construction adhesive like PL Premium which works well in that situation.

Click the image above to enlarge, or you can see the raw plans in Sketchup format here: Birdhouse Plans in Sketchup Format

On the Virtue of Loose Screws

Fastening two pieces of wood together with a screw seems like such a simple thing, and yet most people (myself included, until recently) never learn to do it properly.   The counterintuitive lesson I have learned is very simple:

Loose Screws Make Tight Joints

That is to say, pre-drilling ONE loose screw hole allows the screw to draw the joint tight with a great deal of clamping force, even if you start out with a gap between the boards. On the contrary, if the top screw hole is tight, allowing the screw to bite into the top piece of wood, any gap — regardless of how small — will be locked in place and the boards will never draw tight.

Screw Fastening Technique

It is important to draw all these screws tight

Printrbot Z-Axis Carriage. I drilled out some of the laser cut holes to better allow these screws to draw tight

I was reminded of importance of this technique recently, as I assembled my Printrbot 3D printer kit. The Printrbot kit consists of many pieces of laser-cut wood that MUST be tightly screwed together tightly using the technique above.

Failure to do so can turn this sturdy machine, capable of epic 3D-printing awesomeness, into a wobbly maker of not-so-epic “abstract plastic blob art”.

The best and worst of 3d printed pigs... One awesome, one I prefer to call "abstract"

The best and worst of 3d printed pigs…
One awesome, one I prefer to call “abstract”

Visual Instruction Guide for the Mini DV 1280 Video Camera

One of many flavors of the popular Mini DV 1280.   I got mine on Amazon for about $10

One of many flavors of the popular Mini DV 1280. I got mine on Amazon for about $10

I just got a new “Mini DV 1280” video camera for use with various flying machines.

The camera is PERFECT for onboard video on a Syma X1 Quadcopter — tiny size, decent video quality, amazing price — but the instructions are a bit lacking.

After spending an hour deciphering the cryptic instructions, I decided to clean up my notes and post them as an infographic. So, here is my Visual Instruction Guide to the Mini DV 1280 Video Camera, published with hope that someone else will find it useful.

Visual Instruction Guide for the Mini DV 1280 Video Camera

Visual Instruction Guide for the Mini DV 1280 Video Camera

1) Turn the camera on by hold “on/off” for 3 seconds

2) Cycle through the three main modes by pressing ‘Mode’. You can identify the current mode by looking at the blue and red LEDs. For example, a solid Red light indicates “Standby” mode.

Mode Lights Notes
Standby Solid Red Press “on/off” to record video
Recording Video Flashing Red Press “on/off” to stop
Camera Solid Blue Press “on/off” to take photo. Blue LED will flash once.
Motion Detect Solid Red, Solid Blue Any motion will start video recording
Motion Detected – Video Recording Flashing Red, Solid Blue Press “on/off” to manually stop recording

3) The “on/off” button takes a different action depending on the mode you are in. For example, in Standby mode (indicated by a solid red LED), the “on/off” button will start recording (indicated by flashing red LED). See the table and/or infographic above for details.

Polycaprolactone, an Excellent Glue for 3d-Printed PLA parts

3d printed PLA is notoriously difficult to glue, but I have discovered an easy-to-handle, non-toxic glue that works really well with it: Polycaprolactone. I get mine in pellet form for about $20/lb — a search on Amazon for polycaprolactone will turn up several different brands, and you can also find it at makershed.com.

Here, you can see a 3d-printed bracket that cracked due to poor layer orientation. No big deal — I just heated up a couple of pellets of PCL in hot water, pressed them into the gap like plumber’s putty, and squeezed the parts together. 2 minute fix, vs a couple of hours to re-print…

repaired bracket

The color even matches pretty well! I didn’t bother to clean up the squeeze-out, but that would have been easy enough to scrape off while the glue was still warm.

As another example, I used a single pellet of PCL to carefully glue each gear shaft of this elliptical gear set.

Elliptical PLA gears, with a single bead of PCL to glue the shafts together.

Elliptical PLA gears, with a single bead of PCL to glue the shafts together.

It wasn’t hard to keep the gears from locking up — I just spun the gears for the 30 seconds or so that it takes the glue to cool off.