51 MCU Self-study Notes (V) - Buzzer

Publisher:轻松自在Latest update time:2021-07-28 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

buzzer

The structure principle of the buzzer

(1) Piezoelectric buzzer: Piezoelectric buzzer is mainly composed of a multivibrator, a piezoelectric buzzer sheet, an impedance matcher, a resonance box, a shell, etc. Some piezoelectric buzzers are also equipped with a light-emitting diode on the shell.


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 100-500HZ. The impedance matcher drives the piezoelectric buzzer to sound.


The piezoelectric buzzer is made of lead zirconate titanate or lead magnesium niobate piezoelectric ceramic material. Silver electrodes are plated on both sides of the ceramic sheet, and after polarization and aging treatment, it is bonded to a brass sheet or a stainless steel sheet.


(2) Electromagnetic buzzer: The electromagnetic buzzer 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.


Buzzer sound principle

The sound-generating principle of a buzzer consists of a vibration device and a resonance device, and the buzzer is divided into passive external excitation type and active self-excitation type.


The working principle of the passive external excitation buzzer is: the square wave signal input into the resonant device is converted into a sound signal output.


The working principle of the self-excitation buzzer is: the DC power input passes through the amplification sampling circuit of the oscillation system


A sound signal is generated under the action of the resonance device.


Buzzer in microcontroller

Schematic diagram:

insert image description here

usage:

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.


By changing the duty cycle of the high and low levels of the output level, the volume of the buzzer can be controlled.


Microcontroller controls the buzzer sound code

#include


typedef unsigned char u8;

typedef unsigned int u16;


sbit beep = P1^5;


void delay(u16 i)

{

  while(i--);

}


void main()

{

  while(1)

  {

    beep = ~beep;

    delay(100);

  }

}

Reference address:51 MCU Self-study Notes (V) - Buzzer

Previous article:51 MCU Self-study Notes (VI) - Static Digital Tube
Next article:51 MCU Self-study Notes (IV) - Lighting up LED lights and running lights

Recommended ReadingLatest update time:2024-11-16 12:25

AVR Lesson 5: Buzzer
span style="font-size:18px;" /* *info:buzzer *author:chenlu *date:2014.11.20 */ //input the head file so that the program can work normally //iom16v---know the register //macros---know the BIT(x) #include iom16v.h #include macros.h //use those can make your study very conveninet #define uint unsigned int #define u
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号