I am trying to make a project for detecting vibrations from a guitar using a piezo, and ESP32 for frequency analysis, I am not too experienced in electronics but I have gotten it to work under very specific circumstances.
I have buffered the piezo through an op-amp in non-inverting configuration however the only time I am able to detect anything is when the piezo is sandwiched between the breadboard and the guitar unsupported, I know it is horrible practice but it works. Ideally I want it all to be stuck onto the guitar as to not harm the user experience, I have tried taping the bottom, taping the top, both on the ceramic and the brass on all orientations but it won't output anything, I have tried copying the 'detect a knock' demo but it also won't output anything to ADC unless the piezo is underneath the breadboard. I am also using an ESP32, with the piezo outputting to pin 34 but I doubt this is the culprit.
As @Railroader has requested post an annotated schematic showing exactly how you have wired this. Be sure to properly label all components. You are using an Op Amp, Which one, there are hundreds if not thousands of different ones and configurations. You are using a piezo, post a link to its technical details.
I am not a guitarist, but as I understand it, mounting the piezo pickup
directly under the bridge with minimal adhesive, combined with proper
pre-amplification and signal processing, will give the best results.
In the end, the output quality is what matters. Whether the amplifier stage
is inverting or non-inverting depends entirely on the circuit design and
has no inherent advantage either way.