Piezo speaker to detect sound

Discussion in 'The Projects Forum' started by cdoty, May 8, 2014.

  1. cdoty

    Thread Starter New Member

    May 2, 2014
    I'm trying to use a piezo and an analog input on my arduino uno to detect sound from a tone generator on my iphone. So far, I've read two tutorials which use the piezo in a similar fashion to detect knocks. I attached an image of the circuit diagrams for both tutorials. I think I can work with those tutorials to build my project but I'd like to know more about why the piezos in the tutorials are hooked up to the arduino the way they are. For example,why (in the configuration on the left) is a resistor placed in parallel with the piezo?What are the differences between the two configurations? Also, if it makes any difference, the configuration on the left was from a tutorial that used a piezo that had a red wire and a black wire (polarized?) where as the configuration on the right used a piezo that simply had two terminals. Based on my understanding of how piezos work (voltage is created between two terminals upon deformation of pizeoelectric material) why can't you just plug one end of the piezo into the analog input and the other into ground (with a DC offset). I think the analog input has a resolution of about 4 mv and this can even be changed through code to as low as 1 mV I believe. Could the signal generated by the pizeo be smaller than this? It seems similar to how a microphone works and I figured since signals produced by microphones were in the mV range the signals produced by a pizeo might be in that range as well.
  2. wayneh


    Sep 9, 2010
    Any of those might produce a usable signal with the right choices for R. The far left circuit loads the piezo and I believe this helps filter out low frequency. The other two have a bias voltage that you will need to average and remove to tease out your signal.

    If it was me, I'd probably start experimenting, or go find some references describing the results others have posted.