Dongguan Sheng Chang Electronic Technology Co., Ltd.

PRODUCT CENTER

Years of focus
Buzzer / atomizer products

Hotline

+86-769-87006337
Drive mode
Since the self-excited buzzer is driven by dc voltage, it does not need to be driven by ac signal. As long as the driving level is output from the driver port and the drive current is amplified by audion, the buzzer can make sound. Here is a description of the other beeper driven by the square wave signal of 1 half duty.
There are two ways to drive it: one is to drive the PWM outlet directly, and the other is to drive the buzzer by using the I/O timing flip level to generate the driving waveform.
Direct drive of PWM output is to use the output of the PWM output port itself can output a certain square wave to directly drive the buzzer. Several of is set in the software of the single chip microcomputer system registers are used to set the PWM output of mouth, you can set the duty cycle, cycle and so on, conform to the requirements of the buzzer by setting these registers after the frequency of the waveform, as long as open the PWM output, can output the PWM output frequency square wave, this time using the waveform can drive buzzer. For example, the drive of a buzzer with a frequency of 2000Hz can be known as a period of 500 refugee s, so as long as the period of PWM is set to 500 refugee s and the duty ratio level is set to 250 refugee s, a square wave with a frequency of 2000Hz can be generated, and then the square wave can be used to drive the buzzer by using the audion.
The way to generate the driving waveform with the I/O timing flip level is a bit more troublesome. It is necessary to use timer to do timing. The waveform that meets the requirements of the buzzer is generated by timing flip level, and this waveform can be used to drive the buzzer. For example, the drive of a buzzer with a period of 2500Hz can be known as the period of 400 minus s, so as long as the I/O port of the buzzer is driven and the level is turned over once every 200 minus s, a square wave with a frequency of 2500Hz and a duty ratio of 1/2duty can be generated, and then the buzzer can be driven through the audion amplification.
Drive design Since two driving modes are introduced here, two driving modes should be combined in the design module system, that is, not only the method of PWM outlet driving the buzzer is introduced in the program, but also the method of I/O port driving the buzzer. Therefore, we will design the following system to explain the single-chip driver for the buzzer: the system has two other excited buzzers with a frequency of 2000Hz, one is controlled by I/O port and the other is controlled by PWM outlet. System there are two key, a key for the PORT, I/O control buzzer is not sing when pressing the button once the I/O control buzzer chime, press it again to stop singing, another key for PWM, mouth PWM control buzzer is not sing when pressing the button once the PWM output control buzzer chime, press again to stop singing.