... sawright ... that's what we're here for! Jim ----- Original Message ----- From: Bob Ammerman To: Sent: Saturday, May 27, 2000 1:51 PM Subject: Re: [PIC]: Audio Ideas? Right you are of course. (What can I say, I'm a programmer Jim, not an Electrical Engineer!). I should have known better tho'. Bob Ammerman (high function, high performance, low level software) ----- Original Message ----- From: Jim P To: Sent: Saturday, May 27, 2000 2:36 PM Subject: Re: [PIC]: Audio Ideas? > Oops! Did anyone else catch this? > > "of the converted result to drive one of the LED's (each > LED would then represent a factor of 2 (I think that is 3 dB!)." > > - S/B "6" dB > > (Not meaning to beat a dead horse or anything - but here's > a quick review of the dB anyway ...) > > Voltage factor of 2 = 6 dB > Voltage factor of 1.414 = 3 dB > > Power ratio of 2 = 3 dB > Power ratio of 4 = 6 dB > > Computing decibels: > Power ratio: 10 * log_sub_base10 (P1/P2) = dB > Voltage ratio: 20 * log_sub_base10 (P1/P2) = dB > > > ----- Original Message ----- > From: Bob Ammerman > To: > Sent: Saturday, May 27, 2000 6:05 AM > Subject: Re: [PIC]: Audio Ideas? > > > This sounds like a neat project. > > If you want to do the Vu meter thing, you might consider the following > design: > > Take each analog input, run it thru an op-amp to buffer it (so you don't > affect the signal in its normal use). > > Take the output of the op-amp and half-wave rectify it with a diode > (actually, I think you have to include the diode in the op-amp's feedback > somehow so that you don't have the diode drop affecting your output). > > Run the resulting DC signal thru a resistor to a cap. This forms a simple > low-pass filter. > > Connect the cap to an A/D input on the PIC. > > In your PIC code, periodically reprogram the A/D input to be an output and > drive it low. This will discharge the CAP. > > Then, go back to an A/D input, give the signal time to charge the cap up > (this time interval should be very consistent), then read the voltage on the > cap. > > Since you want a logarithmic display, you could actually just use each bit > of the converted result to drive one of the LED's (each LED would then > represent a factor of 2 (I think that is 3 dB!). > > Have fun. > > Bob Ammerman > RAm Systems > (high function, high performance, low level software)