LF-RF DAC needed with serial interface - Page 1
Forum section: electronics / projects

author: Amish_Fighter_Pilot
author_rank: Regular Contributor
timestamp: June 15, 2025, 09:02:17 am
content: I am trying to figure out what a good DAC would be to use as a higher-frequency output for a device that is limited to audio out or USB only such as a PC or an Android device. Both can make a wide spectrum of waveforms with their powerful processors, but headphone out is limited to 20KHz. I would like to be able to output forms a lot higher than that. I know Analog Devices makes a variety of such things and yet I am overwhelmed with options. Can a PCM signal even work in those frequencies?

author: moffy
author_rank: Super Contributor
timestamp: June 15, 2025, 10:24:01 am
content: You need to define your problem a bit more, up to what maximum frequency, if you only need sine waves then DDS(Direct Digital Synthesis) is an option, but if USB then a micro to interface with the DAC would be needed. What sort of resolution do you need also?

author: Amish_Fighter_Pilot
author_rank: Regular Contributor
timestamp: June 15, 2025, 11:19:27 am
content: The absolute maximum isn't especially important as long as it can do the LF-200KHz(a higher maximum would be great). With audio range signals it seems like phone and PC software is limited to the audio port, but I don't understand why I couldn't just send the signal to a different DAC than the sound card. This is where I'm not sure why a microcontroller would even be needed. Is there no RF DACs that just USB connect like audio DACs do? I'm not really sure what resolution, but it doesn't need to be anything special.

author: tggzzz
author_rank: Super Contributor
timestamp: June 15, 2025, 12:20:46 pm
content: With such a loose specification, it isn't surprising you have "too many" options!In order for people to help you, we would need to know things like "what will you use this for?" and "what are cost/power/size constraints?" and "what would be unacceptable and why?"Numbers, not adjectives!Personally I'd suggest a Digilent Analog Discovery, since you also get a scope and digital pattern generators and logic analyser.

author: Amish_Fighter_Pilot
author_rank: Regular Contributor
timestamp: June 15, 2025, 12:33:22 pm
content: I am not sure why I have to have a super specific use in mind for this. Does every company that makes a function generator have to plan that it get used in a specific way?

author: tggzzz
author_rank: Super Contributor
timestamp: June 15, 2025, 12:46:54 pm
content: Quote from: Amish_Fighter_Pilot on June 15, 2025, 12:33:22 pmSo you actually want a function generator, not a DAC?I suggest you read the first couple of paragraphs ofhttps://entertaininghacks.wordpress.com/library-2/good-questions-pique-our-interest-and-dont-waste-our-time-2/Any more hints, or is this a classichttps://en.wikipedia.org/wiki/XY_problem?

author: Amish_Fighter_Pilot
author_rank: Regular Contributor
timestamp: June 15, 2025, 01:11:53 pm
content: No. I want a DAC for a device being used as a function generator as I stated in my first post.

author: Amish_Fighter_Pilot
author_rank: Regular Contributor
timestamp: June 15, 2025, 01:16:38 pm
content: If my post makes no sense to you then you could just not reply instead of attempting to lecture me about how to post.

author: tggzzz
author_rank: Super Contributor
timestamp: June 15, 2025, 01:42:27 pm
content: Quote from: Amish_Fighter_Pilot on June 15, 2025, 01:11:53 pmAnd implicitly contra-indicated in your response when you mentioned other (but related) devices...Quote from: Amish_Fighter_Pilot on June 15, 2025, 12:33:22 pm

author: tggzzz
author_rank: Super Contributor
timestamp: June 15, 2025, 01:44:54 pm
content: Quote from: Amish_Fighter_Pilot on June 15, 2025, 01:16:38 pmGood luck; as you wish, I will not make a third attempt (in addition to moffy's attempt) to guide you to help yourself get the answers you are after.

author: moffy
author_rank: Super Contributor
timestamp: June 15, 2025, 10:56:57 pm
content: Quote from: Amish_Fighter_Pilot on June 15, 2025, 01:16:38 pmtggzzz was being helpfull, your response does not appreciate that and is not helpfull to your problem.

author: jwet
author_rank: Frequent Contributor
timestamp: June 16, 2025, 04:02:03 am
content: Here are a few hints to get you started. This is all very approximate and general, I hope the pedants don't destroy it- its difficult to start these discussions.1. It sounds like you have a speed in mind. Is this 200KHz the frequency of the signals you want to generate or the sampling frequency that you're going to shift bits out at. If you look at an ARB (arbitrary waveform generator), you're going to have one AC cycle stored in memory. If you wanted to make a half decent looking sine waveform you'd need to have a cycle that might be 1024 points in memory. If you clock this out of a 200 Khz DAC, you'd get a roughly 200 Hz waveform. I doubt this what you're after and its only for the most generalized ARB case. If you only want to make sines, you could get away with perhaps 32x so 200 KHz DAC could give you 7 Khz, still not likely what you're after. To make 200 Khz outputs, you would probably want something on the order 20 MHz. To push bits to something like this would require at least fast DMA on a fast processor but more likely FPGA hardware. If you look a the DAC outuput on gadgets like the Digilent Analog Discovery- you're get a good idea of what's required. You might require a parallel loading DAC, imagine how fast you'd have to run your SPI to provide it with 20 mega words per second.2. The complimentary issue is how many bits the DAC has to be or how much distortion can your generator have? A cheap signal generator might have 1% kind of distortion or said another way 40 db of dynamic range. The DR of a DAC depends on the number of bits but you don't always get all the bits you think you do. The formula is DR = 6.02 * N + 1.76. A perfect 8 bit DAC would give you about 50 dB or DR which gets you in this range. Most 8 bits DAC don't give you 8 bits at speed and some will specify something called ENOB- their effective number of bits might only be 6.5 bits which is under 40 dB and probably more realistic. Some other rough numbers, 10 bits is something around 60 dB (.1%), 12 bits is about 80 and 16 is 96. You then have to add a nice buffer and filter to this that doesn't add distortion.3. The DAC's that you might find internally on an ARM will have a resolution of 12 bits but ENOB closer to 10, they might have a clock rate of 500 Khz. If they're setup well, they might do DMA to shift bits. Still with the 32x sampling, you only get 16 Khz. I haven't looked at the Teensy 4 series in a while but they might be close.Here is a link to an analog device extended app note on the topic. Its specifically about ARB's, this is just one type of popular approach.https://www.analog.com/media/cn/technical-documentation/apm-pdf/adi-arbitrary-waveform-generator-solutions_en.pdfIts a big subject. You have to nail things down a little bit before you can start. Audio DAC's might be a reasonable place to start if you want to make low distortion Ultrasonic type stuff.I hope this helps some.

author: mtwieg
author_rank: Frequent Contributor
timestamp: June 16, 2025, 06:19:04 pm
content: It's really hard to give a suggestion because you it's not clear what sort of interface you want the DAC to use. A "serial" DAC usually refers to something like an SPI bus from a MCU or FPGA. But it sounds almost like you want something to act as a drop-in replacement for a sound card or audio codec. That's a completely different sort of implementation though...