hi, i want the exact envelope of the 40khz signal . i am using low pass filter but i am not getting the signal clearly. suggest me a solution. you can see the attachment.
thanks
You can get a pretty good result using a low pass filter followed by a Schmitt trigger to generate clean logic transitions. Select the cutoff frequency of the LPF so that the resulting 40 kHz ripple has a low enough amplitude to prevent the Schmitt trigger from switching.
I don't know what the amplitude of your signal is, so I just picked some values and did a small simulation as an example.