Go Down

Topic: Thoughts on an Audio Control of RGB LEDs (Read 644 times) previous topic - next topic

Stupidav

Here is my initial schematic. Basically this takes the left and right audio signals and filters them to exract the Bass, Mid, and Treble then run through OP Amp to get the signal up to something that is a little easier for the Analog Inputs to see (I think I need to do something to limit the OP Amp Outputs).

Since this is just the begining / debug of a much larger project that I am going to do, the Outputs are tied to Transisters which control the Red, Blue, and Green LED sections.

What do you think? Thanks in advance for any hints, tips, tricks, ideas, or thoughts!!!!


joss12

Hello !
  You may connect the IN pins of the unused AOP's to avoid electrostatic shock (but not the OUT pins !).
  Then I cannot figure out how the AOP's are wired, maybe you can use this kind of circuit :
  -http://electronique.aop.free.fr/AOP_lineaire_F/Filtre_PHaut_1.html
  -http://electronique.aop.free.fr/AOP_lineaire_F/Filtre_PBas_1.html

  Or these (I think you used these) :
  -http://electronique.aop.free.fr/AOP_lineaire_F/Filtre_PBas_2.html
 
  In those last ones, you can modify the gain without modifying the cutoff frequency


  For the limitation you should use diode like this (D1 and D2):
  http://www.sonelec-musique.com/images2/electronique_detecteur_impulsion_meca_001.gif

Sorry for the french links  :~

Stupidav

Looking at French links and many other sites including here, it occured to me that it would cut down on components if I amplify first and then filter to the analog inputs. I will try to get the drawing updated and posted.

Thanks Joss12 for sparking some additional thought!!!

DVDdoug

#3
Jan 04, 2013, 02:07 am Last Edit: Jan 04, 2013, 02:28 am by DVDdoug Reason: 1
Quote
Here is my initial schematic. Basically this takes the left and right audio signals and filters them to exract the Bass, Mid, and Treble then run through OP Amp to get the signal up to something that is a little easier for the Analog Inputs to see
A line-level signal (like the audio outputs from your CD or DVD player) is around 1V, and that should be fine as long as there's no volume control in the signal path.

Remember, there is an optional 1.1V reference for the Arduino's A/D converter.    A headphone output (at full volume) is in the same ballpark.    Sometimes the peak line-level will go above 1V (it depends on the equipment and the loudness of the signal).   But, you'll loose a little signal with your passive audio filters.  With the 1.1V reference, a signal as low as 0.1V (an A/D reading around 100) should be enough for your lighting effects.

With my audio-activated lighting projects, I "auto range" by reading the input level, and if it hits 1023 with the 1.1V reference, I switch to the 5V reference.   And if the peak doesn't go above around 200 for about 20 seconds, I switch to back to the more-sensitive 1.1V reference.

In additon to the 1.1V/5V hardware reference, I generate a software reference from a 20 second running average.    And, I keep track of the highest peak over the last 20 seconds.  That way, the lighting effect can automatically adjust to volume changes.  In your case, you might want a software reference for each frequency band.  The actual trigger threshold depends on the particular lighting effect.  Sometimes I take the half-way point between the 20-second average and the 20-second peak.

In your case, if you simply turn-on the LED with the signal is above average and turn it off with it's below average, each LED will be on half the time and you'll get lots of "blinking-action" (if that's what you want ;) ). 

With the hardware auto-ranging and the software auto-calibration, I have a some lighting effects in my van that run from the volume-controlled input to the power amp and it seems to work fine at any volume.

Stupidav

Doug, from what I read the LM324 has a 5V buss from the the way it is connected, so I figured that I would just start off with that.... primarily because I was unaware of the optional 1.1V reference. I will have to do some looking into that. I was definitely looking at tracking the peeks to adjust my scaling to get the best effect, as well as eventually adding some additional controls to modify the reaction from an external control (bluetooth via andriod, but that is a ways down the road). 

Here is the updated schematic. I have to do some more figuring and testing to get the filter components correct unless someone knows a short cut  8) !!  I realized this evening that the original was missing a few components, so the original would not of brought the audio signals up. Which led me to discover one potential problem with doing this way. As Doug mentioned I am probably going to get some loss filtering the signals. If I amplify after the filtering it would be less likely that the loss would be noticed (not that it would be noticed anyways, just a thought). Basically this will always be fed from a headphone jack either from something like an MP3 player or cell phone.

If you happen to see anything that I missed please let me know.


Go Up