Police Siren

by clozada575 in Circuits > Arduino

57 Views, 1 Favorites, 0 Comments

Police Siren

Mech Project_20240921_170043_0000.png
20240919_113004.jpg
20240919_113014.jpg

We have made a Police Siren that features a blinking red LED and blue LED and emits sound just like that of a police car.

We referenced "Police Siren Circuit Using 555 Timer IC" by vikkey321, but due to its mechanical nature, we could not utilize it to its fullest extent. However, another Instructable "How to Make a Siren Using Arduino" by Jigneshk5, proved to be more useful as it also utilized an Arduino.

https://www.instructables.com/How-to-Make-a-Siren-Using-Arduino/

https://www.instructables.com/Introduction-99/

Connect Wires to Arduino

tinkercadthing.png

Wires will be connected to Arduino to power the circuit and to transfer programmable instructions.

Apply Resistors

Add resistors in order to with hold energy from burning out the LED materials.

Apply LEDs (blue and Red)

LEDs will be connected to flow of current for electricity and power them.

Tin Then Connect Speaker

Sauntering the wires to the speaker so that the ends of both materials don't flare out.

Coding

8487374263345208618.jpg

Open ARDUINO and apply the code.


void setup() {

pinMode(0, OUTPUT); //This pin we use to control the speaker

pinMode(10, OUTPUT); // This pin is for one light while pin 11 s for the other

pinMode(11, OUTPUT);

}


void loop() {

digitalWrite(10, HIGH); //This makes the light attached to pin 10 turn on

digitalWrite(11, LOW); //This makes the light attached to pin 11 turn of

tone(0,1900,2000); //The first number is the pin second number is the tone that we found was the closest to what we want and the third number is duration

delay(1000);

digitalWrite(11, HIGH); //This makes the light attached to pin 11 turn on

digitalWrite(10, LOW); //This makes the light attached to pin 10 turn off

tone(0,1850,2000); // Same as before but a different tone to make the sound mimic an alarm

delay(1000);


}


Upload Code to Circuit

This will give instructions to the circuit.

Test

Press the button to take you to the passengers seat of that everyday emergency vehicle swiftly driving across the freeway.