A buzzer driving circuit
By designing a buzzer driving circuit including a power control circuit, an oscillation control circuit and an oscillation circuit, the problem of buzzer driver occupies MCU resources and poor sound quality in the prior art is solved, and resource saving and sound quality improvement are achieved.
Patent Information
- Application Number
- CN202010291295.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2040-04-14
AI Technical Summary
The existing buzzer driver solution occupies the main MCU resources, has poor sound quality, and the volume is limited under limited power supply voltage.
A buzzer driving circuit including a power control circuit, an oscillation control circuit and an oscillation circuit is designed. The high and low level control power control circuit is output through the MCU. The oscillation control circuit stably controls the oscillation circuit to generate a standard sine wave and drives the buzzer.
It reduces the IO port usage of the MCU, saves resources of the main MCU, and improves the sound quality of the buzzer, making the sound softer and crisper.
Smart Images

Figure CN111369960B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of household appliance sound processing, and in particular to a buzzer driving circuit. Background Art
[0002] Nowadays, buzzers are used more and more widely in the fields of household appliances and industrial control. They can be as small as the reminder beeps of simple household appliances or as large as the reminder music of central air conditioners. As an important information transmission component for human-computer interaction, buzzers will occupy an important position for quite some time.
[0003] At present, the main driving scheme of the buzzer is to use MCU to directly output PWM square wave to drive. This method is currently widely used, but it also has some unavoidable disadvantages:
[0004] 1. It occupies the main MCU resources, making it inconvenient to use and debug when adding an additional buzzer module.
[0005] 2. The sound produced by the buzzer driven by PWM square wave is single in timbre, sharp in pitch and poor in sound quality.
[0006] 3. Under the condition of limited and fixed power supply voltage, the voltage difference across the buzzer driven by direct PWM wave is limited by the power supply voltage, which in turn limits the volume of the buzzer. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a buzzer driving circuit, which can save MCU resources and improve the sound quality of the buzzer.
[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0009] A buzzer driving circuit includes a power control circuit, an oscillation control circuit and an oscillation loop, wherein the power control circuit is connected to an MCU, and the MCU outputs high and low levels to control the power control circuit to be turned on or off. When the power control circuit is turned on, the oscillation control circuit controls the oscillation loop to oscillate and generate a first sinusoidal wave signal and a second sinusoidal wave signal at both ends of the buzzer, wherein the first sinusoidal wave signal and the second sinusoidal wave signal have the same frequency and opposite phases.
[0010] Preferably, the power control circuit includes a first resistor and a first switch tube, the first end of the first switch tube is connected to the oscillation control circuit, the second end of the first switch tube is grounded, and the control end of the first switch tube is connected to the MCU through the first resistor.
[0011] Preferably, the first switch tube is an NPN transistor, the first end of the first switch tube is a collector, the second end of the first switch tube is an emitter, and the control end of the first switch tube is a base.
[0012] Preferably, the oscillation circuit includes a first inductor, a second inductor and a first capacitor, and the oscillation control circuit includes a second resistor, a third resistor, a second switch tube, a third switch tube and a third inductor, wherein the first end of the second resistor, the first end of the third resistor, the first end of the first inductor and the first end of the second inductor are connected to the power supply, the second end of the first inductor is respectively connected to the first end of the first capacitor and the first end of the third switch tube, the second end of the second inductor is respectively connected to the second end of the first capacitor and the first end of the second switch tube, and the buzzer is connected between the first end of the first capacitor and the second end of the first capacitor; the second end of the second resistor is respectively connected to the first end of the third inductor and the control end of the third switch tube, the second end of the third resistor is respectively connected to the second end of the third inductor and the control end of the second switch tube, and the second end of the second switch tube and the second end of the third switch tube are connected to the power control circuit; the first inductor, the second inductor and the third inductor are wound on the same transformer skeleton, and the first end of the first inductor and the first end of the second inductor are opposite-name terminals, and the first end of the second inductor and the first end of the third inductor are like-name terminals.
[0013] Preferably, the oscillation control circuit also includes a fourth resistor, a first end of the fourth resistor is connected to the power supply, and a second end of the fourth resistor is respectively connected to the first end of the second resistor, the first end of the third resistor, the first end of the first inductor, and the first end of the second inductor.
[0014] Preferably, the second resistor and the third resistor have the same resistance value.
[0015] Preferably, the inductances of the first inductor, the second inductor and the third inductor are the same.
[0016] Preferably, the second switch tube and the third switch tube are bipolar transistors or MOS tubes.
[0017] Preferably, if the second switch tube and the third switch tube are bipolar transistors, the second switch tube and the third switch tube are NPN transistors, the first end of the second switch tube is the collector, the second end of the second switch tube is the emitter, the control end of the second switch tube is the base, the first end of the third switch tube is the collector, the second end of the third switch tube is the emitter, and the control end of the third switch tube is the base.
[0018] Preferably, the buzzer is a piezoelectric buzzer.
[0019] The beneficial technical effect of the present invention is that the buzzer driving circuit includes an oscillation control circuit and an oscillation circuit, the oscillation circuit oscillates and generates a first sine wave signal and a second sine wave signal at both ends of the buzzer, the oscillation control circuit performs stable closed-loop control on the oscillation circuit, so that the oscillation waveform of the oscillation circuit is stable when working, and a standard sine wave is generated at both ends of the buzzer to drive the buzzer to sound, without the need for MCU to output PWM to drive the buzzer, thereby reducing the IO port occupation of the MCU and saving the resources of the main control MCU; in addition, the standard sine wave acts on both ends of the buzzer, and the sound emitted by the buzzer is soft and crisp, which is better than the sound effect emitted by the buzzer driven by the PWM square wave, and there is no noise, thereby improving the sound quality of the buzzer. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a structural block diagram of a buzzer driving circuit of the present invention;
[0021] Figure 2 is a circuit schematic diagram of a buzzer driving circuit of the present invention;
[0022] Figure 3 A waveform diagram of the oscillation circuit of the present invention;
[0023] Figure 4 is a logic schematic diagram of the oscillation control circuit of the present invention;
[0024] Figure 5 is the equivalent circuit of the oscillation circuit of the present invention at the first moment;
[0025] Figure 6 is the equivalent circuit of the oscillation circuit of the present invention at the second moment. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to more clearly understand the objectives, technical solutions and advantages of the present invention, the present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0027] like Figure 1 As shown, in one embodiment of the present invention, the buzzer driving circuit includes a power control circuit 10, an oscillation control circuit 20 and an oscillation loop 30 connected in sequence, the power control circuit 10 is connected to the MCU, and the MCU outputs high and low levels to control the power control circuit 10 to be turned on or off, thereby controlling the circuit between the buzzer driving circuit and the power supply to be turned on or off. When the power control circuit 10 is turned on, the oscillation control circuit 20 controls the oscillation loop 30 to oscillate and generate a first sine wave signal and a second sine wave signal at both ends of the buzzer, and the first sine wave signal and the second sine wave signal have the same frequency and opposite phase.
[0028] like Figure 2As shown, the power control circuit 10 includes a first resistor R1 and a first switch tube Q1, the first end of the first switch tube Q1 is connected to the oscillation control circuit 20, the second end of the first switch tube Q1 is grounded, and the control end of the first switch tube Q1 is connected to the MCU control IO port through the first resistor R1. In the embodiment of the present invention, the first switch tube Q1 is an NPN type triode, the first end of the first switch tube Q1 is a collector, the second end of the first switch tube Q1 is an emitter, and the control end of the first switch tube Q1 is a base.
[0029] The oscillation circuit 30 includes a first inductor L1, a second inductor L2 and a first capacitor C1, and the oscillation control circuit 20 includes a second resistor R2, a third resistor R3, a second switch tube Q2, a third switch tube Q3 and a third inductor L3, wherein the first end of the second resistor R2, the first end of the third resistor R3, the first end of the first inductor L1 and the first end of the second inductor L2 are connected to the power supply VCC, the second end of the first inductor L1 is respectively connected to the first end of the first capacitor C1 and the first end of the third switch tube Q3, the second end of the second inductor L2 is respectively connected to the second end of the first capacitor C1 and the first end of the second switch tube Q2, and the buzzer BZ1 is connected to the first A first end of a capacitor C1 and a second end of the first capacitor C1; a second end of the second resistor R2 is respectively connected to a first end of a third inductor L3 and a control end of a third switch tube Q3, a second end of the third resistor R3 is respectively connected to a second end of the third inductor L3 and a control end of the second switch tube Q2, a second end of the second switch tube Q2 and a second end of the third switch tube Q3 are connected to the power control circuit; the first inductor L1, the second inductor L2 and the third inductor L3 are wound on the same EF20 transformer skeleton, and the first end of the first inductor L1 and the first end of the second inductor L2 are opposite-name terminals, and the first end of the second inductor L2 and the first end of the third inductor L3 are like-name terminals.
[0030] In the embodiment of the present invention, the buzzer adopts a piezoelectric buzzer with a standard operating frequency of 4K HZ. The resistance values of the second resistor R2 and the third resistor R3 are both 1K ohm, and the inductances of the first inductor L1, the second inductor L2 and the third inductor L3 are all 1mH. The second switch tube Q2 and the third switch tube Q3 are both NPN type triodes, the first end of the second switch tube Q2 is the collector, the second end of the second switch tube Q2 is the emitter, the control end of the second switch tube Q2 is the base, the first end of the third switch tube Q3 is the collector, the second end of the third switch tube Q3 is the emitter, and the control end of the third switch tube Q3 is the base.
[0031] In some preferred embodiments of the present invention, the oscillation control circuit 20 further includes a fourth resistor R4, a first end of the fourth resistor R4 is connected to the power supply VCC, and a second end of the fourth resistor R4 is respectively connected to the first end of the second resistor R2, the first end of the third resistor R3, the first end of the first inductor L1, and the first end of the first inductor L2. The fourth resistor R4 is used as a current limiting resistor to limit the current flowing into the buzzer driving circuit.
[0032] In some preferred embodiments of the present invention, the first switch tube Q1, the second switch tube Q2 and the third switch tube Q3 can be different switch tubes as needed, such as NMOS tubes.
[0033] The power control circuit 10 is used to perform logic control on the entire buzzer drive circuit to ensure the controllability and effectiveness of the entire circuit. When the control signal of the MCU is low, the first switch tube Q1 is turned off, the buzzer drive circuit is cut off from the ground (GND), the entire buzzer drive circuit has no current, does not work, and does not generate standby power consumption; when the control signal of the MCU is high, the first switch tube Q1 is turned on, the buzzer drive circuit is turned on to the ground, and under the joint action of the power supply VCC and GND, there is a voltage difference in the buzzer drive circuit, and the conditions for oscillation are met. The oscillation circuit 30 starts to oscillate in the oscillation control circuit 20 to drive the buzzer to sound.
[0034] When the entire buzzer driving circuit is working, the oscillation circuit 30 generates a corresponding oscillation frequency according to the parameters of the first inductor L1, the second inductor L2 and the first capacitor C1, and the waveform changes of the first inductor L1 and the second inductor L2 cause the waveform of the third inductor L3 in the oscillation control circuit 20 to change synchronously. The third inductor L3 generates a corresponding oscillation frequency to control the switching state (on or off) of the second switch tube Q2 and the third switch tube Q3, thereby accurately locking the oscillation frequency of the oscillation circuit 30 and stabilizing it, generating a standard sine wave at both ends of the buzzer to drive the buzzer to sound.
[0035] Figure 3The waveforms of the first capacitor C1, the first inductor L1 and the second inductor L2 of the oscillation circuit during oscillation are shown. When measuring, the first capacitor C1 takes the first end (the end connected to the first inductor L1) as positive and the second end as negative; the first inductor L1 takes the second end (the end connected to the first capacitor C1) as positive and the second end as negative; the second inductor L2 takes the first end (the end connected to the power supply VCC) as positive and the second end as negative. Among them, the first sine wave signal and the second sine wave signal generated at both ends of the buzzer correspond to the first inductor L1 and the second inductor L2, the waveform of the first capacitor C1 is obtained by superimposing the first sine wave signal and the second sine wave signal, the peak values of the waveforms of the first inductor L1 and the second inductor L2 are VCC, and the peak value of the waveform of the first capacitor C1 is 2*VCC (an approximate value calculated after ignoring the voltage drop on the fourth resistor R4).
[0036] Figure 4 The waveform of the third inductor L3 of the oscillation control circuit and the waveforms of the second switch tube Q2 and the third switch tube Q3 that change with the waveform of the third inductor L3 are shown, wherein the waveforms of the second switch tube Q2 and the third switch tube Q3 are positive, indicating that they are turned on, and the waveforms are 0, indicating that they are cut off. Since the first end of the first inductor L1 and the first end of the third inductor L3 are opposite-named terminals, and the first end of the second inductor L2 and the first end of the third inductor L3 are like-named terminals, the waveform of the third inductor L3 has the same frequency as the second inductor L2 and the first inductor L1, the same phase as the second inductor L2, and the opposite phase as the first inductor L1.
[0037] When the third inductor L3 is in the positive half cycle of the sine wave, the third switch tube Q3 is turned on and the second switch tube Q2 is turned off; when the third inductor L3 is in the negative half cycle of the sine wave, the third switch Q3 is turned off and the second switch tube Q2 is turned on. By controlling the on and off of the second switch tube Q2 and the third switch Q3 at the same frequency by the third inductor L3, the third inductor L3 effectively feeds back the oscillation loop composed of the first capacitor C1, the first inductor L1 and the second inductor L2, forming a stable closed-loop control, so that the oscillation waveform is stable during operation.
[0038] The second switch tube Q2 and the third switch tube Q3 are alternately turned on and off under the control of the third inductor L3. The state changes of the second switch tube Q2 and the third switch tube Q3 cause the change of the oscillation circuit together with the frequency. When the third switch tube Q3 is turned on and the second switch tube Q2 is turned off, an oscillation circuit is formed with "the second inductor L2 and the first capacitor C1 connected in series, and then connected in parallel with the first inductor L1", such as Figure 5 As shown; when the third switch tube Q3 is turned off and the second switch tube Q2 is turned on, an oscillation circuit is formed with "the first inductor L1 and the first capacitor C1 connected in series, and then connected in parallel with the second inductor L2", as shown Figure 6 As shown. Figure 5 , Figure 6It can be seen that the oscillation circuit 30 will change the oscillation circuit according to the state changes of the second switch tube Q2 and the third switch tube Q3. When the oscillation circuit changes, the voltage difference across the first capacitor C1 changes from 2*VCC to 4*VCC, which greatly increases the voltage difference change across the buzzer.
[0039] Beneficial effects of the present invention:
[0040] 1. The buzzer driving circuit drives the buzzer by an oscillation circuit composed of a first inductor L1, a second point L2 and a first capacitor C1. At the same time, an oscillation control circuit composed of a third inductor L3, a second switch tube Q2 and a third switch Q3 performs stable closed-loop control on the oscillation circuit, so that the oscillation waveform of the oscillation circuit is stable when it is working, and a standard sine wave is generated at both ends of the buzzer to drive the buzzer to sound. There is no need for the MCU to output PWM to drive the buzzer, thereby reducing the IO port occupation of the MCU and saving the resources of the main control MCU; in addition, the standard sine wave acts on both ends of the buzzer, and the sound emitted by the buzzer is better than the sound emitted by the buzzer driven by the PWM square wave, without noise, thereby improving the sound quality of the buzzer.
[0041] 2. The second switch tube Q2 and the third switch Q3 will change the oscillation circuit synchronously with the oscillation frequency, thereby causing greater changes at both ends of the buzzer, greatly increasing the voltage difference at both ends of the buzzer, and thus enhancing the volume of the buzzer.
[0042] 3. The buzzer driving circuit includes a power control circuit 10. The power control circuit 10 controls whether the buzzer driving circuit forms a loop with respect to GND according to simple high and low levels generated by the MCU, thereby controlling the working state of the buzzer, ensuring the controllability and effectiveness of the entire circuit. The entire control process is reliable and rapid, and the buzzer driving circuit does not consume any power when in standby mode.
[0043] 4. The buzzer driving circuit is composed of ordinary capacitors, inductors and switch tubes, with a simple circuit structure, low cost and stable working performance.
[0044] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0045] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0046] The above description is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Those skilled in the art can make various equivalent changes and improvements based on the above embodiments, and all equivalent changes or modifications made within the scope of the claims should fall within the protection scope of the present invention.
Claims
1. A buzzer driving circuit, characterized in that: The buzzer driving circuit includes a power control circuit, an oscillation control circuit and an oscillation loop. When the power control circuit is turned on, the oscillation control circuit controls the oscillation loop to oscillate and generate a first sine wave signal and a second sine wave signal at both ends of the buzzer. The first sine wave signal and the second sine wave signal have the same frequency and opposite phases. The power control circuit includes a first resistor and a first switch tube, wherein a first end of the first switch tube is connected to the oscillation control circuit, a second end of the first switch tube is grounded, and a control end of the first switch tube is connected to the MCU through the first resistor; The oscillation circuit includes a first inductor, a second inductor and a first capacitor, and the oscillation control circuit includes a second resistor, a third resistor, a second switch tube, a third switch tube and a third inductor, wherein the first end of the second resistor, the first end of the third resistor, the first end of the first inductor and the first end of the second inductor are connected to a power supply, the second end of the first inductor is respectively connected to the first end of the first capacitor and the first end of the third switch tube, the second end of the second inductor is respectively connected to the second end of the first capacitor and the first end of the second switch tube, and the buzzer is connected between the first end of the first capacitor and the second end of the first capacitor; the second end of the second resistor is respectively connected to the first end of the third inductor and the control end of the third switch tube, the second end of the third resistor is respectively connected to the second end of the third inductor and the control end of the second switch tube, and the second end of the second switch tube and the second end of the third switch tube are connected to the power control circuit; the first inductor, the second inductor and the third inductor are wound on the same transformer skeleton, and the first end of the first inductor and the first end of the second inductor are opposite-name terminals, and the first end of the second inductor and the first end of the third inductor are like-name terminals.
2. The buzzer driving circuit according to claim 1, wherein: The first switch tube is an NPN transistor, the first end of the first switch tube is a collector, the second end of the first switch tube is an emitter, and the control end of the first switch tube is a base.
3. The buzzer driving circuit according to claim 1, wherein: The oscillation control circuit also includes a fourth resistor, a first end of the fourth resistor is connected to a power supply, and a second end of the fourth resistor is respectively connected to a first end of the second resistor, a first end of the third resistor, a first end of the first inductor, and a first end of the second inductor.
4. The buzzer driving circuit according to claim 1, wherein: The second resistor and the third resistor have the same resistance value.
5. The buzzer driving circuit according to claim 1, wherein: The inductances of the first inductor, the second inductor and the third inductor are the same.
6. The buzzer driving circuit according to claim 1, wherein: The second switch tube and the third switch tube are bipolar transistors or MOS tubes.
7. The buzzer driving circuit according to claim 6, wherein: If the second switch tube and the third switch tube are bipolar transistors, the second switch tube and the third switch tube are NPN transistors, the first end of the second switch tube is the collector, the second end of the second switch tube is the emitter, the control end of the second switch tube is the base, the first end of the third switch tube is the collector, the second end of the third switch tube is the emitter, and the control end of the third switch tube is the base.
8. The buzzer driving circuit according to any one of claims 1 to 7, characterized in that: The buzzer is a piezoelectric buzzer.
Citation Information
Patent Citations
Buzzer driving circuit
CN212230062U
Multivibrator circuit and piezoelectric buzzer unit
JP2004012789A