In this tutorial we will learn how to use a PIR sensor and a buzzer module to make a sound every time a PIR sensor detects a movement.
Watch a demonstration video.
Step 1: What You Will Need
- Arduino UNO (or any other Arduino)
- PIR Sensor
- Buzzer module
- Jumper wires
- Visuino program: Download Visuino
Step 2: The Circuit
- Connect PIR sensor pin [GND] to Arduino pin [GND]
- Connect PIR sensor pin [VCC] to Arduino pin [5V]
- Connect PIR sensor pin [Signal] to Arduino digital pin 
- Connect Buzzer pin [+] to Arduino pin [5V]
- Connect Buzzer pin [-] to Arduino pin [GND]
- Connect Buzzer pin [S] to Arduino digital pin 
Step 3: Start Visuino, and Select the Arduino UNO Board Type
The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.
Start Visuino as shown in the first picture Click on the “Tools” button on the Arduino component (Picture 1) in Visuino When the dialog appears, select “Arduino UNO” as shown on Picture 2
Step 4: In Visuino Add and Connect Components
- Add “Digital (Boolean) Change Only” component
- Add “Play Frequency Tone” component and in the properties window set “Initial Frequency (Hz)” to 20
-select “Enabled” field and click on the pin icon and select “Boolean SinkPin”
- Connect Arduino digital pin  to “ChangeOnly1” pin[In]
- Connect “ChangeOnly1” pin[Out] to “PlayFrequency1” pin [Enabled]
- Connect “PlayFrequency1” pin [Out] to Arduino digital pin 
Step 5: Generate, Compile, and Upload the Arduino Code
In Visuino, at the bottom click on the “Build” Tab, make sure the correct port is selected, then click on the “Compile/Build and Upload” button.
Step 6: Play
If you power the Arduino UNO module, and make a move the PIR sensor should detect it and a buzzer module will make a sound.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it here and open it in Visuino: https://www.visuino.eu