QB010 P-Buzzer Module

1.Product Introduction

../../_images/P-Buzzer-1.jpg

Buzzer module is an integrated structure of sound electronic components, using DC power supply, widely used in toys, alarms and other electronic products. Buzzer is divided into passive buzzer and active buzzer; There is no shock source inside the passive buzzer, and it needs to be driven by 2K~5K square wave. Passive buzzer can freely control the output sound frequency, and can be programmed to write different scales and duration time to synthesize a beautiful melody of music.

2.Parameter Specification

Parameter Value/Representation
Operating voltage 3.3~5V
Operating temperature -20°C~+70°C
Output signal Digital signal
Size 3.16cm*2.38cm
../../_images/P-Buzzer-2.jpg

3.Wiring Diagram

../../_images/P-Buzzer-3.png
P-Buzzer Module UNO
VCC 5V
GND GND
S Digital Pin 7

4.Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
int buzzerPin=7;//Define the buzzer pin
#define C4 262
#define D4 294
#define E4 330
#define F4 350
#define G4 393
#define A4 441
#define B4 495
int length0=14;
int tune0[] = { C4, C4, G4, G4, A4, A4, G4, F4, F4, E4, E4, D4, D4, C4 };
float durt0[] = { 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2 };

void setup(){
  for (int x = 0; x < length0; x++) {
    tone(buzzerPin, tune0[x]);
    delay(500 * durt0[x]);
    noTone(buzzerPin);
    delay(30);
  }
}
void loop(){
}

5.Test Result

After you upload the code to the controller board, the buzzer will emit a piece of music, and you can change the tune to play different music.

../../_images/P-Buzzer-4.png

6.Related Resources

7.Get One Now

B2B Business: info@acebott.com

Individual buyer: shop on aliexpress