Hello everyone!
My original intention was to sample analog audio via the analog pin of the Arduino Uno Microcontroller. For testing purposes I used my phone as the audio source and plugged in a 3.5mm AUX cable I extracted from some old phone headphones. Then I used the R speaker audio wire to measure the output voltage on maximum sound volume when playing a 1kHz test sound sample by using an oscilloscope. The output was a 400mV peak to peak sine-wave signal.
Then I proceeded to design a pre-amplifier for the input signal. First, a 1μF capacitor was used to block any DC noise of the output signal. Then, I decided it would be a good idea to first offset the signal to 0, by using a voltage devider, which would output a voltage range from 0 to 400mV. This new signal is then connected to the non-inverting input of an op-amplifier, which amplifies the signal by a factor of 12, by employing another voltage devider, whose output is connected to the inverting input of the amplifier. The final output, which has a range from 0-4.8V is then connected to the analog pin of the Arduino. The circuit is shown in the picture.

Because I am quite inexperienced in electronics, I wondered how I can improve this circuit to make it suitable for a wider range of use. For example, when analysing the output voltage of the AUX cable alone and playing several different melodies, the output voltage depended wasn't always the same and amplitude ranged from 200-250mV. I guess the same would happen if I had plugged the AUX into another phone? Maybe a potentiometer combined with the first voltage divider would help?
Besides that feeding negativne voltage into the analog input of the Arduino is a potential danger in my case. I have thought of using a zener diode, but those negative voltages would not exceed more than a Volt, which is not anywhere near the breakdown voltage of zener diodes.
I would be very glad for any additional advices on how to improve and protect my circuit. Thank you in advance!
My original intention was to sample analog audio via the analog pin of the Arduino Uno Microcontroller. For testing purposes I used my phone as the audio source and plugged in a 3.5mm AUX cable I extracted from some old phone headphones. Then I used the R speaker audio wire to measure the output voltage on maximum sound volume when playing a 1kHz test sound sample by using an oscilloscope. The output was a 400mV peak to peak sine-wave signal.
Then I proceeded to design a pre-amplifier for the input signal. First, a 1μF capacitor was used to block any DC noise of the output signal. Then, I decided it would be a good idea to first offset the signal to 0, by using a voltage devider, which would output a voltage range from 0 to 400mV. This new signal is then connected to the non-inverting input of an op-amplifier, which amplifies the signal by a factor of 12, by employing another voltage devider, whose output is connected to the inverting input of the amplifier. The final output, which has a range from 0-4.8V is then connected to the analog pin of the Arduino. The circuit is shown in the picture.

Because I am quite inexperienced in electronics, I wondered how I can improve this circuit to make it suitable for a wider range of use. For example, when analysing the output voltage of the AUX cable alone and playing several different melodies, the output voltage depended wasn't always the same and amplitude ranged from 200-250mV. I guess the same would happen if I had plugged the AUX into another phone? Maybe a potentiometer combined with the first voltage divider would help?
Besides that feeding negativne voltage into the analog input of the Arduino is a potential danger in my case. I have thought of using a zener diode, but those negative voltages would not exceed more than a Volt, which is not anywhere near the breakdown voltage of zener diodes.
I would be very glad for any additional advices on how to improve and protect my circuit. Thank you in advance!