LED Light Reactive to Frequency

The project is to make the LED lights reactive to a certain frequency. Preferably the Green would be light for bass tones and the Red for higher pitches. I followed this for the amplification of the microphone. https://bitluni.net/electret-microphone-amplifier

The parts I have:
Arduino Uno
2 LED lights
2 22microfarad capacitors for the filters
electret microphone
https://digilent.com/shop/analog-parts-kit-by-analog-devices-companion-parts-kit-for-the-analog-discovery/ (all parts included)
op-amp AD8542
1 10 ohm resistor
1 50 ohm resistor
2 2N3904 Transistors

The cutoff frequency was 200 hertz for the bass and 1kilohertz for the high.

I attached images of the schematic and circuit as of now. The problem I seem to be having is that the transistor for the Red LED is only collecting the 5V it is not reading a base or emitting both values that are 0V.

I'm finding it difficult to tell how the circuit is connected from the picture. I suspect it will be easier to help you if you draw a schematic then post a picture of that.

That was a very kind "accent"....


Yea sorry the forum wouldn’t let me post both pictures at the same time. So this is the schematic from the filters onwards and the microphone schematic is in the link for the electret microphone

1 Like

What are the filters?

We really do need to see a schematic (including the filters).

Is the Arduino involved at all? The Arduino's analog inputs are easy to use and the Arduino can drive a couple of "regular little" LEDs without transistors.

You can test your microphone preamp and filters by plugging the analog output into a power amplifier (AKA "speaker amplifer") and speakers (or headphones). Or if you have regular "powered" computer speakers these will work with your microphone preamp.

If you do this, keep the speakers away from the microphone to prevent feedback!

Do you really want to use a microphone to pick-up sounds in the room? It's often better to tap-into a line-level (or headphone-level) audio signal. You have to be careful with "high-power" speaker outputs.

If you do use an audio signal into the Arduino it has to be biased because the Arduino can be damaged by the negative-half of the AC audio signal. (The preamp schematic you linked to already has a biased output). This post shows the standard bias circuit, which is just 2 equal-value resistors and a capacitor. If you use high-pass and low-pass filters into two Arduino inputs, each input needs a separate bias circuit.

Note that the DC bias is "zero Hz" so a high-pass filter will filter-out any existing bias (so it will have to be added-back between the filter and the Arduino).

Ahhh... THE BIAS FROM YOUR PREAMP IS PROBABLY BEING READ AS "BASS". You'll need another capacitor as a high-pass filter that blocks the zero-Hz DC bias but lets-through the bass signal.

P.S. A high-pass & low-pass in series makes a band-pass filter. For example a filter that passes frequencies between 20Hz and 200Hz will kill the DC bias and the high frequencies while letting-through the bass.

Of course, the DC bias is "automatically" filtered-out with the high-pass filter.

I used these for my High pass and low pass filter. This w=one was the low pass filter. The high pass was the same but with the resistor and capacitor switched

Please post the entire schematic. A photo of a hand draw schematic, like the one you posted earlier, is fine.

Hello
For your project you could take a view here:


Not the best schematic but hopefully message gets across

Unfortunately, there are so many variable parameters in that circuit, that it is nearly impossible to guess how it will work. It really is not a workable design.

The settings of the two potentiometers are critical, and settings that might work for getting the low frequency LED to light properly won't work for the high frequency part of the circuit.

The base bias circuits for the two transistors are not correct. For example, the transistor with the 50 Ohm resistor to GND will likely be off nearly all the time.

For a better reading

Would this become better if I only used 1 LED and had that blink when a bass tone hits? I would get rid of the high pass filter and that whole top part of the schematic.

Usually, one would take a sound input (mic+Amp, line-in, speaker via resistor) and do an FFT. Then the individual "band" buckets would form the basis for a graphic display (VU-type) or amplitude of LEDs /lights via an appropriate driver.

Example:
https://embedds.com/arduino-based-vu-meter-uses-fft/

Example:
https://www.reddit.com/r/soundreactive/comments/hu7njo/how_to_make_a_spectrum_analyzer_vu_meter_using/

Entirely up to you.

You need to either create reasonable filters for the frequencies desired in software or in hardware.

Low-pass and high-pass is exactly that... only good for attenuating that which is not desired.

https://www.norwegiancreations.com/2016/03/arduino-tutorial-simple-high-pass-band-pass-and-band-stop-filtering/
Try playing around with some of the preconfigured passive filters here:

https://falstad.com/circuit/

What do you use an Arduino for? It is in the picture but not in your schematic. I also recommend using MSGEQ7 as @paulpaulson has told you.

The arduino is to power the circuit. 5V and Ground

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.