APPLICATION NOTE 4620

Set Your Holiday Lights to Music

By:  Hanif Saeed
© Oct 14, 2009, Maxim Integrated Products, Inc.

Abstract: This circuit digitizes music with a 12-bit A/D converter, monitors the resulting digital outputs, and produces a logarithmic thermometer-code format to control multiple power outlets.

Attend this brief webcast by Maxim on TechOnline
Attend this brief webcast by Maxim on TechOnline

This design idea appeared in the August 6, 2009 issue of EDN magazine.

As one of many ways you can implement a light show, this one selectively activates various subsets in a group of six strings of Christmas tree lights, causing them to flash on and off according to the level and tempo of music you are playing. The stand-alone circuit (Figure 1) requires no microcontroller, no software, and no trimming.

Figure 1. Driven by a 0-to-2.048V music signal applied at IC1 pins 12 and 1, this circuit activates the six AC outlets according to the music amplitude, in a logarithmic thermometer-code format.
Figure 1. Driven by a 0-to-2.048V music signal applied at IC1 pins 12 and 1, this circuit activates the six AC outlets according to the music amplitude, in a logarithmic thermometer-code format.

The audio signal to be displayed is applied to a 12-bit ADC (MAX1276). The signal ranges from zero to +2.048V in this circuit, causing the first string of lights to come on at +2mV. Though the circuit shown controls six AC outlets, it can be expanded to control 12 outlets. When triggered by a short positive pulse at CNVST, IC1 initiates a conversion clocked by the signal at SCLK. Its output (DOUT), clocked by rising edges of SCLK, consists of four leading zeros followed by the 12-bit conversion result, MSB first. Thus, one conversion requires 16 clock pulses at SCLK.

The display is powered by a vertical stack of six switched outlets, in which the top outlet represents the MSB. 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 above) and notes the first bit to assume a value of "1." 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.04dB increment) is either quadruple or one fourth of the immediate value. Although the number of steps available equals the ADC resolution (12), this circuit only uses every other one to drive the six outlets.

At DOUT, the first output bit with a value of "1" charges C5 (via 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, and thereby inserts into the shift register the value presented at its input. At the end of a conversion, all bits following the first one that exhibits a value of "1" are also forced to "1" by the voltage stored on C5.

At the completion of each conversion, a negative pulse applied to the SC_TP 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).

The 74HC4060 IC serves as a clock and timing-sequence generator and the 74HC132 provides some necessary glue logic. For each 74HC595 output connected, the signal (inverted by the 74C901) activates the corresponding MAX253 transformer driver (IC7 in one of the six Power Blocks). Isolated by a 1:1 transformer, this driver signal then triggers the TRIAC (Q1, a solid-state TRIode for Alternating Current) to its ON state. For the component values shown, the circuit has a display sampling rate of about 2.5kHz, and uses the 12th, 10th, 8th, 6th, 4th, and 2nd 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 120VAC). It’s designed to operate with incandescent light bulbs; no other type of light bulb should be used. Even though the outlets are shown as standard 120VAC outputs for use with commercial incandescent lights, fast switching in the TRIACs makes them unsuitable for driving other types of load 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®.

STMicroelectronics is a registered trademark of STMicroelectronics, Inc.



Related Parts
MAX1276 1.8Msps, Single-Supply, Low-Power, True-Differential, 12-Bit ADCs with Internal Reference Free Samples  
MAX253 1W Primary-Side Transformer H-Bridge Driver for Isolated Supplies Free Samples  


Next Steps
EE-Mail Subscribe to EE-Mail and receive automatic notice of new documents in your areas of interest.
Download Download, PDF Format (58kB)  
Share
Other Channels  Email this page to an associate or friend. 


The content on this webpage is protected by copyright laws of the United States and of foreign countries. For requests to copy this content, contact us.

APP 4620: Oct 14, 2009
APPLICATION NOTE 4620, AN4620, AN 4620, APP4620, Appnote4620, Appnote 4620