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

Click For Summary

Discussion Overview

The discussion revolves around obtaining the peak-to-peak voltage value from a sine wave output of a DAC module that has been filtered using a moving average filter. Participants explore methods to calculate and store this value, addressing both theoretical and practical aspects of the process.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant seeks guidance on how to obtain the peak-to-peak voltage value from a sine wave output after filtering.
  • Another participant emphasizes that the method of the moving average filter is crucial for understanding the output characteristics and requests further details about its implementation.
  • A participant expresses confusion regarding the purpose of calculating the peak value after filtering, noting that the average of a sine wave over complete cycles is zero and suggests using RMS to find the peak value.
  • It is proposed that the moving average filter acts as a low pass filter, with its effect on the peak-to-peak value depending on the averaging period relative to the sine wave period.
  • One suggestion involves using an ADC to measure the DAC's analog output to calculate the peak-to-peak value, while another suggests processing the digital data directly if accessible.

Areas of Agreement / Disagreement

Participants express differing views on the relevance of the moving average filter's characteristics to the peak-to-peak value calculation, and there is no consensus on the best method to obtain this value.

Contextual Notes

Participants note the importance of the sampling rate in relation to the sine wave frequency and the potential implications of the moving average filter's design on the output signal.

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.
 

Similar threads

  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 15 ·
Replies
15
Views
5K
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 28 ·
Replies
28
Views
6K
  • · Replies 10 ·
Replies
10
Views
4K
Replies
8
Views
2K