Introduction: Arduino Police Siren With LED Police Lights - Tutorial

About: Arduino fan!

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

Watch a demonstration video.

Step 1: What You Will Need

  • 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

Step 2: The Circuit

  • 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]

Step 3: Start Visuino, and Select the Arduino UNO Board Type

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

Step 4: in Visuino Add Components

  • 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

Step 5: In Visuino Connect Components

  • 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]

Step 6: Generate, Compile, and Upload the Arduino Code

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)

Step 7: 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