ebeowulf17
- Joined Aug 12, 2014
- 3,307
Thank you for detailed, clear answers to my questions. Remote diagnostics are nearly impossible when communication is poor, but you're doing a great job so far.Alright, that's even easier then. I will look around because I might have a cap or two lying around, of the correct value.
Here's the voltages:
At full phone volume, the highest I saw was 100mV, of course, the lowest being 0mV.
The output of the amplifier was about 0.12V at max, which is way to low.
I did use an adjustable pot, but it wasn't 100K (only 10K). I have a feeling this could be why.
I did try with just a 100K resistor but that didn't change much.
I believe they are raw ADC values.
I am not using the Instructables code, just the simple analogRead() function. Which, like I quoted above, outputs a value of 0-1023 with an input 0f 0-5v.
EDIT: That means an output of 200 is probably equivalent to about a volt.
Bod
Your analog read results provide an interesting clue. If the amplifier output biasing was working properly, the signal from the amp to the ADC would be biased at roughly 2.5VDC, with an AC signal riding on top of it. With an optimized gain setting, the AC would be roughly 2.5V peak, so the actual voltages at the ADC would swing from almost 0 to almost 5, always centered around that 2.5V bias. The 2.5V bias would correspond with roughly 512 for your raw ADC value. The fact that it drops to zero with no audio instead of settling at 512 with no audio tells us that biasing isn't set up right.
I'd propose two test measurements to confirm the current situation.
1) Take DC measurements of the signal between amplifier output and ADC. With high audio levels, the DC reading may jump around a lot, but at lower levels it should settle around 2.5V. I'm guessing from your ADC readings that you'll find it settling at 0, which would confirm bias problems.
2) Create a couple voltage dividers to generate a few voltage references (or use adjustable power supply, signal generator, etc if available) and feed them to your ADC to confirm that the raw readings are scaling with input voltages as expected. 5V is ~1023, 2.5 is ~512, 1 is ~204, etc. This is just to make sure the code, analog reference voltage, etc. aren't impacting the accuracy of your readings.