Monday 27 February 2017

Meet the WOBATRON


LED matrix displays are everywhere... I've made and used them in many projects. Typically the rows and columns of the display are driven by components called "shift registers" usually with eight outputs controlled by "shifting" in data, one bit at a time. when a "store clock" pulse is received all the data can be moved on to the output pins, lighting up a set of LEDs.

Using a microcontroller (i.e. a computer chip), information can be loaded onto the display shift registers one row at a time and used to show text and so on. Most displays work by "multiplexing" the rows so that there is only one row lit at a time, but the persistance of vision of our eyes makes it seem that all the rows are on at once.

A few weeks ago I was inspired by a chat with a friend (Brighton sound artist Lorah Pierre) to see what would happen if random noise signals were fed into the shift registers controlling the matrix instead of the usual orderly data from a computer. The easiest way to test that is simply to power it up and touch the data input wires! Stray electrical noise is enough to make the display think its getting data and for things to happen on the LEDs...

The next step was to try it with something a bit more controllable. I did some experiments with an LED matrix I'd already made for another project and LOVED the results, so I decided to make something a bit bigger and more flexible especially for the purpose.

The WOBATRON is an LED matrix made up of 16 x 16 white, 0.5W 8mm LEDs. These are fitted into a laser cut grid on a "honeycomb" pattern (which I though would look cooler than a square grid). The LED mounting sheet is 5mm acrylic with another sheet of 5mm acrylic in front, cut with the hexagonal baffles. The front diffuser is 3mm frosted blue acrylic.
Baffle construction

The LEDs are wired in a grid. Every LED has a 100 ohm series resistor (Since the rows and columns are not going to be multiplexed. I didn't want to share current limiting resistors between LEDs).

Matrix wiring

Driver boards for matrix
The rows and columns are driven by transistor arrays (2 x ULN2803 on low side, 2 x A2982 on high side). These are driven by 74HC595 shift registers with the following signal inputs going to the control box where they are broken out to 4mm sockets.

  • Column drive data line, shift clock line, store clock line
  • Row drive data line, shift clock line, store clock line
  • Output enable (pulled down when not connection) to allow display blanking

In the control box is a 74HC14 hex inverter chip which is used to create six individual square wave oscillators with frequency pots (100k with 1k resistor in series). Four are "high frequency" with 0.1uF capacitor, then two are lower frequency oscillators with 10uF and 4.7uF capacitors. All these six outputs go to 4mm sockets so they can be patched to the display signal inputs with external leads. There are 4k7 resistors inline with the outputs as to allow signals to be mixed together and to prevent problems due to outputs being shorted together.

Control box with patch cables

Control box circuit

Two of the oscillators also feed a pair of "linear feeback shift registers" (LFSRs). These are clever little circuits that work by feeding data into a standard shift register that is an exclusive OR function of some of its outputs. By some clever mathematical jiggery-pokery that is beyond me, it is possible to set this up to that the outputs of the shift register will cycle through all the 255 (exclusing 0) possible combinations of 8 bits, in a "random" order (of course its not random, it repeats time after time, but it is far from sequential)

I think these are the best bit of the control box, since they allow for some very complex (but repeatable) signals to be generated, which give the best patterns on the display!

I wanted to be able to control the "density" of this signal, so I put the 8 bits of the output into an R-2R DAC. This is another simple but clever circuit which does a binary addition of the 8 output bits of the shift register to generate a voltage level, just using a network of resistors of 2 values. This circuit is found inside most Digital to Analog Converters.
Output from R2R DAC fed by LFSR

Once I had an analog voltage level, I can compare it with a reference voltage (from a 100k potentiometer connected across the power rails) using an op-amp as a comparator. When the DAC output exceeds the voltage dialled up on the pot, the comparator output is HIGH. Since the DAC output is a "random" sequence varying over the whole voltage range, changing the comparator reference voltage allows the pot to dial up a "density" of HIGH values on the comparator output. This works well when fed into the data lines of the display.
Pulse train after comparator stage

The two comparator outputs (one from each LFSR-DAC-comparator circuit) also go to a pair of output sockets.

Now if an LFSR is in a state where all its output bits show zero, a zero will be fed back into it, so the sequence will not advance. When the circuit is powered up, there is a chance one or both LFSRs will be "stuck" in this state. To get around this there is a push button that will pull the LFSR inputs HIGH while pressed to get the LFSRs going if they are stuck.

I really love playing with this build! I could twiddle the knobs and stare into the display for hours (and I have done :). Its really hypnotic and trippy, especially when the oscillators are audible too (i just mix the signals through 100k resistors and feed to a mono audio output)

Despite the simple inputs, there are a lot of interactions possible between the signals that produce results that can only guessed at! Close frequencies which are mixed will produce beating, the shift registers "chop" the signals by sampling data inputs based on shift clock inputs and there is a kind of second order to this where the store clock is used. Then there are stroboscopic effects possible with the blanking input. I am sure I have only scratched the surface of what might appear at certain settings!

Here is a schematic of an earlier noise matrix build. The new one is very similar except the display is driven with transistor arrays on both the high and low sides and each LED has a series resistor. There are also now 6 oscillators and two noise generators, with all the signals patchable to matrix.



2 comments: