Project didn't work with resistor but works with out one. Bad for Arduino???

So thats basically it, the project I am working on is a laser tripwire that sounds a piezo buzzer. The plans I used had me going from pin 11 to piezo + then the negative to ground via 10k resistor. The buzzer would sound but almost inaudibly. I then removed the resistor and the buzzer worked properly, and a 330 resistor seemed to slit the differences.

My question is by bypassing the resistor am I doing harm to my Arduino???

Thanks

Slit. I think you mean Split.

What is the resistance of your piezo?

I use piezo speakers that are 1K, I add a 100R resistor in series.

Edit. Piezos are better a some frequencies that others, try 3400 to 4200Hz. .

I wonder whether you are using a piezo buzzer something like this that requires a DC supply when the circuit you are using is perhaps for a piezo transducer something like this that requires to be driven with a square wave.

H-Good: My question is by bypassing the resistor am I doing harm to my Arduino???

Rule of thumb: Output pins on 8-bit Atmega boards can deliver 20 mA.

How much current does your piezo buzzer draw without using the resistor? If it is less than 20 mA ==> no problem.

LarryD: Piezos are better a some frequencies that others, try 3400 to 4200Hz.

+1 Definitely worth checking out the frequency response of the buzzer before concluding it's a circuit problem.

Here are the specs of the Piezo:

The RadioShack 12VDC (6-16V) Piezo Buzzer is used for a wide variety of applications, including audible alarms and distance testing. This siren-like 100dB Piezo buzzer operates on 3-16VDC, carrying 58mA at 12V with an intense buzzer tone rating of 2500Hz.

Also I think would need go from pin 11 to the positive via the resistor NOT the negative to ground via resistor right???

I think it'd be a very, very good idea to measure what sort of current that thing takes when powering it directly from a 5V source. Got a multimeter available?