Arduino Ambulance Siren Alarm with Buzzer and Led

Introduction

An Arduino Ambulance Siren Alarm is a project that involves using an Arduino microcontroller and a few electronic components to create a siren sound similar to the ones used by emergency vehicles such as ambulances. This project is a great way to learn about programming and electronics, and it can be easily customized to create different types of sounds.

To create the siren sound, the project uses a piezoelectric buzzer or a speaker, which is controlled by Arduino. The sound can be programmed to produce different tones and frequencies, which can be adjusted to create a siren sound that is similar to that of an ambulance.

In addition to the siren sound, the project can also include flashing lights using LED lights or other components. These lights can be programmed to blink in a specific pattern, similar to the ones used by emergency vehicles. Overall, the Arduino Ambulance Siren Alarm project is a fun and educational way to learn about programming and electronics while creating a useful and entertaining device.

Hardware Required

To create an Arduino Ambulance Siren Alarm with Buzzer and LED, you will need the following components:

Components#Buy From Amazon
Arduino UNO1Buy Now
Led 5mm1Buy Now
Buzzer1Buy Now
Resistor 220​Ω2Buy Now
Jumper WiresFewBuy Now
Breadboard1Buy Now

Pinout of LED

Led-Pinout

Pinout of Buzzer

Buzzer-Pinout

Circuit Connection

  1. Connect the positive leg of the LED to the digital pin 4 on the Arduino board, and the negative leg to the 220-ohm resistor. Connect the other end of the resistor to the GND pin on the Arduino board.
  2. Connect the positive leg of the active buzzer to the digital pin 7 on the Arduino board, and the negative leg to the GND pin on the Arduino board.
  3. Copy and paste the following code into your Arduino IDE:
  4. Upload the code to your Arduino board.
  5. Power on your Arduino board.
ArduinoBuzzerLed
Pin 4+Ve
Pin 7+Ve
GNDGND-Ve

Circuit Diagram

Ambulance-Siren-Alarm-with-Buzzer-and-Led-Circuit

Installing Arduino IDE Software

First, you will require to Download the updated version of Arduino IDE Software and Install it on your PC or laptop. if you Learn How to install the Arduino step-by-step guide then click on how to install Arduino Button given Blow

Code

//For more info Visits: www.arduinocircuit.com
int i; // define the variable "i" used in a for loop
void setup()
{
  pinMode(7, OUTPUT); // define port 7 as an output port
  pinMode(4, OUTPUT); // define port 4 as an output port
}
void loop()
{
  for (i = 0; i < 350; i++) // define the duration of the first sound (350 2 millisecond cycles).
    // The extended description of the use of the for statement is available
    // in exercise 05 – carousel of lights
  {
    digitalWrite(7, HIGH); // turn on the sound
    digitalWrite(4, HIGH); // turn on the led
    delay(1); // wait 1 millisecond. It actually repeats the sound every 2 milliseconds e
    // then with a frequency of 500 repetitions per second
    digitalWrite(7, LOW); // turn off the sound
    delay(1); // wait 1 millisecond and restart from the for statement (350 repetitions)
  }
  delay(50); // wait 50 milliseconds before playing the second round of sounds
  for (i = 0; i < 150; i++) // define the duration of the second sound (150 cycles of 4 milliseconds)
  {
    digitalWrite(7, HIGH); // turn on the sound
    digitalWrite(4, LOW); // turn off the led
    delay(2); // wait 2 milliseconds (repeat sound every 4 milliseconds and then
    // 250 times per second)
    digitalWrite(7, LOW); // turn off the sound
    delay(2); // wait 2 milliseconds and loop 150 times
  }
}

Explanation

The code above will turn on the LED and play the siren sound through the buzzer for 0.1 second, then turn off the LED and stop the siren sound for another 0.1 second. The loop will continue indefinitely, creating the siren effect.

You can customize the siren sound by changing the value passed to the tone() function. The higher the value, the higher the pitch of the siren sound. You can also adjust the delay time to change the speed of the siren effect.

Applications

  1. Emergency Vehicles: This circuit can be used in emergency vehicles like ambulances, police cars, and fire trucks to alert other drivers and pedestrians.
  2. Security Systems: The siren and LED in this circuit can be used in security systems to alert people of potential threats or danger.
  3. Industrial Safety: This circuit can be used in industrial settings to signal an emergency or to warn workers of unsafe conditions.
  4. Traffic Control: The LED lights in this circuit can be used to control traffic flow at intersections or to alert drivers of construction zones.
  5. Home Alarms: This circuit can be used as a DIY home alarm system, providing an audible and visual alarm to alert homeowners of potential intruders or hazards.

See Also

  1. Arduino Clap Switch Project Circuit for Beginners
  2. Tune Replay Arduino Project Circuit for Beginners
  3. Dual LED Chaser Arduino Project Circuit for Beginners

Leave a Comment


error: