Electronics > Beginners
how arbitray waveforms are generated
ant17:
Hi guys i have a question thats been bugging me. I want to build a arbitrary waveform generator and have been looking at some proffesional ones. like the ones from keysight and others most of them load their arbitrary waveforms from what they call waveform memory Then to some sort dac but .My question is how are the values calculated for a given waveform for the represented digital values in memory and even in dds how the values calculated can anyone help.
MarkF:
I'll give you a rough idea how to do it.
But, the real problem comes into being able to send out the samples fast enough.
- To start, you generate a table of samples that represents one period of the waveform.
- Then, you will write each sample to a DAC at a fixed rate between each write.
Repeating the table when you reach the end.
- The rate you write the samples will determine the frequency of the waveform.
- Then, the DAC output would go to an op-amp for scaling and DC offset.
As an example:
Consider a single cycle of a sine wave which you would write to a 8-bit DAC.
Assuming a DAC like an MCP4802 which outputs a 0 to 4 volt signal.
As you sequence through the table, the DAC will generate the sine wave one cycle at a time.
Where writing a 0 to the DAC outputs 0 volts and writing a 255 to the DAC outputs 4 volts.
The table represents one cycle of the waveform which will be repeated.
You can put any waveform shape you wish to generate into the table (hence "arbitrary" waveform).
Like I said, the frequency is a function of the rate you sequence through the table.
There are two ways to change the frequency.
- One is the rate you write each sample to the DAC.
- The second, is by using a constant sample rate but skipping samples (i.e. every other sample or every third sample).
- Or a combination of both depending on how fine the samples are.
This works fairly well for a micro-controller to clock the samples to a DAC to generate audio frequencies. For higher frequencies, the process really needs to be done in hardware (like a AD9834 DDS chip for instance). In order to generate a frequency, you would want to have at least 10 samples per cycle. Therefore, the rate you write samples would be at least 10 times faster than the frequency you want to generate.
In my opinion, arbitrary waveforms are over rated. In the majority of cases, a sine, triangle or square wave will satisfy test conditions.
rs20:
Or use this, which has built-in memory:
https://www.analog.com/en/products/ad9102.html#product-overview
joeqsmith:
--- Quote from: ant17 on November 22, 2019, 11:14:46 pm ---Hi guys i have a question thats been bugging me. I want to build a arbitrary waveform generator and have been looking at some proffesional ones. like the ones from keysight and others most of them load their arbitrary waveforms from what they call waveform memory Then to some sort dac but .My question is how are the values calculated for a given waveform for the represented digital values in memory and even in dds how the values calculated can anyone help.
--- End quote ---
Looking at your question form a completely different angle, I don't always calculate the values. Sometimes I will capture live signals with a DSO (or other means) and use that to drive the Arb. I designed my first Arb and would draw the waveforms on paper and scan them in. Nowdays, I use Labview to create the waveforms.
rstofer:
The values are given in a waveform file. The real question is 'how is the file created?'. First, the format needs to match the file requirements but let's assume that's no big deal.
As to the values: Compute them with Fortran, C or <whatever>.
Navigation
[0] Message Index
[#] Next page
Go to full version