A test for a digital envelope detector using a rectifier and a low-pass filter. The program first creates sample vectors for sinusoidal waves of 2Hz and 20Hz (considering 1kHz sampling frequency). Then, every 10ms it generates a new sample for a modulated wave (multiply both waves), and passes it through a full-wave rectifier and a Chebyshev low-pass filter with cutoff frequency of 5Hz. Then it sends the original wave and the recovered envelope through serial port in CSV format. I used 10ms interval instead of 1ms because otherwise the serial speed would have to be too high.

Dependencies:   mbed

Changes

RevisionDateWhoCommit message
0:1ba9469c839f 2014-08-26 quevedo Original program; default tip