Active/passive buzzer
The picture shows a passive buzzer - it can be clearly seen that there is a "+" on the top of the package and a green circuit board on the bottom; (the passive buzzer in the HC6800-EM3 V2.2 development board)
The picture shows: an active buzzer - it can be clearly seen that its package is sealed with black glue and there is no "+" on the top, and there is no green circuit board on the bottom;
Buzzers are divided into two categories
Electromagnetic buzzer:
The electromagnetic buzzer (active) consists of an oscillator, an electromagnetic coil, a magnet, a vibrating diaphragm and a casing.
After the power is turned on, the audio signal current generated by the oscillator passes through the electromagnetic coil, causing the electromagnetic coil to generate a magnetic field. Under the interaction between the electromagnetic coil and the magnet, the vibrating diaphragm vibrates periodically and produces sound.
Piezoelectric buzzer:
The piezoelectric buzzer (passive) is mainly composed of a multivibrator, a piezoelectric buzzer, an impedance matcher, a resonance box, a casing, etc.
The multivibrator is composed of transistors or integrated circuits. When the power is turned on (1.5-15V DC working voltage), the multivibrator starts to oscillate and outputs an audio signal of 1.5-2.5kHZ. The impedance matcher drives the piezoelectric buzzer to sound.
Buzzer circuit diagram
Driving principle
The self-excited buzzer is driven by DC voltage and does not need to be driven by AC signal. It only needs to output the driving level to the driving port and amplify the driving current through the amplifier circuit to make the buzzer sound. It is very simple.
By changing the duty cycle of the high and low levels of the output level, the volume of the buzzer can be controlled. (Duty cycle = high level signal duration / cycle)
By changing the frequency of the waveform output by the microcontroller pin, the tone of the buzzer can be adjusted to produce sounds with different timbres and tones.
It is worth noting that the IO port of the microcontroller is only used to control the buzzer;
Code
#include sbit beep = P1^5; void delay(unsigned int x); void main() { while(1) { beep=~beep; delay(10);//1ms=10^3us;f=1/T; } } void delay(unsigned int x) { while(x--); } Development board connection diagram J8 is connected to P1.5;
Previous article:Getting Started with C51 MCU - Buttons
Next article:
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Based on TI Sitara series AM437x ARM Cortex-A9 core board processor
- I have a red board of gd32f405vet6, please provide information
- Several Questions About Differential Amplifier Circuits
- #Idle Market#-----It is recommended to clearly mark the prices when selling things, so that everyone can save time.
- [Raspberry Pi Pico Review] - Start Programming
- Smart agriculture automatic spraying and water and fertilizer integrated remote wireless automation control solution solenoid valve pressure liquid level wireless acquisition
- MicroPython adds JavaScript port
- Share a skill
- Why does the BLE Sensor APP require my location permission?
- Detailed explanation of the basic components and flight principles of quadcopters