I have been asking a few questions here to get to a proper one, the initial questions I asked are linked to at the end. I used Fritzing to make up some schematics of my initial thoughts, but at the very least I need help with the values on the components, which I only vaguely understand and picked what seem to be reasonable or common values.
Basically, I have an Arduino that has 6 analog inputs. It uses a 10-bit ADC to read the voltage on any of the analog pins, so 0 = 0v, 511 = 2.5v, and 1023 = 5v, and all the values in between. It makes a LINEAR DC reading, so I'm not looking for logic 1-0 here.
I have this hooked to LED lights, and I want to make them respond to music. What I want is maximum resolution with minimum components, and I think I'm using WAY too many components and making this WAY too complex. Perhaps Electret microphones are not what I want here, I'm open to something else. I'd prefer to not use op-amps to conserve space on my PCB.
What I want is a simple noise level sensor. I'm not looking to reproduce the audio, or have clarity or anything, but I would like, as close I can get:
- Perfect Silence = as close to 0v DC (stable, not AC) as possible
- Medium Noise = Around 2.5v DC (stable, not AC)
- Loud Noise = as close to 5v DC (stable, not AC) as possible
I understand with a BJT that the best I can get is going to be 0.6v to 4.4v, but this is acceptable enough. What is not, however, is half of the wave, 0.6v to 2.5v. This seems to be wasting half of my available resolution for no reason. However, if there are other setups than a BJT that can get me closer to 0v-5v, I'd be interested in giving them a shot; as long as they're simple.
Here's a simpler one, that I hope that this is possible, but it requires the electret signal to have enough amplitude to drive the envelope detector circuit (diode, resistor and capacitor) to get only the positive half. I don't think it can because of the diode's forward drop, but perhaps this can be rearranged or done before the output cap? What should the values of the envelope detector and amplifier resistors be? Should a sensitivity potentiometer be placed on the signal, or RE, or RL, and what should it's value be? Linear or Logarithmic?
However, perhaps the electret output can't survive the envelope detector, sensitivity shunt, and still drive a NPN transistor. If not, here's a more complex version. Do I need to go this route? Does getting my desired output from the circuit really really require all these components?
Here are some of the past questions I asked before I more fully understood what I was trying to articulate, for more details. Here's what the envelope detector is 'supposed' to do, and I'm not sure how to tune it for the electret output: