Pages: [1] 2   Go Down
Author Topic: Do I need a resistor with a piezo?  (Read 4886 times)
0 Members and 1 Guest are viewing this topic.
Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi.

I don't know a whole lot about wiring up electronics.  I've built a few circuits, but I don't have a firm grasp of what exactly is going on yet.

Anyway, i'm thinking about getting a piezo speaker to use with my arduino. One of these two probably:

http://www.projectsunlimited.com/audioproducts/movieclips/products/drawings/AT-1438-TWT-R.pdf
http://www.projectsunlimited.com/audioproducts/movieclips/products/drawings/AT-1750-TFL-LW95-R.pdf

Both look like they can run off 5v, so hooking them up to one of the analog pins should be okay, but I noticed the smaller one can only handle 1ma of current, and I know the Arduino pins can put out much more than that.

So my question is, just because the Arduino pro mini CAN put out 40ma on a pin, WILL it, in the case of these piezos?  Do I need to stick a resistor in series with them to prevent them from being burned out, or what?  If not, would I need to do that if they could handle more than 40ma?


I was also wondering how well a magnetic transducer would work with the Arduino.  Would that need to be amplified like a speaker, or is it interchangable iwth a piezo?
« Last Edit: February 11, 2010, 05:41:32 pm by scswift » Logged

MD, USA
Offline Offline
God Member
*****
Karma: 2
Posts: 663
A jack of all trades and a master of none!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you connect the speaker to pin 13 then No. You'll be using the internal resistor on that pin. Any other pin and it would be a good idea to have a resistor so you don't blow the speaker.
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thats not really great advice, not all arduinos have a resistor on pin 13 (mine doesnt)

yes you need one
Logged


Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How large of a resistor should I have for each of those?  I'm thinking I need a larger one for the one which can only handle 1ma?

Also, I have the pro mini 5v from sparkfun, does that have the resistor on pin 13?  I don't see any mention of one on the hardware page.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
thats not really great advice, not all arduinos have a resistor on pin 13 (mine doesnt)

yes you need one

Actually it's worst then that, it's very poor advice and false and misleading. Even boards that have an internal resistor/LED wired to pin 13, does not protect pin 13 at the connector, which wires directly to the chips pin. So you have no more protection on pin 13 then any other of the digital pins as far as potential damage if you try and draw too much current from the pin. Refer to the published schematics if you don't understand this.

As far as do Piezos requiring a current limiting resistor, I don't think so. They are constructed more like a capacitor with no DC resistance, just an AC impedenace. However one really should refer to it's datasheet to be certain.

Lefty

« Last Edit: February 11, 2010, 07:33:32 pm by retrolefty » Logged

Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, I'm gonna try to calculate the resistor I need myself since I really need to learn how to do this.  If someone could tell me if I've got this right, it would be a big help.

So, my little piezo there can only handle 1ma.  1ma is 1/1000th of an amp.  So, I (being in amps, not milliamps) = 0.001

V = 5v because that's what's coming out of the pin.

So, if ohms law says R = V / I then:

5 / .001 = 5000

So R being in ohms, I need a 5000 ohm resistor to protect my piezo which can handle only 1ma, from my 5v source which can safely put out up to 40ma.

Is that right?

[edit]

Also, based on that, I calculate that larger piezo which can handle up to 9ma requires a 556 ohm resistor.
« Last Edit: February 11, 2010, 07:44:23 pm by scswift » Logged

B0100111001000011, USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1503
I'm confused.  Wait, maybe not..
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I agree with Lefty.  It's an unfortunate misconception.

I can't check the schematics right now, but I think the resistor on some boards is connected in parallel with the pin header itself to the chip's output.

[edit]Yup, that's how it is.[/edit]

Quote
So R being in ohms, I need a 5000 ohm resistor to protect my piezo which can handle only 1ma

For any other component, that'd be correct, but as Lefty said, I don't think you need one for a piezo.
« Last Edit: February 11, 2010, 07:47:43 pm by Tchnclfl » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is that right?

Correct as your logic goes, however I'm not sure DC calculations are what is called for on a piezo. Your calculated resistor will certainly prevent any damage to both the pin and the piezo, however the volume may be very small. You might want to experiment with a 5K pot (use to wiper and one end terminals) and adjust down from 5K until you get a volume that is useful, or until you let the magic smoke out.  smiley-wink
Lefty
Logged

Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought you just said you didn't need a resistor with a pot though?

I posted the datasheets above.  They don't make any mention of a resistor.
« Last Edit: February 11, 2010, 08:07:02 pm by scswift » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I thought you just said you didn't need a resistor with a pot though?

Not sure I understand your question. I'm proposing instead of using a fixed series resistor, use a 5k pot wired as a variable resistor that you can use to adjust for desired volume.

I posted the datasheets above.  They don't make any mention of a resistor.

The datasheet is a little sparse and shows no typical hook-up. My gut says you can wire it directly to an Arduino digital output pin without needing a resistor at all, however that's just a guess and I would never recommend something like that unless I've tested it out myself.

Lefty
« Last Edit: February 11, 2010, 08:16:45 pm by retrolefty » Logged

Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't want to adjust volume, I just don't want to blow up the arduino.  

A 5K pot would let me adjust the resistance, but it won't really tell me what a safe resistance is, if in fact, a resistor is required.
Logged

Manchester, New Hampshire
Offline Offline
Edison Member
*
Karma: 4
Posts: 1359
Propmaker
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hm...

This page says you shouldn't put over 100ohms on a piezo because it affects the high frequency response of it:

http://members.misty.com/don/pzfix.html


Sheesh.  You'd think it wouldn't be so hard to get trustworthy info about something so basic as hooking up a piezo speaker. :/
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

welcome to electronics, it all depends
Logged


0
Offline Offline
Edison Member
*
Karma: 8
Posts: 1411
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
my little piezo there can only handle 1ma
your piezo consumes 1mA

If you have a source capable of providing 5V at 10A (like a PC power supply) and connect it to your piezo, your piezo will still take only 1 mA.

Where is Grumpy_Mike when you need him?  smiley

Quote
V = 5v because that's what's coming out of the pin.

So, if ohms law says R = V / I then:

5 / .001 = 5000

So R being in ohms, I need a 5000 ohm resistor to protect my piezo which can handle only 1ma, from my 5v source which can safely put out up to 40ma.

You just calculated the impedance of your piezo.
« Last Edit: February 11, 2010, 09:20:15 pm by florinc » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 200
Posts: 12782
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Where is Grumpy_Mike when you need him?
He's around.  You just have to search for him.   smiley-wink

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1255352439/all
Logged

Pages: [1] 2   Go Up
Jump to: