# Using analog in with line audio? DC offset? Is there a shield for this?

I'm not trying to build the wheel here. I'm just trying to figure out if there's a product to buy (add-on shield) to give me an audio-in jack that will automatically bias (DC offset) the audio to 2.5v so I can read the values of the audio waveform from 0-5v (0-1023).

Thinking of playing around with audio and FFTs on the Arduino. Trying to get a full picture of what's needed first and how difficult it'll be. Like I said, I don't want to build the wheel, but I could if all it involves is buying a board and popping it on.

I don't know of a shield, but it just takes [u]2 equal-value resistors and a capacitor[/u]. I think you can leave-out the 47nF capacitor, but you might need it to prevent aliasing (false frequencies) if the input frequency exceeds the Nyquist limit (half the sample rate).

The two equal value resistors create a voltage divider at half the applied voltage. The 10nF capacitor (and it can be a larger value) keeps the source impedance of whatever's connected from affecting the voltage divider, and it keeps the bias voltage out of whatever you've connected to it.

DVDdoug:
I don't know of a shield, but it just takes [u]2 equal-value resistors and a capacitor[/u]. I think you can leave-out the 47nF capacitor, but you might need it to prevent aliasing (false frequencies) if the input frequency exceeds the Nyquist limit (half the sample rate).

The two equal value resistors create a voltage divider at half the applied voltage. The 10nF capacitor (and it can be a larger value) keeps the source impedance of whatever's connected from affecting the voltage divider, and it keeps the bias voltage out of whatever you've connected to it.

Ack, I've seen that post already. Was still hopping for something easier. But if that's my only option, I may just have to do it.

Two resistors and a capacitor? You can't get much easier than that!

Russell.

DVDdoug:
I don't know of a shield, but it just takes [u]2 equal-value resistors and a capacitor[/u]. I think you can leave-out the 47nF capacitor, but you might need it to prevent aliasing (false frequencies) if the input frequency exceeds the Nyquist limit (half the sample rate).

For audio you don't want that capacitor at all, it shorts out the input at higher frequencies. The circuit
is originally for a load-cell sensor, which has bandwidth of << 1Hz, rather than audio which wants 20kHz
or so.

So long as you sample at twice the range of hearing (40kSPS) you don't have to worry about aliases
since your input sources won't have much above 16kHz in the first place (bat detector being the exception!)

If you are sampling at a lower rate you will need to employ an antialiasing filter before the ADC, but it will
need to be a lot better than a single RC stage - multipole filter (6 or 8 poles) is more likely to give the
needed performance.

Consider sampling at 16kHz, so you want to attenuate all signals above 8kHz a lot, yet retain signals
below it - in other words the filter would need to have maybe 30dB drop between 6 and 8kHz, which is
a stringent requirement. Easier to sample at 40kHz and down-convert.

russellz:
Two resistors and a capacitor? You can't get much easier than that!

Russell.

Your sigline: Retired after 40 years as a chartered engineer working mostly with RF and analogue electronics.

Any guy with a Smith Chart as an avatar is obviously an RF guy... most probably in the black magic realm of microwave circuit design....

I've been doing some more research and I've decided what will work for me is a Teensy v3.2 w/Audio Board. I may still have to deal with a few low level electronic components to get a display to work. But at least for the most part it'll all be plug-n-play. The Audio System Design Tool looks pretty easy with drag-n-drop. These boards were made for audio processing, which is what I want to play with.