Fourmilab home

Mind Grenade

Fifty Years On

Mind Grenade: front view


One should be considered lucky if, during their life, they encounter a “wild talent”. These are people who spin off original ideas faster than others can write them down, undertake challenges few others would imagine, no less attempt, and make you feel exhausted yet exhilirated just trying to keep up. The first such person I met in my life was Harry S. Pyle, who was a classmate of mine in engineering school. At the time I met him, as a university freshman, Harry was already an electronics wizard, having obtained the highest level of amateur radio license (Amateur Extra), been awarded a lifetime membership in the American Radio Relay League based upon his proficiency in Morse code, and was among the small number of radio amateurs using radioteletype (RTTY) gear. Legend had it that Harry could pick out his call sign by ear when transmitted in frequency-shift-keying encoding on the amateur radio bands. I never saw him do this, but I never doubted he could.

In later years Harry would go on to become, with Victor Poor, co-designer of the instruction set of the Intel 8008 microprocessor, which was the ancestor of the Intel x86 architecture used by a majority of general-purpose computers today. He was a principal designer of ARCnet, the first commercial local area computer network, and later worked in the area of computer vision and communications. Here is a list of patents granted to Harry Pyle. Harry Pyle died in 2013.

In 1969, Harry amazed everybody with a little electronic gadget he'd built which, using the primitive digital integrated circuits of the time, generated random music, played it through a speaker, and flashed lights on its front panel. It was precisely what people expected computers to do, based upon portrayals in the movies and on television, and yet it could be held in your hand and was, internally, very simple. He explained how it worked, and I immediately knew I had to have one. Digital electronics was in a great state of flux at the time, with each manufacturer launching their own line of integrated circuits, most incompatible with one another, so there was no point in slavishly reproducing Harry's design. Starting from the concept, I designed my own gadget from scratch, using Signetics Utilogic diode-transistor small scale integration integrated circuits which were popular at the time but shortly thereafter made obsolete by 7400 series transistor-transistor logic (TTL). The architecture was identical to Harry's device, but I opted for more with-it and less power-hungry light-emitting diodes (LEDs) for the display instead of the incandescent bulbs he used. I built the electronics assembly on a sheet of perforated board using wire-wrap fabrication (some people look down their noses at wire-wrap today, but it was good enough for the Apollo Guidance Computer and almost every mainframe backplane of the 1960s, and my wire-wrapped electronics works perfectly fifty years later.)


Here is the Mind Grenade I built. Move the mouse over the image to show legends on the controls. The knob at left controls the pitch of the music, while the knob at right sets its tempo (speed). The four switches at the bottom select one of 16 tunes, each 511 notes long, which the device can play. The display panel shows the state of the nine bits of the linear-feedback shift register used to generate the pseudorandom sequence of notes.

Mind Grenade: front view

With the cover removed, we see the front panel with the tempo and pitch controls, the display panel and, beneath it (largely obscured by the rat's nest of wires) the tune select switches, and the circuit board. Below the circuit board is the bottom-mounted speaker and the AC power supply I added later to the original battery-powered design.

Mind Grenade: the insides

Here is a detailed view of the circuit board; move the mouse over the image to show functional units. The integrated circuits were mounted in wire-wrap sockets, while discrete components had their leads pushed through the board and spread to hold them in place. Off-board components, such as the tempo and pitch potentiometers, tune select switches, and light-emitting diodes (LEDs) were connected via three IC sockets into which dummy IC “headers” were plugged with wires leading to the components. The nine 220 ohm resistors at the bottom left are series current-limiting resistors for driving the LEDs from logic level signals.

Mind Grenade: circuit board detail

All of the wiring of the digital components was done by wire wrapping. Discrete components such as resistors, capacitors, and transistors had their leads pushed through the perf board, bent outward a bit to hold them in place, then soldered to one end of a wire to either wire wrap or solder to the destination.

Mind Grenade: wire wrap construction

In 1969, few people had seen light-emitting diodes (LEDs). The front panel of the Mind Grenade had a block of red plastic into which I drilled nine holes that did not penetrate the front surface. In each hole I placed a tiny red LED (the only colour available at the time) in a clear package, with its leads bent back to protrude from the hole. The negative leads were all connected together and grounded, while the positive leads were soldered to wires which ran to connectors that plugged into the circuit board. After testing, I fixed the LEDs in place by squirting clear silicone sealing compound into the holes. The completed display panel was mounted with black silicone sealer to the back of the square hole I'd punched for it in the front of the cabinet.

Mind Grenade: display panel and LEDs

The original Mind Grenade was powered by a 6 volt “lantern battery”. In the mid-1970s, I retrofitted a built-in AC power supply using a 6.3 volt filament transformer, a bridge rectifier, smoothing capacitor, and a TO-3 5 volt regulator. The regulator generates relatively little heat, so simply mounting it to the grounded box and leaving the package to dissipate heat by convection is sufficient. The power supply was somewhat inelegant in that when you plugged in the device the sound would “burble” for a brief interval until the smoothing capacitor charged up, but then stabilised. Because the transformer is designed for 60 Hz AC power, and the likelihood the electrolytic smoothing capacitor is shot after almost half a century, to run the Mind Grenade for the video in this page I disconnected the power supply and ran the circuitry from a 5 volt DC bench power supply.

Mind Grenade: power supply retrofit

How It Works

The Mind Grenade is based upon a 9-bit linear-feedback shift register which acts as a pseudorandom sequence generator with a period of 511. The shift register is built from Signetics SP322B flip-flops, with the bit shifted out from the low-order being exclusive-ored with fifth bit in the register and shifted in as the new high-order bit, producing the maximum sequence length of 511 for a 9-bit register. A Signetics N8242A Exclusive Or gate is used to compute the bit shifted into the register on each step.

The shift register is clocked (shifted) by an analogue pulse generator whose rate is controlled by the “Tempo” (right) knob on the front panel, which adjusts the rate at which the register shifts between around twice a second to more than ten times a second. Each time the register shifts, it will take on a new value between 1 and 511, and the pattern will not repeat until all 511 values have been generated. This produces the pseudorandom sequence which generates the “music” played by the Mind Grenade.

To turn this number into a musical tone, we examine the value of the least significant four bits of the nine bit shift register, which will have a value from 0 to 15. We then have a four bit counter, also built from the same kind of flip-flops as the shift register, which counts up starting from 0. The value in the counter is compared to that in the low four bits of the shift register with logic built from Signetics SP337A and SP387 NAND gates and, when equality is detected, the counter is reset to zero and a signal emitted which inverts a flip-flop dedicated to generating the tone. The output of this flip-flop is amplified by a power transistor and used to drive the speaker. The counter is incremented by a separate analogue pulse generator whose speed is controlled by the “Pitch” (left) knob on the front panel: this sets the frequency range for the 16 tones generated based on the low four bits of the shift register. When the low four bits of the shift register are all zero, the counter will be reset so fast that the generated tone will be above the range of human hearing (and the ability of the speaker to reproduce), and will produce a pause, or rest note, in the output.

The four switches on the front panel control whether the value of each of the four low bits of the shift register is sent directly to the comparator or inverted before the comparison. This allows selecting 16 different sequences of the notes played by the device. These are called the “Tune Select” switches. They only affect the mapping of the shift register state to audible tones and may be changed at any time.

In Action

Here is a short video of the original Mind Grenade in action. To avoid using the built-in power supply, which was designed for 120 volt 60 Hz AC power, I disconnected it and powered the electronics from a 5 volt DC bench power supply. The piercing timbre is due to the square wave output of the tone generator. This video was made with the cover removed, which allows ambient light to shine through the red plastic block holding the LEDs; with the cover in place, you don't see the distraction of the wires and non-illuminated LEDs.

The Software Simulator

Little did I imagine, when designing and building the Mind Grenade hardware in 1969, that fifty years later I'd be emulating it on a computer which ran more than a thousand times faster than the one I used in my day job at the time and, furthermore, was sitting on my own desk. But here we are.

Thanks to HTML5 and JavaScript, it is now possible to emulate the hardware Mind Grenade entirely in software that runs within any modern Web browser. Below is an abstracted version of the Mind Grenade front panel. Press the power button at the bottom to get things going. The slider at the left controls the pitch and the slider at the right sets the rate at which the notes play. The check boxes below the lights select any of the 16 possible tunes that can be played.

  Your browser does not support HTML5 canvas.  

Of course, what programmer can resist adding a few “special modifications” which, doubtless, I would have thought of fifty years ago if not constrained by limitations which have been transcended in our age of extravagant computing? Change the box below from “Swinging Sixties” to “Roaring Twenties” and an additional control panel will appear which allows you to select:

The Univac 1108 Morse Code Exec

This isn't the first software simulation of the Mind Grenade! In October 1971, I wrote the Morse Code Exec, a fully-general Univac 1108 series operating system which could be booted into any memory module by any processor or IOC of a Univac 1108 single- or multiprocessor system and would, if the “Audio” button was pressed on the CPU maintenance panel, run the Mind Grenade music algorithm on a Moon Race-era multi-megabuck supercomputer and, ahem, to boot, send Morse code for keys you typed on the console. Hey, if you had a multiprocessor, you could have multi-channel audio! Don't believe it? Here's source code!

Mind Grenade in Second Life

In December 2019, the Mind Grenade came to life once more, this time in the Second Life virtual world. Built as an object which can be instantiated in the world, and programmed in Second Life's Linden Scripting Language, Fourmilab Mind Grenade is available for free from the Second Life Marketplace, delivered with “full permissions”, allowing users to examine and modify it as they wish, including the source code of the script that drives it. Complete source code and support files may be downloaded from GitHub.

The Second Life Mind Grenade is an extended version of the original design, much like the “Swinging Sixties” Web implementation on this page, providing a 31 bit shift register which, running at four notes per second, repeats only once every 17 years, and colour display based upon the three most recent states of each bit displayed. Here is a video demonstration of the Mind Grenade running in Second Life.

by John Walker
August 2019
Updated: May 2022