# Piezoelectric showing strange, slowly fluctuating periodic background noise

We are trying to detect mice's licking using a piezoelectric attached to a metal spout tube that delivers water.

It's kind of working in the sense that we can detect licking, but it suffers from strange slow oscillations in the baseline (see screenshot 1 below).

The sinusoidal or spindle-like shape is the baseline signal without licking, and larger spikes are the detected licking of a mouse. As you can see in this image and the one below without licking, the frequency of the spindle-shaped oscillations is slowly fluctuating between <0.1 to 0.25 Hz.

The readout of licking is still visible, but it looks as though the amplitude of the signal is proportional to the amplitude of the spindle-shaped baseline oscillation. The licking spikes are smaller at the edge of the spindles, but become larger at the belly of the spindles.

So we cannot really know the exact amount of deflection of the piezoelectric by the mouse's licking. It appears that the signal gain of the piezoelectric is fluctuating, rather than the fluctuating noise is simply added to the signals.

We have tried to fix this problem by trying various ways of grounding, but so far not working.

Couple of things we've considered/tested are:

• The piezoelectric attached to the metal spout tube is not insulated from the metal tube, and the metal tube is creating problems?

• Is this still a grounding problem? How can grounding affect the gain of piezoelectric?

• Could the metal tube or piezoelectric work as an antenna and pick up signal/noise from distant objects?

• What is the source of this weird rhythm?

• The sampling frequency of the piezo readout is 100 Hz.

• Mains frequency is 50 Hz.

If you have any advice on this, or have seen something similar, let us know, please! Thanks.

There were comments about the gain change or piggybacking on baseline noise.

I can do a proper analysis using the recorded data later, but for now just a quick look at the screenshot above demonstrates that the amplitude of licking "spikes" subtracted with the "spindle shape baseline noise" is increasing towards the belly of the spindle (see the red numbers; they would be more or less constant if it were piggyback and if the pressure given by licking is stable, but it steadily increased).

We can't be sure about whether the pressure of licking is constant from this small example, but I've seen this pattern of evolving spike height in relation to, or in the spindle-like baseline, and that's why I think it is not piggyback for the moment.

• I'd first look for the obvious, acoustic signals which may be coupling into the containment structure. It looks like around 250-400Hz, quite likely resonating with a similar vibration or with a part of the structure to produce the beat pattern shown above. I don't think the gain is changing, it's more that the peaks of the signal are piggybacking on the noise. This leads me to suspect your scope speed is too low for the noise source and you might be aliasing higher frequency signals down with your slow scope sampling speed. Oct 29, 2019 at 20:33
• Mains hum aliasing with your sample rate. Oct 29, 2019 at 22:33
• How are you amplifying the piezoelectric element? Oct 30, 2019 at 14:27
• I concur with @BrianDrummond; if you were to lock your sample rate to the mains frequency (so it is truly double the mains frequency) it would be (mostly) eliminated. Oct 30, 2019 at 14:56
• Thank you, guys. Mains hum noise is at 50 Hz and the sampling rate is 100 Hz. I thought aliasing is most prone to happen when the sampling rate is lower than the signal, but maybe not necessarily? In our case, Nyquist frequency is 100/2 = 50 Hz, so it's just at the borderline to get aliasing noise?. Oct 30, 2019 at 21:35