Skip to main content

Questions tagged [piezo]

refers to the prefix of Piezoelectricity.

Filter by
Sorted by
Tagged with
1 vote
2 answers
129 views

How do you use two piezos at the same time?

I'm trying to replicate a short music clip with two piezos, and I want them to play at the same time. While the right piezo is playing, I want the left one to still be looping. The problem is, I'm not ...
1 vote
2 answers
166 views

Using 2 piezo buzzers to emit the same tone with phase difference

For a physics project, I want to record the effect of 2 speakers emitting 100hz at different phase differences. Trouble is, the Arduino can only send one tone() signal at a time. How do I create a ...
0 votes
1 answer
130 views

Drum game controller - Problem with Piezo inputs [closed]

I currently try to build some Drums for the game Clone Hero. The problem that I have is that I can't use both of my Piezo inputs that I have hooked up at the same time. I have a Arduino Pro Micro and ...
2 votes
3 answers
721 views

How do I make my piezo buzzer only hum once without repetition?

I have a problem with getting my buzzer to only do the tones I programmed in once. I know I have to add some sort of code but I'm relatively new to this so I don't really know. I want it to start ...
1 vote
2 answers
565 views

Using millis() instead of delay() when playing a melody

I want to make my Arduino to play several simple melodies, and also be able to skip a melody by pressing a button and go on with the next song. therefore I cannot use delay() because the code should ...
1 vote
1 answer
145 views

Multitasking with Arduino?

I am making a Christmas Tree with Arduino. I found a 12 led chaser code on internet so I made 12 rows of leds and hook them up to my Arduino pro mini. They are working just fine. However, I also want ...
0 votes
2 answers
3k views

Arduino piezo-buzzer melody for car alarm

I would like to play car alarm sound through Arduino buzzer - something like this https://youtu.be/nuPHwijMsIg Does anybody have a library for such melody?
1 vote
0 answers
217 views

Piezo sensor requires parallel or pull-down resistor?

Apologies but I didn't happen to find ultimate answer to this. I'm trying to make a simple piezo sensor (https://www.sparkfun.com/products/10293) which triggers something (e.g. a sound or lights up a ...
1 vote
0 answers
58 views

Arduino IDE on Attiny45: What kind of power does a chip need?

I have this little AtTiny45 which I'm loading a program with Arduino as ISP. My goal to use this chip along with a op amp, a piezo buzzer and a press button, and have it automatically sleep between ...
2 votes
0 answers
673 views

1.7 MHz generator for a water atomizer

I'm creating a controller for a small greenhouse, I have a DHT22 for measuring and two relay module that controls heating and cooling systems, and I will use a piezo to produce humidity when it goes ...
0 votes
2 answers
52 views

Including keypad library removes sound from my piezo element

I am using the keypad library to include keypad and input numbers. when a specific number is entered a sound must be made. However when I input using the serial monitor , sound is working. But when I ...
0 votes
0 answers
76 views

Speaker & Piezo when beeping both cause CapacitiveSense to sense

I am using this speaker: CUI part number CSS-I4B20-SMT-TR as an alarm on a clock using atmega328 chip and Arduino IDE with the tone function. Works great. I am also using Arduino CapacitiveSensor.h ...
0 votes
1 answer
3k views

Sound quality is poor using a piezo in TinkerCad

I did a quick search and couldn't seem to find this question posted already, but I'm sure it must have so forgive me if it's a repeat. I'm using a piezo and Arduino on TinkerCad to produce notes ...
0 votes
2 answers
587 views

Piezo buzzer not sounding well with ATmega328

I am using an ATmega328 to drive a 16x2 LCD, a LED, and a piezo buzzer. Piezo buzzer needs to buzz after every 5 seconds. But it doesn't make a nice sound it just gives out a faint buzz. Suspecting ...
0 votes
1 answer
213 views

Behaviour of tone() not as expected within while loop

I have a smoke detector with a piezo buzzer. I want to operate the arduino in low power mode so that it will last on a 9V battery. I've attached an interrupt, and when the digital output of the MQ-2 ...
0 votes
1 answer
332 views

Why does analog sensor "hum" when plugged into common ground?

I have the ground for an SD card module, LED, and piezo sensor all plugged into the same ground rail. When doing this I get a low "hum" in the piezo readings where instead of reading ground voltage (0)...
4 votes
2 answers
914 views

Noise on piezo analog read due to Arduino power supply

I am making a device that measures temperature and vibrations and records the values onto an SD card. It will be a standalone device. The hardware used: - Arduino Uno - PCF8523 RTC clock - MAX3186 + ...
0 votes
0 answers
510 views

How to stop the screeching noise that comes from buzzer?

I use sfm-27 dc 3-24v Buzzer. It sounds fine if i close the buzzer using my palm but if i doesn't close it, it will make a screeching noise. I play melody using the buzzer so the sound is important. ...
-2 votes
1 answer
5k views

how to set buzzer on and off

I have a project that require me to use magnetic contact sensor. I will put the sensor at the door. So the idea is i want every time someone open the door, the buzzer will make a sound, but it will ...
1 vote
0 answers
110 views

Shall an active piezo buzzer module draw as much as 10mA on its signal pin?

I have connected an active piezo buzzer to my arduino: KY-012 Active buzzer module. I was a bit surprised that it drew like ~10mA on the signal pin from my nodemcu, which I find a bit weird, since ...
1 vote
1 answer
1k views

Proper use of the tone() function within the loop () function [duplicate]

I am trying to have my sketch run a short series of tones (melody) through a Piezo buzzer after a selection is made by the user. I am getting a compilation error with my use of the tone function in ...
0 votes
1 answer
250 views

Serial monitor doesn't work with piezo buzzer

So I can't see the distance of the proximity sensor anymore as soon as I type the code for the piezo buzzer. I've tried many things but it doesn't work.. Can anybody help me fixing this? int trigPin =...
0 votes
3 answers
11k views

Passive buzzer works with analogWrite(), but not with digitalWrite(). It also has constant static noise

I have a YL-44/MH-FMD passive piezo buzzer hooked up to an ESP8266/NodeMCU. It's connected like this: Buzzer ---> NodeMCU - GND ---> G - VCC ---> 3V - I/O ---> D2 This code makes a clear beep. ...
0 votes
2 answers
1k views

Won't break out of for loop

I'm new to Arduino and I'm trying to use PWM to generate a tone through a buzzer. I've created a for loop, however, the for loop doesn't seem to break when the variable ms is < 1000000. int ...
0 votes
1 answer
241 views

everything works independitly but not together. Piezo not generating a tone

My goal with the code is simple. Let the Piezo buzz when temperature reaches 25 degrees. My piezo is hooked up correctly, because It makes a buzz when the arduino boots or when I put this line of code ...
1 vote
1 answer
1k views

How to stop a loop when using attachInterrupt to catch the change of a button

This what the program does: There is 1 button to start/stop the engine, when the motor is running the green LED will go on, when stopped the red LED is on. The second button is used to change ...
-1 votes
2 answers
311 views

how can I break from this case by IRremote even if it's not finished yet?

I want to give a pause to case 0xFF02FD or at least to break from that case by entering the case 0xFFA25D even if the 1st case not finished, when I press power button wich has hexa code ( 0xFFA25D) I ...
1 vote
2 answers
4k views

How can I read a piezo sensor and have it output a fixed voltage?

I'm trying to creature an instrument out of a few boards I have. The plan is to have piezo sensors wait for a hit, then be read by a digital pin, then execute code based on what piezo sensor was hit. ...
0 votes
1 answer
121 views

Arduino UNO Intro to Engineering Project [closed]

I am a college student in an intro to engineering class looking to create a final project. My goal is to create a small "present" that opens its lid via a servo and plays jingle bells with LEDs ...
0 votes
1 answer
2k views

What's the problem with program , continously beeping buzzer

I have used PIR motion sensor with arduino Uno r3, alongwith one piezo buzzer. and the program is as /* * PIR sensor tester */ int ledPin = 13; // choose the pin for the LED int ...
0 votes
1 answer
5k views

How do I make specific tones with a piezo buzzer?

I am using a piezo buzzer and fiddling around with it a little bit. I currently have different tones with delays in between and I have to do a lot of trial and error for the piezo buzzer to play ...
0 votes
1 answer
349 views

Coding or Wiring? Dual Piezo sensor not triggering LED lights

I am running two piezos off an Arduino UNO and trying to get 10 LED lights to trigger when the piezo voltage exceeds a certain threshold. Problem is, the LEDs wont fire when the Piezo voltage exceeds ...
0 votes
1 answer
1k views

My Arduino Uno buzzer isn't working [duplicate]

/* */ void setup() // Built in initialization block { Serial.begin(9600); Serial.println("Beep!"); } void loop() // Main loop auto-repeats { // Serial.println("Beep!"); tone(4, ...
1 vote
2 answers
2k views

My button stays on high if I press it once, what did I do wrong?

If I press my button once, I get characters on all of the 32 character places and I get an infinite tone with my piezo. Can someone help me with this? #include <LiquidCrystal.h> const int ...
1 vote
0 answers
112 views

my button won't work, why?

I have been trying to get the button to work properly for over a day, but it just won't, can you help me. The lcd display is for another part of this project, not important at the moment, but I can't ...
1 vote
1 answer
4k views

Several Piezo contact mics with Arduino

I'd like to connect about 6 contact mics to my arduino and receive simultaneous signals to be used in my computer for an art installation. Nonetheless, I don't know what's the ideal way to go. Shall ...
0 votes
1 answer
420 views

Execute function until called again?

I am building a simple security system with my Arduino Uno. I have an alarm() function: void alarm() { tone(8, 3300, 200); delay(200); tone(8, 3000, 200); delay(200); } When I call it in the ...
2 votes
1 answer
149 views

Arduino play many piezo at once

I need to play sound on 10 piezos at once. How to do that without delay() function.
4 votes
2 answers
9k views

Multiple tones with one piezo buzzer

I have figured out how to make a piezo buzzer play two tones at once with analogWrite() and tone() but how would I make an actual song by playing both bass and treble, such as this one. Here is the ...
0 votes
1 answer
5k views

Why is the piezo buzzer not making any sound?

My ciruit: My code: // Pin 13 has a LED connected on most Arduino boards. // give it a name: int led = 13; const int buttonPin = 2; // the setup routine runs once when you press reset: void setup() ...
2 votes
1 answer
2k views

Amplify Piezo Sensor

I am trying to amplify a piezo sensor per the instructions found at the link below. I am not trying to trigger a buzzer only print to the serial monitor whether the vibration was detected or not. I ...
0 votes
1 answer
963 views

Amplified piezo sensor wiring problem

I am trying to amplify the signal from an Adafruit Small enclosed piezo. The piezo is working using the Arduino Knock example but I want to increase the sensitivity using an amplifier. The wiring ...
0 votes
2 answers
1k views

Piezo not loud enough

I'm trying to get 110dB out of a 25khz Piezo Transducer. This piezo resonates at 25khz and as per the illustration in its datasheet should emit 110dB with 10 volts and 25khz frequency. Any ...
0 votes
2 answers
797 views

Is a 9v battery appropriate for a piezo and 1 LED?

I'm making a basic "door open" detector that, when a door is opened, it turns on an LED and then sounds an alarm via a piezo. This is controlled via a 5v Adafruit Trinket. Is a 9v battery the ...
0 votes
1 answer
75 views

Piezo connection causing RTC to go haywire

When I connect a piezo (to pin 8), it causes the output of my RTC to go haywire and throw 165 errors into the results. 2016/3/25 13:36:4 2016/3/25 13:36:4 2016/3/25 13:36:4 2016/3/25 13:36:4 2016/3/...
1 vote
1 answer
744 views

How to Serial read two consecutive chars sent by computer to Arduino?

My program reads the input and plays the appropriate note for 500 milliseconds. If I type in 'a', tone(8, 440, 500) will be called. I now want to add different note lengths so that in the future, I ...
0 votes
1 answer
276 views

Piezo not making sound

I've used the piezo on other projects with no problem, but for some reason this project isn't working out so hot. Here's a photo of my current set up. Here's the basic code that I presumed would ...
3 votes
1 answer
390 views

Push-Pull tone code

I wanted to use a piezo sounder to sound an alarm in an application. Testing indicated that tone() was not very loud. I could use some external circuitry to swing the pins ±5V but as I have plenty of ...
1 vote
1 answer
4k views

What is the correct way to wire a piezzo buzzer with a potentiometer and a button?

I'm working on a morse transmitter (kind-a), this how it looks like now: It's working, but is it correct? My piezo buzzer is 3-24V. I use the potentiometer as a volume control. The button is for ...
1 vote
2 answers
1k views

How do I know which is ground and power in Piezo?

I have a piezoelectric sensor. Both pins are the same length. I have one like this: Piezo picture. On the Piezo it's written muRata and 01P. How do I know which do I send to the digital pins and which ...