Skip to content

This program removes unwanted noise (60 Hz) using a digital notch filter. A sine wave enters the MSP432's precision ADC module and exits through an external DAC after being digitally filtered. Matlab is used to calculate the 60Hz notch filter transfer function which is then implemented in C.

Notifications You must be signed in to change notification settings

Ltran0325/MSP432-Digital-Notch-Filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

MSP432-Digital-Notch-Filter

This program removes unwanted noise (60 Hz) using a digital notch filter. A sine wave enters the MSP432's precision ADC module and exits through an external DAC after being digitally filtered. Matlab is used to calculate the 60Hz notch filter transfer function which is then implemented in C.

https://github.com/Ltran0325/MSP432-Digital-Notch-Filter/blob/main/main.c

Demo:

https://www.youtube.com/watch?v=BwOXYYQE5To

Notch Filter Transfer Function:

MATLAB Code:

% H(s) = (s^2 + w^2)/(s^2 + (w/Q)s + w^2)

% w = 60Hz = center frequency to reject

% Q = 3 = quality factor (increase to narrow rejection)

% w/Q = bandwidth of the rejection band

Hc = tf([1,  0, (2 * pi * 60)^2], [1, 20, (2 * pi * 60)^2]);

bode(Hc);

Hd = c2d(Hc, 1/2000)

MATLAB Bode Plot:

60Hz notch filter.

image

Oscilloscope (Scopy):

60 Hz is filtered.

image

About

This program removes unwanted noise (60 Hz) using a digital notch filter. A sine wave enters the MSP432's precision ADC module and exits through an external DAC after being digitally filtered. Matlab is used to calculate the 60Hz notch filter transfer function which is then implemented in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages