Police and Ambulance Siren Generation Using Arduino or Analog Circuit

Deal Score0
Deal Score0


In this article, you will learn to easily make an Ambulance or Police siren system using Development or Analog Circuit method.

Using Arduino While the siren on a police vehicle emits a frequency of 300Hz, the ambulance siren emits a frequency of 650 to 750 Hz.

So here, create a circuit and its relevant code such that it generates a sinusoidal wave of 300Hz.

Bill of materials

Coding

First, include the library called pitches.h into the code for generating the required sound frequency.

Then, define the pin numbers for the buzzer and the button (with which you can change the siren between an ambulance and a police vehicle).

Now, create a setup function to set the pin mode as output for buzzer and input for the button.

Next, create a loop function for button press and increase its value on every press. Using the if condition, switch the siren between police and ambulance.

For ambulance sirens, create a code for emitting an audio signal of frequency between 650Hz to 750 Hz and with a delay of 300.

For a faster siren sound, set a higher frequency range between 900 Hz and 1000 Hz.

As earlier mentioned, police vehicle sirens emit a frequency of 300Hz sinusoidal wave. Therefore, create a code for generating the same with a delay of a few seconds.

Connection

Connect the components as shown in the below diagram.

Ambulance & Police Siren Generation Using Arduino or Analog Circuit

Testing

Connect the Arduino to a power source of either 5V using a USB port or 9V using a barrel jack. Then press the button on the siren generation device to switch between the police and ambulance siren modes.


 





Source link

We will be happy to hear your thoughts

Leave a reply

2KNH Consumer Store
Logo
Enable registration in settings - general
Compare items
  • Total (0)
Compare
0
Shopping cart