Page 261 - ARM Based Microcontroller Projects Using MBED
P. 261
8.35 PROJECT 29—MELODY MAKER 247
8.35 PROJECT 29—MELODY MAKER
8.35.1 Description
This project shows how sound with different frequencies can be generated with PWM
waveforms using a simple buzzer device. The project shows how the simple melody Happy
Birthday can be played using a buzzer.
8.35.2 Aim
The aim of this project is to show how PWM can programmed on the Nucleo-F411RE de-
velopment board to generate sound with different frequencies.
8.35.3 Block Diagram
Fig. 8.117 shows the block diagram of the project.
8.35.4 Circuit Diagram
A buzzer is a small piezoelectric device that gives sound output when excited. Normally,
buzzers are excited using square wave signals, also called pulse width modulated (PWM)
signals. The frequency of the signal determines the pitch of the generated sound, and
duty cycle of the signal can be used to increase or decrease the volume. Most buzzers
operate in the frequency range 2—4kHz. There are two types of buzzers: active and
passive. Active buzzers operate with logic signals and they give a constant frequency
sound. Passive buzzers require an audible waveform to generate sound. In this project,
FIG. 8.117 Block diagram of the project.