Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
What does the 5Vpp look like? Is it oV to 5V or is it -2.5 to +2.5 ? Is it AC coupled through a capacitor?
I assume the 5Vpp signal must change in value. Why measure some that you know to be 5Vpp? So when the signal changes what happens? Will it change to 0 to 4.8V? or does it change like this (0.1 to 4.9V)?
It is safe to assume it is 50% on 50% off. (0/5V)
I think it is 0 to 5V and DC coupled. I think you ADC reads form 0 to 5V but don't know.
In the schematic:
Signal source; 0V 5V 10hz
The diode catches the peak signal. The capacitor stores the energy.
There will be some voltage loss because the diode. Vout is 4.7 volts. This is how a volt meter measures AC voltage.
Green trace is the 5Vpp signal. Blue trace is output.
tonytnnelectrotech: How long are you willing to wait for the dc level to accurately represent the average value of (pulse width/pulse period) before sampling it with the ADC? (This has to do with how aggressive the filtering has to be.)
How accurate is the 5V peak value of the pulse train? (Does it need to be normalized to the the ADC's Vdd supply in order to make the reading accurate.)
As long as every one had a different idea as what is wanted:
"square wave" usually = 50% low, 50% high
"fixed width" = on for 0.05 seconds and off for a variable amount of time so the frequency can be from 3hz to 10hz. Example: fixed on time, variable off time. (not 50%, 50%)
"continuous signal" A square wave is continuous if it is never turned off. A triangle wave is also continuous if it goes forever. I am certain that who ever made up this assignment wants a output that never changes voltage; that is not stated.
What is almost clear is that Tony has given up on us and gone away.
As the saying goes :
Describe the problem correctly, and you have the problem halfway solved.
Unfortunately on this and most of the technical forums I lurk, stating or describing a problem incorrectly is commonplace.
And I am not talking about members whose mother tongue is not English. Those I can understand if they have a poorly translated sentence.
No, I am talking about individuals which do not understand what they want to accomplish or why they want to do it a particular way.