So after driving by one of the Christmas light displays set to music, my kids really want to do “the exact same thing”. Now obviously (or will be shortly) this is beyond my capabilities. I have fixed/replace many fittings, switches, motors, etc. before but have never really manipulated electronic components.
I figured I would do a simple model system this year and build to something more exciting next year. Toward this I found this instructable which uses a simple solid state relay to take a hacked speaker to turn a strand of lights on. Now I am pretty confident that I can handle this without problem and understand how it works.
So I went to the electronics store, but they didn’t have any SSRs in stock, but they did have a 4-channel 5V module relay which they convinced me was a better place to start as it would allow more utility later. Now I would prefer not to invest too much at this point so I am going to try without a microcontroller. I am simply going to replace the Solid State Relay in the Instructable with 1 channel on this module (or maybe put L and R stereo on two separate channels) driving a strand of LED Xmas lights based on the music’s loud notes controlling the relay directly.
So a couple of questions that are seemingly obvious but aren’t easily answered on the internet due to the volume of non-science websites that use electronic components:
Is the 5V rating is the voltage required to close the circuit/relay? or the maximum tolerated voltage?
I assume changing the volume on a speaker changes the voltage and is how to select the sound level for the lights to turn on. Is the relay just open or closed? Or does it act as a voltage-dependent gate (i.e. dimmer)?
Is there a better/simpler way to do this? I’m a Mac user but would prefer this to be computer independent.
Is the 4-channel relay useful and easy to use with Arduino and other systems as I expand my set?
Is there a good USB (Mac compatible) controller that anyone would recommend (now that I have your attention)?
OK, what you want is a MIDI relay interface.
But assuming you don’t want to start that big, I would NOT follow the instructable.
An amplifier output is not designed to drive a relay, and you are likely to destroy it (it being the relay).
Your relay module is a good start, but you are going to need some interface electronics to drive the relays. They require 5v DC to close, and anything over 7V is likely to cook them.
If you want me to sketch up a simple circuit, I can - how much effort are you willing to put into this?
I knew that it would be more work than I was hoping for. The USB relay looks like the best solution, but it would be great to run it using an analog signal if at all possible.
I agree with beowulff. That’s not a very good instructable. I wouldn’t follow it if I were you.
A better way of doing it is to take the amplifier’s output, rectify it (a single diode will work), clamp it as necessary (using resistors and a diode clamp circuit) and then take that conditioned signal into a simple comparitor circuit. You can set the threshold on the comparitor to determine what output “volume” turns your lights on. The comparitor output will be a 5 volt logic level, which you can then use with a 5 volt relay to turn your lights on and off.
You can use multiple comparitor circuits with their thresholds set to different levels, so that with the music quiet, no lights are lit, above one level only one set of lights are lit, and above an even higher volume level both sets of lights are lit. With some creative light placement this will give you a much more attractive display.
If you want to get really fancy, you can use a microcontroller programmed as a sequencer and use timing to decide what lights are turned on and off. This is how they make the really cool light effects that you see in the really fancy youtube videos (they often use a dedicated light sequencer unit, but an el-cheapo arduino could be programmed to do the same thing). This may be a bit beyond your abilities at the moment, especially since you have to synchronize the microcontroller’s timing to the music track.
ETA: Just checked beowulff’s link and you could also use the USB relay with a bit of spiffy programming. The PC would start the music and control the relay sequencing. It’s the same idea as using a microcontoller just using a PC instead.
Okay so now after reading and designing the necessary circuit- I think I’m ready to procede. I have one last question for beowulff that I think I don’t quite understand yet. My goal is to understand electronics well enough that by next year, I can do significantly fancier things and I’m making notes about what to do and what I need to know
The speaker volume is proportional to the Power or current through the voice coil of the speaker and since the resistance is constant, voltage is what is varied- correct? And there is a potentiometer that regulates the resistance to adjust the voltage. Or does the voltage not vary and only the current is changed? (Now I’ve confused myself as I am trying to restrict the “circuit” to mean only directly around the voice coil and not the amplifier, potentiometer, etc.) This is all to say, after rectifying (either single diode or diode bridge), how much change in voltage should I expect to observe going from whisper to canon fire?
Lastly, the diode clamp circuit is brilliant (and for next month!) but is it possible to build a circuit that sets a maximum voltage? Like to cap the circuit voltage (with rectifying and then capping allowing a 0-5V range)? Is there a name for such a circuit?
color organs are available as kits. building one gives some construction experience and a circuit schematic from which you can study to understand how it works. good basis from which to expand in the future.
It was a long time ago but I took 3 or 4 color organ kits, beefed them up with larger power transformers , and used them to drive about 600W of DJ lights. I wish I had some diagrams to show you but, after using the ho-made kit for a few years I stepped up and bought a used controller and DMX packs.
It might be too late this year but you might keep your eyes on Craigslist or other low market sources and watch for somebody dumping DJ lighting equipment. You can usually get a dimmer packs and controllers much cheaper than market prices.
I wouldn’t be surprised if you could set up a nice programmable 8 bank system for your Christmas lights for under $300.
Generally, a power amplifier has a fixed gain.
So for example 1V of input will result in 20V of output. Since your speakers are a fixed resistance (8Ω, nominally), this results in a fixed power gain. So if you have a 10W amp, and a 1,000W amp, the 1,000W amp will output a much higher voltage for a given input. In order to change the volume, the input to the power amp is varied, which is the job of the pre-amp. Most audio components follow a loose standard. The inputs to power amps is called “line level” and it maxes out at 5V or so. The output of power amps is dependent on the wattage, and could be 100V for a huge amp (100V across 8Ω = 1250W).
I would also like to point out that Power amplifier is a misnomer. As Beowulff stated, amplifiers generally have a fixed gain, with a certain level giving maximum output of the amplifier. In most professional amplifiers, this gain is switchable, usually between 26 dB (20 x input voltage), 32 dB (40 x input voltage), or 1.4V (an input signal of 1.4V gives the maximum output out of the amplifier).
The input attenuator on the amplifier does just that, attenuates the level coming into the amplifier before it hits the actual amplification stage of the amplifier, maintaining the constant gain relationship while doing so.
Also, some modern amplifiers can run up to 270 volts on the output, depending on speaker impedance and configuration of the amplifier.