Summary of the invention
The technical problem to be solved in the present invention is, above-mentioned defect for prior art, a kind of single-input dual-output pulse-width modulation signal generating circuit is provided, comprise the inverter being connected with the PWM port of microcontroller, regulating circuit with described inverter electrical connection, the PWM output circuit being all electrically connected with described regulating circuit and the first reference circuit and the 2nd PWM output circuit being all electrically connected with described regulating circuit and the second reference circuit, wherein, one end of described the first reference circuit is connected with external power source, the other end of described the first reference circuit is through described the second reference circuit ground connection,
Described inverter, for filtering interference signals, carries out Shape correction to the pwm signal receiving from described PWM port;
Described the first reference circuit is used for providing the first reference voltage to a described PWM output circuit, and described the second reference circuit is used for providing the second reference voltage to described the 2nd PWM output circuit;
A described PWM output circuit is used for exporting the first pwm signal, and described the 2nd PWM output circuit is used for exporting the second pwm signal, wherein, and the complementary PWM signals that described the first pwm signal and described the second pwm signal are two-way band dead band;
Described regulating circuit is for regulating the Dead Time of the two-way complementary PWM signals of a described PWM output circuit and described the 2nd PWM output circuit output.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, described the first reference circuit comprises that the first resistance, the second resistance and the first electric capacity, described the second reference circuit comprise the 3rd resistance and the second electric capacity; Wherein, one end of described the first resistance is connected with external power source, the other end of described the first resistance is successively through described the second resistance and described the 3rd grounding through resistance, one end of described the first electric capacity connects the tie point of described the first resistance and described the second resistance, the other end ground connection of described the first electric capacity, and described the second electric capacity and described the 3rd resistance are connected in parallel.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, described regulating circuit comprises the 4th resistance and the 3rd electric capacity, described the 4th one end of resistance and the output of described inverter is connected, the other end of described the 4th resistance is through described the 3rd capacity earth.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, a described PWM output circuit comprises the 5th resistance, the 6th resistance, the 7th resistance and the first comparator, one end of described the 5th resistance connects the positive input terminal of described the first comparator, the other end of described the 5th resistance connects the tie point of described the first resistance and described the second resistance, one end of described the 6th resistance connects the negative input end of described the first comparator, the other end of described the 6th resistance respectively with one end of described the 7th resistance, described the 4th resistance is connected with the tie point of described the 3rd electric capacity, the other end ground connection of described the 7th resistance, the output of described the first comparator is exported the first pwm signal.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, described the 2nd PWM output circuit comprises the 8th resistance, the 9th resistance and the second comparator, one end of described the 8th resistance is connected with the tie point of described the 3rd electric capacity with the positive input terminal of described the second comparator, described the 4th resistance respectively, the other end ground connection of described the 8th resistance; The tie point that one end of described the 9th resistance is connected with the negative input end of described the second comparator, the other end of described the 9th resistance connects described the second resistance and described the 3rd resistance, the output of described the second comparator is exported the second pwm signal.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, also comprise the tenth resistance, one end of described the tenth resistance connects external power source, and the other end of described the tenth resistance connects the output of described inverter and the tie point of described the 4th resistance.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, described the first reference voltage is greater than described the second reference voltage.
In above-mentioned single-input dual-output pulse-width modulation signal generating circuit, the first pwm signal of the pwm signal of the PWM port of described microcontroller output and a described PWM output circuit output and the second pwm signal of described the 2nd PWM output circuit output are Low level effective signal.
Implement single-input dual-output pulse-width modulation signal generating circuit of the present invention, there is following beneficial effect: because a PWM port of microcontroller can change the complementary PWM signals output in two-way band dead band into by Ba Yi road pwm signal, and Dead Time can regulate, be easy to realize, cost is lower, be that microcontroller only need use a PWM port just can control two switch elements of same brachium pontis and produce Dead Time, therefore can effectively save the PWM port of microcontroller, solve the not enough problem of PWM port of control system in Motor Control Field.For example, when the pulse signal of exporting by PWM port is controlled the electronic commutation of three phase alternating current motor, adopt single-input dual-output pulse-width modulation signal generating circuit of the present invention, only need 3 road PWM ports of microcontroller can realize the electronic commutation control of microcontroller to motor, greatly reduce the development cost of product, and the Dead Time of pwm signal can be set flexibly, avoid the risk with bridge arm direct pass completely, thereby improved the reliability of product.
Embodiment
For technical characterictic of the present invention, object and effect being had more clearly, understand, now contrast accompanying drawing and describe the specific embodiment of the present invention in detail.
Fig. 1 is the functional block diagram of a kind of single-input dual-output pulse-width modulation signal generating circuit of the present invention, comprise the inverter 101 that is connected with the PWM port of microcontroller, with the regulating circuit 102 of inverter 101 electrical connections and the PWM output circuit 105 all be electrically connected with regulating circuit 102 and the first reference circuit 103, and one end of the 2nd PWM output circuit 106, the first reference circuits 103 that are all electrically connected of regulating circuit 102 and the second reference circuit 104 is connected with external power source VCC, the other end of the first reference circuit 103 is through the second reference circuit 104 ground connection.Wherein, microcontroller can be exported required pwm signal at PWM port according to the control program setting in advance, because the impact of some peripheral circuits, need to carry out by inverter 101 interference signal existing in filtering circuit, the pwm signal receiving from PWM port is carried out to Shape correction, prevent the microcontroller misoperation that powers on; The first reference circuit 103 for provide the first reference voltage to PWM output circuit 105, the second reference circuits 104 for providing the second reference voltage to the 2nd PWM output circuit 106.
The one PWM output circuit 105 is for exporting the first pwm signal, the 2nd PWM output circuit 106 is for exporting the second pwm signal, wherein, the first pwm signal and the second pwm signal are the complementary pwm signal in two-way band dead band, and according to regulating circuit 102, can regulate the Dead Time of pwm signal of the two-way complementation of a PWM output circuit 105 and the output of the 2nd PWM output circuit 106.Therefore this single-input dual-output pulse-width modulation signal generating circuit can Jiang Yi road pwm signal converts the pwm signal output of the adjustable two-way complementation of Dead Time to, be that microcontroller only needs a PWM port just can control two switch elements of same brachium pontis and produce Dead Time, avoid the risk of same bridge arm direct pass completely, effectively saved the PWM port of microcontroller.
Fig. 2 is the circuit theory diagrams of a kind of single-input dual-output pulse-width modulation signal generating circuit of the present invention, wherein, inverter 101 is preferably schmitt inverter U2, in this circuit, inverter U2 is absolutely necessary, in complicated electronic environment, exist and be difficult to the electromagnetic interference grasped, can filtering interference signals by inverter U2, the pwm signal MCU_PWM of PWM port output is carried out to Shape correction.Regulating circuit 102 comprises resistance R 4 and capacitor C 3, and one end of resistance R 4 is connected with the output of inverter U2, the other end of resistance R 4 is through capacitor C 3 ground connection.
The first reference circuit 103 comprises that resistance R 1, resistance R 2 and capacitor C 1, the second reference circuit 104 comprise resistance R 3 and capacitor C 2; One end of resistance R 1 is connected with external power source VCC, the other end of resistance R 1 is successively through resistance R 2 and resistance R 3 ground connection, and one end of capacitor C 1 is connected between resistance R 1 and resistance R 2, the other end ground connection of capacitor C 1, and capacitor C 2 is connected in parallel with resistance R 3.
The first reference circuit 103 is for providing the first reference voltage, and the A point between resistance R 1 and resistance R 2 forms a reference voltage, and in this circuit, capacitor C 1 is storage capacitor, is mainly used for keeping the first reference voltage stable.The second reference circuit 104 is for providing second reference voltage that ratio the first reference voltage is little, and one end B point in resistance R 3 and capacitor C 2 parallel connections produces the second reference voltage, and in addition, the effect of capacitor C 2 is also for keeping the second reference voltage stable.
The one PWM output circuit 105 comprises resistance R 5, resistance R 6, resistance R 7 and the first comparator U1-A, one end of resistance R 5 is connected between resistance R 1 and resistance R 2, the other end of resistance R 5 connects the positive input terminal of the first comparator U1-A, one end of resistance R 6 connects the negative input end of the first comparator U1-A, the other end of resistance R 6 is connected with one end, resistance R 4 and the tie point of capacitor C 3 of resistance R 7 respectively, the other end ground connection of resistance R 7, the output of the first comparator U1-A is exported the first pwm signal PWM_U1 with conducting and the shutoff of control switch element.
The 2nd PWM output circuit 106 comprises resistance R 8, resistance R 9 and the second comparator U1-B, and one end of resistance R 8 is connected with positive input terminal, resistance R 4 and the tie point of capacitor C 3 of the second comparator U1-B respectively, the other end ground connection of resistance R 8; One end of resistance R 9 is connected with the negative input end of the second comparator U2-A, the other end of resistance R 9 is connected with the tie point of resistance R 3 with capacitor C 2, and the output of the second comparator U1-B is exported the second pwm signal PWM_U2 with conducting and the shutoff of control switch element.
In above-mentioned pulse-width modulation signal generating circuit, all pwm signals are Low level effective, the first pwm signal PWM_U1 and the second pwm signal PWM_U2 of output are the pwm signal of two-way complementation, and there is certain Dead Time, and the regulating circuit 102 that this Dead Time can consist of resistance R 4 and capacitor C 3 regulates, just can flexible Dead Time by the value of change resistance capacitance.While removing again in power ratio control circuit the switch element in same brachium pontis by this two-way pwm signal, avoided the risk with bridge arm direct pass completely, improved the reliability of product, therefore microcontroller only need use a PWM port just can control two switch elements of same brachium pontis and produce Dead Time, can effectively save the PWM port of microcontroller, and good reliability, cost is extremely low.
Now introduce in detail list of the present invention and input the specific works principle of many output pulse widths modulated signal producing circuit: pwm signals all in this signal generating circuit are Low level effective, therefore in this circuit, inverter U2 is absolutely necessary, this is because in complicated electronic environment, exist the electromagnetic interference that is difficult to grasp, can be because interference signal produces misoperation when pwm signal when PWM port output is in high level state by arranging that inverter U2 can effectively guarantee, therefore the existence of inverter U2 can effectively prevent electromagnetic interference, the generation of misoperation prevents from powering on, and guaranteed that the pwm signal of PWM port output is consistent with the waveform of the first pwm signal PWM_U1 of PWM output circuit 105 outputs.When inverter U2 is output as the 5V voltage that high level and magnitude of voltage provide lower than external power source, can be by external power source to resistance R 4 supplemental current.
By the first reference circuit 103, provide the positive input terminal of the first reference voltage to the first comparator U1-A, be provided with oppositely the relatively threshold value of upset to the positive input terminal of the first comparator U1-A; The second reference circuit 104 provides the negative input end of the second reference voltage to the second comparator U1-B, is provided with the threshold value with the upset of comparing to the negative input end of the second comparator U1-B, and wherein, the first reference voltage is greater than the second reference voltage.While initially powering on, the pwm signal of the PWM port output of microcontroller is high level, after inverter U2, be output as low level, the positive input terminal of cause the first comparator U1-A i.e. voltage of 5 pin is equivalent to the first reference voltage, now the positive input terminal voltage of the first comparator U1-A is greater than negative input end voltage, the first comparator U1-A output high level, and the negative input end of the second comparator U1-B positive input terminal that voltage of 6 pin is greater than the second comparator U1-B i.e. voltage of 7 pin, now the second comparator U1-B output low level.
When the pwm signal of the PWM of microcontroller port output is low level, after inverter U2, be output as high level, its magnitude of voltage generally can be less than outer power voltage 5V, and now outer power voltage can be by pull-up resistor R10 to resistance R 4 supplemental current.Capacitor C 3 is in charged state, the voltage of the voltage of the first comparator U1-A negative input end and the second comparator U1-B positive input terminal is equivalent to the voltage that the tie point C of resistance R 4 and capacitor C 3 is ordered, wherein, the value of resistance R 4 and capacitor C 3 has determined the speed in charging interval, when C point voltage is during lower than the first reference voltage and the second reference voltage, the first comparator U1-A still exports high level, the second comparator U1-B is output low level still, after a period of time to be charged, C point voltage is during higher than the second reference voltage but lower than the first reference voltage, the positive input terminal voltage of the first comparator U1-A is higher than negative input end voltage, output high level, and the positive input terminal voltage of the second comparator U1-B is also higher than negative input end voltage, same output high level, capacitor C 3 continues charging, when C point voltage is during higher than the first reference voltage, the positive input terminal voltage of the first comparator U1-A is lower than negative input end voltage, now the first comparator U1-A output low level, is both the second comparator U2-A and still exports high level.Dead Time is that the first comparator U1-A and the second comparator U1-B output are the time of high level simultaneously, because significant level is low level, be that switch element conducting when the pwm signal of the first comparator U1-A or the second comparator U1-B output is low level, pwm signal end while being high level, so can avoid the risk of same bridge arm direct pass completely.
Afterwards when the pwm signal of the PWM of microcontroller port output is high level, after inverter U2, be output as low level, capacitor C 3 starts electric discharge, when C point voltage is greater than the second reference voltage lower than the first reference voltage, the first comparator U1-A output high level, the second comparator U2-A also exports high level.Capacitor C 3 continues electric discharge, until C point voltage during lower than the second reference voltage, and the first comparator U1-A output high level, the second comparator U1-B output low level, until C point voltage is 0.Wherein, the first comparator U1-A and the second comparator U1-B output are simultaneously for the time of high level is Dead Time, because of Low level effective, can avoid the risk of same bridge arm direct pass completely, and the Dead Time regulating circuit that Dead Time can consist of resistance R 4 and capacitor C 3 regulates, and the parameter that changes resistance R 4 and capacitor C 3 just can arrange the Dead Time of two-way complementary PWM signals flexibly.Why need to regulate Dead Time, because when adopting PWM to control, switch element conducting simultaneously with brachium pontis, otherwise DC power supply can form short circuit in inside, this is definitely unallowed, the short circuit that may cause is not in time reacted in switching for fear of switch element, must between the two-way pwm signal of output, set interlock time, i.e. Dead Time.
With the example that is applied as in three phase alternating current motor, domestic motor control schemes mainly adopts the DSP of TI manufacturer production as main control chip at present, the 6 road PWM peripheral hardwares that configure its chip by software produce modulating wave, control again its switch element and complete electronic commutation, Dead Time is also to complete by configuration register simultaneously, although adopt, by software, configure the mode of PWM peripheral hardware of DSP comparatively simple on controlling, and need to take 6 road PWM ports and export, and cost is higher.And by adopting single-input dual-output pulse-width modulation signal generating circuit of the present invention, the electronic commutation that only needs 3 road PWM ports can complete three phase alternating current motor is controlled, only need there is the microcontroller of 3 road PWM ports, each road PWM port all connects above-mentioned single-input dual-output pulse-width modulation signal generating circuit, one road PWM port just can be controlled conducting and the shutoff of two switch elements of same brachium pontis, and Dead Time is adjustable, avoided the risk with bridge arm direct pass completely, and the pwm signal of three road PWM ports outputs all can arrange according to control program in advance by microcontroller.In three phase alternating current motor is controlled, by utilizing single-input dual-output pulse-width modulation signal generating circuit of the present invention, PWM port only need utilize 3, for the microcontroller that contains a plurality of PWM ports, can save 3 PWM ports realizes as the design of the application scenarios such as analog output, ratio-voltage output for software developer, thereby greatly reduce the development cost of product, and the Dead Time of pwm signal of the two-way complementation of output can be set flexibly, avoid the risk with bridge arm direct pass completely, thereby improved the reliability of product.
Therefore implement a kind of single-input dual-output pulse-width modulation signal generating circuit provided by the invention, circuit structure is simple, can change the output of two-way pwm signal into by Ba Yi road pwm signal, and Dead Time can regulate, be easy to realize, cost is lower, therefore adopt now widely used low-cost single channel output control chip, coordinate circuit of the present invention, can realize and need the power inverter topological circuit of 2 switch elements to control, and the peripheral hardware of having expanded microprocessor is controlled function, solved the not enough problem of PWM port of control system in Motor Control Field.
By reference to the accompanying drawings embodiments of the invention are described above; but the present invention is not limited to above-mentioned embodiment; above-mentioned embodiment is only schematic; rather than restrictive; those of ordinary skill in the art is under enlightenment of the present invention; not departing from the scope situation that aim of the present invention and claim protect, also can make a lot of forms, within these all belong to protection of the present invention.