1
\$\begingroup\$

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:

enter image description here

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?

\$\endgroup\$
  • 2
    \$\begingroup\$ I suspect you will need a piezo pre-amp that will condition the signal for transmission. They aren't complicated. But given the high impedance of the piezo, looking probably at a JFET pre-amp. \$\endgroup\$ – jonk Nov 16 '18 at 21:42
  • 1
    \$\begingroup\$ The first search I did produced this jfet preamp for piezos. However, this one uses the phantom power used in XLR microphones and wouldn't be appropriate for your use here. But it gives you an idea. And it is a pretty fancy design. I'm kind of curious about studying it more carefully. Anyway, you'd be considering something much easier, I think. More like what's used with electret microphones, I think. So include jfet and electret in your searches, too. \$\endgroup\$ – jonk Nov 16 '18 at 21:56
  • 1
    \$\begingroup\$ @ChristopheGudlake I think you should experiment a bit unless you feel able to do the design, yourself. That schematic you found is more like what I was thinking about. You may not require anything additional at the MCU end. But a DC path at the MCU end is probably a good idea. So you might try your 1 Meg idea just to provide something simple there. Just a series capacitor alone is probably not as good. So yeah. Add something. \$\endgroup\$ – jonk Nov 16 '18 at 22:23
  • 1
    \$\begingroup\$ It is important to know what you actually want to amplify, i.e. what is the nature of the signal that actually contains the information. In a piezo sensor that is charge. You amplify charge with a charge amplifier which converts the charge generated in the piezo sensor into for instance a voltage. The simplest circuit for this is a well-biased low noise mos- or j-fet with low impedance gate capacity and negative feedback through a capacitor between drain and gate which is much larger than the drain-gate parasitic capacitance. The smaller this capacitor, the larger the amplification. \$\endgroup\$ – joe electro Nov 16 '18 at 23:11
  • 1
    \$\begingroup\$ The \$ R C \$ time of the filter should be (much?) lower than \$ 20 \$ or \$ 16.7 \, ms \$. Say you make it \$ 5 \, ms \$, then with your \$ 1 \, M \Omega \$ resistor, the input capacitor will be \$ 20 \, ms/1 \, M \Omega = 20 \, \mu F \$. And don't forget to decouple the input for DC with a capacitor. An example can be found here: www.ti.com/lit/an/sloa033a/sloa033a.pdf (charge mode amplifier) or here: www.ti.com/lit/ug/tidu765/tidu765.pdf . \$\endgroup\$ – joe electro Nov 16 '18 at 23:29
1
\$\begingroup\$

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:

schematic

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.

\$\endgroup\$
  • \$\begingroup\$ I don't see where am I applying negative ( - ) voltage to the uC? Could you explain? \$\endgroup\$ – Christophe Gudlake Nov 17 '18 at 13:56
  • 1
    \$\begingroup\$ @ChristopheGudlake the output of the piezoelectric sensor is capacitively coupled, so it swings both positive and negative. It is also high-impedance so it might not be problematic, however a good wack could also mean hundreds of volts and considerable energy so a protection zener might be advisable. \$\endgroup\$ – Edgar Brown Nov 17 '18 at 14:31
  • \$\begingroup\$ I finally did it with your schematic. I still get noise on my ADC input. I will try to use a smaller resistor to act as a pull down. For the moment I have a 1M ohm. \$\endgroup\$ – Christophe Gudlake Feb 16 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.