Multiple noise sources are relevant for this detector. The dominant higher-frequency noise source is the USB connection. The lowest-frequency component in the USB signal is the 1 kHz polling rate. At this frequency, passive RC filters are very doable and are used to attenuate noise from the USB power supply.
Unfortunately, there are also noise sources below 1 kHz. The most relevant ones are the mains power cables all around us. As I'm in Europe, they emit electromagnetic fields at 50 Hz and multiples of 50 Hz (overtones).
One important way of reducing low-frequency noise is to keep a decent distance between the device and any power cables or powered devices. Using a battery-powered laptop also helps to reduce the coupling of 50 Hz noise into the detector.
Building passive filters for these low frequencies requires large and expensive capacitors and is therefore not feasible here. Digital filters, however, can be designed for these low frequencies. The effect of a simple digital high-pass filter is shown in the figure above. This only works well when the low-frequency noise is small and does not reach the upper or lower limit of the amplifier or digitizer. As long as the device was not placed directly on a power supply, the noise level was significantly smaller in all measurements I performed so far.
Using a digital high-pass filter has the added benefit of removing any offsets and nicely centering the signal around zero.
The firmware for the RP2040 microcontroller implements a simple first-order low-pass filter. With a 125 MHz clock speed, the microcontroller is capable of continuously filtering the 500 kHz input signal.
In designing the high-pass filter, it is important not to significantly attenuate the input signal. The figure below shows an average pulse. Looking at the spectrum, we can see that most of it is above 1 kHz. So, adding a 1 kHz high-pass filter is a good option to get rid of the mains hum without losing much of the signal.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.