I use an analog input from an Arduino to read the value from a piezo plugged in parallel with a 1M ohm resistor.
I followed this tutorial from Arduino: https://www.arduino.cc/en/Tutorial/Knock
Here is my schematic:
It worked perfectly until I decided to use a 1m cable between the piezo scheme (piezo || resistor) and the analog input.
With a short cable, I read 0 when there was no vibration nor activity. But when I change the length to 1m, I always read values higher than 0... This input is floating.
What would be the solution so I can read a precise value and stop this input from floating?