Understanding an audio front end (buffer for ADC) - Page 1
Forum section: electronics / beginners

author: hitech95
author_rank: Regular Contributor
timestamp: March 13, 2023, 03:32:35 pm
content: HI,I've receltly got suggested by Youtube a video from Phil'sLab about a DSP based on a STM32.I've seen thet he used a quite complciated input buffer network for its Audio Codec.I have attached below the screenshoot from his video.Now he said that it is composed from a series of filter and buffer.While I'm rusted with op amps I got that:The input filter is to cut off signals that are out of the ADC ranges (something like after 48Khz you cut all)The buffer is biased, he is using a classic buffer topology. He used a buffer to separate the ingresses and the ADC built in buffer (some sort of protection?)The output resistor of the OpAmp is there to limit the currentWhat I dont understand are:Why the 220p cap is (CC702) after the the output resistor, that cap is specified in the Codec datasheet but should have been placed after the 10uF DC blocking cap.In this way it forms a low pass filter, he states that the CODEC has aliasing filters built in and for what I've got that 220pF cap is part of it!.Why the RT701 and RT702 are in parallel for input impedance? I was expecting to have RT700 and RT701 as a parallel to calculate the input impedance.When such frontend is necessary? The codec datasheet has a very simplified input filter. So I was wandering why he used that much real estate for this complicated input section.I've watched some datasheet of some other ADCs just to confirm if this is a common practice and none I've found suggest such complicated input network.Even The evaluation boards in most cases directly connect (with the DC blocking cap and pulldown resistor) the input to the ADC.I'm currently experimenting with a PCM9211, PCM1865 and PCM1808 so this video rised a lot of questions!References:Video:https://youtu.be/AxEL3eESL9I?t=815Codec:https://statics.cirrus.com/pubs/proDatasheet/CS4270_DS686F2.pdf

author: Terry Bites
author_rank: Super Contributor
timestamp: March 13, 2023, 05:17:18 pm
content: Next time pull out the schematics from the video- you’re making for a lot of work for us.It’s a good idea to buffer the ADC with an opamp running from the ADCs rails. This stops the buffer output from exceeding the ADC input range.It saves you the effort of adding another protection circuit at the ADC input. Over voltage kills the opamp not the ADC.I think RT701 provides a path to ground for signal sources that are coupled via output (probably electrolytic) capacitors.As far as the input signal is concerned, Vref is a short to ground so RT701 and RT702 appear in parallel.RT702 is the bias reistor for the opamp input. RT701 ll RT702 and CC701 set the input high pass corner. (~32Hz)It doesn't appear to be entitrely rational at first sight, I agree. But it works.You do need ESD and RFI protection. Opamp inputs can act as RF detectors, bipolar input types are better detectors than fet types.BTW, anyone know why shapes may have gone bonkers when running MC12 on win11? (Obviously win 11 is the work of lunatics- why don't MS have one click setting for "I'm an adult"?)

author: Kleinstein
author_rank: Super Contributor
timestamp: March 13, 2023, 05:26:31 pm
content: For the capacitor CC702 it does not make a significant difference at wich side of C701 it is. At the frequencies where cc702 is relevant C701 essentially behaves like a short, as it is much larger.RT701 provides a path to ground, so that in open input can dicharge the input capacitor, to start somewhat defined. It is not absolutely needed, but nice to have.Usual audio level have an output resitance of less than 600 Ohm, so 2x1M are not a significant load and not real disadvantage from having RT701.For the lower frequency limit it is only RT702 and CC701, not RT701 in parallel. So this would be more like 16 Hz.

author: hitech95
author_rank: Regular Contributor
timestamp: March 13, 2023, 06:22:03 pm
content: Quote from: Terry Bites on March 13, 2023, 05:17:18 pmIts in the attachements of the post, inline attachments has been broken for years....Quote from: Terry Bites on March 13, 2023, 05:17:18 pmGot it! I was thinking the same, that is why I asked if it was to provide some sort of protection for the codec...Quote from: Terry Bites on March 13, 2023, 05:17:18 pmI'm still not completly sure how you calculated this, but I'll try to figure it out!Yea it is not clear at first sight at all! Especially for noobs like me!Quote from: Kleinstein on March 13, 2023, 05:26:31 pmYea now it's clear!Quote from: Kleinstein on March 13, 2023, 05:26:31 pmYea I've thoungt it was something like a "pulldown" for when the connection is empty.Quote from: Kleinstein on March 13, 2023, 05:26:31 pmStill not clear, but I'll try to figure it out!

author: dmills
author_rank: Super Contributor
timestamp: March 13, 2023, 07:29:42 pm
content: CC702 is there to deal with the sampling current pulses from the charge transfer ADC, this is effectively RF engineering not audio!I would have placed it the other side of CC701 because you really want this as physically close to the codec as possible, and that 10uF is likely a fairly butch film job if audio quality matters at all, or an electrolytic.Hopefully CC701 is not a type II dielectric ceramic cap!

author: hitech95
author_rank: Regular Contributor
timestamp: March 19, 2023, 09:21:07 pm
content: Quote from: dmills on March 13, 2023, 07:29:42 pmQuote from: dmills on March 13, 2023, 07:29:42 pmIt is marked as C701, so according to phil this is not a C0G, but the one marked as CC are!What does this means?

author: jonpaul
author_rank: Super Contributor
timestamp: March 20, 2023, 01:05:53 am
content: No idea where you have found this poor and ancient filter design.Depends on the BW, ringing, and FS rate, the filter sharpness is determined.Then design a linear phase or sharp cut anti alias filter as needed.Normally a digital fileter or at least 5..7 pole is used.Jon

author: John Coloccia
author_rank: Super Contributor
timestamp: March 20, 2023, 05:38:29 am
content: I would assume that RT701 is there to give you a fighting chance of not having a huge *POP!* when you plug in an audio device.

author: hitech95
author_rank: Regular Contributor
timestamp: March 20, 2023, 10:39:38 pm
content: Quote from: jonpaul on March 20, 2023, 01:05:53 amWhy you say so? I'm trying to learn!

author: jonpaul
author_rank: Super Contributor
timestamp: March 21, 2023, 03:42:22 am
content: rather than as for,critique on a poorly chosen design copied, suggesting that you research and learn above sampling and anti -aliasing filtersAfterwards look at analog lowpass filter designs, and digital,'switched capacitor filters.AmicalementJon

author: switchabl
author_rank: Frequent Contributor
timestamp: March 22, 2023, 11:47:01 pm
content: Quote from: jonpaul on March 20, 2023, 01:05:53 amI respectfully disagree. The codec has a delta-sigma ADC with 6.144 MHz sampling rate. The only aliasing you will get is from narrow bands around multiples of that frequency. So there is absolutely no need for a very steep 7 pole filter (which may well degrade performance unless you design it very carefully).There isn't actually any signal present at 6 MHz on an audio output either (unless something is broken). So there are really only two things to worry about:- broadband noise that gets aliased down and ruins your SNR: I didn't do the math but I expect that asingle pole RC filter (as specified in the datasheet) may well be enough to prevent this unless the source is very noisy.- radio frequency interference (RFI): this is radio signals being picked up by audio (and power) cables acting as antennas. But that is a complicated topic and is IMHO about careful layout first and filtering second.

author: jonpaul
author_rank: Super Contributor
timestamp: March 23, 2023, 12:16:03 am
content: No idea the dtaailas of the ST ADC, see data sheet.Analg front end seems unnecseearliy complex.For Delta Sigma ADC front end, we made many in production since their inception in 1985.Transient prot: Schottky diodes to Vcc, GRD, or low cap TAZ if needed.EMI: Ferrite beads, off the shelf CM chokeLowpass: The OSADC are designed to run with no ext. LP.The Sallen key and other 2 pole as shown have little benefit but add noise, according to the filter noise gain.Just my experience,Jon

author: wasedadoc
author_rank: Super Contributor
timestamp: March 23, 2023, 12:24:34 am
content: Quote from: jonpaul on March 23, 2023, 12:16:03 amDecades before that.https://en.wikipedia.org/wiki/Delta-sigma_modulationAIUI the telcos were the earliest en-masse adopters of the method.

author: jonpaul
author_rank: Super Contributor
timestamp: March 23, 2023, 02:18:30 am
content: Worked on the first one with MOTDSP56ADC1616-bit Sigma-Delta Analog-to-Digital ConverterInvented the digital mic (Ariel) and built for for the NexT computer, Steve Jobs, Circa 1986.Fine with just a diff amp and no analog input filters.https://elcodis.com/parts/5806127/DSP56ADC16S.htmlhttps://www.ece.rutgers.edu/~orfanidi/ece346/sigma-delta.pdfhttps://www.analog.com/en/design-center/interactive-design-tools/sigma-delta-adc-tutorial.htmlhttps://www.ti.com/lit/an/slyt423a/slyt423a.pdfBon Soiree!Jon