Author Topic: Driving LED strips from dedicated audio amplifier  (Read 2416 times)

0 Members and 1 Guest are viewing this topic.

Offline FlyingMooseTopic starter

  • Contributor
  • Posts: 18
  • Country: ph
Driving LED strips from dedicated audio amplifier
« on: December 08, 2019, 02:38:50 am »
First of all, I would say I'm a bit above a beginner but still way below most of the people in this forum as far as electronics knowledge goes.  I've been watching EEVBlog for years so this was the first place I thought of to ask my question.

I'm working on a project for a disco (for a friend, not being paid).  I'm looking for a solution that's faster and better, not necessarily cheaper.  I don't have a lab or parts so I want something easy to do, I don't want to build from components if possible.

I've seen some sound-activated LED controllers but they all seem to just change color (on an RGB strip) in tune with the music, I don't see any that flash in tune with it.

I would like to have a large amount of blue LED strip lights (maybe 100 meters) flash in tune with the beat of the music.  I've seen a lot of circuits online but most of the comments say they're poorly designed for various reasons, and also they're probably not high enough power for so many LEDs.

I'm thinking that a good way to do this might be to have a dedicated audio amplifier to drive them.  My thoughts are to run the output of the amplifier through a rectifier, and then an appropriate amount of resistance, in series with the load.  I was also thinking it might be a good idea to include an appropriate light bulb in series to limit the current at the higher end to avoid blowing the LEDs during transient spikes (loud portions of the music) or maybe just the light bulb instead of resistors.

This will be a dedicated amplifier, not used to drive any speakers.  I can change the input (to emphasize the bass, for example).

The problems I can thing of from doing it this way are:

1. The LED's (and rectifier) won't conduct until the breakdown voltage, so the load will be non-linear.  I'm not sure if this will fry the amp.  I will make sure it has enough resistance (4 or 8 ohms, whatever the amp specifies) so it won't draw too much current.  I think most LED strips use 12 volts.

2. The amplifier may over-drive the LEDs during especially loud parts of the music.  This was the reason I thought of using a light bulb to limit the maximum current non-linearly.

Is this a good idea or am I barking up the wrong tree?  If I use an audio amplifier, is a rectifier, resistors and/or lightbulb appropriate circuitry to protect both the amp and LEDs?  I was thinking of 12v car light bulbs (maybe multiple in parallel if 1 doesn't allow enough current).

 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Driving LED strips from dedicated audio amplifier
« Reply #1 on: December 08, 2019, 05:31:29 am »
You are barking up the wrong tree, not even in the right forest, but in the yard of the insane asylum!

Dumb LED strips consist of segments each containing N series LEDs + a current limiting resistor, all segments in parallel.   Its usual to make N=3 for blue LEDs as their Vf is typically around 3V and a total Vf in the 9V to 10V range works well with a 12V supply with no more than 25% of the power wasted in the limiting resistors.  For analog brightness control, a 3V change in supply voltage (from 9V to 12V) will cover most of the range, but if you want to be able to shut them off completely you need to be able to drop the voltage right down to near zero due to the soft knee of their Vf vs If curves. 

Lets assume each LED needs 10mA for full brightness, and that there are 30 LESs (in series groups of 3) per meter.  That's 0.3A/meter.  For 100m you need 30A, or 360W.

If you over-voltage them, the odds of blown LEDs go up drastically with increasing voltage, so over drive them and it will look pretty crappy a few months down the road.

Good luck getting that sort of characteristic out of your idea.  Get anything wrong and you risk being out an expensive amp (30A DC needs about 48A RMS AC before the bridge rectifier, and you need an amp that can do that into a fractional ohm load!)

The sane way to do this is a whole bunch of CV LED PSUs with fast voltage controlled dimming inputs, then build an envelope detector circuit with whatever filtering you want in front of it, driving a buffer with variable gain, threshold and limit to translate the desired portion of the envelope detector's output range to 0-10V for the LED control
 

Offline FlyingMooseTopic starter

  • Contributor
  • Posts: 18
  • Country: ph
Re: Driving LED strips from dedicated audio amplifier
« Reply #2 on: December 08, 2019, 01:05:02 pm »
Thanks for the suggestion.  I think that’s a bit more than I can handle.

What if I use an LM3915 (audio bar graph driver) and put each of the 10 outputs through a voltage divider to produce the 0-10V to put into the dimming input of the power supplies?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Driving LED strips from dedicated audio amplifier
« Reply #3 on: December 08, 2019, 01:49:01 pm »
You'd probably do better to start with an analog VU meter circuit, which will give you a workable envelope detector, then its just a mess of OPAMPs, resistors and clamping diodes to get the required range and limits. 

Alternatively feed the voltage from the VU meter circuit into an  Arduino's ADC input, do the mapping in software and generate a PWM output.  Many LED driver PSUs with dimming control inputs accept PWM as well as an analog control voltage, so you can probably avoid having to filter and amplify the PWM, though you may need to level shift it.
 

Offline austfox

  • Regular Contributor
  • *
  • Posts: 154
  • Country: au
Re: Driving LED strips from dedicated audio amplifier
« Reply #4 on: December 08, 2019, 03:31:33 pm »

I'm working on a project for a disco (for a friend, not being paid).  I'm looking for a solution that's faster and better, not necessarily cheaper.  I don't have a lab or parts so I want something easy to do, I don't want to build from components if possible.


If you reconsider not building from components, then have a look at the ‘LED Musicolour’ project on the Silicon Chip website from Oct and Nov 2012. You can purchase the articles, as well as the PCB. At least with the articles it will be quite easy to assemble and get working.

It will control 16 strips of LEDs, but I haven’t read the entire article, so am not sure how much current each channel will control, but multiple units can be daisy-chained together. It accepts line input (eg from a CD player).
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving LED strips from dedicated audio amplifier
« Reply #5 on: December 08, 2019, 04:03:52 pm »
You want to low pass filter the audio so that you get the base beat. Maybe a comparator will then be enough to pick a threshold at which to turn the LED's on and off.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Driving LED strips from dedicated audio amplifier
« Reply #6 on: December 08, 2019, 07:00:56 pm »
Use PWM to control the brightness of the LEDs, it will usually give a better result than trying to vary the voltage. If you want to do this the easy way, use an arduino clone to read the audio signal with the ADC and use that to control the PWM output, it's about 5 lines of code. You can do the processing and filtering of the audio signal in the software domain if you want to get fancy, or you can do that in hardware if you're more comfortable there. You can probably find something like an arduino based VU meter project to get you started.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving LED strips from dedicated audio amplifier
« Reply #7 on: December 08, 2019, 07:02:50 pm »
not even sure how one does filtering in software.
 

Offline FlyingMooseTopic starter

  • Contributor
  • Posts: 18
  • Country: ph
Re: Driving LED strips from dedicated audio amplifier
« Reply #8 on: December 09, 2019, 12:27:00 am »
not even sure how one does filtering in software.

Looking into Arduino a bit, looks like there is a FFT library available, it can give the output of any frequency band...  I may go this way.  There are even LED strips that take digital input (also have an Arduino library available) and then just 5V or 12V power.  I’m kinda surprised that people on this board are recommending the Arduino solution, kinda thought this is an old-skool retro/analog type of group. :)
 

Offline atmfjstc

  • Regular Contributor
  • *
  • Posts: 121
  • Country: ro
Re: Driving LED strips from dedicated audio amplifier
« Reply #9 on: December 09, 2019, 02:27:59 am »
If you need to low-pass something for purely display purposes, applying FFT is massive overkill. Pretty sure you can get by with a simple exponential averaging filter. You might still need to apply some hardware pre-filtering to avoid aliasing if your Arduino samples the audio at much less than 30 kHz.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Driving LED strips from dedicated audio amplifier
« Reply #10 on: December 09, 2019, 02:50:11 am »
not even sure how one does filtering in software.

Digital filtering has been around a long time, it's quite math heavy so 8 bit microcontrollers are not really the preferred platform but it can be done.

https://www.deviceplus.com/how-tos/arduino-guide/arduino-dsp-intro-to-digital-signal-processing-using-matlab-part-1/

http://www.amandaghassaei.com/projects/arduinodsp/

If you want more general information look up DSP techniques.
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving LED strips from dedicated audio amplifier
« Reply #11 on: December 09, 2019, 07:50:46 am »
Oh yes I know it can be done but not something I have ever looked at.
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: Driving LED strips from dedicated audio amplifier
« Reply #12 on: December 10, 2019, 04:36:15 pm »
I experimented with:
Peak detect circuit + WS2812s + Arduino and got this far:


I could easily be scaled up to quite a lot of LEDs if you have DC bricks to power them.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline FlyingMooseTopic starter

  • Contributor
  • Posts: 18
  • Country: ph
Re: Driving LED strips from dedicated audio amplifier
« Reply #13 on: December 14, 2019, 05:09:45 pm »
Ok, let’s assume I go the Arduino route.  The recommended audio circuit uses a capacitor and 2 resistors to shift the voltage from +- 2.5V or so to 0-5V or so.

One thing I’m concerned about is if the 5V power supply goes haywire and sends 230V to the Arduino and that sends it down the line-in back to the mixer and fries the $20,000 of equipment attached.

What’s the best way to make sure that nothing is back-fed into the system?  Im not sure if the capacitor would offer enough protection...
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Driving LED strips from dedicated audio amplifier
« Reply #14 on: December 14, 2019, 05:15:33 pm »
Erm, why are you concerned about the power supply and why would a 5V supply turn into 230V? Just make sure you use a good quality supply or properly design the one you make. If you step down to 12V for the LED,s you can attach the Arduino to this as it has it's own 5V regulator. That way 12V is the most you could see.

Voltage regulators don't tend to go "haywire".
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: Driving LED strips from dedicated audio amplifier
« Reply #15 on: December 17, 2019, 04:28:53 pm »
I would agree.  Buy decent 12V supply (or supplies depending on how many LEDs  you are running!) and run the arduino off that 12V.  I believe, from memory, but do check the onboard regulator supports up to 20V.

12V will assume WS2811s which are not individually addressable.  Groups of 3 are addressable.  If you are running a whole wall length of 3-4 meters that will not be an issue.

I don't want to do the calculations right now, but you will be able to power 4 meters of 2812s off a single supply, but might need to power it at both ends.  Depends on the LED density though and thus total number of LEDs, of course.

MeanWell PSUs are popular and get good reviews.  Fairly cheap on Amazon, EBay or a bit more expensive at the likes of Farnell or RS.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Online paulca

  • Super Contributor
  • ***
  • Posts: 4055
  • Country: gb
Re: Driving LED strips from dedicated audio amplifier
« Reply #16 on: December 17, 2019, 04:36:58 pm »
If you are really paranoid, you could always explore this route:

http://www.learnabout-electronics.org/Semiconductors/opto_53.php

But you still have to power it from somewhere.
"What could possibly go wrong?"
Current Open Projects:  STM32F411RE+ESP32+TFT for home IoT (NoT) projects.  Child's advent xmas countdown toy.  Digital audio routing board.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Driving LED strips from dedicated audio amplifier
« Reply #17 on: December 18, 2019, 06:14:00 pm »
Beware that many of the cheap clone arduinos use a cheap clone voltage regulator, I fried a few of them powering them from a 12V battery before I figured out what's going on.

I wouldn't worry about 230V going into things though. Also you can AC couple the audio with a capacitor that will block excessive DC voltage, or use an analog optoisolator.
 

Offline Etesla

  • Regular Contributor
  • *
  • Posts: 149
  • Country: us
Re: Driving LED strips from dedicated audio amplifier
« Reply #18 on: December 19, 2019, 04:44:08 am »
Here's a fun 'analog' circuit that will do it for you. All you need is an envelope detector, a ramp wave generator, a comparator, and some output stage stuff. If I used some model that doesn't come with LTSpice that prevents this from working, let me know.
« Last Edit: December 19, 2019, 04:53:24 am by Etesla »
 

Offline FlyingMooseTopic starter

  • Contributor
  • Posts: 18
  • Country: ph
Re: Driving LED strips from dedicated audio amplifier
« Reply #19 on: December 23, 2019, 05:07:59 am »
Looks like I’ll be working with high-voltage LED strips that have a power supply which is just a rectifier.

Will a solid-state relay work on rectified DC since it at least approaches 0 for each hump, or should I try to find one which can switch 240V DC?

I might also use a PWM-controlled light dimmer but I’m not sure if they respond fast enough for the desired effect. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf