Shop OBEX P1 Docs P2 Docs Learn Events
piezo speaker as touch sensor — Parallax Forums

piezo speaker as touch sensor

amirbaramamirbaram Posts: 13
edited 2009-01-05 11:01 in General Discussion
Would like to use a piezo speaker as a touch sensor similar to the nike pedometer.
How do I connect it to my micro?
Thanks!

Comments

  • ercoerco Posts: 20,260
    edited 2008-12-31 14:43
    Probably similar to this film, check the link and associated info. http://www.parallax.com/Store/Sensors/PressureFlexRPM/tabid/177/CategoryID/52/List/0/Level/a/ProductID/89/Default.aspx?SortField=ProductName%2cProductName

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-01-01 12:39
    You may need to examine the magnitude of the piezo speaker's output on a scope in order to engineer anything useful. The Vibra Tab puts out huge spikes that need to be limited in order to protect the I/O. But the speaker may do just the opposite and require some sort of amplification.

    Why so? With the speaker you don't have the direct physical contact driving it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    How do you like my name change?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • LeonLeon Posts: 7,620
    edited 2009-01-01 14:11
    Piezo devices need a very high impedance to generate much output, a MOSFET is typically used to interface them to an MCU.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • amirbaramamirbaram Posts: 13
    edited 2009-01-01 20:44
    Thanks so much!
    I'll try using Mosfet to interface with the speaker...

    I'm trying to figure out how the nike pedometer works to identify how long the foot is on or off the ground. Don't have a unit and looking at this tutorial: http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=41

    I see there's a mechanical switch in there - not sure if it's pressed through the plastic to identify when the the foot is on the ground? Read somewhere that the pedometer works even when not placed in the space under the foot in the nike+ and the pedometer can be placed in a shoe pocket on top of the shoe so it must be using the piezo only to identify when the foot is on the ground.

    Maybe the piezo is acting as an accel and the unit identifies the motion of the foot during stride. When the foot is on the ground there is no acceleration. But it seems like the foot strike would cause the accel output to spike so the output during motion would actually be constantly high with no actual 0 acceleration when the foot is on the ground?

    Would appreciate any input from someone who has an idea how they do it or has any suggestions - I could easily use the flexiforce sensor glued to the insole but looking for a cheaper solution and would prefer my sensor to sit in a shoe pocket. If I can get the piezo to work with the mosfet then I could do the same thing identifying pressue but again prefer the shoe pocket solution.

    Thanks,
    Amir
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-01-01 20:56
    If you use a MOSFET, be sure to add a zener diode from the source (anode) to the gate (cathode) to prevent damage to the transistor. Piezos don't produce much current, but the voltage can be quite high.

    -Phil
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-01-02 16:03
    I had the piezo speaker working without the mosfet.
    With enough induced pressure, it responded with
    changing numbers. It depends on how you want to
    activate it.

    humanoido
  • amirbaramamirbaram Posts: 13
    edited 2009-01-04 21:41
    Can you give me a part number for a suitable MOSFET and how to hook it up?
    Thanks,
    Amir
  • LeonLeon Posts: 7,620
    edited 2009-01-04 21:48
    A 2N7002 is what MSI have in their app. notes for their piezo film devices. They recommend a 10M input impedance.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/4/2009 9:54:07 PM GMT
  • kwinnkwinn Posts: 8,697
    edited 2009-01-05 01:34
    Try using a cmos inverter or other gate instead of the mosfet if you have one handy.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-01-05 02:22
    Am I missing something here? Why on earth would you need a MOSFET or a CMOS inverter when the Prop is already a high-impedance input? I would simply use a series protection resistor and rely on the internal diodes for clamping as the current is minuscule. I think that you would only want a really high impedance buffer of around 50Gohm if you want to preserve the low-frequency response as a linear transducer. Since this is being used more as a shock type sensor there isn't really any need for all that buffering. But then again, I may be missing something.

    *Peter*
  • mparkmpark Posts: 1,306
    edited 2009-01-05 03:12
    Well, this is the sandbox, not the prop forum.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-01-05 03:22
    Doh
  • LeonLeon Posts: 7,620
    edited 2009-01-05 11:01
    Piezo devices have a very high output impedance. Unless it feeds a high impedance (MSI recommends 10M) most of the signal will be lost.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
Sign In or Register to comment.