I am attempting to determine the frequency of an instrument from its vibration using a piezo disc and an mbed LCP1768.
I attempted this with a raspberry pi but couldn't get the sample frequency high enough to get accurate readings. I've now moved onto using an mbed which gives much higher conversion rates using less parts.
The piezo is stuck to my guitar using blue-tac and I play an E note (82Hz).
The schematic shows the set up I have. The code that runs just reads the input every millisecond and writes the values to a text file. Then I get the text file and put the values into excel and generate a graph.
I would expect to see a very flat line where the DC offset is, before the guitar is played then a wave like format for the rest centered around the offset but I get a fluctuating offset to start with with values ranging from 1.52 and 1.48, which then jumps up to 1.65 between the first 163-358 samples and then back down again. Can anyone explain how I can reduce the noise of the DC offset to get a more accurate signal?