Arduino Police Siren With LED Police Lights - Tutorial

by RonFrtek in Circuits > Arduino

4736 Views, 4 Favorites, 0 Comments

Arduino Police Siren With LED Police Lights - Tutorial

Arduino Police Siren with LED Police lights -Visuino Tutorial

In this tutorial we will learn how to make a police siren with flashing led blue and red.

Watch a demonstration video.

What You Will Need

arduino-uno-rev-3.jpg
RGB-LED-Module.jpg
0005160_pe-012-active-piezo-buzzer-module.jpeg
20131108211302285.jpg
VisuinoAdvrtisementM5Stack7.jpg

  • Arduino UNO (or any other Arduino)
  • 2x RGB LED (If you dont have it just use a regular LEDs blue and red)
  • Piezo buzzer
  • Jumper wires
  • Visuino program: Download Visuino

The Circuit

2020-01-02_16-52-51.jpg

  • Connect both RGB LED pin [-] to Arduino pin [GND]
  • Connect first RGB LED pin [R] to Arduino digital pin [5]
  • Connect second RGB LED pin [B] to Arduino digital pin [6]
  • Connect Piezo Buzzer pin [S] to Arduino digital pin [8]
  • Connect Piezo Buzzer pin [-] to Arduino pin [GND]
  • Connect Piezo Buzzer pin [+] to Arduino pin [5V]

Start Visuino, and Select the Arduino UNO Board Type

F2UF2UFK4K5NOQU.LARGE.jpg
FQAKUTWK4K5NOQT.LARGE.jpg

To start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. 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

in Visuino Add Components

2020-01-02_17-44-38.jpg
2020-01-02_17-44-13.jpg
2020-01-02_17-45-21.jpg
2020-01-02_17-43-56.jpg
2020-01-02_17-45-00.jpg

  • Add "Sine Analog Generator" component
    In the properties window set Amplitude to 300, Frequency to 0.5 and Offset to 600

  • Add "Play Frequency Tone" component
  • Add "Pulse Generator" component
  • Add "Pulse Generator" component

In Visuino Connect Components

2020-01-02_17-43-24.jpg

  • Connect "SineAnalogGenerator1" pin [Out] to "PlayFrequency1" pin [In]
  • Connect "PlayFrequency1" pin [Out] to Arduino board digital pin [8]
  • Connect "PulseGenerator1" pin [Out] to Arduino board digital pin [5]
  • Connect "PulseGenerator1" pin [Out] to "Inverter1" pin [In]
  • Connect "Inverter1" pin [Out] to Arduino board digital pin [6]

Generate, Compile, and Upload the Arduino Code

FS7ESAJK4K5OJL9.LARGE.jpg
F5MY32UK4K5OJLA.LARGE.jpg

In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE

In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Play

If you power the Arduino UNO module, the LED will start to flash and you should hear the siren.

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