package from < a href =" https://blog.csdn.net/hihell" target="_blank"> The dream eraser Storm group based on the GPT "secret"
Tianwei's TM7707 ADC chip has a programmable data filter that can be used to filter noise from the acquired signal. According to the official documentation, the data filter consists of four registers(REG4~REG7) to which setting parameters can be written through the SPI interface. Here's a quick look at what these four registers do:
- REG4: Filter control register, can set data filter enable/disable, filter type, cutoff frequency, data output mode and other parameters.
- REG5: Bandwidth register, used to set the bandwidth size. The smaller the bandwidth, the better the noise reduction effect of the filter, but the sampling rate will be reduced.
- REG6: high-pass filter setting register, used to set the high-pass filter cutoff frequency.
- REG7: low pass filter setting register, used to set the low pass filter cutoff frequency.
If you want to filter the 50Hz signal, you can choose to use a bandpass filter and set the cutoff frequency to around 49-51Hz. For details about how to set parameters, see the official documentation of the chip or the example code. It should be noted that the setting parameters of the filter are related to the specific signal characteristics and need to be debugged and optimized according to the actual situation.