# Passive buzzer
Features of passive buzzer: 1、There is no vibration source inside the passive, so if you use a DC signal, you can't make it tweet. Must use 2k~5k square wave (pwm) to drive it 2、The sound frequency is controllable, and the effect of the sound spectrum can be made 3、In some special cases, a control port can be reused with LED
![](././../../images_dir/1625016079/1.png) ![](././../../images_dir/1625016160/2.png)
Schematic diagram of buzzer module installation
**
In this example, the system's own pwm drive is used to control the buzzer to sound
**
Test script program driver_210519pwm_buzzerpwm_buzzer.sh Test command: 1、Increase execution authority: chmod +x pwm_buzzer.sh 2、Execute the script program: ./ pwm_buzzer.sh 7 300000 150000, a)The first parameter (7): refers to the seventh pwm channel b)The second parameter (300000): Specify the frequency of pwm i.1000 1Mhz ii.10000 100Khz iii.100000 10Khz iv.1000000 1Khz c)The third parameter (150000): Specify the duty cycle of pwm
---
![](././../../images_dir/1703141148/4.png)