little piezo on 4.0 question.

jim lee

Well-known member
Back in the Teensy 3.2 days I could hook a lirttle piezo speaker to an output pin, call tone() and away we go. Now this 4.0 has these 3V pins and limits. Is it still ok to do this? Or do I need to toggle a transistor for this?

Thanks!
 
Yes, Teensy 4.0 has tone().

Output mode is similar, so you should see (hear) similar results.

Many of those piezo transducers can output a large positive or negative spike voltage if it is struck by a hard object. Whether yours does this, I can't know. But if it can, both Teensy 3.2 and Teensy 4.0 could potentially be damaged, especially if the pin is configure for input mode or hasn't been configured at all.
 
Oh, didn’t know about them creating a current.

My worry was that they would allow too much current through the pin when using tone() and burning out the pin.
 
Piezo elements typically electrically look like a type II ceramic capacitor (which is kind of what they are) in parallel with a current source, and its best to add some protection around them. All type II ceramic caps are microphonic.
 
Back
Top