555 Astable Multivibrator as an AM Transmitter

I mostly avoided the siren song of the 555 timer that seemed to echo through the blogiverse during the recent 555 contest, but when I was out and about last weekend, I picked up 10 of them from Anchor Electronics, and they have been taunting me from the shelf ever since. So, last night I dug out some resistors and caps, and tossed together a simple multivibrator circuit. Today, I was pondering what I could do with it, and I recalled seeing the circuit being used as an AM transmitter. The basic idea is to simply AC couple the audio onto pin 5, and voila. So… that’s what I did!

I’m actually not quite sure I completely understand how this works (it’s not entirely clear to me whether it is more accurate to call this pulse width modulation or frequency modulation) but the circuit does work. I imagine that once I understand it better, I’ll be able to make it work significantly better. But that’s something for the future.

Amazing small machining site…

Back when I was into building telescopes (something I haven’t done very much of in the last few years) I developed a desire to try some machining. I managed to pick up a 6″ Atlas mini lathe. And… well.. I’ve done very little. It’s sitting on my workbench in the garage. This website demonstrates some cool projects that can be done with inexpensive Taig mills and lathes.

So, I got a Taig.

Neat article on William Friedman and Steganography

William F. Friedman is a name that might not be familiar to you unless you are a bit of a cryptography nut. Of course, I am a bit of one: I have a couple of long technical notes that were authored by Friedman on the cracking of some complex WWI era ciphers. But I must admit that I’ve barely scratched the surface of a very fascinating man and his career. The following article talks about Friedman’s work on steganography (the hiding of information in plain sight) and its relationship with Bacon’s cipher. Pretty neat stuff, and includes some material I had never seen before.

CABINET // How to Make Anything Signify Anything.

Roger, G3XBM shows off a software VLF receiver

Roger, G3XBM, has been busy experimenting on the Dreamer’s Band: signals somewhere around 8.9khz. These signals are actually in the audio range: so all you need to receive them are an antenna (Roger uses a largish loop antenna) and an RF preamplifier, feeding into a soundcard. Roger demos his system here, and shows reception of the Russian Alpha Beacon station operating around 12khz.

HOPALONG, from Dewdney’s Armchair Universe

All this fiddling around with the Lorenz attractor has made me try to think of other simple, easy graphics hacks that I could make. I recalled that A.K. Dewdney had some simple graphics hacks in one of his Computer Recreations column back in the 1980s. It turns out that Wallpaper for the mind was published back the September 1986 issue of Scientific American, and was reprinted in Dewdney’s compendium The Armchair Universe. I had a quick look, and wrote the following implementation of the HOPALONG program first… discovered? written? by Barry Martin. The program initializes X and Y to zero, and then repeatedly applies a pair of functions to the existing X, Y to generate new values. The program here just prints the values.

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define LIMIT   21000000

double sgn(double x)
    if (x == 0.) return x ;
    if (x < 0.0) return -1. ;
    return 1.0 ;

main(int argc, char *argv[])
    double x, y ;
    // double a = -200, b = .1, c = -80 ;
    // double a = 0.4, b = 1, c = 0 ;
    // double a = -3.14, b = 0.3, c = 0.3 ;
    double a = -1000., b = 0.1, c = -10 ;
    double nx, ny ;
    int i ;

    x = y = 0.0 ;

    for (i=0; i<LIMIT; i++) {
        printf("%lf %lf\n", x, y) ;
        nx = y - sgn(x) * sqrt(fabs(b*x-c)) ;
        ny = a - x ;
        x = nx ;
        y = ny ;

Depending on the value of a, b, and c, a different set of points is produced. I’ve left several “interesting” values as comments in the code. The set that remains uncommented is actually among the more interesting. It generates all sorts of interesting details. To visualize these points, I found it convenient to use gnuplot. Zooming into a fairly small region, you can see this wonderfully vascular like pattern evolve:

I remember implementing this on my old Atari 400 back then. But I probably didn’t really appreciate how it worked. Now, I recognize that this iteration is some kind of iterated function system, and that you might reasonably expect it to develop these kind of fractal patterns. It seems likely for convergence that the variable b should have absolute value less than 1, but a and c can (I think) be more or less chosen at any scale you desire. The sqrt implements some nonlinearity, which accounts for the many curved features that are visible.

This program has all sorts of fun tweaks. It always begins by initializing x and y to zero, but if you try different starting points, you get different orbits. You could try coloring the dots by slowly changing the way they are colored, or by coloring all points on the same orbit the same color. I removed the sqrt, and still got some interesting patterns. I’ve also thought of producing some animations by slowly varing some of the parameters to see how the resulting pattern evolves. All sorts of good stuff.

The Chaotic Lorenz Water Wheel

Doing a bit more reading, I found out that the equations that make up the Lorenz attractor (which are derived from a simplified model of 2D fluid flow with a superimposed temperature gradient) can also be thought of as governing another physical system. Imagine a water wheel, with a number of buckets spaced evenly around the perimeter. These buckets filled at the top of the wheel. As that bucket fills, any offset will generate an imbalance, and the wheel rotates. That will rotate another bucket into position. The amount of water in that bucket is less because it spends less time under the faucet. But eventually, the buckets all fill up, the wheel is balanced, and the friction of rotation causes the motion to cease.

But now, imagine that each bucket is leaky: that some of its water drains out. What happens then? Well, it turns out that depending on the speed at which the water is pumped in and leaks out, the wheel can exhibit chaotic motion: spinning at radically different speeds and often reversing itself. Very neat. Here’s a video of one with a particularly simple design (you can google for more examples):

This would be a fun garden project.

Chua chaotic oscillator

Over sushi this evening, Tom mentioned “Chua’s circuit”, or “Chua’s oscillator”. I knew that I had seen this somewhere before, but failed to remember that Chua was also the guy who first theorized about the memrister: a circuit element whose resistance is proportional to the sum of the charges that has been passed through it. Chua first imagined this circuit back in 1983, and it is probably one of the most well studied and well understood chaotic circuits ever proposed. It’s also quite simple. The page linked here should a simple circuit, with just a single op amp and a handful of other discrete components. I’ll ponder it some more:

Chua chaotic oscillator.

My own animation of the Lorenz Attractor

I’ve been working on a script or two for generating intros for some of my little YouTube videos, and thought that maybe something like an animation of the Lorenz strange attractor might make a somewhat interesting background. A little tweaking, and I produced the following example (only 10 seconds long, and with some Morse as the background):

You’ll probably see this (or something similar) on front of future videos.

The Strange Attraction of Strange Attractors…

I’ll just lead off with a picture:

This is a graph of the so-called “Lorenz attractor”, first described by mathematician Edward Lorenz in his paper Deterministic Nonperiodic Flow back in 1962. I learned about this kind of stuff probably back in highschool by reading Scientific American. Anyway, the equations themselves are pretty simple, but describe paths which are nonperiodic, and which are unstable: for two points very near each other, their evolution rapidly diverges, and they no longer follow identical paths.

Making these graphs was really just a diversion: I’ve got it in my head that creating an analog circuit that simulates these equations might be a fun thing to do. This is boldly going where others have gone before, so here are some links:

Build a Lorenz Attractor has a nifty little circuit that has two analog multipliers and three op amps. Checking with digikey, the MPY634 multipliers seem pretty spendy for something that is just a lark ($28 a piece, ouch), but Analog Devices makes some devices which seem like they will perform adequately, and cost $8 a piece.

A Simple Circuit Implementation of a Chaotic Lorenz System by Ned Corron uses these less expensive parts (AN633 multipliers, and the super cheapie TL082 op amps) and probably would be a good place to start.

And, of course, we need a YouTube video. Jeri and Chris show off a hardware implementation of the first circuit that Chris assembled:

I didn’t realize until later that the first article was written by Paul Horowitz, one of the authors of the incredible book The Art of Electronics by Horowitz and Hill. Digging a bit more, I found an actual lecture by Paul Horowitz on the subject, posted by user harvardphysics on YouTube:

Addendum: Here are some more links.

From the analogmuseum.org website, a nifty page that points out that if you change the value of the integrating caps, you can effectively change the speed of calculation, allowing the analog computer to directly drive a pen plotter.

I got pointed to the Analog Museum from this page, which in addition to demonstrating the Lorenz attractor running on an analog computer also has schematics and parts lists for actually building an analog computer, again using the AN633 analog multipliers from Analog Devices. Neat.

3-D printing method advances electrically small antenna design

Antenna design and manufacture has historically been pretty, well, primitive. There are reasons for this: early on, solving the large systems of equations to adequately model complex antennas was difficult. Luckily, advances in computers and software make that much more tractable. Now, we can design antennas with dozens or even hundreds of elements, and in complex three dimensional shapes. But manufacturing such antennas has been difficult. Hence, my interest in this article:

3-D printing method advances electrically small antenna design.

According to Bernhard, these antennas are electrically small relative to a wavelength (typically a twelfth of a wavelength or less) and exhibit performance metrics that are an order of magnitude better than those realized by monopole antenna designs.

Haven’t had time to rundown the original article yet, but it seems really intriguing. More later.

Addendum: Here’s a link to the article in PDF format, thankfully not behind a pay wall. I’ll find time to read it at lunch time.

Cooking up piezo crystals at home

I’ve always been interested in crystals: their outer beauty hints at a certain kind of inner beauty, caused by the orderly arrangement of molecules at the atomic level. When I was a kid, I made crystals from sugar, salt, alum, and copper sulfate, but never tried Rochelle salts. Rochelle salts are interesting because they are piezoelectric: in response to mechanical deformation, they generate an electrical current. Similarly, when stimulated with an electric current, they deform. This makes them useful for all sorts of cool applications such as microphone pickups.

Cooking up piezo crystals at home – Hack a Day

In an attempt to give you some value added, beyond just the link, I did some searching on Google Books. Somewhat interestingly, it turned up the Nov 11, 1946 issue of Life magazine, which ran an article on Rochelle salt crystals, which had the tag line:


Pretty girls in sunsuits grow a unique mineral that can turn pressure into electric current

Perhaps of greater interest to the experimenter is this article from Popular Science, November 1945 which talks about the history of microphones in general, and includes a bunch of experiments (somewhat tersely described) which can be done.

Demo of Enigma and the Turing Bombe at Bletchley Park

Carmen and I just got back from a trip to London, and we had a blast. One of the geekiest things we did while there was to take a day trip by train out to Bletchley Park to see the site of the codebreaking efforts by the British during WWII. As any long time reader of this blog must know, I’m pretty interested in codes and cryptography, and this was a bit of a personal thrill for me.

While we were there, we managed to get demonstrations of a real Enigma machine (very cool) and the modern reconstruction they completed of the Turing Bombe. I shot some video of it using a Canon G11, which isn’t all that great (the sound in particular is pretty terrible) but I thought I’d archive it on YouTube in case anyone else found it of interest. If you get the chance to go to Bletchley, I heartily recommend it: we spent four hours there, and it really wasn’t enough. Besides the Enigma and the Bombe, they have a reconstruction of Colossus, the first electronic digital computer that was used to break the German teleprinter code that the British called “Tunney”. They also have huts filled with many artifacts of the period, including one containing a bunch of radio equipment, dating all the way back to the crystal sets of the 1910s and 1920s to the Piccolo secure modem transceivers that were used in British embassies well past the war. Nifty stuff.

I have some pictures that I’ll get onto Picasa sometime soon of related nifty topics.

No, really, pi is wrong

Having completed my posting of a new program in celebration of pi day (going back to just spelling it out, since somewhere in the WordPress to Twitter chain, the HTML entities get dropped) I was reading my twitter feed, and found Vi Hart’s amusing video asserting that “Pi is Wrong”. Click through and watch the whole thing.

Her argument is really derived from Michael Hartl’s Tau Manifesto:

No, really, pi is wrong: The Tau Manifesto by Michael Hartl | Tau Day, 2010

I must admit, it’s remarkably convincing. Plus, Tau Day is actually my wife’s birthday. See you all on June 28th.