What resources are available for getting started learning how to build a very simple ADC - DAC audio interface?

Thread Starter

Dolmetscher007

Joined Mar 21, 2019
24
I recently posted a thread on here about what an audio interface really is, and what manufacturers of them put into them to make their prices range from $300 - $10,000 for similarly spec'd devices. ("similar" is slightly hyperbolic, but you get my point). I learned a lot from that thread, and now I would really like to try my hand at building a very simple audio interface that just does the following...
  1. Accept up to 2 simultaneous incoming audio signals
  2. Feed those signals into an ADC which converts them to digital data
  3. Send that digital data to a Mac computer running the Digital Audio Workstation (DAW) software Logic Pro X over the thunderbolt data protocol
  4. Accept a digital stereo (2x mono signals) signal back from the computer into a DAC for conversion back into analog and sent to a headphones output and two main audio XLR outputs (L & R)

Is it incredibly bold and probably arrogant for me, a total novice, to even hint at wanting to try this? Sure! And I am sure I will get a lot of... <cough> constructive feedback from you guys about how foolish I am to even entertain such a thing at my level, when audio interface companies employee highly experienced senior engineers to design these things. But... even if I have to track down schematics online and "steal" designs, or even open up my own interface Focusrite Interface to have a look at what I can find out... I cannot help but think this is possible. I have removed anything "esoteric" from the above interface. I do not plan to include any pre-amps, which is often where audio companies focus on the "magic sauce" for their design. I will use really high end Rupert Neve audio pre-amps that I already own to boost the incoming signal up to an appropriate level before the signal even reaches my interface. There are tons of DIY headphone amp kits and schematics on the internet, for when the digital signal returns from the DAC and needs to be heard as audio again. Also, I used to work for Texas Instruments in their DSP dept. and know their products well. Have a look at this section of their www.ti.com website. They publish all kinds of pro audio design reference material and examples. Also, have a look at the TI TLV320ADC5140 ADC chip. TI even sells a $200 4-channel ADC evaluation board with this chip on it. Hell, it looks like this eval board might be exactly the design I am trying to create. I have not had a chance to really dig into the documentation, but I know the schematic for that board comes with it. I know that there is a lot more to these types of devices and just buying an ADC, a DAC, a thunderbolt chipset, and using the data sheets from these chips to build power supply circuits to power it all, and just soldering it all to a perf board. I hear the term "Clock" used a TON around this type of design and I even know there are whole companies that specialize in nothing but clocks that sync all this kind of stuff so that this system and interface with this and that. My goal, however, is not to take this thing to market, or try to design some universal tool that will set the pro audio world on fire. I literally simply want to build my own DIY audio interface that is very bare-bones and purpose built for just me and my digital home recording. I do not care about S/PDIF, ADAT, PCI card, SCSI, or any kind of "interface" other than thunderbolt. I do not care about trying to power things from the thunderbolt; I'm fine with it having it's own wall wart Power Supply.

So... I am willing to spend some cash for evaluation boards, samples, and breadboarding components. And I am certainly willing to spend the time... but... I am not really sure where to look for resources on how to learn about this area of electronics, other than the aforementioned resources from the chip companies like Analog Devices, Texas Instruments, and AKM? I checked on Amazon, and there are no books that come even close to something as specialized as this application. I know that companies like Apogee, Focusrite, MOTU, Universal Audio, RME, and Avid all have experienced and senior electrical engineers on staff to design stuff like this. But unless they all graduated from college within the past 10-15 years, I doubt they learned about all this stuff in school. So, let's say an electrical engineer who has been working in the automotive industry all of the sudden is asked to shift into designing a pro Audio Interface... what would be the first resource he/she would turn to trying to get up to speed on what goes into these things?
 

KeithWalker

Joined Jul 10, 2017
895
I don't understand why you would want to spend so much time and resources to build something that is already built into your computer. Your sound card will convert your analog stereo audio into digital exactly in the way you need it to do home digital recording and to listen to from the computer audio output .
Regards,
Keith
 

Berzerker

Joined Jul 29, 2018
615
Sorry, @Dolmetscher007 but what you described is not a "Very simple" thing. Designing will take a lot of time, calculations, Component selection, PCB design.....etc.
Even if you "borrow" wink, wink, another's schematics you would have to figure out all the components they used and still make up your own PCB. Now there goes having to learn all the different programs that go into making a PCB.
Brzrkr
 

Delta prime

Joined Nov 15, 2019
336
lectrical engineers on staff to design stuff like this. But unless they all graduated from college within the past 10-15 years, I doubt they learned about all this stuff in school.
They did... and speaking for myself I have.
I have to say you do have grit.
You have made derogatory comments to the very people you seek guidance from. :mad:
 

Papabravo

Joined Feb 24, 2006
13,728
Yeah. Us guys that graduated in 1969 were obviously too stupid to design all the cool stuff that has happened in the last 50 years.
Q: What was Arnold Schwarzenegger's iconic line from the movie "Commando"?
 
Last edited:

Delta prime

Joined Nov 15, 2019
336
Q: What was Arnold Schwarzenegger's iconic line from the movie "Commando"?
:D
“I let him go.” [After dropping a man off a cliff – Commando]

“Let off some steam.” [After impaling Bennett on a steam pipe – Commando]

“I eat Green Berets for breakfast. And right now, I’m very hungry!” [Commando]

“You’re a funny guy Sully, I like you. That’s why I’m going to kill you last.” [Commando]

“I lied.” [After not killing Sully last – Commando]
 

Thread Starter

Dolmetscher007

Joined Mar 21, 2019
24
They did... and speaking for myself I have.
I have to say you do have grit.
You have made derogatory comments to the very people you seek guidance from. :mad:
Yeah. Us guys that graduated in 1969 were obviously too stupid to design all the cool stuff that has happened in the last 50 years.
I definitely would never make derogatory comments about anyone on this forum. This place has been great!!! I am a software engineer. The main programing language the company I work for uses is Python.
  • When I graduated college 20+ years ago, Python was not around. I had to learn it
  • The resources I used to learn it were: I bought two books from Amazon on Python, and I went through approx ~20 hours of online tutorials on a website called "Plural Sight".
  • If you graduated college in 1969, 24-bit, 192kHz ADCs and DACs were not around. You had to learn about it.
  • What resources does an electrical engineer use in a situation like this?
 

Papabravo

Joined Feb 24, 2006
13,728
I definitely would never make derogatory comments about anyone on this forum. This place has been great!!! I am a software engineer. The main programing language the company I work for uses is Python.
  • When I graduated college 20+ years ago, Python was not around. I had to learn it
  • The resources I used to learn it were: I bought two books from Amazon on Python, and I went through approx ~20 hours of online tutorials on a website called "Plural Sight".
  • If you graduated college in 1969, 24-bit, 192kHz ADCs and DACs were not around. You had to learn about it.
  • What resources does an electrical engineer use in a situation like this?
Most manufacturers produce exquisitely detailed datasheets and Application Notes. You consume them like a first edition of War and Peace in the original Russian. In excruciating detail,
Did you follow the I2S link I gave you?
 

MrChips

Joined Oct 2, 2009
21,123
Audio guys worry about the amplitude of the signal and rightly so. For high fidelity, you need low noise, good linearity, and flat pass band. And then they know or do nothing about the CLOCK.

The digitized voltage is only half the problem, the other half is the CLOCK. Here is why graphically.

1590986212341.png

If you want to digitize a signal, you need to capture the voltage and the time accurately.
Why? Because any error in the capture time becomes an error in the digitized voltage.

Where as we worry about extraneous noise added to the signal voltage, CLOCK JITTER creates an additional error in the captured voltage.
 

Papabravo

Joined Feb 24, 2006
13,728
:D
“I let him go.” [After dropping a man off a cliff – Commando]

“Let off some steam.” [After impaling Bennett on a steam pipe – Commando]

“I eat Green Berets for breakfast. And right now, I’m very hungry!” [Commando]

“You’re a funny guy Sully, I like you. That’s why I’m going to kill you last.” [Commando]

“I lied.” [After not killing Sully last – Commando]
Those are the ones, but there was one more I think which was kinda jarring at the time. The one where the guy was going to shoot him, but the gun had no bullets
 

MisterBill2

Joined Jan 23, 2018
6,070
OK, the first thing to understand about creating an analog to digital converter system is the sample rate and the amount of resolution desired. For music you need to be able to accurately copy waveforms up to at least 15,000 hertz accurately. Thus you need much more than the nyquist minimum number of samples, which is only applicable to single frequency sine waves. So probably sampling at 50,000 samples per second would be reasonable, and well within the abaility of current A/D converters. And you would also want a minimum of 12 bits of resolution. Knowing those requirements you can now search for a suitable converter. Most A/D converter ICs need external circuits to sequence the load, read, convert. send, and reset functions. Those commands need to be precisely timed . And the analog input voltage must be kept within a specific range to provide satisfactory performance.
So at this point one of the quite excellent TI demo boards should look quite good. Analog Devices also has good demo boards. But now once the audio is converted into digital data there is a whole bunch of logic to put it into the format that you want. That part is software and not my area of expertise.

So you see that even at the very simplest, the project quickly gets huge. And I an running out of time and I need to get to work today.
 

Thread Starter

Dolmetscher007

Joined Mar 21, 2019
24
Most manufacturers produce exquisitely detailed datasheets and Application Notes. You consume them like a first edition of War and Peace in the original Russian. In excruciating detail,
Did you follow the I2S link I gave you?
Perfect! That is what I thought would end up being the case. In that case, I am already on the right track.I did bookmark the I2S documentation you linked to above. I read the first three pages, enough to know I have quite a long way to go. But... I will absolutely read and re-read it until I understand the living hell out of it. Considering the fact I did not even know there was such thing as different audio "formats" when it comes to analog to digital to analog conversion, you sharing that with me is a quantum leap for me. So, again... thank you.

Once more, simply so I know I made myself clear... I certainly meant nothing snarky or wise-ass about my comment regarding modern technological changes that came into being after an engineer graduated from college. I have a funny anecdote that underscores how ironic technology can be as far as age is concerned. My uncle has. a PhD in electrical engineering. Growing up, I never knew what he actually did for a living, other than I knew he was some "big wig" at Alabama Power in Birmingham, and he would spend 6-months to 1-year at a time living in China, France, or some other distant place basically engineering some huge new power grid system for that government, I assume as some form of contracted extension service, or consulting etc. He also oversaw everything about how the state of Alabama was run electrically. He also taught several classes in his later years at University of Alabama at Birmingham. He's 71 years old now, retired, and it finally occurred to me recently, A.) I had not seen or spoken to him in 15+ years. B.) He was always my absolute favorite uncle, possibly my favorite family member. C.) I have so many questions about electronics, and I probably have a gold mine of a resource in my very own family.

So, I reached out to him via email recently just to tell him I have recently become obsessed with vintage guitar amplifiers and how I would love to build my own single-ended Class-A vacuum tube amplifier. I didn't ask him any specific questions or anything like that. I just asked if he knew of any books or resources that were considered "The Bible" of vacuum tube amplifiers. I will admit to you guys, I kind of thought (incorrectly)... since he was in his 70's, that he would know everything about vacuum tube technology, and that it would feel like "coming home" for him to get to "go back to the good ole days," and talk about vacuum tubes again. His response email was a huge wake-up call for me, that I really do not have a good grasp on time and the how-and-when of what is "new" and "old" technology. He basically said...
"TUBES?!? Why on Earth would you want to use vacuum tubes? I remember seeing a tube in my father's really old radio, and all I remember was they broke easily, and got really hot. By the time I got into college, they had long since stopped teaching about vacuum tubes. Why would you use those old impractical things, when you can accomplish the exact same thing with transistors, diodes, etc etc." (paraphrased)
I certainly did not want to get into any discussion about why guitarists still crave "that old tube sound." Mostly because, I honestly have no idea exactly why vacuum tube amps are so sought after vs. their solid-state brothers. Don't get me wrong, I have read online forum posts and amplifier marketing talk all about how the imperfections of the technology are what make those old amps, "sound so good." It feels weird to talk about how "good" or "bad" a massively distorted audio signal sounds. When, really... it is totally obvious that it is all about convention. It just so happens that Jimmy Page, Eric Clapton, Pete Townsend, The Beatles, Black Sabbath, and all those guys, were using tube amps... so everyone just knows that "Rock n Roll sounds like... THIS!!!" If all those old records had somehow been magically recorded using solid-state transistor-based amplifiers, I think people would be pouring over some specific brand/model of transistors maybe, and how these new transistors just don't sound as good as the old germanium one's did. (The whole "germanium vs. silicone" debate is still very alive when it comes to guitar effects pedals.) Anyway... I digress.
I am in my mid 40's and trust me, as a software engineer, I am a dinosaur!!! So, I meant absolutely no disrespect with anything I asked or said. I'm literally just a very curious chap who wishes with all his heart that he had made better decisions earlier in life and had studied electrical engineering. I'm just trying to make up for 20 years of lost time. I appreciate every word you guys write, in response to my threads.
 

MrChips

Joined Oct 2, 2009
21,123
Why on earth would you want to use or build a guitar amp out of tubes when solid-state amps are so much more reliable, powerful and precise? Sounds like another audiophoolish myth to me. Your uncle is right!:rolleyes:
 

Thread Starter

Dolmetscher007

Joined Mar 21, 2019
24
OK, the first thing to understand about creating an analog to digital converter system is the sample rate and the amount of resolution desired. For music you need to be able to accurately copy waveforms up to at least 15,000 hertz accurately. Thus you need much more than the nyquist minimum number of samples, which is only applicable to single frequency sine waves. So probably sampling at 50,000 samples per second would be reasonable, and well within the abaility of current A/D converters. And you would also want a minimum of 12 bits of resolution. Knowing those requirements you can now search for a suitable converter. Most A/D converter ICs need external circuits to sequence the load, read, convert. send, and reset functions. Those commands need to be precisely timed . And the analog input voltage must be kept within a specific range to provide satisfactory performance.
So at this point one of the quite excellent TI demo boards should look quite good. Analog Devices also has good demo boards. But now once the audio is converted into digital data there is a whole bunch of logic to put it into the format that you want. That part is software and not my area of expertise.

So you see that even at the very simplest, the project quickly gets huge. And I an running out of time and I need to get to work today.
Luckily, software IS my area of expertise. For the most part the DAW software application takes over and digitally routes the digital audio. But you are right, there are some hand-off specs that must be taken into consideration. As far as the bit-depth and sample rate, as you referenced, since perfect human hearing falls between 20Hz and 20kHz, "CD quality" audio was fixed at 16-bit, 44.1kHz. Just enough to account for double the highest note a human can hear. Now that audio has moved past the confines of physical CDs, this resolution is more up for debate. Although, since people now stream most of their music over the internet, by the time audio reaches most human ears, who knows how many different resolution changes it has undergone. So, I won't get into all that. My main idea around that is, I want to capture as high a resolution as possible at the source (recording), so that any down-sizing conversions later will at least have a high quality signal to mess with. 24-bit seems to still be the "word length" that is till the "Gold Standard," and the 44.1kHz sample rate increased to 48kHz, and then to 96kHz as a sort of "base standard," with 192kHz being the new horizon for digital audio.
High quality storage devices have improved so that file size isn't really a huge deal with these super high sample rates. The big debate seems to hover around whether or not recordings at 192 kHz have any audible advantage over a 96 kHz file. As a budding amateur audio engineer, I think that whether or not your ears can really "hear" a difference is not really the point. My view is when you are mixing together 40+ waveforms, which is very common in mixing any typical rock or pop song, the higher sample rates make it mathematically easier to sort out EQ problems. I am not going to go into those mathmatical details, because I would butcher them, and also because I do not fully understand them, so I would be posturing if I pretended to. Here is a really good video that kind of sums up what I am talking about as far as why such a super high sample rate as 192 kHz makes life easier with pro audio. That little Dutch kid really knows his stuff as far as audio is concerned. He can be a little hard to watch sometimes, because he has kind of a super-opinionated chaotic rant vibe to his videos... kind of like a whiny millennial on speed. But, at his core... he's a smart dude, hands down.
 

MrChips

Joined Oct 2, 2009
21,123
The "Gold Standard" is 24-bit @ 192kHz.
I compare that to my ultra high performance audio processing computer, 128-bit, 8GHz, 64GB, 4TB SSD I built.
Why? Because it gives me all the spare room to move around and be lazy. Space wasted.:rolleyes:
 

MrChips

Joined Oct 2, 2009
21,123
I like a green LED instead of a blue LED.

Why do some guitarists play Fender Strat, other prefers Tele or Gibson?
It is not the instrument that makes the musician. The Beatles, Eric Clapton, Jimmy Page, etc. would still be great musicians regardless of what guitars they played or what kind of amps they used.

btw, I play Fender Strat and Tele and Fender Jazz Bass. I have Fender and Marshall tube and solid-state amps and I'm still a lousy musician so the fancy equipment make no difference.
 

MrChips

Joined Oct 2, 2009
21,123
Also, you have to learn to walk before you can run.

If you want to learn the intricacies of building your own recording system, start off with a single channel 16-bit ADC @ 48ksps
 

MisterBill2

Joined Jan 23, 2018
6,070
Once again, the pain of designing is in ALL of those details.
In my technical education I learned about both tubes and transistors, and later op-amps and digital logic. Rather well rounded, it seems. The reason that anybody wants tube amplifiers is that they do produce certain kinds of distortion that some folks love. Sort of like "the first time" that was GOOD. Yes, that distortion can be duplicated in an all solid state amplifier, sort of, but not as easily. And while tubes certainly can suffer breakage, that really is rather rare. The plus side is that tubes can very well survive voltage spikes that will totally destroy most semiconductor devices.
And now I also own a Fender "Staratocaster guitar and a few guitar amplifiers. All I need to get now is some skill and a bunch of talent, and I can be a rock star. It is a good thing that I went into engineering instead.
 

bassbindevil

Joined Jan 23, 2014
94
About tubes; get your hands on back issues of "Glass Audio" magazine, and a copy of the classic Radiotron Designer's Handbook.
https://cc-webshop.com/collections/glass-audio-magazine
As for digital audio, there's been a lot of articles over the years in Audio Amateur, Glass Audio, and Audioxpress (some are a bit suspect: references to green ink on CDs are red flags). Data books from Analog Devices, Burr-Brown, Crystal Semiconductor, and whoever owns them now (TI?).
 
Top