Forum Rule: Always post complete source code & details to reproduce any issue!

1. Confused with the recommended circuitry for ADC on teensy.

Hey. Quite a simple question. I found this on the teensy's Audio Library Design Tool documents.

I *THINK* this is so that line level inputs are dc-offsetted appropriately so it can be read by an ADC within the range of 0 to 1.2v. i.e. adding 0.6v DC offset? am I correct? If I am, what exactly is that RC circuit doing? How were the values chosen? What do I search on google to learn more about this??

and one more question,

I hear that opamps can achieve DC offsetted output too. Is there any advantage of doing this with either the RC circuit or opamp that i'm missing? I'm asking because I do have some opamps lying around, but not those exact resistors and capacitors.

Thank you guys always!

2. You will have to ask the designer of the circuit to be sure, but it looks to me like it is an RC bandpass filter, in addition to providing bias.

3. Originally Posted by jidagraphy

I *THINK* this is so that line level inputs are dc-offsetted appropriately so it can be read by an ADC within the range of 0 to 1.2v. i.e. adding 0.6v DC offset? am I correct? If I am, what exactly is that RC circuit doing? How were the values chosen? What do I search on google to learn more about this??
Yes, there's a virtual ground at 0.6V comprising the 10k, 2k2, 10uF to ground. The capacitor makes this
this virtual ground referenced to real ground at audio frequencies (ie it suppresses all the digital hash
on the 3.3V rail).
The other series capacitor (only needs to be about 470nF, 10µF is overkill), is a DC blocker.

The cutoff freq of 10µF into 47k load is 10µ * 47k = 0.47s, corresponding to 0.3Hz. 470nF gives
a more rational 22ms and 7Hz.

The input 47k can be much larger (1M), it serves only to discharge the series capacitor when
nothing's plugged in, so there isn't an almighty full-scale *CRACK* when you do plug something in.

The values weren't really chosen particularly carefully, but they will work. Normally audio input
impedance is 47k (although in modern equipment is often less, such as 10k, since valve circuitry
isn't used any more(!)).

and one more question,

I hear that opamps can achieve DC offsetted output too. Is there any advantage of doing this with either the RC circuit or opamp that i'm missing? I'm asking because I do have some opamps lying around, but not those exact resistors and capacitors.
Opamps can buffer (lower the impedance) and amplify (raise the signal level). Passive networks can't amplify, and can
only lower the impedance through attenuation (which raises the noise floor).

You'll need the resistors and capacitors with an opamp too though.

Maybe you don't want to go quite this far, but a great way to learn about circuits is to type them into LTSpice and and try things and see the result.

5. Originally Posted by MarkT
Yes, there's a virtual ground at 0.6V comprising the 10k, 2k2, 10uF to ground. The capacitor makes this
this virtual ground referenced to real ground at audio frequencies (ie it suppresses all the digital hash
on the 3.3V rail).
The other series capacitor (only needs to be about 470nF, 10µF is overkill), is a DC blocker.

The cutoff freq of 10µF into 47k load is 10µ * 47k = 0.47s, corresponding to 0.3Hz. 470nF gives
a more rational 22ms and 7Hz.

The input 47k can be much larger (1M), it serves only to discharge the series capacitor when
nothing's plugged in, so there isn't an almighty full-scale *CRACK* when you do plug something in.

The values weren't really chosen particularly carefully, but they will work. Normally audio input
impedance is 47k (although in modern equipment is often less, such as 10k, since valve circuitry
isn't used any more(!)).

Opamps can buffer (lower the impedance) and amplify (raise the signal level). Passive networks can't amplify, and can
only lower the impedance through attenuation (which raises the noise floor).

You'll need the resistors and capacitors with an opamp too though.
This is GOLD. Dont understand much of it except the input 47k, but this will be a nice starting point. Thank you always MarkT!
Do you have any suggestions on what I should google regarding this topic of DC offsetting with RC circuits and opamps? What is this circuit even called?

6. Originally Posted by jonr

Maybe you don't want to go quite this far, but a great way to learn about circuits is to type them into LTSpice and and try things and see the result.
oh wow is this some sort of circuit simulator?? this would be very useful!
Thanks!

7. Originally Posted by MarkT
Yes, there's a virtual ground at 0.6V comprising the 10k, 2k2, 10uF to ground. The capacitor makes this
this virtual ground referenced to real ground at audio frequencies (ie it suppresses all the digital hash
on the 3.3V rail).
The other series capacitor (only needs to be about 470nF, 10µF is overkill), is a DC blocker.
Hey just a question.
Is this circuit making any assumptions? i.e. the input audio outputs voltage in the range of ___v?
I was looking at the circuit and I realised the DC offset wouldnt work if the audio voltage spans wider than 0.6v, am I right?
What should I expect from a typical consumer audio devices like synthesizers?

8. Originally Posted by jidagraphy
Hey just a question.
Is this circuit making any assumptions? i.e. the input audio outputs voltage in the range of ___v?
only assumption: input signal is <0.6 V. possible DC-offset is taken care by AC coupling

9. Hi MarkT,
Sorry for bringing this up again, I just couldnt find an answer.
I just have a few questions

What do you mean by :

Originally Posted by MarkT
The capacitor makes this
this virtual ground referenced to real ground at audio frequencies (ie it suppresses all the digital hash
on the 3.3V rail).
Because the circuit works and gives +0.6v dc offset whether that particular capacitor is there or not.
What does it mean by "digital hash?"

Also,
Originally Posted by MarkT
The other series capacitor (only needs to be about 470nF, 10µF is overkill), is a DC blocker.

The cutoff freq of 10µF into 47k load is 10µ * 47k = 0.47s, corresponding to 0.3Hz. 470nF gives
a more rational 22ms and 7Hz.

I understand the role of a DC blocker, yet I didn't understand why 470nF would be more Ideal.

and lastly,

the circuit seemse to work without a lot of the components mentioned in the diagram. Some I understand, some I dont. The DC offset seems to work with a simple voltage divider that brings down 3.3v to 0.6v, joined with an audio signal and a capacitor in series. Not fully understanding the questions above, I feel like my bare minimum does the job. How would this set up affect the audio?

Thank you MarkT! Your help is always appreciated!

10. Originally Posted by WMXZ
only assumption: input signal is <0.6 V. possible DC-offset is taken care by AC coupling
Be careful -- a very large DC offset on the input (say 5 V) could damage the Teensy when it is initially plugged in because the initial step as the 10 uF is charged will be driven straight into the A2 pin. If this is a possibility, put a 1k resistor in series with that 10 uF.

11. Originally Posted by WMXZ
only assumption: input signal is <0.6 V. possible DC-offset is taken care by AC coupling
Oh yes! thanks for clarifying!

Originally Posted by Jp3141
Be careful -- a very large DC offset on the input (say 5 V) could damage the Teensy when it is initially plugged in because the initial step as the 10 uF is charged will be driven straight into the A2 pin. If this is a possibility, put a 1k resistor in series with that 10 uF.
Do you mean like this spike? (0.3v AC with 3v DC offset).

12. There's no 1k resistor in series with the input in that circuit.

13. Yes, that spike could be bad. Add 1k in series with the input, or just in series with the 10 uF.

You don't need to use 1k & 220 Ω -- they make the cutoff frequency too high for audio (10 uF & (220//1k) = 10u&180 = 88 Hz; They also set the bias point unnecessarily low (around 0.6 V) -- so just use 10k (or even 100k) resistors for each to set the boas point around 1.6 V. With 0.6 V bias, your ADC will clip for signals over 0.6 V peak; with mid-rail bias, you can handle 1.6 V AC peaks.

The original circuit had a 47k from the R divider tap to the bias point -- that allowed another 10 uF (could have used 0.1 uF) to filter any noise coming in from the 3.3 V supply. How important this depends on the signal quality you expect.

14. Originally Posted by Jp3141
...
They also set the bias point unnecessarily low (around 0.6 V)
Since the original photo showed a T3.2, perhaps the user intended to use the ADC with the internal 1.2V reference. In that case, 0.6V is the midpoint of the ADC range.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•