Go Down

Topic: Do I need a resistor with a piezo? (Read 5893 times) previous topic - next topic

scswift

Feb 11, 2010, 11:16 pm Last Edit: Feb 11, 2010, 11:41 pm by scswift Reason: 1
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?

digimike

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.

Osgeld

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

yes you need one
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

scswift

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.

retrolefty

#4
Feb 12, 2010, 01:29 am Last Edit: Feb 12, 2010, 01:33 am by retrolefty Reason: 1
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


scswift

#5
Feb 12, 2010, 01:41 am Last Edit: Feb 12, 2010, 01:44 am by scswift Reason: 1
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.

TchnclFl

#6
Feb 12, 2010, 01:42 am Last Edit: Feb 12, 2010, 01:47 am by Tchnclfl Reason: 1
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.

retrolefty

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.  ;)
Lefty

scswift

#8
Feb 12, 2010, 01:56 am Last Edit: Feb 12, 2010, 02:07 am by scswift Reason: 1
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.

retrolefty

#9
Feb 12, 2010, 02:15 am Last Edit: Feb 12, 2010, 02:16 am by retrolefty Reason: 1
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

scswift

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.

scswift

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. :/

Osgeld

welcome to electronics, it all depends
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

florinc

#13
Feb 12, 2010, 03:17 am Last Edit: Feb 12, 2010, 03:20 am by florinc Reason: 1
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?  :)

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.

Coding Badly

Quote
Where is Grumpy_Mike when you need him?

He's around.  You just have to search for him.   ;)

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

Go Up