Home | |
(index locations on both: gammaelectronics.xyz and industrial-electronics.com) This light control unit is a "Bass/ Complementary", which switches color in time to the bass line of the music. -Andrew Armstrong Do you like listening to music? Has your room got a number of interesting, colored objects in it? If the answer to either of these is yes, then this light unit may be for you. This is a simple design, based on the principles of doing more for less cost, but it is highly effective. It flashes lights in time with the bass line of the music, and uses zero level triggering to avoid generating clicks on the mains, which could interfere with the sound. On my drawing board is a complicated three channel design, which modulates the brilliance of the lights in proportion with the sound. It uses some of the circuitry shown in the feature on lighting control, and is about four times as complicated. It needs filtering on the triac outputs to avoid serious interference, and the effect is very impressive. This, however is for the enthusiast. The light unit featured here is much simpler and cheaper, but the visual effect is similar and not proportionally less impressive.
How It Works As its name implies, this light unit switches one light on in time with the bass line of the music, and one light off at the same time. The idea is to change the color of the lighting in a room in time with the music, without significantly changing the brightness. It is intended that a spare tape recorder output on the amplifier should be used to provide the audio signal to operate the unit, but a microphone may be used instead. The block diagram, Figure 1, illustrates the functioning of the system. Effectively, it splits into two parts, one powered by a mains transformer, and the other powered by a mains dropper resistor. The signal is transferred from the one to the other by means of an optoisolator. The input signal is buffered and, if it is a stereo signal, the two channels are mixed. The bass part of the signal is then filtered out, by a second order filter with a rolloff at 228Hz. The filtered signal is now rectified by a precision rectifier, the output from which is AC coupled to a comparator. The AC coupling ensures that, regardless of the signal amplitude, the comparator will switch, rather than remaining locked on if the signal amplitude is very high. This may be regarded as a self adjusting comparator level, which avoids the necessity for controls on the front panel. The comparator output feeds the LED part of an opto-isolator. The output of this controls the triggering of the triacs, via some CMOS logic and a pair of transistors. The triacs are triggered on mains zero crossings, both to conserve trigger current, and to avoid interference. The logic signal which controls one triac is inverted to feed the other one, so that, unless the comparator output switches close to the end of the zero level triggering pulse, the load current will simply be diverted to one lamp or the other. If the lamps on each circuit are similar, the current drawn from the mains will be virtually constant, regardless of how the lights flash. Sound Input The circuit diagram is shown in Figure 2. The lower part, involving the LM324 quad op-amp, is powered via a mains transformer, while the top is the part powered by mains dropper resistor. The audio input signal is fed in to a virtual earth amplifier via R1 and R2. The input is protected from damage due to excessive signals (if, for example, a loudspeaker output is used to provide the signal) by D1 and D2. These two diodes should only conduct when a substantial DC component is present in the signal, or when the signal is so large that the op-amp output clips, so that the virtual earth input is virtual earth no longer. The input coupling capacitor, C1, and the interstage capacitor, C2, provide a low frequency rolloff which prevents subsonic components, due for example to warped records, from affecting the lights. The low pass filter consists of IC3c, R5, R6, C3, and C4. It is of a standard form called VCVS (voltage controlled voltage source). This name refers to the fact that the input in use has a high impedance, so that the voltage is controlled solely by the relative impedances of the passive components. The "voltage source" aspect refers to the voltage drive to the feed back capacitor C3. The frequency of the filter is given by the formula: F=1 /(2x 1< x R5xR6xC3xC4). The action of the precision rectifier is straightforward. C5 is charged to the peak of positive half cycles, and it discharges through R8 to the virtual earth point on pin 6 of IC3. The time constant is 0.1 seconds, which has been found, in practice to be a good compromise between speed of response and the possibility of the lights flickering in time with half cycles of low frequencies of the music. ------------------ Parts List RESISTORS (All 0.25W 5% unless stated) R12,3,4,5,6,9 47k R7,8,15,18,20 22k R10,13 1k R11,12 1M R14 100R R16,17 100k R19,21 1k5 R22,23 1 M, 0.5W R24 22k, 3W CAPACITORS C1,2 100n C3 22n C4 10n C5 4u7 16V radial electro C6,8 47u 16V radial electro C7,9,10 100u 16V radial electro Parts SEMICONDUCTORS D1,2,3,4,5 1N4148 D6 1N4006 D7 10V 400mW Zener BR1 W005 Q1, 2 BC182 or similar T1, 2 2N6073 or C206D ICI 4093 IC2 4001 IC3 LM324 IC4 Cheap 6 pin opto isolator eg. Maplin WL3510 MISCELLANEOUS Miniature 6-0-6 clamp mounting mains transformer, 8 pole mains connectors (both plug and socket), 5 pole DIN socket. IEC mains inlet connector, mains lead, case. PCB, lamps, lampholders, wire, solder. Stick on PCB pillars, stick on feet. Nuts, bolts, etc.
The comparator level is biased up from the 0V level by R10 and R11, so that the LED is off in the absence of signal. The diode D5 is there to forestall the possibility that the opto-isolator LED may be damaged by reverse bias when it is off. The bi-colored LED is an optional extra, which may be helpful in fault finding should the lights fail to work. It may also be regarded as a bit of flash' The 6-0-6V transformer which powers this part will charge the smoothing capacitors to about +/- 10V, because the capacitors will charge to the peak voltage of the transformer, which itself will be above nominal due to the very light loading. The ripple on the power supply is of no consequence, because the op-amp will effectively ignore moderate disturbances on its power supply. Triac Control The output of the opto-isolator is fed into a Schmitt trigger to give clean logic levels. The pull-up resistor is of a value high enough that the phototransistor need only pass 400 microamps to pull the Schmitt gate input to logic 0. There fore opto-isolators of only a small current transfer ratio may be used. (The current transfer ratio is the ratio between the phototransistor current, and the LED current necessary to provide this.) In order to trigger on the triac T1, Q1 must be switched on, which requires pin 3 of IC2 to go to logic 1. This can only occur when both pin 1 and pin 2 are at logic 0. Therefore, to permit triggering only near to the mains zero crossing, a short negative pulse is applied to pin 2 at the mains zero crossing. The triggering current will then be applied for this period, assuming that pin 1 is at logic 0 as well. Zero Level Triggering The zero level triggering pulse is generated by two parts of the 4093. The output of this section. IC1 pin 3 can only go to logic 0 if pin 1 is at logic 1. and pin 2 is above the logic threshold, and there fore classifies as logic 1. During positive mains half cycles, pin 2 is held to logic 1. Near the zero crossing. when the positive voltage is small, pins 5 and 6 are biased below their logic threshold by R16. so pins 4 and 1 are at logic 1, and pin 3 is at logic 0. Larger positive mains voltages take pins 5 and 6 through the logic switching' threshold, switching pin 4 to logic 0 and hence forcing pin 3 to logic 1. During negative mains half cycles, pins 8 and 9 remain on the logic 0 side of the threshold, holding pin 10 to logic 1. The biasing on pin 12 is now relevant--for small negative mains voltages pin 12 is on the logic 1 side of the threshold, while larger negative voltages pull it to a 0 logic level. The waveforms to be expected here are shown in the light sequencer project in this issue. In either case, the input protection diodes of the CMOS gate prevent destruction due to inputs significantly outside the supply rails. The choice of 1/2 watt resistors for R22 and R23 is because the voltage rating of most of the smaller types is insufficient for connection to the mains. Most samples of 1/4 watt resistors will, in fact, survive connection to the mains, but they are not specified for it. The only other point to note is that, to avoid damage to the IC, the unused inputs of 102 are connected to logic signals. This also helps the routing of tracks on the pcb. Power Supply The current to run this part of the circuitry is provided by a mains dropper resistor. This method of providing power supply can give only a small current, or else it generates a lot of heat, but it is compact and cheap. The power supply is negative rather than positive as is often customary in order to provide a negative gate pulse to trigger the triacs. Some triacs do not trigger well on negative mains half cycles if the gate voltage is positive, but the reverse situation, negative gate voltage and positive mains half cycle, gives good triggering. Some triacs which will trigger reliably in this quadrant need more gate current to do so, which, of course, would necessitate a "wattier" power supply. Dissipation The dissipation of the resistor can be calculated easily--because of the diode in series with it, the mains flows through it for half the time, so the power dissipated is half that which would be dissipated if the mains were connected straight across the resistor. Power = V2/ R = 2402/22000 = 2.618 watts. The actual dissipation is half this figure ie 1.31 watts. It is possible here to use quite a small power resistor--3 watts is adequate, and does not contribute excessively to the overall size of the PCB. The current available from this type of resistive power supply is calculated in detail in the light sequencer article. Suffice it to say here, that by using the formula derived by integration, the current is: Peak voltage /(R x It ) = 340/ (22000 x 3.1415926) = 4.9mA. This is not enough to guarantee to trigger one of the triacs, if it were applied in the form of a steady current, but meted out as heavier pulses around the mains zero crossings it is plenty. The current consumption of the CMOS is very low, and may be ignored, while the resistors in the circuit draw less than 1 mA. Triacs The triacs chosen for this project will trigger with 5mA of gate current, and will hold on at low currents. The trigger current provided by this circuit is about 6.5mA, so all samples should switch cleanly. "Junkbox" triacs may need more trigger current, but the gate resistors may be lowered to provide somewhat more. If the trigger current is increased too much, then the power supply may be unable to cope. ---------- This shows the board and other components in the case. These Is a lot of cutting, so don't choose a case which is too chunky. Make quite sure you have room for the PCB, transformer and all switches before you start Cutting. Construction Mains is used fairly extensively on the board, so the use of the PCB is recommended. It is best to assemble and test the two power supplies before proceeding further. The transformer supply requires only the bridge rectifier, C9, and 010, and, of course, the mains transformer. When the mains is connected to the transformer, which is not mounted on the PCB, the voltage on the positive terminal of the bridge should be between 9V and 12V, while the negative terminal should be at the same voltage only negative. The mains dropper power supply consists of R24, R14. D6, D7, C7, and D8. When these components have been assembled, the power supply may be tested by first connecting a voltmeter across D7 or C8 (tiny little probe clips help) and then connecting to the mains. If the power supply is approximately 10V, the right polarity, then all is well so far. Disconnect from the mains, then if there was a problem search for the wrongly inserted component, otherwise proceed with the rest of the construction. As is usual, the CMOS gates should be inserted last of all. There are no particular problems in construction, but several points to note. The two flexible wire links, from R22 and R23 may be interchanged without harm. The triacs are to be stood up rather than bolted down. The layout is, in general, compact, and some care will be needed with certain of the components to get them all fitted in. In particular, C3 and C4 should be fitted after the resistors in the same area. Testing Since the circuit is divided into a "safe" and a "dangerous" side, it is convenient to test it in halves. If the two color LED indicator is not to be used, then replacing D5 with an LED can be a useful aid to test. To test the sound input part. connect the mains to the transformer, and a sound signal to the input (R1 or R2). The LED should flash in time with the bass line of the music. If it does not, first check that the power supply voltage is about 10V, and if it isn't, then find out what is shorting the supply. If the LED still does not flash, check that the LED is ok by briefly shorting IC3 pin 1 to the negative supply (IC3 pin 11). If the LED does not switch on then it may be damaged or connected the wrong way round. (This does not apply if a bi-colored LED is in use, as one color or the other should always be ON.) Once the LED is known to be OK, test one stage earlier by connecting the Positive input of the comparator, pin 3 temporarily to the negative power supply. The output, pin 1, should switch low, and illuminate the test LED. (A bi color LED should change color. If it does not work at this point. then the fault is around pins 1, 2, and 3 of IC3. If the fault has not been located so far, measure the voltage on pins 7, 8, and 14, relative to OV. If any one of them is far from the ground rail, with no signal present, then the fault is in that area of circuitry. If the fault still persists, and all the tests so far give no clue, then the best thing to do is to carry out a close visual inspection, starting with the signal coupling components R1, R2, C1, C2, R5, R6, and R7. Those who possess oscilloscopes have a much easier job. All they need do is trace through, starting from the input, to see where the signal disappears. Don't forget, though, that pins 6 and 13 are virtual earth inputs, and, as such, should have no signal on them. The live part of the circuit is best tested once the unit is mounted in its case. Boxing First of all, the IEC mains input socket, the 5 pin DIN socket, and the lighting output socket should be mounted on the be attached to these ready for connection to the PCB. The earth connection of the mains input should be connected to the case, via one of the mains input mounting bolts. The switch, and the LED if fitted, should be mounted on the front panel. Lay the board and the mains trans former in the box to find a convenient position for both. Then drill holes for the transformer and mount it using small nuts and bolts (eg M3). The board should now be mounted in the case, using self adhesive plastic pillars. In order that these will stick properly, first clean the bottom of the case, with a rag and some methylated spirit. Now the internal wiring should be carried out, as per the circuit diagram. Take care that mains connections, in particular, are secure, and not dangling by a thread. This is doubly important if the unit is for disco use, when it can be very embarrassing to find let the smoke out of the unit in front of a crowd of people. Author's note: Research has shown that smoke is the working fluid of electronics components. This is demonstrated by the fact that, when the smoke is let out of an electronic component, it ceases to work. So far, no reclamation technology (where all the smoke particles can be extracted from the air and replaced in the component) has been developed. It is very easy to end up using a different set of pins in the plug from the ones used in the socket, so double check this point. Also, if the unit is ever to be connected to lights which have an earth connection, then the earth in the lighting output socket must be connected. Once all wiring is complete, plug in and switch on. One of the lights should be on. If neither illuminates, then check the wiring to the lampholders. If this is ok, then disconnect the mains, and connect a voltmeter across D7, and then reconnect the mains for long enough to measure the power supply voltage. If this is not correct, then search for the short circuit. If it is correct, and the unit will not illuminate either lamp, then the fault is probably around IC1 a or IC1 b, the zero level trigger pulse generator. Unless you own an oscilloscope, the only recourse at this stage is careful inspection. If a fault cannot be found after the most careful inspection, then eventually a dead IC may be suspected. This is very unlikely, unless the ICs used are distinctly junkbox, while one of the most likely faults is a solder splat across two adjacent IC pins. Oscilloscope owners who wish to search for the trigger pulse should remember that the circuit is connected to the mains. The oscilloscope earth wire, in the plug, should be temporarily disconnected, and the oscilloscope chassis connected to mains neutral. Make sure it is neutral and not live by the use of a neon screwdriver--houses have been known to have incorrect wiring. If in any doubt, don't do it! If one lamp illuminates. but the lamps will not flash in time with the music, then just about the only possible cause is a short circuit on pins 12 and 13 of 101. However persistent the fault, it is inadvisable to try to work on the unit while the mains is connected, with the exception of a very cautious use of an oscilloscope, as mentioned above. Suggested Use A good starting point is to use three 100W spot-lamps, one red, one green, and one blue. The blue and green lamps should be wired in parallel, and connected to the complementary channel, while the red spot should be connected to the bass channel. Thus, the light color will change from blue/green to red on peaks of bass. The blue and green lamps together are about the same brightness as the red on its own, so the room brightness does not appear to change. Different colored objects in the room do respond dramatically to the color change, book covers being good examples. SHOP: Most of the components used in this project are straightforward. The 3W resistor, R24, is stocked by Maplin. The ultra-miniature capacitors C7. 9, 10 are available from Cirkit, number 05-10713, as are most of the connectors. The miniature mains transformer is available from either supplier. The total cost of the project should be around £ (x 1.4 USD) 15 excluding case and PCB. The stick-on PCB pillars may be hard to come by: other varieties of PCB pillar will do the job if you cannot obtain the type used by the author, who had them in his spares box and is himself wondering where the next batch is coming from. ------------- Also see: AUDIO AMPLIFIER MODULE -- A voltage-efficient amp module suitable for radios. |
| HOME |