Color Grid

Small Color Grid

Electrical Design

The main components are the computer and the microcontrollers.  The microcontrollers control the lights in each module and read the sensor switches. The computer receives the switch states from all the microcontrollers, computes the new light intensities, and sends the new intensities to the microcontrollers.  The computer and the microcontrollers communicate over a serial line (or over two serial lines if one is not fast enough).

Note 5/18/02: This page is a bit out of date, but it is pretty close.  I'm probably going to change from the 75110/75107 driver/receiver pair to the 75115 receiver with a new driver since the 75115 has a lot larger common mode voltage range (+- 15 volts instead of +- 3 volts).  The lamp driver is a IRF730 MOSFET with a 2N4401 switching the 12 V gate voltage.

Block Diagram

The picture below shows the overall block diagram.  The serial signals from the computer are broadcast to the microcontrollers.  The serial data is sent in a series of messages.  Each message contains an address indicating the microcontroller that should respond to it. One address tells all the microcontrollers to respond to the message.

Data returned to the computer  over a serial line as well.  All of the microcontrollers could send data at any time.  However, since having two controllers send data at the same time would corrupt the data, each microcontroller only sends when the computer asks for a message.

Because the serial data must be routed through the grid, there is potential for noise to interfere with the serial data.  The potential for noise interference is high because many amperes of current are being switched quickly.  The interference is reduced by using a differential current-source signaling convention.  The differential configuration reduces noise by only looking at the difference between two signals.  Most interference will affect the pair of signals equally, which means that the difference between the signals is unchanged.  The current-source signaling also reduces interference because the feedback within the current source will compensate for the noise

The control signals start from the computer in serial RS232 format at 115.2 Kbaud.  This goes to an interface board, where the signals are turned into the differential current-source signals.  Three of these are created and routed to the microcontrollers in each module.  The end of the cable is terminated.

Power goes to the power box in the standard 120 V AC circuit.  The power box has three cords (only one is shown) to allow for 15A circuits.  The 120 V AC is fed into a series of transformers that output 60 V AC, which is rectified into pulsating DC.  The power box also has transformers, rectifiers, and capacitors to generate unregulated ±12 V DC, which is regulated down to ±5 V DC for use in the grid.  The difference between 12 and 5 volts allows for cable and regulation losses.
 

Color Grid Electrical Block Diagram
 

Control Signals

The next figure details the control signals.  The figure shows how the RS232 is turned into a pair of differential signals and routed to the microcontrollers.  The differential line drivers (the 75110s) have two outputs.  If the driver is enabled, one of the lines is driven for a high signal, and the other is driven for a low signal.  The line is driven by sinking a nominal 12mA.  The driver can also be disabled, where it doesn't drive either line.

Transmitting data back to the computer is a bit complicated because at most one microcontroller can send data.  All the line drivers share a pair of wires; only one driver is enabled at a time.  However, sometimes no driver is enabled, which means that both wires are at ground, which in turn means that the differential receiver will pick up any noise on the line and send it back to the computer.  The circuit prevents this by having an enable line that shuts off communication when no driver is turned on.

Sending data to the computer has these steps:

1. Enable the transmit line driver so the differential lines have a valid signal.
2. Drive the valid line.  The valid line is driven by the spare second line driver in the 75110 package.
3. Send data.
4. Stop driving the valid line.
5. Disable the transmit line driver.

The valid line has larger resistors (higher than the line impedance) for better noise immunity.  Reflections aren't a problem because this is a slow signal.  The valid line also has a small capacitor to reduce noise.

The figure below only shows one set of control lines; the block diagram above shows three sets.  The other two sets use copies of the driver and receiver parts.  The output of each set of control's AND gates are OR'ed together.

The control lines are isolated from the computer by using optoisolators (6N137's) .  This will protect the computer from the relatively high voltages and currents found in the grid, and will prevent damage if there is fault.  The optoisolator will probably have to be driven by something like the output of several 74LS04 inverters.

Links to Datasheets (PDF files)

75110 line driver
75107 line receiver
PIC16F874 microcontroller
 


 
 

Microcontroller Board

The next figure shows the main parts on the microcontroller board.  This shows the sensor switches and the light driver circuit.  The sensor switches sink 10mA, much more than the PIC input requires, for better noise immunity.  The light driver circuit is just a transistor and resistor that switches the rectified 60 V AC to the lights.  The transistor is either on or off.  The different lamp intensities come from using PAM (see below).  The two current transistor possibilities are two Zetex parts: a high-gain transistor, the ZTX1055A , and a darlington transistor, the ZTX601B (click for datasheet).

The lamp drivers need to be able to handle the following:

Each microcontroller controls 16 strings of lights, which is enough for 4 squares.  This means that each module has two microcontrollers, which are on the same circuit board.  The transmit lines from the two microcontrollers are combined using wired-OR, where each microcontroller only sinks current, and the line is pulled up with a transistor.


 

Power Box

The power box turns the 120 V AC wall current into 60V rectified AC for the lamps and ±12V DC to power the electronics. I'm using 5 12 V transformers in series.  Each transformer can output 40 A, so a 12x12 grid needs two sets of five transformers.

The 12V supply is just a cheap 150 W switching power supply.  The -12V supply will probably be deleted.
All of this plus switches, fans, relays, fuses, and connectors will be stuck in a footlocker.

Pulse-Width Modulation (PWM)

Different lamp brightnesses come from switching the 60V rectified AC power fast enough so that your eye can't see the flickering.  The switching must be synchronized with the rectified AC to avoid having the switching and AC waveforms combine and cause flickering.
 
 
The first chart shows the input waveform.  The rectified AC has pulses every 1/120 of a second.  The input waveform is what drives the string of lamps when they are fully on.

The second chart shows the waveform when the lamps are at half power. Power is only applied during the second half of each sinusoidal cycle.  The lamps won't be at half brightness because the brightness isn't proportional to the amount of power.  I hope to do some calibration so the main computer knows how much power to request to get a string of lamps to be at half brightness.

The third chart shows the waveform at about 3/4 power.  The last chart also shows a 3/4 power waveform, but with the power on during the first part of the cycle.  When lights are on partially, I plan to have half of the strings of lights turn on during the first part of each cycle, and the other half turn on during the second part of each cycle.  This should make the power used be more constant, which should make the generators happier.
The microcontroller will have either 256 or 512 intensity levels, where a level specifies the fraction of time that the power is applied.  Using 512 levels seems like overkill, but it would allow for 256 fairly evenly spaced intensity levels.  Not much power comes at the beginning and ending of each sinusoidal cycle, which means that changing the intensity when it is at the top or bottom of the range doesn't make much difference.  However, the current microcontroller probably doesn't have enough CPU power for 512 intensity levels, so I will need to see if 256 levels is good enough.  A faster microcontroller or adding more hardware would allow more levels.

Back to color grid main page

Last changed 5/18/02