Buzzer electronic Xiangqi an integrated structure, the use of a DC voltage supply, widely used in computers, printers, copiers, alarms, electronic toys, automotive electronics, telephones, timers and other electronic products as a sound generating device . Buzzer divided into piezoelectric buzzer and two types of electromagnetic buzzer. Piezo buzzer mainly by the multi-vibrator, a piezoelectric buzzer, impedance matching and resonance box, shell and other components. Multivibrator transistors or integrated circuits, when the power is turned on (1.5 ~ 15V DC working voltage), multi-harmonic oscillator start-up, Shucu 1.5 ~ 2.5kHz audio signal, impedance matching device to promote piezoelectric buzzer piece sound. Electromagnetic buzzer by the oscillator, the electromagnetic coil, magnet, diaphragm and case. After power on, the audio oscillator signal current generated by the electromagnetic coil, the electromagnetic coil generates a magnetic diaphragm in the interaction of the electromagnetic coil and the magnet, periodically vibrated sound. This design uses an electromagnetic buzzer, when the distance exceeds a preset value, the buzzer will alarm stiff.
Electromagnetic buzzer sound principle is the current through the solenoid coil, electromagnetic coil generates a magnetic field to drive the diaphragm sound, thus requiring a constant current to drive it, the microcontroller IO pin output current is small, TTL signal microcontroller output basically flat can not drive the buzzer, and therefore a need to increase the current amplification circuit through a PNP transistor 9012 amplifies a drive buzzer. Schematic shown in Figure 5.3.