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.
 
While I was rolling out a shielded cable, a though came to my mind - what happens to the current flow in the cable if there came a short between the wire and the shield in both ends of the cable? For simplicity, lets assume a 1-wire copper wire wrapped in an aluminum shield. The wire and the shield has the same cross section area. There are insulating material between them, and in both ends there is a short between them. My first thought, the total resistance of the cable would be reduced...
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
Back
Top