Home > Microcontroller >Interface Circuits > Improvement of microcontroller-driven piezoelectric buzzer

Improvement of microcontroller-driven piezoelectric buzzer

Source: InternetPublisher:酷到被通缉 Keywords: Piezoelectric drive Updated: 2023/11/22

This article focuses on how to use a microcontroller to drive a piezoelectric buzzer with a large AC voltage. It uses a four-MOSFET circuit connected to two I/O pins of the microcontroller (Reference 1). The following is a modification and expansion of this circuit in this article, which can save the I/O pins of a microcontroller. The gate of Q4 is connected to the drain of Q2, not the second I/O pin (picture). The microprocessor applies a high logic level to the I/O pin, causing Q2 to conduct, pulling Node A to a low logic level. This action opens Q3 and closes Q4. The voltage on Node B goes to 15V and Q1 turns off. The voltage on the piezo element is now 15V.

Improvement of microcontroller-driven piezoelectric buzzer The piezoelectric ceramic piece

    
A microcontroller I/O pin drives this circuit, producing an AC voltage across the piezoelectric buzzer

The microcontroller then switches the I/O pin low and Q2 turns off. Q1 is also off, so Node A slowly rises to a high logic level through pull-up resistor R1. When the voltage on Node A reaches the switching threshold of the inverter formed by the pair of Q3 and Q4 tubes, Q3 turns off quickly and Q4 turns on quickly. As a result, the low logic level on Node B turns Q1 on and accelerates the voltage rise on NodeA. Now, the 15V voltage on the piezoelectric buzzer is of opposite polarity.

R2 weakens the coupling between the output and input of Q4 due to the presence of the piezoelectric element. An R2 value of 330Ω is usually sufficient to suppress high-frequency oscillations caused by feedback. If the resistance of R1 is small, it will increase the power pulled from the power supply. If the value of R1 is too large, it will also increase power consumption, because it will prolong the switching time of the transistor and increase the related through current. The optimal value for R1 is around 1kΩ.

This design saves an I/O pin, but at the expense of increased power consumption. Therefore, the power consumption of the circuit is an order of magnitude higher than that of the circuit described in the previous design example.

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号