Disco Lights Project
(Project added 14th Nov 2008)
What does it do?The Disco Lights project is what you get when you combine the fantastic beat detection circuitry of my ever popular beat triggered strobe light with coloured halogen lamps! In other words, four coloured lights flash in a variety of patterns in time with your music. Some seriously cool patterns can be achieved and the effect is really amazing!
Even better, the effects are achieved using a microcontroller, so you can program your own patterns and effects in fact you can even choose to use your own microcontroller that you are familiar with or if you're not familiar with microcontrollers, you can use the one shown in my design which can be programmed in either basic or with a flow chart, all you need is a PC with a serial port an old mouse cable & a couple of resistors and you're away!
Circuit detailsMost of the circuit is actually borrowed exactly from the low voltage section of the beat triggered strobe light. In fact, it would be possible to assemble half of the circuitry on the beat strobe's circuit board, simply omitting the high voltage section and the opto isolator. Since I did not have any spare strobe boards and the circuit is relatively straight forward, I assembled it on vero-board. If you choose to take this route, just be very careful and check your work as I myself made a few errors along the way, it's fairly easy with vero-board. Figure 1 shows the initial analogue processing. Yes it is almost verbatim from the beat strobe, the only differences being the supply voltages. For details on how it works, please check out the beat triggered strobe.
Pulse shaping and flash rate limitingThe next section of the strobe circuit is the pulse shaping section. It is shown in figure 2 below and again is the same as what was used in the beat triggered strobe light, except that instead of an opto-isolator, we take the pulses off to a point marked A. I also left out S1 & R18 but it is a matter of personal preference. I have found the music triggering to be excellent, especially when the audio line input is used rather than the internal microphone.
Note: This image can be enlarged by double clicking and returned to original size by single clicking.
Disco lights specific circuitry and microcontrollersThis is where the disco lights are different to the beat triggered strobe light. Instead of each beat triggering a high voltage xenon flash tube to create a bright white flash, it serves as a cue to a microcontroller to produce the next pattern on a set of coloured halogen lamps. These lamps are rated at 12V, 50W and came in red, yellow, green and blue. I purchased them from Jaycar Electronics, catalogue numbers SL2741-SL2744. I would urge that you also purchase some holders for these bulbs as they get rather hot so the proper ceramic bases are much less likely to cause a fire than any impromptue mounting solution and take it from me, the pins don't solder well and it's a pain to change bulbs if soldered to wires. ;)
But back to the circuit. Figure 3 shows the rest of the circuit for the disco lights. Here, I have chosen to use a PICAXE microcontroller. These are an educational variation of the PIC microcontroller family and whilst they have several major limitations, the only one that is going to be a problem here is the memory capacity. For this reason, I reccomend that you use the PICAXE 18X rather than the 18A that I used here (which has been discontinued but it was the one in stock at my local electronics shop). They are pin compatible. You can of course use any microcontroller and I highly reccommend using one that you're familiar with especially if it can be programmed in C as after a while, BASIC becomes a bit verbose for my liking at least. Details about the PICAXE can be found at www.picaxe.co.uk. You will also need to download the free software and make up a programming cable. They're really easy to use, even if you're new to microcontrollers (but know enough basic electronics to do the rest of the project). If you are experienced in the use PICs or ATMEGAs then you'd be better using those. I personally used a PICAXE so that I could give someone who'd never used a micro before a chance to write the code for me and the patterns were so cool that I continue to use his code. It can be downloaded at the bottom of this page. :)
The pulses from figure two come in on the right of figure 3 at the point marked A. These are then level shifted down from 9 volts to 5 volts by Q1 which also has the effect of inverting them. Thus, the microcontroller should be programmed to respond to a falling edge. S1 is a switch that I provided for manually changing patterns or otherwise interacting with the disco lights. Likewise, LED DS2 is next to this push button. I also placed LED DS1 next to the sensitivity pot from figure 1 on the panel to indicate triggering so that it can be adjusted more easily. Outputs 0 to 3 control the MOSFETs which in turn control the 50 Watt halogen lamps.
MOSFET SelectionI used IRF1405 MOSFETs as I had some spare and they were massively overkill for this application. Yes the 169A drain current rating would probably melt the legs clean off but I originally purchased them due to the low drain resistance of 0.0053 ohms. Remember, the lamps will draw around 4A but could pull a lot more when cold, so I suggest at least a 16A MOSFET to be safe. As they are a little bit inductive, a 30 volt or more MOSFET is preferable, otherwise you will need fast diodes and/or snubbers. When you have some you'd like to use, calculate the loss at 4A continuous. My MOSFETs have a junction to case thermal resistance of 62 degrees per watt which means that for every watt that they dissipate, their junction will be 62 degrees hotter than the ambient air. The air could well be as high as say 35 degrees with those halogens near by so at 1 watt, they would hit 97 degrees and their maximum temperature of 175 degrees C would be hit at (175-35)/62=2.26W. Due to their low on resistance, however, they will dissipate just 4x4x0.0053=0.08W so will barely get warm and won't need a heatsink. For a thermal resistance of 62 degrees, I'd suggest you find a MOSFET of no more than 0.05 ohms as although this is conservative, the resistance of a silicon MOSFET goes up as it gets hot, causing a phenomenon known as thermal runaway where it gets hotter so dissipates more power so gets hotter etc until it is destroyed! Of course you could dissipate a few watts with a decent size heatsink but I'd rather spend that heatsink money on better transistors in the first place!
The big stuffFigure 4 shows the rest of the circuit. This is the power supply. T1 is a 110V or 230V (depending where you live) to 9V AC transformer. I suggest you use at least a 150VA transformer and limit the number of simultaneously on lamps to 2 in your software as this gives plenty of overhead. I used a 300VA toroidial transformer that I had lying around from an old project so am able to easily run all 4 lamps at once, although the bridge would get extremely hot if I were to do this. Some might find it odd that I use a 9V transformer for 12V bulbs and still others might say that it's because when I rectify and filter the output, I get 12V DC. Neither is entirely true. To get anywhere close to a smooth DC with such high power, low voltage lamps, C1 would need to be almost a farad! It is simply there to smooth the transients that occur when the lamps are turned on. The bulbs effectively see a rectified 9V RMS sinewave, so do not run at full brightness. Of course, the temperature coefficient of the filaments somewhat compensates, drawing a bit more current and the lamps are still bright enough to be very unpleasant to look at directly. The bulb life is also (hopefully) extended as a result. (Halogens are not really designed for being flashed as far as I know). In a future revision, I would consider a soft start feature for the lamps, but am unlikely to find time for that. F1 should be a slow blow fuse rated sensibly according to your transformer. E.g. my 300VA transformer at 230V should in theory draw up to 1.3A RMS at full load so a 2A fuse makes sense. If you use a 120V mains (and appropriate transformer of course!), you would need a 3A fuse.
Please note, it is not an error, the negative of bridge D2 is not connected! Whilst all circuits here share a common earth through D1, the large current drawn by the lamps results in massive ground bounce and voltage ripple. As mentioned previously, C1 does not substantially filter the 100/120Hz mains ripple. This is why we have D2 to allow a separate positive supply rail to be created for the small electronics. The very light power consumption of the electronics means that C3 is able to smooth this supply very well. D1 should be rated at 30A or preferably 35A and WILL NEED TO BE WELL HEATSINKED! Each lamp can draw in excess of 4A RMS, resulting in a potential dissipation of around 25W in D1. In the photos further down you will see that I used a small CPU heatsink I had lying around. D2 won't need a heatsink and could be constructed using 2 common 1N4001 or 1N4004 diodes. P1 is a mains plug and S1 is a mains rated power switch. U1 provides much needed noise rejection for the supplies to the audio electronics. Without it, the lights will false trigger from the noise, rather than changing in time with the music. R2 and C6 provide a low pass filter to create an even quieter supply rail for the microphone. U2 provides a 5V rail for the microcontroller.
Important construction issuesPlease note, this is not a directly mains project, however, it will require you to correctly wire up a transformer to the mains for power supply. If you are not sure that you can do this safely and don't know anyone who can assist you, then please do not construct this project yet!
The main issue with building the disco lights is heat. You will need to use proper holders designed for holding hot halogen lamps. I would suggest a sealed case that you can create holes at one end for air to enter in and a hole at the other end for a fan. Trust me, you WILL NEED A FAN! The fan gets connected across C3 in figure 4. It should blow hot air out of the case. The inlet holes should between them have roughly the same area as that of the fan and please put a grill over the fan to prevent fingers from getting nibbled.
Aside from the thermal issues, the project is pretty straight forward to construct as per the circuit diagrams. Note that the lead from the bridge D1 to the lamps wil need to be pretty heavy guage as it can potentially carry up to 16A so at least 2.5mm^2 is needed.
Have fun, I've yet to blow a bulb but I suggest you keep a set of replacements as losing one in the middle of a party might be very annoying. Just remember when you change it, they will be hot! Below are pictures of the finished unit and a view of inside the case.
Watch a video of the disco lights in your browserChoose your format, both are the same movie and will open in a new window:
- MPEG-4 Movie, reccommended for Mac or a Quicktime or MPEG-4 plugin, 1.4MB
- Windows Media Video, should play on most Windows PCs, 1.2MB
Go to top