A kind of direct supply analogue means
Technical field
The utility model relates to a kind of direct supply analogue means, and specifically, the utility model belongs to the technical field that industrial control equipment is made,
Background technology
Electric power system, equipment and the relevant problem of loading can cause the quality of power supply to descend, and disturb the electronic equipment normal operation.Particularly at the Industry Control scene, a large amount of opertaing devices include microprocessor, and these microprocessors all are to adopt direct supply, and quality of power supply decline can cause faults such as these microprocessors are made mistakes, deadlock.Generally address this problem two approach arranged usually:
(a) antijamming capability of reinforcement direct supply itself, when the extraneous quality of power supply descended, the power supply internal mechanism guaranteed that direct current output is constant, as the present extensive filtering technique that adopts, switch power technology etc.Chinese patent 90212288.6 and 90105668.5 is used for analog alternating current interruption, step-down, three kinds of interference of pulse, and these three kinds of alternating current disturbances are relevant with the direct supply that microprocessor uses to the influence of microprocessor, existing high performance switch power technology can reduce or eliminate this three kinds of alternating current disturbances fully, makes it very little to its direct current output influence.
(b) antijamming capability of reinforcement microprocessor itself adopts filtering, monitoring voltage module and watchdog technique to prevent system in case of system halt or program fleet usually.But this opertaing device that includes microprocessor is usually in the laboratory or normal during the workshop debugging, and will occur makeing mistakes in industry spot, the deadlock phenomenon.Main cause is exactly the fluctuation that the general all environment of industry spot badly cause direct supply, and this fluctuation seldom occurs under the environment of laboratory and workshop.Therefore in order to check the real work performance of the opertaing device that includes microprocessor, need can the analog DC power-supply fluctuation equipment simulate direct supply output under the abominable industrial environment, in order to test these microprocessor control systems, whether check parts such as its filtering, monitoring voltage module and house dog working properly, whether the microprocessor antijamming capability is enough strong.The utility model just is being based on this purpose.
Summary of the invention
Summary of the invention
Technical matters:
The purpose of this utility model just provides one can simulate the unsettled direct supply analogue means of output voltage under the abominable industrial environment, in order to simulate the distortion of various direct supplys under the abominable industrial environment, be used for testing the control system that contains microprocessor, whether check parts such as its filtering, monitoring voltage module and house dog working properly, whether the microprocessor antijamming capability is enough strong.To solve the disappearance problem of this kind equipment in the prior art.
Technical scheme:
The utility model provides a kind of direct supply analogue means, draws together serial ports level shifting circuit, single-chip microcomputer, nonvolatile memory, filtering circuit, power amplification circuit, feed circuit and output interface; Wherein, described feed circuit are connected with serial ports level shifting circuit, single-chip microcomputer, nonvolatile memory, filtering circuit, power amplification circuit; Single-chip microcomputer is connected with serial ports level shifting circuit, nonvolatile memory, filtering circuit; Filtering circuit is connected with power amplification circuit, power amplification circuit) be connected with output interface, described feed circuit provide the input power supply for this device; Described single-chip microcomputer reads the parameter that is stored in the nonvolatile memory, dutycycle according to high-low level on this parameter control single chip computer pin, promptly export the PWM ripple, simulate the direct current of spread of voltage under the abominable industrial environment after this PWM ripple described filtering circuit of process and power amplification circuit filtering and the power amplification by described output interface output.
The direct supply analogue means of power status also comprises parameter set unit under the abominable industrial environment of simulation in a preferred embodiment of the present utility model, be used to be provided with the parameter in the described nonvolatile memory, this parameter set unit is arranged in the computing machine, communicate by letter with this direct supply analogue means by the computer interface that is arranged on this direct supply analogue means, described parameter comprises: cycle, amplitude, ceiling voltage, minimum voltage, ceiling voltage duration, minimum voltage duration, uphill process time, falling process time.
In the preferred embodiment of the present utility model, described filtering circuit is a low-pass filter, is used for described this pulse signal of PWM ripple is converted into the direct current signal that contains more radio-frequency component; Described power amplification circuit is the power amplifier of a band feedback, in order to amplify direct current signal.
In a preferred embodiment of the present utility model, the model of described single-chip microcomputer is 89C52; The model of nonvolatile memory is X25045, built-in house dog of X25045 and voltage monitoring circuit; It is amplifier and the peripheral circuit composition of LM324 that described filtering circuit adopts model.
Beneficial effect: the direct supply analogue means that the utility model provides, different with signal generator, the electric current of the utility model output is bigger, its afterbody is the power amplification link of band feedback, make output current reach several amperes, even it is bigger, and can conveniently simulate the distortion of various direct supplys by the PWM ripple control of single-chip microcomputer, be used for testing the control system that contains microprocessor, whether check parts such as its filtering, monitoring voltage module and house dog working properly, whether the microprocessor antijamming capability is enough strong.
Description of drawings
Device system's composition diagram in use that Fig. 1 provides for the utility model;
The hardware structure diagram of a preferred embodiment of the device that Fig. 2 provides for the utility model;
The parameter of a preferred embodiment of the device that Fig. 3 provides for the utility model is provided with the interface;
The main program block diagram of a preferred embodiment of the device that Fig. 4 provides for the utility model;
The microcontroller serial port interrupt routine block diagram of a preferred embodiment of the device that Fig. 5 provides for the utility model;
The single-chip microcomputer timer interrupt program block diagram of a preferred embodiment of the device that Fig. 6 provides for the utility model.
Numbering explanation: 1: the direct supply analogue means; 2: tested equipment; 3: computing machine; 4: single-chip microcomputer; 5: the serial ports level shifting circuit; 6:RS-232 interface (a kind of computer interface); 7: feed circuit; 8: filtering circuit; 9: power amplification circuit; 10: output interface; 11: nonvolatile memory.
Embodiment
Below in conjunction with accompanying drawing the utility model is described in further detail.
With reference to figure 1, the device that the utility model provides system in use forms.As shown in the figure, direct supply analogue means 1 of the present utility model is connected with tested equipment 2 by its output interface, give tested equipment 2 in order to the direct current supply of exporting the abominable industrial environment of unsettled simulation, to test the running status of tested equipment 2 when the unstable direct current supply.In a preferred embodiment of the present utility model, DC simulation device 1 also comprises an interface that is connected with computing machine 3, be used for being connected with computing machine 3, operation has parameter set unit on computing machine 3, it can be the form of software, can software be set by this parameter DC simulation device 1 is provided with parameter, therefore, DC simulation device 1 parameter can be as required by the parameter on the computing machine 3 the software change be set at any time.And do not require that computing machine 3 one direct sum DC simulation devices 1 connect, but need the parameter setting just to connect, the parameter of setting can be stored in the nonvolatile memory of DC simulation device 1, also can not lose even have a power failure.
With reference to figure 2, illustrate the hardware configuration of a preferred embodiment of the device that the utility model provides.As shown in the figure, in the preferred embodiment of the present utility model, DC simulation device 1 comprises filtering and power amplifier, feed circuit 7 and the output interface 10 that serial ports level shifting circuit 5, single-chip microcomputer 4, nonvolatile memory 11, filtering circuit 8 and power amplifier 9 constitute.Wherein, described feed circuit 7 are connected with power amplification circuit with serial ports level shifting circuit 11, single-chip microcomputer 4, nonvolatile memory 11, filtering, for these parts provide power supply.Single-chip microcomputer 4 is connected with power amplification circuit with serial ports level shifting circuit 5, nonvolatile memory 11, filtering; Filtering is connected with output interface 10 with power amplification circuit.During work, described single-chip microcomputer 4 reads the parameter that is stored in the nonvolatile memory 11, dutycycle according to high-low level on this parameter control single chip computer pin, promptly export the PWM ripple, simulate the direct current of spread of voltage under the abominable industrial environment after this PWM ripple described filtering of process and power amplification circuit filtering and the power amplification by described output interface 10 outputs.
In a preferred embodiment of the present utility model, DC simulation device 1 also comprises a computer interface, it is the RS-232 interface 6 among Fig. 2, this interface be used for being connected (as Fig. 1) with computing machine, in computing machine, be deployed with parameter setting apparatus, be used to be provided with the parameter that is stored in the described nonvolatile memory with form of software.
In this preferred embodiment of the present utility model, single-chip microcomputer 4 is hardware cores, and computing machine 3 is communicated by letter with single-chip microcomputer 4 with serial ports level shifting circuit 5 by RS-232 interface 6, carries out the parameter setting; Parameter is stored in the nonvolatile memory 11; Single-chip microcomputer 4 is exported corresponding PWM ripple according to the parameter in the nonvolatile memory 11; This PWM ripple is wave circuit 8 and power amplifier 9 outputs after filtration; Be connected to tested testing equipment by output interface 10.
In the present embodiment, single-chip microcomputer 4 adopts 89C52; Nonvolatile memory 11 adopts X25045, and built-in house dog of X25045 and voltage monitoring circuit guarantee working stability of the present utility model; Filtering circuit 8 adopts amplifier LM324 and peripheral circuit to form, comprise follow, filtering and waveform amplifying circuit; Power amplifier 9 adopts amplifier LM324 and high power transistor to form, and constitutes backfeed loop, and this link also has holding circuit in addition, burns high power transistor to prevent output short-circuit; Serial ports level shifting circuit 5 adopts MAX232, realizes the conversion of RS-232 level and Transistor-Transistor Logic level.
The parameter of a preferred embodiment of the device that Fig. 3 provides for the utility model is provided with one of interface, and parameter is provided with the interface and moves on computing machine 3, and Fig. 3 interface can be provided with the various parameters that the utility model is exported non-sinusoidal wave.Comprise: low voltage value, high-voltage value, low-voltage duration, high voltage duration, voltage rise time, voltage fall time etc.
Fig. 4 has provided the main program block diagram of preferred embodiment of the device that the utility model provides.All programs all are arranged in the single-chip microcomputer 4.Master routine is mainly realized initialization, comprises reading nonvolatile memory 11 stored parameters to buffer zone, the various initial values of initialization and interruption, opens interruption, realizes clear house dog and led status etc. is set in major cycle.
Fig. 5 has provided the microcontroller serial port interrupt routine block diagram of a preferred embodiment of the device that the utility model provides.Single-chip microcomputer 4 produced serial ports and interrupts when computing machine 3 was provided with parameter, interrupted differentiating and receive parameter is set, and received verification after whole parameters, and verification correctly then preserves parameter, change output, reply computing machine 3 receives correct; Check errors is then replied computing machine 3 and is received parameter error, and computing machine 3 can resend parameter.
Fig. 6 has provided the single-chip microcomputer timer interrupt program block diagram of a preferred embodiment of the device that the utility model provides.The main task that timer interrupts is to obtain output voltage values according to the parameter of setting, recently realize by the duty of regulating PWM output, same pwm pulse will be exported a plurality of, guarantee to obtain required voltage after the output filtering, and then according to next output voltage values change PWM dutycycle, the so continuously unsettled direct current of output expection.
Present embodiment be not formation to restriction of the present utility model, those of ordinary skills also belong to protection domain of the present utility model by reading the equivalents of making behind the present embodiment.