Site icon 14core.com

Wiring the Passive & Active Buzzer with Raspberry Pi

Another illustration that demonstrate how to use the buzzer both passive and active. The difference between an active and passive is. The active buzzer has a built in oscillating source that will make a sound when amplifying a power compare to passive buzzer does not have such a source so it means that no beep or sound will generate when it plug to the power source on this case you need to use a square wave frequency to make a sound between 2k and 5k. As you can see diagram below there are two option to wire up the buzzer.
The active buzzer has onboard oscillating source it will beep as long as it is wired up but it can only beep with fixed frequency.

Required Component

Wiring Manually

Wiring Diagram

Uploading the Code

WiringPi Code for Active Buzzer
[crayon-6768047908dbf916766562/]
Python Code for Active Buzzer
[crayon-6768047908dc7701774624/]
WiringPi Code for Passive Buzzer
[crayon-6768047908dcb888421203/]
Python Code for Passive Buzzer
[crayon-6768047908dcf148044464/]

Wiring the Passive & Active Buzzer with Raspberry Pi
Exit mobile version