Previous capture 23 Next capture
2007 2008 2012
27 captures
30 May 00 - 8 Aug 12
Close Help

Quick Circuit Description for The Simple Pseudo-Random Sound Generator Example designed for MAS861

The Schematic is posted here

J. Paradiso 11/1/00

Note that I've linked to manufacturer pages for the few chips that I use; you can download the PDF datasheets from these sources. A scanned graphic of the handwritten schematic is linked above. Such hand-drawn schematics are often the first stage in circuit design (especially in the hacking tradition) as you converge on a working design. The next step is to capture the schematic into an ECAD system. In the tutorial set up by our TA's, you'll learn how to commit rough schematics such as these to the computer with Protel EDA.

I have posted sample sounds actually made by this prototype at the bottom of this document, and have posted a photograph of the prototype circuit here as made on the breadboard (small image or high-resolution image). Note that these pseudo-random music generators have a very interesting lineage - the first such commercial device was designed by our own Prof. Marvin Minsky and Ed Fredkin back in the late 60's. It was called the "Muse", and did make some impact on commercial electronic music (it was the first affordable electronic music box that you could buy that actually played itself), although was not a great commercial success; perhaps a bit ahead of its market.

This circuit runs on a single +5 Volt supply and drives a speaker directly. The sound that's heard originates from a 555 timer in one-half of the dual-555 chip (U1), the 556. This 555 circuit drives a 4024 CMOS 7-stage binary counter U2, which produces 7 subharmonics below the frequency of the 555 (quiescently set to be around 10 kHz through the resistors and capacitors at pins 1 and 2 of U1). An 8-1 multiplexer/demultiplexer, the 4051 (U3) selects one signal out of the 7 available subharmonics from U2 and the original clock signal from U1, and routes it through an NPN emitter follower bufer (T1), which is able to drive a loudspeaker, producing the sound that we hear (I've provided a line-level audio output as well for jacking into recording device inputs, decoupled with the 1 uF capacitor and buffered by the 1K-Ohm series resistor). Note that driving a loudspeaker directly off the Class A amplifier that T1 forms isn't good form without isolating the speaker from the transistor with a big (e.g., 1000 uF or more) capacitor (remember that T1 would still need an emitter resistor for DC bias), as the 0-5 volt square waves appearing at the transistor output have an average DC voltage of 2.5 volts, which does nothing but heat up the voice coil in the speaker. I get away with it here as the voltages are so low and the speaker isn't of high quality, but note that it's very poor form.

The signal that's actually selected by U3 is set by the binary value on its address pins, numbers 9,10, and 11. These signals actually come from 3 output bits of shift register U4, which is a 4021 8-bit shift register that gives access to the last 3 bits. This register is configured as a ring counter with feedback; i.e., two output bits of the shift register are combined by an exclusive OR gate in U8 (a quad 4030 package) and fed back into the input of the shift register (loading the first stage). This forms a pseudorandom bit train - as the shift register is only 8-bits long the pseudorandom bit train must be less than 256 bits, but in reality it's much shorter here as we only feed 2 bits back - we probably get a repeating sequence around 30 bits long (which is musically relevant as you can remember the notes as they go by and hear them repeat). Note that the sequence of bits advances with each clock input pulse; the input clock is a low-frequency (e.g., 5 Hz) square-wave generated by the other 555 timer in the 556 U1, again as programmed by the resistors and capacitor at pins 12 and 13.

At this stage, without anything else, we'd hear a repeating pattern of octaves being switched in and out, which becomes quickly boring, hence I added a few other chips to liven things up. U6 is another 4024 7-stage binary counter, which actually divides down one of the pseudorandom bits from the shift register U4. These bits are all analog summed by U7, a MAX473 rail-to-rail OpAmp (note that one could use individual opamps in the the MAX474 dual and MAX475 quad packages here, although it's wasteful in this case as we only need one device). Note also that the MAX473-class device isn't the best fit here; although it's a nice low-voltage rail-to-rail device, it's a bit too fast (18 v/us) for these slow control signals and also can be somewhat unstable. Keeping in the Maxim line, the MAX492 series of opamps would probably be a better fit (but we use what we have in stock...). The output of this summer drives the frequency-control-voltage input of the 555 timer stage in U1 (at pin 3), shifting the pitch of the audio in a complicated fashion as the pseudorandom bit turns on and off. Note that the gain of opamp U7 is less than unity (actually around 0.2 per signal) and its biased up by the voltage divider at its summing node - this keeps the signal within range of the 555's control voltage input as the bits toggle on and off.

So now we have octaves switching at roughly 10 Hz, and the pitch of the entire sequence changing occasionally - a bit more interesting. To make things even better, we introduce another 4024 counter, U5, which divides down the lowest-frequency audio subharmonic from U2 by up to another factor of 128. This brings our audio signal down to the range where we can use it as another control signal. One of the counter bits (actually the divide-by-4) makes a square wave on the order of 10 Hz or so (depending, of course, on the audio frequency that U1 is producing); we actually sum this square wave also into U7, producing an audable trill when it appears at the control voltage input (pin 3) of the master oscillator. This trill can be annoying if it's always present, so we periodically disable counter U5 by driving its reset pin (in 2) by one of the divided-down pseudo-noise bits produced by counter U6. Now, the trill occurs only on certain sets of notes, which adds an interesting periodic emphasis. Finally, we do one more thing to liven things up a little more. The tempo has thusfar been static, as driven by the circa 5 Hz oscillator on the right side of U1. We can use the voltage-control input of this oscilator (pin 11) to vary the tempo of particular notes; for this, we use one of the bits produced by the pseudo-noise generator (U4). Now, our notes are quantized into two different durations.

The last thing that we do is enable a small degree of operator interaction. This happens by exclusive-OR'ing a couple of controllable signals into the feedback train of the pseudonoise generator that can change the note patterns. One is a pushbutton switch, that compliments the feedback pulse train when pressed. Depending on when this button is pressed and how long it's held down, a different pattern of notes is loaded into the pseudo-noise counter. The other input that's exclusive-OR'ed in comes from one of the divided audio signals provided by counter U5 (the divide-by-128 signal - the slowest available). This periodically (e.g., after many seconds) toggles the exclusive-OR output, changing the note pattern (hence it's called "randomize"). This behavior can be turned on and off by the SPST switch, which holds the XOR input at ground when on and allows the "randomize" signal to pass when off.

The end result does indeed make amusing sounds for such a simple circuit. I've posted a couple of 1.5 minute MP3 clips so you can sample its operation. The first clip illustrates the circuit working with the "randomize" switch off. I let a few repeats of the notes generated by the pseudo-noise counter play, then press the "load" button to cause a new sequence to be generated. The next clip is taken entirely with the "randomize" switch on, hence the repeating patterns are harder to identify as they are changing more frequently. The square-wave sounds are quite tiring, however, and a next step would be to introduce some dynamic timbral modulation to make it still more interesting. One way to do this would be to introduce tunable (e.g., voltage-controlled) filters, although this is a bit beyond what I'd expect for this class. Another technique may be to introduce additional oscillators for more voices - they can be combined in a linear summer (as we did in U7 for the control voltage signals) or in exclusive OR gates (which would generate sidebands similar to a ring modulator, for those familiar with audio synthesis).

Likewise, the control signals could be made to be more sophisticated with the addition of more logic chips or perhaps a more clever wiring between the chips on the current board. The circuit that I used in previous years' FAB class assignments was likewise a complicated state machine that generated electronic sounds - it was even more complex than this one, and the sounds were more varied. It was, however, perhaps less musical. Unfortunately, no recordings exist and the device seemed to have vanished, although the schematic is preserved at the above link.