15.12.12

Nanotechnology

I finally got the invitation to Google Communities and joined the first 3D Printing group I saw. It turns out it's pretty much like following the people in my 3D Printing circle of the same name, except the scope is a bit wider. There are some posts I either missed or wasn't seeing, and some I can do without. There are more people of course, some with good information or opinions and others that are on the periphery or complete novices. It's a bit of a wash that way; there is more data, but less information density.

I'm not convinced yet on whether communities will take off. I can't see how to filter out everything that hasn't been +1'd yet (there's an opportunity for a coined verb if I ever saw one - the act of clicking +1 on Google Plus: how about plussed or plownd or plumped), but that's a natural extension that would be easy to do. You can model it after the system on /.

So anyway, the reason I'm writing this is one comment from a guy, who was already in my circles, on a post by a novice who asked "How big is the gap between a 3D printing machine and a personal fabricator?" Here's the money quote:

Basically, no, you're never going to be able to say "tea, earl grey, hot" and have a machine fabricate whatever you want out of atomic structures.
To which I heartily disagree and call bullshit.

Now granted, it may not be realized in my lifetime, but the fact that plants and people have already created it, is an existence proof that it's possible to construct it - even more so when it's done purposefully either by an organism or a machine. But, it won't be done by the bulk processes we have now.

The dialog around the post did include the words nanotechnology, but not in the way I've always thought of it. To me nanotechnology has always meant the ideas championed by K.Eric Drexler, especially in the mind blowing tome:

This book, based on his PhD dissertation, and his other more accessible previous work Engines of Creation were based on the There's plenty of room at the bottom lecture by my personal hero Richard Feynman. If you haven't read any of the above, I would recommend doing so at the next opportunity.

So, yes, it will be possible to construct any physically possible arrangement of atoms. The original question about what's the gap between the current technology and the possibilities as envisioned is simple to answer: it's a very large one. But even now, the differences are more subtle and nuanced than they were, just as the question of machine intelligence can now be answered affirmatively albeit with many caveats and conditions.

21.11.12

GnuPG

If you want to use encryption on emails you send, you have to:
  1. have a program to encrypt and decrypt text like GnuPG
  2. have somebody's public key
Here's mine:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.17 (MingW32)

mQENBE2z3s4BCADhbXqd+vRmuuzLWOZKyg1gJ1ds2ZQih0pAfm4SRU4q8sn+dcUP
D2jI9rsZkMrZ+mcSNyvPiENQjl8wYpjpt9POJLh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NNZ5Ru+KDyzB7+sCo0Y81WSVWDA28Aw7
TT92iz64cArhMhbdAzDozDy8fTHmfFD7TPFLvU2QBAMkNVtVEMQm0wARAQABiQEl
BBgBAgAPBQJNs97OAhsMBQkDwmcAAAoJEHMId2gBaOIbjW4H/R1upuX/nvp3JjjL
cuCw0qCsLVlXcmSq91P34gDsitC6LLw9oOqoRnBShiYkrDzBRdROV6o8A2DLBUOw
iYOWldLcXFUvfhskFWJB9LXcwSHcERSOoytyBT49BS1VZjYumrxA7tmhwPcZJQRK
8moZ4GGh+jlEYk07KfYrgKcWfTBr4y0mairRfShJ0bkn90S45+0KZ1+L6FvVMcz9
97wTuORbjkppSUgIzkoJNQvHx5KGEM8OEAxfpQNTjn+yygzy8hrY6+7pXA71gCwZ
Lbcf4VKdXitec/+W7xD9cnizIeP352S3rIl7qJCymzeS5nh9zesT9Sxo6OJbRz9M
/26RpiE=
=tTO0
-----END PGP PUBLIC KEY BLOCK-----

File name: 45595F7674B3E29228BBCEA1730877680168E21B.asc


8.10.12

Go on the Pi

If you have a Raspberry Pi and you want to program it, there are a lot of choices. Here's another: Go.

You're probably wondering why Go? Well, it's got some good libraries for networking and the binaries it makes are statically linked (albeit huge) so you don't need any supporting runtime when you ship a program. It's also cross platform enough so that the same program compiles on Windows and the Pi.

There are a few problems with it too. I would argue that Go is the ugliest looking language in the world because it forces K & R style braces - always. And the debugger is gdb, which I compare only slightly favourably with repeatedly poking a sharp stick in your eye. But hey, it's only a system the size of a credit card, what do you expect. I've worked on many embedded systems that have far more arcane (and expensive) tool chains.

Many others have got Go running on the Pi. ARM is one of the supported architectures. But since there are no binary packages available, this means installing from source. In case I have to do this a third time because I'm an idiot and baffed the SD Card image again (don't mess with the files in /etc/sudoers.d without enabling a root passwd), I'm recording the steps here:

Set the memory split for the pi, to the maximum for the CPU using:
sudo raspi-config
and the memory_split option.

Start by getting mercurial running:
sudo apt-get install mercurial

As suggested add these lines to /etc/mercurial/hgrc:
[web]
cacerts = /etc/ssl/certs/ca-certificates.crt


Get the GO source code.
cd /usr/local
sudo hg clone -u release https://code.google.com/p/go
(note: this takes a while)

Then update to the tip so that the ARM 7 support is available:
cd go
sudo hg update -C tip

Build the go runtime and binaries:
cd go/src
export GOARM=7
sudo ./all.bash

(note: this takes a real long time)

Test it out:
export PATH=$PATH:/usr/local/go/bin
Create a file hello.go containing:
package main
import "fmt"
func main() {
    fmt.Printf("hello, world\n")
}

Then run it with the go tool:
go run hello.go
which produces:
hello, world

2.9.12

Oops

Here's a tip for you.

If you use Cura, don't put any valuable files in the Cura directory, because if you ever uninstall it, for example to upgrade the version, it erases everything in that directory tree.

Lesson learned. All the configuration files, scripts and command files that I had constructed to make that program work better are now history. Maybe I should file a bug, or submit a patch, but there are bigger issues with Cura than a flawed uninstall strategy.

1.9.12

Git on GDrive

I need to get stuff backed up. I've been programming too long without a net now. By that I mean I should be using Source Control Management (SCM) or at least some sort of Revision Control (RC) besides copying files to a thumb drive every so often.

I could push the projects to github or sourceforge, but then they would be public and I don't think I'm ready for that yet.

You can pay a monthly fee to github of course, and get private storage, but does it sound like I'm the kind of person who would pay a monthly fee?

So anyway, if you want to push stuff to the cloud, and you're using Git, you can use GDrive as the data storage site (or others like dropbox) by following the instructions (google search for "git" and "google drive"), but only if you're using Linux. Here's the instructions when using Windows.

Make a directory in your Google Drive local directory to hold all your projects:
cd C:\Data Files\Personal\Google Drive
mkdir git
cd git

Make a directory for a project and initialize git there:
"\Program Files\Git\bin\git.exe" init myproject.git -–bare

Each project should be given a new directory (myproject.git is the directory in the above command).

Now change to the project working directory - where you work on it. Initialize git there (if you're not already using it) and establish a remote (called gdrive below) to the created project directory in the Google Drive directory:
"\Program Files\Git\bin\git.exe" init
"\Program Files\Git\bin\git.exe" remote add gdrive "file:///C:/Data Files/Personal/Google Drive/git/myproject.git"

Note the syntax for the file URL is the keyword file, a colon and 3 slashes. This is important, otherwise you get an error like:
ssh: file: no address associated with name

This directory will have all the build artifacts, so you will probably want to clean it up first, but then add all the files in it, commit, and post to the remote (GDrive):
"\Program Files\Git\bin\git.exe" add .
"\Program Files\Git\bin\git.exe" commit --message "First commit to GDrive"
"\Program Files\Git\bin\git.exe" push gdrive master

When GDrive finishes syncing up the directory you're good to go.

8.7.12

Arcs

The toolchain for 3D printers is broken.
By that I mean there is a fundamental flaw in it; at least for regular geometrical objects. The process is good for Yoda heads and other objects extracted from 3D scans, but it fails for designed objects that have anything other than rectilinear forms.
The fundamental problem is using STL files as an intermediate format. The contents of this file type is a series of triangles that describe the exterior boundary of the solid. If the design that creates the STL files has a cylindrical, spherical or other curvilinear solid body, the program that generates the STL file has to approximate this with a tessellated surface. Even very simple solids can generate thousands of planar faces in trying to represent the design in the limited vocabulary of planar triangles.
As an example, consider the simple cylindrical object and its STL equivalent:
Obviously, storing the three coordinates of each of the three triangle vertices and three direction numbers for the normal, takes considerable storage. This STL file is 100KB for an exceedingly simple object. This is the result for a high resolution output, but reducing the resolution causes more deviation between the flat triangles and the original object - in other words the printed object is not what was designed; holes get smaller, you can see facets instead of smooth surfaces, etc. As the hole size gets smaller the facets need to get smaller to keep the surface deviation small, so the number of facets is mostly independent of the scale of the object.
The problem is, downstream programs like ReplicatorG, Cura and Slic3r need to process all this crap data. The generated G code file for this example is 750KB. This is why slicing takes so long and baud rates to the machine need to be as high as possible.
There is a possibility to use arc G codes (G2 clockwise arc, G3 counterclockwise arc) with Marlin to reduce the number of G codes needed to print circular objects, but the only program that even tries to generate these G codes is Slic3r, and that is only an "experimental feature".
Why? Because it's a hard problem to reconstruct the original mathematical shapes that created the STL file. A long time ago, my professor said "You should always tell downstream programs what to do, not have them try and figure it out." That has proved out to be true time and time again. This means the instructions to the slicing code should be as rich and explicit as possible, rather than have the slicing code try to figure out what the intent is.
Certainly, eventually, there will be technology to reconstruct solid models out of STL files, but like colorizing black and white movies, or performing raster to vector conversion, the result is never as good as having the original data.
Why are we throwing out the information that can make 3D printing simpler? Why not start making color movies today and create (or adopt) a real 3D format for the use-case of printing designed (rather than scanned) objects?
The problem is, there are many formats (e.g. IGES, STEP, etc.), and figuring out which one would be best for the 3D printer community is also a hard problem.

7.7.12

Success with Cyanoacrylate

Cyanoacrylate "crazy glue".
Based on an Ultimaker Google Group post and Florian's comment on my ABS warping post, I went out in search of some cyanoacrylate to try and glue the first layer to the platform in order to avoid the warping when using ABS.
I located some glue that is mostly cyanoacrylate in the local hardware store. I sprung for the big 10g bottle of this "crazy glue", even though in my experience it dries up long before it gets used up.
The first problem is that this trick involves applying the glue to the corners of the print "while printing [the] first layer". If you've ever seen one of these Ultimaker machines run a small part, you'll realize there are two issues with that. The first is that the layer takes about 15 seconds to print, which isn't much time to futz around gluing the corners. The second issue is that if you get your fingers in the way of the moving head in that small print area you'll either a) hurt your fingers and/or b) shift the print by making the stepper motor skip (it's operating open loop, so it doesn't measure where the head actually is, it just counts steps, so if one or more steps fails to move the head, the location of layers above the skip are displaced).
So what you want is for the machine to stop for you so you can do the needful and then tell it to start printing again. Fortunately there's a code for that.
The G code M0 stops the machine and waits until the user presses the button on the Ulticontroller. If you don't have an Ulticontroller, you can still use it with a timeout via the S parameter.
So the workflow is

  • slice the stl file to gcode
  • manually edit the gcode file to insert the wait code
  • load the file into the printrun program
  • start the print
  • when it pauses, apply the glue to the corners
  • press the continue button (or let the wait timeout)
  • continue the print
So, where do you insert the G code when you edit the file? Here's the first few lines of the part G code file.

;TYPE:CUSTOM
M92 E854.177692541
G21        ;metric values
G90        ;absolute positioning
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstops
G92 X0 Y0 Z0 E0 ;reset software position to front/left/z=0.0
G1 Z15.0 F400
G92 E0         ;zero the extruded length
G1 F75 E5
G1 E4.5
G92 E0         ;zero the extruded length again
G1 X100.0 Y100.0 F3500
G1 Z0.0 F400
G90 ;set positioning to absolute
G21 ;set units to millimeters
M105
M106
M113 S1.0
M108 S25.0
;TYPE:SKIRT
G1 X57.35 Y111.134 Z0.1 F9000.0
G1 F2400.0
G1 E1.035
G1 F9000.0
G1 X63.234 Y117.017 Z0.1 F1500.0 E1.0935
G1 X138.734 Y115.05 E1.6242
G1 X142.65 Y111.134 E1.6631
G1 X142.65 Y88.866 E1.8196
G1 X138.724 Y84.941 E1.8586
G1 X61.285 Y84.932 E2.4028
G1 X57.35 Y88.866 E2.4419
G1 X57.35 Y111.134 E2.5984
G1 F2400.0
G1 E1.5984
G1 F1500.0
;TYPE:WALL-OUTER
G1 X64.15 Y91.75 Z0.1 F4500.0
G1 F2400.0
G1 E2.6334
G1 F4500.0
G1 X71.25 Y91.75 Z0.1 F1500.0 E2.6833
G1 X71.25 Y93.85 E2.698
G1 X66.25 Y93.85 E2.7332
G1 X66.25 Y106.15 E2.8196
G1 X126.65 Y106.15 E3.2441
G1 X126.65 Y93.85 E3.3305
G1 X121.65 Y93.85 E3.3656
G1 X121.65 Y91.75 E3.3804
G1 X135.85 Y91.75 E3.4802
G1 X135.85 Y108.25 E3.5961
G1 X64.15 Y108.25 E4.1
G1 X64.15 Y91.75 E4.2159
G1 F2400.0
G1 E3.2159
G1 F1500.0
M0 S30 ; wait to apply glue
;TYPE:WALL-OUTER
G1 X128.65 Y94.15 Z0.1 F4500.0
G1 F2400.0
G1 E4.2509
G1 F4500.0
G1 X128.65 Y105.75 Z0.1 F1500.0 E4.3324
G1 X133.85 Y105.75 E4.369
G1 X133.85 Y94.15 E4.4505
G1 X128.65 Y94.15 E4.487
;TYPE:WALL-INNER
G1 X128.65 Y93.75 F4500.0
G1 X128.25 Y93.75 F1500.0 E4.4899
G1 X128.25 Y106.15 E4.577
G1 X134.25 Y106.15 E4.6192
G1 X134.25 Y93.75 E4.7063
G1 X128.65 Y93.75 E4.7456
G1 F2400.0
G1 E4.1456
G1 F1500.0
;TYPE:WALL-INNER

Too much glue, 2nd layer separates.
The location I used was after the first TYPE:WALL-OUTER that defines the corners (see the line in yellow), right after the extrusion retraction preparing for the jump to the second outer wall. This should leave less of a blob.
The first time I did it I applied too much glue and the second layer was pretty much mush, so it separated from the first layer.
The second time I was more careful, and used a Q-Tip to smear the drops of glue out a bit. I also increased the extrusion temperature from my normal 230°C to 240°C to get the second layer to stick to the (now colder) first layer.
I also turned off the cooling fan by unplugging it at the extrusion head. There's a code for that too (M107, fan off), but this didn't work for me. Something to investigate later.
This yields the desired result, although now, the blue tape is starting to lift from the print bed, so the print was still distorted a bit.
Successful attempt, although the blue tape is lifting at the corners.
You can't really see the tape lifting in the picture, but the hole is supposed to be round (naturally).
Before the print, I did do the best I could to make the tape adhere to the bed. If you shine a light from below the acrylic and you run your fingernail backwards over the tape if the tape isn't pressed down completely you can see a mark where your finger nail presses the tape fully into the bed.
The slight curvature can maybe be seen better when the part is removed from the printer.
Only slightly warped part.
Still, it's good enough.
You can see the part on Thingiverse.