Shop OBEX P1 Docs P2 Docs Learn Events
I can't even hook up a piezo speaker! — Parallax Forums

I can't even hook up a piezo speaker!

TD-LinuxTD-Linux Posts: 33
edited 2006-01-07 17:15 in General Discussion
I wrote a simple program for the SX that toggled rb (it had lots of delay subs)
I ran it so that rb ran about ~350Hz.
I had a LED connected to it (classic circuit with LED connected between pin and Vdd) and decided I wanted to hear the sound. So I took the Parallax piezo element, hooked the positive side to Vdd, and the negative side to the same connection as the LED. (The LED resistor was connected between it and power, so there was no resistor on the element).
The instant I turned it on, the element made made a very strange whooshing sound, and about a second later everything died - probably the regulator cutting in, but I have yet to test that.

Does anyone have any info on connecting piezo elements, or more specifically, what went wrong in my circuit?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SX-Key + SX52 + Proto Board + SX-Key Software + Computer + USB to Serial Adapter + Resistor + LED = Blinky LED!
As the SX52 reaches the EOL, the blinky light slowly fades away...

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-07 00:20
    You might insert a 0.1 uF cap between the pin and the piezo element -- that works best when using the SX/B SOUND instruction and I suspect it will help you as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • TD-LinuxTD-Linux Posts: 33
    edited 2006-01-07 00:51
    Looks like I killed my voltage regulator... it puts out 3.77v unloaded. I probably killed my SX too, but I can't tell until I apply a clock source with my SX-Key and of course without a voltage regulator I can't.
    Time for a trip to RadioShack.

    What's the normal resistance of a piezo element? I get 6.2 ohms both ways. This piezo element worked before on my BS2SX. I don't want to test on that because it will be quite an expensive loss.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SX-Key + SX48 + Proto Board + SX-Key Software + Computer + USB to Serial Adapter + Resistor + LED = Blinky LED!
  • BeanBean Posts: 8,129
    edited 2006-01-07 00:55
    If you measure 6.2 ohms then that is NOT a piezo element. It's probably a small speaker.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "If I was king for just one day...I don't think I could screw things up any worse [noparse];)[/noparse]"
    ·
  • TD-LinuxTD-Linux Posts: 33
    edited 2006-01-07 01:14
    www.parallax.com/detail.asp?product_id=900-00001
    is the element I use. It was labeled 'Piezo Speaker'.
    I suppose I could have killed it along with my voltage regulator and SX, but that seems unlikely.
    Aren't Piezo elements just pieces of special metal glued together conductively? That would explain the resistance reading, but not why I don't fry my Basic Stamp with it.
    Maybe I should do a Google search on how piezo works...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    SX-Key + SX48 + Proto Board + SX-Key Software + Computer + USB to Serial Adapter + Resistor + LED = Blinky LED!
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-07 17:15
    Piezos are crystalline elements that provide electrical -> mechanical and mechanical -> electrical transduction, they are capacitive by nature (meaning they do not conduct electricity when a DC voltage is applied across its terminals (except through dielectric loss which shouldn't be above a few µA). Therefore a functioning piezo element should not have a resistance below the MΩ range, if the element also has a driver (circuitry incorporated to ease the driving of the element) then this may not be the case. If it is just a piezo element and you are measuring the ohms you are getting then your piezo is broken and may have caused a cascading failure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
Sign In or Register to comment.