So, I'm still working through numbers (struggling with some of them).
For now I'll pick 0.615Vrms as 0dB. So that means a rectified VPeak of 0.870V (minus diode drop)... which straight away I can see is a problem requiring a good schokty.... or I just give the MCU the negative and let it ignore it and hopefully not fry it.
This gives me the following values for the LEDS:
Vrms Vpp Vpk
Vref 0.615 1.740 0.870
dB
-12 0.154 0.437 0.219 Blue
-9 0.218 0.617 0.309 Green
-6 0.308 0.872 0.436 Green
-3 0.435 1.232 0.616 Green
0 0.615 1.740 0.870 Green
3 0.869 2.457 1.229 Yellow
6 1.227 3.471 1.736 Yellow
9 1.733 4.903 2.452 Yellow
12 2.448 6.926 3.463 Red
15 3.458 9.783 4.892 Red
Which nicely fit under the +5V max. With an 10 bit resolution of 4.8mV and the smallest step (-12dB to -9dB) being 90mV I should be more than fine with the AVR 10 bit ADC.
This covered "internal levels" of the project based around the Line level -2dB figure of 0.615Vrms taken as the 0dB reference.
For the master output level things are different. I calculated the sound pressure levels of my headphones based on their sensitivity and found that -15dB is not going to cut it. To give me a usable indication of "loudness" I would need something like:
Given dbSPL = sensitivity(db/V) + 10*LOG10(Vpk)
db Vrms Vpk
-120 0.000 0.000 - 53dB (quiet conversation)
-100 0.000 0.000
-80 0.000 0.000
-60 0.001 0.002
-40 0.006 0.017
-20 0.062 0.174
0 0.615 1.740 - 113dB ( loud rock concert )
20 6.150 17.397 - 124dB (Dumb and dangerous! Not possible with the circuit I should add and it will be diode clamped much lower)
And there is the problem. Anything much below -40dB would not be measurable by an MCU with a 5mV resolution, but I can't gain it or the 0dB level will bust the 5V limit.
Might need to reconsider this meter or abandon it altogether and just use another Line level meter.
Of course, as I said, I'm stuggling a little with the maths, so some of my calculations could be out.