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?
Best Answer
Most of the designs I see in the comments seem overkill for what you are trying to do (BTW: you do realize you are applying negative voltages to your µC, right?). A very simple amplifier could do the trick.
Try this configuration, which is powered from the remote bias node on the µC side:
simulate this circuit – Schematic created using CircuitLab
If the gain is excessive for your application or you want to DC-couple to the piezo, you can add a resistor on the source of the FET and/or remove C2.