Design Idea
Set your lights to music
This circuit activates six ac outlets according in a logarithmic thermometer-code format, causing six to 12 strings of lights to flash on and off according to the level and tempo of music you are playing.
Hanif Saeed, Maxim Integrated Products, Inc, Sunnyvale, CA; Edited by Martin Rowe and Fran Granville -- EDN, 8/6/2009
As one of many ways you can implement a light show, the circuit in this Design Idea selectively activates various subsets in a group of six strings of lights, causing them to flash on and off according to the level and tempo of music you are playing. The stand-alone circuit requires no microcontroller, no software, and no trimming (Figure 1). You apply the audio signal you want to display to IC1, a 12-bit ADC. The signal ranges from 0 to 2.048V, causing the first string of lights to come on at 2 mV. Although the circuit controls six ac outlets, you can expand it to control 12 outlets.
A short positive pulse at the CNVST pin of IC1 triggers it to initiate a conversion, which the SCLK signal clocks. Its output (DOUT), which the rising edges of SCLK clock, comprises four leading zeros followed by the 12-bit conversion result, MSB (most-significant bit) first. Thus, one conversion requires 16 clock pulses at SCLK.
A vertical stack of six switched outlets, in which the top outlet represents the MSB, powers the display. You might, for example, plug a separate string of lights into each outlet. During operation, the circuit scans each conversion result as it is generated (MSB first, as described previously) and notes the first bit to assume a value of one. It then turns on the corresponding outlet and all those below it in the stack. The result is a logarithmic column, in which the change of input voltage necessary to move the column one step up or down (a 12.04-dB increment) is either quadruple or one-fourth the immediate value. Although the number of steps available equals the ADC's resolution of 12 bits, this circuit uses only every other one to drive the six outlets.
|
At DOUT, the first output bit with a value of one charges C5 through D1 to the logic-one level. The voltage on C5 connects to the data input (DS) of the first of two cascaded 74HC595 ICs, which together form a 16-bit shift register. The signal that clocks the ADC, slightly delayed, also clocks this shift register through the NAND gates in IC2 and thereby inserts into the shift register the value present at its input. At the end of a conversion, the voltage stored on C5 forces to one all the bits following the first one that exhibits a value of one.
At the completion of each conversion, a negative pulse applied to the ST_CP inputs of both 74HC595 ICs transfers these shift-register contents to a parallel-output register, IC6. The same pulse discharges the storage capacitor through diode D2, leaving the circuit ready for the next conversion scan. The parallel-register outputs then serve as drivers for the 12-bit logarithmic column, with the MSB driving the top outlet.
IC4, a 74HC4060, serves as a clock and timing-sequence generator, and IC2, a 74HC132, provides some necessary glue logic. For each connected 74HC595 output, the signal, which IC6 inverts, activates the corresponding MAX253 transformer driver, IC7 in one of the six power blocks. A 1-to-1 transformer isolates this driver signal, which then triggers solid-state TRIAC (triode for alternating current), Q1, to its on state. For the component values in the figure, the circuit has a display-sampling rate of about 2.5 kHz and uses the 12th, 10th, eighth, sixth, fourth, and second bits to control the six outlets. The resulting light show adds an extra dazzle to the music you are playing.
This circuit operates at lethal voltages and requires proper handling. Note that the transformer must withstand a line level of 120V ac. It operates with incandescent light bulbs; you should not use any other type of light bulb. Even though the outlets are standard 120V-ac outputs for use with commercial incandescent lights, fast switching in the TRIACs makes them unsuitable for driving other types of loads, such as appliances, electronics, or ac adapters. Transformer T1 is a TGM-350NA from Halo Electronics Inc, and TRIAC Q1 is a T1235-T from STMicroelectronics. Click here for a video of this circuit in action.
















