Buzzer driving circuit and electronic device

CN224862016UActive Publication Date: 2026-10-16SHENZHEN H&T CONTROL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202522065713.2
Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-10-16
Estimated Expiration
2035-09-25

AI Technical Summary

Technical Problem

[0003]目前,常见的蜂鸣器驱动电路都是应用在以正电源作为供电电源的应用场景中,而不适用于以负电源作为供电电源的应用场景

Benefits of technology

[0015] The beneficial effects of this application are as follows: The buzzer driving circuit of this application embodiment includes a first switching branch, a second switching branch, a charging/discharging branch, and a controller. The controller is electrically connected to both the first and second switching branches. The first switching branch is electrically connected between the negative power supply and the buzzer. The second switching branch is electrically connected to both the charging/discharging branch and the buzzer, and the charging/discharging branch is also electrically connected to the negative power supply. The second switching branch is configured to be turned on or off in response to a control signal output by the controller. The first switching branch is configured to alternately be turned on and off in response to a pulse width modulation signal output by the controller. When the second switching branch is on, the charging/discharging branch is charged. When the second switching branch is off and the first switching branch is on, since the buzzer is electrically connected to the negative power supply, a discharge circuit is formed between the charging/discharging branch and the negative power supply, allowing the charging/discharging branch to discharge to the buzzer, thereby driving the buzzer to operate. Through the above process, the buzzer is driven by using the negative power supply as the power source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224862016U_ABST
    Figure CN224862016U_ABST
Patent Text Reader

Abstract

The application discloses a buzzer driving circuit and electronic equipment. The buzzer driving circuit comprises a first switch branch, a second switch branch, a charge-discharge branch and a controller. The controller is electrically connected with the first switch branch and the second switch branch. The first switch branch is electrically connected between a negative power supply and a buzzer. The second switch branch is electrically connected with the charge-discharge branch and the buzzer respectively. The charge-discharge branch is also electrically connected with the negative power supply. The first switch branch is alternately turned on and turned off in response to a pulse width modulation signal output by the controller. The buzzer is electrically connected with the negative power supply when the first switch branch is turned on. The second switch branch is turned on or turned off in response to a control signal output by the controller. The charge-discharge branch is charged when the second switch branch is turned on, and is discharged to the buzzer when the second switch branch is turned off and the first switch branch is turned on, so as to drive the buzzer to operate. In this way, the negative power supply can be used as a power supply to drive the buzzer to operate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic circuit technology, and in particular to a buzzer driver circuit and electronic device. Background Technology

[0002] A buzzer is a device that converts electrical signals into sound. It is an efficient tool for human-computer interaction and is widely used in electronic products such as computers, printers, alarms, and electronic toys.

[0003] Currently, common buzzer driver circuits are used in applications where a positive power supply is used, but not in applications where a negative power supply is used. Utility Model Content

[0004] This application provides a buzzer driver circuit and electronic device that can use a negative power supply as a power source to drive the buzzer.

[0005] In a first aspect, embodiments of this application provide a buzzer driving circuit, comprising: a first switching branch, a second switching branch, a charging / discharging branch, and a controller; the controller is electrically connected to the first switching branch and the second switching branch respectively; the first switching branch is electrically connected between a negative power supply and the buzzer; the second switching branch is electrically connected to the charging / discharging branch and the buzzer respectively; the charging / discharging branch is also electrically connected to the negative power supply; the first switching branch is configured to alternately turn on and off in response to a pulse width modulation signal output by the controller, wherein the buzzer is electrically connected to the negative power supply when the first switching branch is on; the second switching branch is configured to turn on or off in response to a control signal output by the controller; the charging / discharging branch is configured to charge when the second switching branch is on and discharge to the buzzer when the second switching branch is off and the first switching branch is on, thereby driving the buzzer to operate.

[0006] In one or more embodiments, the first switching branch includes: a first switching unit electrically connected to the controller and the second switching unit respectively, configured to alternately turn on and off in response to the pulse width modulation signal, wherein when the first switching unit is on, a first level signal is output to the second switching unit, and when the first switching unit is off, the output of the first level signal is stopped; and a second switching unit electrically connected between the buzzer and the negative power supply, configured to turn on when the first level signal is received, and turn off when the first level signal is not received, wherein when the second switching unit is on, the buzzer is electrically connected to the negative power supply.

[0007] In one or more embodiments, the first switching unit includes a first switching transistor, a first resistor, and a second resistor; the control terminal of the first switching transistor is electrically connected to the first terminal of the first resistor and the first terminal of the second resistor, respectively; the second terminal of the first resistor is electrically connected to the controller; the first terminal of the first switching transistor and the second terminal of the second resistor are both grounded; and the second terminal of the first switching transistor is electrically connected to the second switching unit.

[0008] In one or more embodiments, the second switching unit includes a second switching transistor, a third resistor, and a fourth resistor; the control terminal of the second switching transistor is electrically connected to the first terminal of the third resistor and the first terminal of the fourth resistor, respectively; the second terminal of the third resistor is electrically connected to the first switching unit; the second terminal of the fourth resistor and the first terminal of the second switching transistor are both electrically connected to the negative power supply; and the second terminal of the second switching transistor is electrically connected to the buzzer.

[0009] In one or more embodiments, the first switching transistor in the first switching unit is a PNP transistor, and the second switching transistor in the second switching unit is an NPN transistor; the control terminal of the first switching transistor is the base of the PNP transistor, the first terminal of the first switching transistor is the emitter of the PNP transistor, and the second terminal of the first switching transistor is the collector of the PNP transistor; the control terminal of the second switching transistor is the base of the NPN transistor, the first terminal of the second switching transistor is the emitter of the NPN transistor, and the second terminal of the second switching transistor is the collector of the NPN transistor.

[0010] In one or more embodiments, the second switching branch includes a third switching transistor, a fifth resistor, and a sixth resistor; the control terminal of the third switching transistor is electrically connected to the first terminal of the fifth resistor and the first terminal of the sixth resistor, respectively; the second terminal of the fifth resistor is electrically connected to the controller; the first terminal of the third switching transistor and the second terminal of the sixth resistor are both grounded; and the second terminal of the third switching transistor is electrically connected to the charging and discharging branch.

[0011] In one or more embodiments, the third switching transistor is a PNP transistor; the control terminal of the third switching transistor is the base of the PNP transistor, the first terminal of the third switching transistor is the emitter of the PNP transistor, and the second terminal of the third switching transistor is the collector of the PNP transistor.

[0012] In one or more embodiments, the charging and discharging branch includes a first capacitor, a seventh resistor, and an eighth resistor; a first terminal of the first capacitor is electrically connected to the negative power supply, a second terminal of the first capacitor is electrically connected to the first terminal of the seventh resistor, a second terminal of the seventh resistor is electrically connected to the first terminal of the eighth resistor and the buzzer, and a second terminal of the eighth resistor is electrically connected to the second switching branch.

[0013] In one or more embodiments, the buzzer driving circuit further includes a ninth resistor; the ninth resistor is connected in parallel with the buzzer.

[0014] Secondly, embodiments of this application provide an electronic device, including a buzzer and a buzzer driving circuit as described above; the buzzer driving circuit is electrically connected to the buzzer to drive the buzzer to operate.

[0015] The beneficial effects of this application are as follows: The buzzer driving circuit of this application embodiment includes a first switching branch, a second switching branch, a charging / discharging branch, and a controller. The controller is electrically connected to both the first and second switching branches. The first switching branch is electrically connected between the negative power supply and the buzzer. The second switching branch is electrically connected to both the charging / discharging branch and the buzzer, and the charging / discharging branch is also electrically connected to the negative power supply. The second switching branch is configured to be turned on or off in response to a control signal output by the controller. The first switching branch is configured to alternately be turned on and off in response to a pulse width modulation signal output by the controller. When the second switching branch is on, the charging / discharging branch is charged. When the second switching branch is off and the first switching branch is on, since the buzzer is electrically connected to the negative power supply, a discharge circuit is formed between the charging / discharging branch and the negative power supply, allowing the charging / discharging branch to discharge to the buzzer, thereby driving the buzzer to operate. Through the above process, the buzzer is driven by using the negative power supply as the power source. Attached Figure Description

[0016] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, which are not intended to limit the embodiments, and elements having the same reference numerals in the drawings are designated as similar elements.

[0017] Figure 1 This is a schematic diagram of the buzzer driver circuit provided in the embodiments of this application. Figure 1 ; Figure 2 This is a schematic diagram of the buzzer driver circuit provided in the embodiments of this application. Figure 2 ; Figure 3 This is a schematic diagram of the circuit structure of the buzzer driver circuit provided in the embodiment of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0019] It should be noted that when an element is described as "connected" to another element, it can be directly connected to the other element, or there can be one or more intermediate elements between them.

[0020] Furthermore, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.

[0021] Please refer to Figure 1 , Figure 1 This is a schematic diagram of a buzzer driver circuit provided in an embodiment of this application. Figure 1 As shown, the buzzer drive circuit 100 includes a first switch branch 10, a second switch branch 20, a charging / discharging branch 30, and a controller 40.

[0022] The controller 40 is electrically connected to the first switch branch 10 and the second switch branch 20 respectively. The first switch branch 10 is electrically connected between the negative power supply V- and the buzzer BU1. The second switch branch 20 is electrically connected to the charging and discharging branch 30 and the buzzer BU1 respectively. The charging and discharging branch 30 is also electrically connected to the negative power supply V-.

[0023] Specifically, the first switch branch 10 is configured to alternately turn on and off in response to a pulse width modulation signal output by the controller 40, wherein when the first switch branch 10 is on, the buzzer BU1 is electrically connected to the negative power supply V-. The second switch branch 20 is configured to turn on or off in response to a control signal output by the controller 40. The charge / discharge branch 30 is configured to charge when the second switch branch 20 is on and to discharge to the buzzer BU1 when the second switch branch 20 is off and the first switch branch 10 is on, thereby driving the buzzer BU1 to operate.

[0024] In practical applications, when the second switch branch 20 is turned on, the charging / discharging branch 30 is charged. When the second switch branch 30 is turned off and the first switch branch 10 is turned on, since the buzzer BU1 is electrically connected to the negative power supply V-, a discharge circuit is formed between the charging / discharging branch 30 and the negative power supply V-, allowing the charging / discharging branch 30 to discharge to the buzzer BU1, thereby driving the buzzer BU1 to operate. Through the above process, the buzzer BU1 is driven by the negative power supply V- as the power source.

[0025] In some embodiments, the controller 40 may be a microcontroller unit (MCU) or a digital signal processing (DSP) controller, etc.

[0026] In some embodiments, such as Figure 2 As shown, the first switch branch 10 includes a first switch unit 11 and a second switch unit 12.

[0027] The first switch unit 11 is electrically connected to the controller 40 and the second switch unit 12 respectively, and the second switch unit 12 is electrically connected between the buzzer BU1 and the negative power supply V-.

[0028] Specifically, the first switching unit 11 is configured to alternately turn on and off in response to a pulse width modulation signal. When the first switching unit 11 is on, it outputs a first-level signal to the second switching unit 12; when the first switching unit 11 is off, it stops outputting the first-level signal. The second switching unit 12 is configured to turn on when it receives the first-level signal and turn off when it does not receive the first-level signal. When the second switching unit 12 is on, the buzzer BU1 is electrically connected to the negative power supply V-. The on / off state of the second switching unit 12 corresponds to the on / off state of the first switching branch 10, and the off / off state of the second switching unit 12 corresponds to the off / off state of the first switching branch 10.

[0029] In this embodiment, by setting the first switch branch 10 as a first switch unit 11 and a second switch unit 12, the signal conversion process can be realized through the first switch unit 11 when the second switch unit 12 cannot be directly controlled by the pulse width modulation signal.

[0030] Please refer to Figure 3 , Figure 3 This application provides a circuit structure for a buzzer driver circuit. For example... Figure 3 As shown, the first switching unit 11 includes a first switching transistor Q1, a first resistor R1, and a second resistor R2.

[0031] The control terminal of the first switch Q1 is electrically connected to the first terminal of the first resistor R1 and the first terminal of the second resistor R2. The second terminal of the first resistor R1 is electrically connected to the controller 40. The first terminal of the first switch Q1 and the second terminal of the second resistor R2 are both grounded to GND. The second terminal of the first switch Q1 is electrically connected to the second switch unit 12.

[0032] The first resistor R1 is used for current limiting. The first resistor R1 and the second resistor R2 divide the voltage of the pulse width modulation signal output by the controller 40. The second resistor R2 also serves to discharge charge when the first switch Q1 is turned off, ensuring that the first switch Q1 is reliably turned off.

[0033] In this embodiment, the first switching transistor Q1 is a PNP transistor. The control terminal of the first switching transistor Q1 is the base of the PNP transistor, the first terminal of the first switching transistor Q1 is the emitter of the PNP transistor, and the second terminal of the first switching transistor Q1 is the collector of the PNP transistor.

[0034] In addition, the first switch Q1 can be any controllable switch, such as an insulated gate bipolar transistor (IGBT) device, an integrated gate commutated thyristor (IGCT) device, a gate turn-off thyristor (GTO) device, a silicon controlled rectifier (SCR) device, a junction gate field-effect transistor (JFET) device, a MOS controlled thyristor (MCT) device, etc.

[0035] In some embodiments, the second switching unit 12 includes a second switching transistor Q2, a third resistor R3, and a fourth resistor R4.

[0036] The control terminal of the second switch Q2 is electrically connected to the first terminal of the third resistor R3 and the first terminal of the fourth resistor R4, respectively. The second terminal of the third resistor R3 is electrically connected to the first switch unit 11. The second terminal of the fourth resistor R4 and the first terminal of the second switch Q2 are both electrically connected to the negative power supply V-. The second terminal of the second switch Q2 is electrically connected to the buzzer BU1.

[0037] The third resistor R3 is used for current limiting. The third resistor R3 and the fourth resistor R4 form a voltage divider between ground GND and the negative power supply V-. The fourth resistor R4 also serves to discharge charge when the second switch Q2 is turned off, ensuring that the second switch Q2 is turned off smoothly.

[0038] In this embodiment, the second switch Q2 is an NPN transistor. The control terminal of the second switch Q2 is the base of the NPN transistor, the first terminal of the second switch Q2 is the emitter of the NPN transistor, and the second terminal of the second switch Q2 is the collector of the NPN transistor.

[0039] In addition, the second switch Q2 can be any controllable switch, such as an insulated gate bipolar transistor (IGBT) device, an integrated gate commutated thyristor (IGCT) device, a gate turn-off thyristor (GTO) device, a silicon controlled rectifier (SCR) device, a junction gate field-effect transistor (JFET) device, a MOS controlled thyristor (MCT) device, etc.

[0040] In some embodiments, the second switching branch 30 includes a third switching transistor Q3, a fifth resistor R5, and a sixth resistor R6.

[0041] The control terminal of the third switch Q3 is electrically connected to the first terminal of the fifth resistor R5 and the first terminal of the sixth resistor R6, respectively. The second terminal of the fifth resistor R5 is electrically connected to the controller 40. The first terminal of the third switch Q3 and the second terminal of the sixth resistor R6 are both grounded to GND. The second terminal of the third switch Q3 is electrically connected to the charging and discharging branch 30.

[0042] The fifth resistor R5 is used for current limiting. The fifth resistor R5 and the sixth resistor R6 divide the voltage of the control signal output by the controller 40. The sixth resistor R6 also serves to discharge charge when the third switch Q3 is turned off, ensuring reliable turn-off of the third switch Q3.

[0043] In this embodiment, the third switch Q3 is a PNP transistor. The control terminal of the third switch Q3 is the base of the PNP transistor, the first terminal of the third switch Q3 is the emitter of the PNP transistor, and the second terminal of the third switch Q3 is the collector of the PNP transistor.

[0044] In addition, the third switch Q3 can be any controllable switch, such as an insulated gate bipolar transistor (IGBT) device, an integrated gate commutated thyristor (IGCT) device, a gate turn-off thyristor (GTO) device, a silicon controlled rectifier (SCR) device, a junction gate field-effect transistor (JFET) device, a MOS controlled thyristor (MCT) device, etc.

[0045] In some embodiments, the charging / discharging branch 30 includes a first capacitor C1, a seventh resistor R7, and an eighth resistor R8.

[0046] The first terminal of the first capacitor C1 is electrically connected to the negative power supply V-. The second terminal of the first capacitor C1 is electrically connected to the first terminal of the seventh resistor R7. The second terminal of the seventh resistor R7 is electrically connected to the first terminal of the eighth resistor R8 and the buzzer BU1. The second terminal of the eighth resistor R8 is electrically connected to the second switch branch 20.

[0047] Among them, the seventh resistor R7 and the eighth resistor R8 are used to adjust the charging time of the first capacitor C1, and the eighth resistor R8 is also used to adjust the discharging time of the first capacitor C1.

[0048] In some embodiments, the buzzer drive circuit 100 further includes a ninth resistor R9. The ninth resistor R9 is connected in parallel with the buzzer BU1.

[0049] The ninth resistor R9 is used for circuit characteristic optimization. On the one hand, the buzzer BU1 in this application is a passive buzzer. The coil of a passive buzzer is an inductive load, which generates a back electromotive force at the moment of power failure, causing the diaphragm to "inertially vibrate" (residual vibration), resulting in noise or trailing sounds. The ninth resistor R9 can quickly dissipate the energy of the back electromotive force, damping the diaphragm movement and making the sound clearer and without trailing sounds. On the other hand, when the signal driving the buzzer BU1 is a square wave, the inductive load will cause the current waveform to lag (generating spikes). The ninth resistor R9 can weaken the inductive effect, making the current waveform closer to the ideal square wave, ensuring that the buzzer's vibration frequency is consistent with the signal driving the buzzer BU1.

[0050] The following are Figure 3 The principle of the circuit structure shown will be explained.

[0051] When the control signal output by the controller 40 is the level signal corresponding to the negative power supply V-, the level signal corresponding to the negative power supply V- is input to the base of the third switch Q3 through the fifth resistor R5. Since the emitter of the third switch Q3 is grounded to GND, the voltage at the base of the third switch Q3 is less than the voltage at the emitter. Furthermore, the difference between the emitter voltage and the base voltage of the third switch Q3 is greater than the conduction threshold of the third switch Q3, thus the third switch Q3 is turned on. One end of the first capacitor C1 is grounded to GND through the seventh resistor R7, the eighth resistor R8, and the third switch Q3. Because the other end of the first capacitor C1 is electrically connected to the negative power supply V-, a voltage difference exists across the first capacitor C1, and current flows through the first capacitor C1, charging it. At this time, if the second switch Q2 is continuously switched on and off alternately, the voltage applied to the buzzer BU1 is a slowly changing voltage, which can make the buzzer BU1 output a corresponding sound. Furthermore, by adjusting the resistance values ​​of the seventh resistor R7 and the eighth resistor R8, the charging and discharging speed of the first capacitor C1 can be adjusted, thereby adjusting the sound output by the buzzer BU1.

[0052] When the control signal output by controller 40 is the level signal corresponding to ground GND, the level signal corresponding to ground GND is input to the base of the third switch Q3 through the fifth resistor R5. The emitter of the third switch Q3 is also grounded to GND, so the voltage between the base and emitter of the third switch Q3 is the same, and the third switch Q3 is turned off. At this time, if the second switch Q2 is continuously and alternately turned on and off, when the second switch Q2 is turned on, the first capacitor C1, the seventh resistor R7, the buzzer BU1, the second switch Q2, and the negative power supply V- form a discharge circuit for the first capacitor C1. The first capacitor C1 discharges to the buzzer BU1 (it can be understood that in practical applications, the resistance value of the ninth resistor R9 is relatively large, much larger than the resistance value of the buzzer BU1, so the first capacitor C1 mainly discharges to the buzzer BU1) to drive the buzzer BU1 to operate. In this circuit, the pulse width modulation (PWM) signal output by controller 40 acts on the first switch Q1, causing Q1 to alternately turn on and off (Q1 turns on when the PWM signal corresponds to the level of the negative power supply V-; it turns off when the PWM signal corresponds to the level of ground GND). Then, when Q1 is on, the base of the second switch Q2 is grounded through the third resistor R3, and its emitter is electrically connected to the negative power supply V-. Therefore, the voltage at the base of Q2 is greater than the voltage at its emitter, and the difference between the base and emitter voltages is greater than the turn-on threshold of Q2, thus Q2 turns on. When Q1 is off, Q2 also turns off. Therefore, when Q1 alternately turns on and off, Q2 also alternately turns on and off. It is understandable that the buzzer BU1 does not have an internal oscillation source. It is driven to produce sound by an externally provided signal, and different notes correspond to different signal frequencies. Therefore, in this embodiment, the frequency of the pulse width modulation signal corresponds to the notes that the buzzer BU1 can output. That is, by adjusting the frequency of the pulse width modulation signal, the buzzer BU1 can output the sound of the note corresponding to the pulse width modulation signal.

[0053] This application also provides an electronic device, which includes a buzzer and a buzzer driving circuit 100 as described in any embodiment of this application. The buzzer driving circuit 100 is electrically connected to the buzzer to drive the buzzer to operate.

[0054] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

[0055] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, and the steps can be implemented in any order. Those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A buzzer driver circuit, characterized in that, include: The first switch branch, the second switch branch, the charging / discharging branch, and the controller; The controller is electrically connected to the first switch branch and the second switch branch respectively. The first switch branch is electrically connected between the negative power supply and the buzzer. The second switch branch is electrically connected to the charging and discharging branch and the buzzer respectively. The charging and discharging branch is also electrically connected to the negative power supply. The first switch branch is configured to alternately turn on and off in response to a pulse width modulation signal output by the controller, wherein the buzzer is electrically connected to the negative power supply when the first switch branch is on. The second switch branch is configured to be turned on or off in response to a control signal output by the controller; The charging and discharging branch is configured to charge when the second switch branch is turned on, and to discharge to the buzzer when the second switch branch is turned off and the first switch branch is turned on, so as to drive the buzzer to operate.

2. The buzzer drive circuit according to claim 1, characterized in that, The first switch branch includes: The first switching unit is electrically connected to the controller and the second switching unit respectively, and is configured to alternately turn on and off in response to the pulse width modulation signal, wherein when the first switching unit is turned on, it outputs a first level signal to the second switching unit, and stops outputting the first level signal when the first switching unit is turned off; The second switching unit, electrically connected between the buzzer and the negative power supply, is configured to turn on when the first level signal is received and turn off when the first level signal is not received, wherein the buzzer is electrically connected to the negative power supply when the second switching unit is on.

3. The buzzer drive circuit according to claim 2, characterized in that, The first switching unit includes a first switching transistor, a first resistor, and a second resistor; The control terminal of the first switch is electrically connected to the first terminal of the first resistor and the first terminal of the second resistor, respectively. The second terminal of the first resistor is electrically connected to the controller. The first terminal of the first switch and the second terminal of the second resistor are both grounded. The second terminal of the first switch is electrically connected to the second switch unit.

4. The buzzer drive circuit according to claim 2, characterized in that, The second switching unit includes a second switching transistor, a third resistor, and a fourth resistor; The control terminal of the second switch is electrically connected to the first terminal of the third resistor and the first terminal of the fourth resistor, respectively. The second terminal of the third resistor is electrically connected to the first switch unit. The second terminal of the fourth resistor and the first terminal of the second switch are both electrically connected to the negative power supply. The second terminal of the second switch is electrically connected to the buzzer.

5. The buzzer drive circuit according to claim 2, characterized in that, The first switching transistor in the first switching unit is a PNP transistor, and the second switching transistor in the second switching unit is an NPN transistor; The control terminal of the first switching transistor is the base of a PNP transistor, the first terminal of the first switching transistor is the emitter of a PNP transistor, and the second terminal of the first switching transistor is the collector of a PNP transistor. The control terminal of the second switch is the base of the NPN transistor, the first terminal of the second switch is the emitter of the NPN transistor, and the second terminal of the second switch is the collector of the NPN transistor.

6. The buzzer drive circuit according to claim 1, characterized in that, The second switching branch includes a third switching transistor, a fifth resistor, and a sixth resistor; The control terminal of the third switch is electrically connected to the first terminal of the fifth resistor and the first terminal of the sixth resistor, respectively. The second terminal of the fifth resistor is electrically connected to the controller. The first terminal of the third switch and the second terminal of the sixth resistor are both grounded. The second terminal of the third switch is electrically connected to the charging and discharging branch.

7. The buzzer drive circuit according to claim 6, characterized in that, The third switching transistor is a PNP type transistor; The control terminal of the third switch is the base of the PNP transistor, the first terminal of the third switch is the emitter of the PNP transistor, and the second terminal of the third switch is the collector of the PNP transistor.

8. The buzzer drive circuit according to claim 7, characterized in that, The charging and discharging branch includes a first capacitor, a seventh resistor, and an eighth resistor; The first terminal of the first capacitor is electrically connected to the negative power supply, the second terminal of the first capacitor is electrically connected to the first terminal of the seventh resistor, the second terminal of the seventh resistor is electrically connected to the first terminal of the eighth resistor and the buzzer, and the second terminal of the eighth resistor is electrically connected to the second switch branch.

9. The buzzer drive circuit according to claim 1, characterized in that, The buzzer driver circuit also includes a ninth resistor; The ninth resistor is connected in parallel with the buzzer.

10. An electronic device, characterized in that, Includes a buzzer and a buzzer drive circuit as described in any one of claims 1-9; The buzzer driver circuit is electrically connected to the buzzer to drive the buzzer to operate.