Android deep exploration and HAL-driven development (Volume 1)-Chapter 8: android-driven development
Buzzer type and working principle
The buzzer also becomes PWM (Pulse Width Modulation). The basic principle is to control the opening and stopping of the buzzer through the pulse. It is a very effective technology that uses the digital output of a microcontroller to control analog circuits. It is widely used in many fields such as measurement, communication, power control and transformation.
Therefore, we need to operate the buzzer by setting TOUT [0] pin to TOUT_0 and configuring the PWM waveform.
Type
The buzzer is mainly divided into two types: piezoelectric buzzer and electromagnetic buzzer.
The piezoelectric buzzer is mainly composed of multi-harmonic oscillator, piezoelectric beeching, impedance matching, co-occurrence box, and shell. Some piezoelectric buzzer shells are also equipped with light emitting diodes. A multi-harmonic oscillator consists of a transistor or an integrated circuit. After power-on (1.5 ~ 15 v dc operating voltage), multi-harmonic oscillator vibration, output 1.5 ~ Khz audio signal, impedance matching to promote the sound of piezoelectric beeps.
The electromagnetic buzzer consists of an oscillator, an electromagnetic coil, a magnet, a vibrating diaphragm, and a shell. After the power is switched on, the audio signal current generated by the oscillator passes through the electromagnetic coil to generate a magnetic field. The vibration diaphragm periodically vibrates and sounds when the electromagnetic coils and magnets interact.
Differences between the active and passive BUZZER: the word "Source" refers to the power supply, but to the shock source, that is, the active buzzer contains an oscillating source, and the passive buzzer does not have an internal oscillating source. If the source is powered on, the system can generate a voice. if the source is not oscillating, the system must be driven by a pulse signal.