Voltage output from DAC module, Obtaining the Pk-Pk Value

AI Thread Summary
To obtain the voltage peak-to-peak value from a sine wave output of a DAC module, one approach is to use an ADC to measure the analog output and then calculate the peak-to-peak value through code. The moving average filter, implemented in code, helps reduce noise but may affect the output depending on its averaging period. Calculating the RMS of the sine wave and multiplying by the square root of two can also provide the peak value, but the sampling rate should exceed ten times the sine wave frequency for accuracy. If the digital data is accessible, processing it directly can eliminate the need for an ADC. Ultimately, understanding the filter's impact on the output is crucial for accurate peak-to-peak measurement.
zanner
Messages
6
Reaction score
0
I have a sine wave produced as an output, which varies. This sine wave has been filtered by a moving average filter. From this output, coming out of a DAC module, I need to obtain the the voltage peak-peak value and store it preferably in an array.
How can I do this?
More importantly how can I obtain my voltage peak-peak value?
 
Engineering news on Phys.org
That depends entirely on how the moving average filter works . Can you tell us more?
 
anorlunda said:
That depends entirely on how the moving average filter works . Can you tell us more?

The moving average filter is done via code. Essentially I am taking data points from the ADC module and storing these into an array. Each time I get a new data point the moving average is calculated. The calculated data is then passed onto the DAC module to deal with and output it.

Essentially this is being done to filter out noise.
 
  • I'm confused. You have a signal that you filter and send to a DAC as an output. Then you want the peak value of the output to input again to store in an array.
  • The average of a sin over an integer number of cycles is zero by definition.
  • Despite the confusion I think RMS is your answer. Calculate the RMS of the sin and multiply by ##\sqrt 2## to get peak. Look up RMS on Wikipedia to see how to do that. Your sampling rate should be more than 10x the frequency of the sin.
 
A moving average filter is a low pass filter. If the period over which the average is taken is small relative to the period of the sin wave then it will have little effect on the peak to peak value. At the other extreme (long averaging time) you get zero output as anorlunda says.

However all this appears irrelevant to your question which is...

I need to obtain the the voltage peak-peak value and store it preferably in an array.
How can I do this?
More importantly how can I obtain my voltage peak-peak value?

You could put the analogue output of the DAC through an ADC and use code to calculate and log the peak to peak value. Peaks can be detected by looking for the point at which the slope changes from positive to negative or negative to positive.

If you already have access to the digital data going to the DAC (eg all this is being done on one microprocessor) you could process that data to measure the peak to peak values avoiding the need for an ADC.
 
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top