Simple Audio input - not working as expected

The resistor should be 100K ohms, the one you have is 1K ohms and the capacitor you have is 22nF instead of 220nF.

If you don't have 100K I suggest you remove it for testing. It's there to discharge the capacitor so that A0 sees a varying signal as sound level changes.

The diode is silicon so it will need at least 0.6V peak before A0 will register anything.

Do you have a voltmeter? You should be able to measure DC voltage between A0 and 0V (gnd) when the PC volume is at maximum. Expect to see approx 1V DC changing with volume depending on how much signal is coming from the PC.

back to the store :slight_smile:

Thank you.

Are you trying to have the Arduino read "sound" or "sound level"? Because the above circuit won't leave you with any audio, just an amplitude envelope. None of the sound will really be left in the signal after it goes through that circuit. What are you planning to do with the signal that you read?

Just the sound level. I want to move a servo attached to a puppet mouth to simulate talking. I don’t need the audio itself.

aarg:
Are you trying to have the Arduino read "sound" or "sound level"? Because the above circuit won't leave you with any audio, just an amplitude envelope. None of the sound will really be left in the signal after it goes through that circuit. What are you planning to do with the signal that you read?

From this previous statement, the puppet is to move it's mouth synchronously with a microphone amplified voice, ie he/she just wants to detect sound level:

"Just need to move a puppet mouth (servo) to the input provided..ie Recorded voice mp3 (no music)
This will later get repaced with live input to the PC via microphone (again output via the soundcard into the arduino)"

For your reference, I have made my thoughts into a diagram showing how an amplifier module can be used. It's not tested but should work as drawn. See attachement.

The module gain can be adjusted to exactly match your signal levels and being 5volts will not damage your Arduino A0 input.

It's just a suggestion as I'm not sure the PC audio out has a higher enough peak level.

If you don't use an amplifier replace the silicon diode with a low forward voltage drop germanium diode. Germanium will conduct from 0.2 to 0.3 volts, silicon will be 0.6 to 0.7 volts, this will make it more likely to work on lower input signal levels.

Same problem, end user

Here are the newer componets, same issue. Simply replaced the Resistor and Diode. (numbers seemingly random, no change when volume up or down.


The capacitors are both 220n one ceramic one mono. * fixed, i had diodes

Suggested diodes by guy in store but im pretty sure they aren't what I'm after.

Attempted to do a reading with voltmeter but numbers weren't changing at all.

I'm still so new at all the electonics side of things when it comes to adding anything more to an Arduino.

How / is it possible to strip things back to bare bones and look at.

Determine the output range of the pc audio output..
ie Voltmeter on the 3.5mm jack. Play audio, volume up and down to see changes?
(I tried but failed, again user error likely, incorrect VM setting etc.

Thank you all

Firstly you need to be clear what sound level is coming from your PC. Connect some monitoring device, like an auxillary amplifier connect it to the jack socket so you can hear what's coming from the PC.

If you can hear sound then play a continuous sine wave test tone from here. Play it at full volume. Connect the voltmeter to measure the output directly on the jack socket. If your meter doesn't have autorange then set it to a low range say 1 or 3V AC.

If the AC above checks out OK then on A0 you should measure a DC voltage approx. 1V. But only if you have connected the components correctly.

By the way the 220nF is a capacitor not a diode. The diode you had first is 1N4148, you can see it written on the packet use this one rather than the 1N4004 in the last picture.

I think you may need to get someone local to assist you in connecting the audio components correctly.

Thanks again good sir or madam,

I have been trying to troubleshoot for most of the afternoon, I figured out my audio jack was incorrectly wired for a start :frowning:

After revisting the setup and it still not working I got the following results:

Audio jack directly to ground and A0 - best result so far, 0 when muted picks up sound when not (sadly too many rogue peaks when muted. ( I think this is the version I had woprking originally)

Tried the latest circuit (with the original diode) volume result sits around 45 regardless of mute.

Audio jack input attached 3W PAM8403, tested and confirmed sound on speaker

Measured the AC on the Digital Amplifier output getting max 1 and saw value going up and down with volume.

Put the amp + to A0 and ground, forgot result already, brain mush. All I remember is it didn't work or change with volume mute.

Summary. I want to thank you all for the patience. I have learnt a lot so far.

I will revist youtube videos on the task at hand and see if I can replicate it exactly. From memory I couldn't find much, but my mind is not what it used to be.

Again thank you!