Generating sound patterns with Arduino is a topic of this article. All you need is Arduino compatible board a simple DC buzzer and current limiting resistor. In this project I’ll show how to build a police siren using Arduino Mega or UNO boards. The schematic is shown next. 3 push buttons for selecting a desired siren sound connected to pins 2,3,4 and a piezoelectric buzzer to A0.
The sound is produced by using Arduino tone() function as can be seen from attached code. This code will generate 3 siren patterns via push buttons as shown in a short video on the bottom of the page.
The sound quality and its volume depend on the type of buzzer you are using. Your buzzer may produce a slightly different sound from my original circuit. Experiment with various buzzers types and models until you satisfied with the final results.