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-673fa088b7f27677683776/]
Python Code for Active Buzzer
[crayon-673fa088b7f32213913814/]
WiringPi Code for Passive Buzzer
[crayon-673fa088b7f38273918061/]
Python Code for Passive Buzzer
[crayon-673fa088b7f3e112209697/]

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