Path: EDN Asia >> Design Ideas >> IC/Board/Systems Design >> Adjusting lights according to music
IC/Board/Systems Design Share print

Adjusting lights according to music

11 Nov 2015  | Hanif Saeed

Share this page with your friends

As one of the various 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). 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.

Figure: Driven by a 0 to 2.048V music signal at pins 12 and 1 of IC1, this circuit activates the six ac outlets according to the music amplitude, in a logarithmic thermometer-code format (a). The power block (b) represents each of the power blocks, PB1 through PB6.

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.

About the author
Hanif Saeed contributed this article.

This article is a Design Idea selected for re-publication by the editors. It was first published on August 6, 2009 in

Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.

Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming

News | Products | Design Features | Regional Roundup | Tech Impact