Summary of the invention
The technical problem to be solved in the present invention be to provide a kind of current precision high, do not affect the low and not troublesome multichannel many grades of digital AC constant-current sources of electrical network, cost and transfer the files and gating control method.
For solving the problems of the technologies described above, the invention provides technical scheme as follows:
A kind of multichannel many grades of digital AC constant-current sources, comprise the micro-control unit MCU module, signal generator, signal processing module, No. four amplifying circuits, circuit of transferring the files, high-operational amplifier module and No. four gating circuits that connect successively;
To transfer the files described in the control signal output terminal of described MCU module is connected to the control signal input end of circuit and No. four gating circuits.
Further, described MCU module adopts chip MSP430F149 single-chip microcomputer; Described signal generator adopts synthesizer chip AD9850;
Described signal processing module comprises amplifier, and the reverse input end of described amplifier is connected with output terminal, and positive input is connected through the output terminal of a filter capacitor with described signal generator, and output terminal is also connected with described No. four amplifying circuits through a filter capacitor.
Further, described No. four amplifying circuits have four output terminals, are connected respectively with four input ends of described circuit of transferring the files; Described No. four amplifying circuits comprise the first differential amplifier circuit, the second differential amplifier circuit, the 3rd differential amplifier circuit and the 4th differential amplifier circuit, wherein:
Each differential amplifier circuit includes amplifier, the reverse input end of the amplifier of each differential amplifier circuit is connected to the output terminal of described signal processing module respectively through a current-limiting resistance, positive input is respectively through a ground resistance earth, output terminal is connected to the reverse input end of each amplifier respectively through a feedback resistance, output terminal is connected with four input ends of described circuit of transferring the files respectively simultaneously;
The positive power source terminal of the amplifier of each differential amplifier circuit is connected with+5V power supply, and negative power end is connected with-5V power supply.
Further, the resistance of the current-limiting resistance comprised in each differential amplifier circuit is different.
Further, described in circuit of transferring the files comprise multiplexer ADG604, wherein:
The positive power source terminal VDD of described multiplexer ADG604 is connected with+5V power supply, and positive power source terminal VDD is through a direct earth capacitance ground connection, and negative power end VSS is connected with-5V power supply, and negative power end VSS is also through a direct earth capacitance ground connection;
The control signal input end EN of described multiplexer ADG604, address selection end A0, address selection end A1 are connected to the control signal output terminal of described MCU module;
The signal output part Dout of described multiplexer ADG604 is connected with the input end of described high-operational amplifier module.
Further, described high-operational amplifier module comprises high-operational amplifier chip OPA551, transfer the files described in the forward signal input end of described amplifier chip OPA551 is connected to through a current-limiting resistance signal output part Dout of circuit, non-inverting signal input thereof is through a ground resistance earth and be connected with the loop end of described No. four gating circuits, mark FLAG end is through a ground resistance earth, and signal output part is connected with the input end of described No. four gating circuits.
Further, in described No. four gating circuits, the port of each road gating circuit comprises a control end and two output terminals, the inside of each road gating circuit includes the relay action unit, capacitance-resistance filter unit and the relay drive unit that connect successively, wherein:
Described relay action unit comprises a double-pole single-throw (D.P.S.T.) normal open switch, the two ends of the way switch in described double-pole single-throw (D.P.S.T.) normal open switch connect an output terminal of the signal output part of described high-operational amplifier chip OPA551 and No. four gating circuits at described relay action unit place, the two ends of another way switch in described double-pole single-throw (D.P.S.T.) normal open switch connect another output terminal of the non-inverting signal input thereof of described high-operational amplifier chip OPA551 and the gating circuit at described relay action unit place, and described relay two ends are also connected to the diode played a protective role;
Described capacitance-resistance filter unit is formed by the resistance of parallel connection and electric capacity.
Further, described relay drive unit comprises N channel junction field-effect pipe and NPN transistor, wherein:
The grid of described N channel junction field-effect pipe connects the control signal output terminal of described MCU module, and source electrode connects+5V voltage, drains and is connected to the base stage of described NPN transistor through a resistance;
The base stage of described NPN transistor is simultaneously through a resistance eutral grounding, and the direct ground connection of emitter, collector connects described capacitance-resistance filter unit.
Further, the output terminal of described No. four gating circuits is circumscribed with the output circuit of interface shape.
Further, comprising:
Step (1): MCU module receive eight transfer the files with gating steering order after, by high for this instruction four and low four, separately Gao Siwei represents N road and selects data, and low four represent M shelves and select data;
Step (2): by by low four lt two, change circuit address terminal number value of transferring the files, a certain shelves signal that gating needs, realize the selection of many grades;
Step (3): by 0x02 is moved to left, and the figure place that moves to left is the numerical value on N road, opens the field effect transistor that a certain road signal is corresponding, realizes the selection of multichannel.The present invention has following beneficial effect:
During work, first MCU module produces multichannel many grades of steering orders, be sent to signal generator, signal generator produces corresponding electric signal according to this steering order, and electric signal transmission to signal processing module, signal processing module is sent to No. four amplifying circuits the signal after process, No. four amplifying circuits comprise No. four amplifying circuits, respectively this electric signal is carried out to the amplification of different multiples, transfer the files circuit under the control of MCU module, wherein a certain road amplifying signal is selected to be sent to high-operational amplifier module, amplifying signal selected is afterwards after high-operational amplifier module, become the constant current source signal of high stable, export after entering four road gating module.
Compared with prior art, the present invention utilizes No. four gating circuits and circuit realiration of transferring the files only utilizes a high-operational amplifier module to realize the conducting of 4 tunnel current source signal, because 4 road signals share a high-operational amplifier module, both provided cost savings, turn eliminate the systematic error (even if the chip of same model also can exist fine distinction) of 4 road signals, the constant-current accuracy that the present invention is produced is higher; In addition, the present invention directly utilizes signal generator to produce sinusoidal ac signal, without transformer and spwm conversion, so can not produce harmonic wave; Finally, whole solution principle is simple, and device used is less, and cost is lower, not easily breaks down.
Embodiment
For making the technical problem to be solved in the present invention, technical scheme and advantage clearly, be described in detail below in conjunction with the accompanying drawings and the specific embodiments.
On the one hand, a kind of multichannel many grades of digital AC constant-current sources of the present invention and transferring the files and gating control method, as shown in Figure 1, comprise the micro-control unit MCU module 1, signal generator 2, the signal processing module 3 that connect successively, comprise No. four amplifying circuits 4 of No. four amplifying circuits, circuit 5 of transferring the files, high-operational amplifier module 6 and No. four gating circuits 7; The control signal output terminal of MCU module 1 is connected to the control signal input end of transfer the files circuit 5 and No. four gating circuits 7.
During work, first MCU module 1 produces multichannel many grades of steering orders, be sent to signal generator 2, signal generator 2 produces corresponding electric signal according to this steering order, and electric signal transmission to No. four amplifying circuit 4, No. four amplifying circuits 4 comprise No. four amplifying circuits, respectively this electric signal is carried out to the amplification of different multiples, transfer the files circuit under the control of MCU module 1, wherein a certain road amplifying signal is selected to be sent to high-operational amplifier module 6, amplifying signal selected is afterwards after high-operational amplifier module 6, become the constant current source signal of high stable, export after entering No. four gating circuits 7.
Compared with prior art, the present invention utilizes No. four gating circuits 7 and circuit 5 of transferring the files to achieve the conducting only utilizing a high-operational amplifier module 6 to realize 4 tunnel current source signal, because 4 tunnel current source signal share a high-operational amplifier, both provided cost savings, turn eliminate the systematic error (even if the chip of same model also can exist fine distinction) of 4 road signals, the constant-current accuracy that the present invention is produced is higher; In addition, the present invention directly utilizes signal generator 2 to produce sinusoidal ac signal, without transformer and spwm conversion, so can not produce harmonic wave; Finally, whole solution principle is simple, and device used is less, and cost is lower, not easily breaks down.
Concrete, the present invention can adopt following circuit structure form:
First, as shown in Figure 2, MCU module 1 preferentially adopts chip MSP430F149 single-chip microcomputer;
MCU module 1 is the control center of whole system, and under the control of MCU module 1, system realizes signal and generates the function with multichannel many grades of gatings.
As shown in Figure 3, signal generator 2 preferentially adopts synthesizer chip AD9850.
After signal generator 2 produces sinusoidal signal, faint sinusoidal electric signals transfers to signal processing module 3, as shown in Figure 4, signal processing module 3 comprises amplifier U13ATL062 and filter capacitor C29, the reverse input end of amplifier U13ATL062 is connected with output terminal, positive input is connected with the output terminal of signal generator 2 through a filter capacitor C27, and output terminal is also connected with No. four amplifying circuits 4 through a filter capacitor C29.
In fact, the AD9850 of signal generator 1 includes DDS system able to programme and high-speed comparator, can realize the frequency synthesis of digital programming Control.The core of DDS system able to programme is phase accumulator, and it is made up of a totalizer and a N position phase register, can be input on sine look up table address after the output of phase register is added with phase control words.Sine look up table comprises the digital amplitude information of a sine wave period.Question blank is mapped to sinusoidal amplitude signal the phase information of Input Address, then drives DAC with sine wave output analog quantity.Then, the analog quantity that DAC exports passes through the signal processing module 3 comprising voltage follower U13A and capacitance C29.Voltage follower U13A can play buffer action and prevent back circuit on the impact of front circuit, and can improve the driving force of circuit.Capacitance C29 then plays isolated DC, the effect that gating exchanges, and the sine wave of signal generator module 2 generation is played to the effect of protection.
Then, the signal after signal processing module 3 processes is transferred into No. four amplifying circuits 4, and as shown in Figure 5, No. four amplifying circuits 4 have four output terminals, are connected respectively with four input ends of circuit 5 of transferring the files; No. four amplifying circuits 4 comprise the first differential amplifier circuit, the second differential amplifier circuit, the 3rd differential amplifier circuit and the 4th differential amplifier circuit, wherein:
Each differential amplifier circuit includes amplifier U12A, U12B, U12C, U12D, wherein, the reverse input end of the amplifier of each differential amplifier circuit is connected to the output terminal of signal processing module 3 respectively through current-limiting resistance R15, R22, R28, a R38, positive input is respectively through stake resistance R16, R25, R31, R41 ground connection, output terminal is connected to the reverse input end of each amplifier U12A, U12B, U12C, U12D respectively through feedback resistance R14, R19, R27, a R36, output terminal is connected with four input ends of circuit 5 of transferring the files respectively simultaneously;
The positive power source terminal of the amplifier of each differential amplifier circuit is connected with+5V power supply, and negative power end is connected with-5V power supply.
During work, the signal that signal processing module 3 exports is transferred into the four road differential amplifier circuits that No. four amplifying circuits 4 comprise respectively, because four road differential amplifier circuits have different enlargement factors, so, out can form through four road differential amplifier circuits the electric signal that four tunnels vary in size.
Current-limiting resistance resistance in above-mentioned four road differential amplifier circuits is different, so cause the multiple of differential amplifier circuit different.
After electric current flows out from No. four amplifying circuits 4, just flow into circuit 5 of transferring the files as shown in Figure 5, in circuit 5 of transferring the files, the related device with circuit selection function can be adopted, preferably adopt multiplexer ADG604, wherein:
As shown in Figure 6, the positive power source terminal VDD of multiplexer ADG604 is connected with+5V power supply, and positive power source terminal VDD is through a direct earth capacitance C22 ground connection, and negative power end VSS is connected with-5V power supply, and negative power end VSS is also through a direct earth capacitance C21 ground connection;
The control signal input end EN of multiplexer ADG604, address selection end A0, address selection end A1 are connected to the control signal output terminal of described MCU module 1;
The signal output part Dout of multiplexer ADG604 is connected with the input end of described high-operational amplifier module 6.
During work, the control signal instruction that circuit 5 of transferring the files sends according to MCU module 1, which signal conduction address selection port command, select as the input of constant-current source circuit, to control the size that constant-current source circuit exports, achieves the control of constant current source many grades.Because digit chip cost is lower, and reliability is high, and reaction in time, ensure that the switching carrying out electric current gear at any time, economical and practical.
And then, the signal flowing out multiplexer flows into high-operational amplifier module 6, as shown in Figure 7, this module comprises high-operational amplifier chip OPA551, the forward signal input end of amplifier chip OPA551 is connected to the signal output part Dout of circuit of transferring the files through a current-limiting resistance R33, non-inverting signal input thereof is connected through the loop end of stake resistance R29 ground connection Qie Yu No. tetra-gating circuit, and mark FLAG end is through a stake resistance R32 ground connection, and signal output part OUT is connected with the input end of No. four gating circuits 7.
The core of high-operational amplifier module 6 is OPA551 chips, and this chip has the following advantages: wide power voltage scope, ± 4V to ± 30V; High Output Current, can reach 200mA; Low noise; Band self-protection function; Operating temperature range is wide; Wide bandwidth scope; Most importantly the output of this chip is stable especially, can eliminate error fast.Utilize this module can produce the constant current source signal of high precision, high stability.
After constant current source electric signal flows out from high-operational amplifier module 6, flow into No. four gating circuits 7, as shown in Figure 7, the port of each road gating circuit comprises a control end RELAY_1 and includes with the inside of two each road gating circuits of output terminal OUT1_1, OUT1_2 the relay action unit 71, capacitance-resistance filter unit 72 and the relay drive unit 73 that are connected successively, wherein:
Relay action unit 71 comprises a double-pole single-throw (D.P.S.T.) normal open switch, the two ends of the way switch in this double-pole single-throw (D.P.S.T.) normal open switch connect an output terminal OUT1_1 of the signal output part OUT of high-operational amplifier chip OPA551 and No. four gating circuits 7 at relay action unit 71 place, the two ends of another way switch in this double-pole single-throw (D.P.S.T.) normal open switch connect another output terminal OUT1_2 of the non-inverting signal input thereof-IN of high-operational amplifier chip OPA551 and No. four gating circuits 7 at relay action unit 71 place, relay two ends are also connected to the diode D10 played a protective role,
Described capacitance-resistance filter unit is formed by the resistance R17 of parallel connection and electric capacity E13.
During work, the drive singal that relay drive unit produces, imposes on the input end of relay action unit through capacitance-resistance filter unit, controls two normal open switch turn-on and turn-off simultaneously; When relay drive unit produces interference current due to environmental change etc., capacitance-resistance filter unit well serves filter action, effectively prevents the misoperation of relay; Protect diode D10 in addition, when preventing unexpected closedown No. four gating circuit 7, excessive induction current burns out relay.
In addition, as shown in Figure 8, above-mentioned relay drive unit 73 preferably includes N channel junction field-effect pipe and NPN transistor, wherein:
The grid of N channel junction field-effect pipe Q1 connects the control signal output terminal of MCU module 1, and source electrode connects+5V voltage, drains and is connected to the base stage of NPN transistor through a resistance R20;
The base stage of NPN transistor is simultaneously through a resistance R23 ground connection, and the direct ground connection of emitter, collector connects above-mentioned capacitance-resistance filter unit 72.
In work, MCU module 1 sends multi-way control signals, when making RELAY_1 be 1, N channel junction field-effect pipe Q1 conducting, electric current arrives NPN transistor Q3 through R20, Q3 conducting makes+5V voltage source make constant current source through OUT1_1 supply load through relay K 1, K1 adhesive, and OUT1_2 is as current return.
This unit adopts field effect transistor and transistor two-stage drive, enhances driving force and the responding ability of this part, and employing discrete device builds driving circuit but not integrated device significantly reduces cost simultaneously, achieves larger driving force.
Other No. three gating circuit principles and structure similarly, repeat no more herein.
In addition, the output terminal of No. four gating circuits 7 is preferably circumscribed with the output circuit of interface shape.
Finally, to control with gating to realize transferring the files of multichannel many grades of digital AC constant-current sources, we adopt and control it with the following method, comprising:
Step (1): MCU module receive eight transfer the files with gating steering order after, by high for this instruction four and low four, separately Gao Siwei represents N road and selects data, and low four represent M shelves and select data;
Gao Siwei, low four be separately conducive to many grades, the selection of multichannel controls respectively;
Step (2): by by low four lt two, change module's address terminal number value of transferring the files, a certain shelves signal that gating needs, realize the selection of many grades;
It is less that shift left operation takies instruction, saves MCU module calculation resources, moves to left two and effectively make use of the IO resource of system, achieve the exchange of many grades, electric current.
Step (3): by 0x02 is moved to left, and the figure place that moves to left is the numerical value on N road, opens the field effect transistor that a certain road signal is corresponding, realizes the selection of multichannel.
Move to left N bit value, and just corresponding N circuit-switched data, realizes the conducting of N road.
Illustrate as follows: when needing the circuit on the 2nd grade, gating the 2nd tunnel, first, the control command on the 2nd grade, gating the 2nd tunnel is 00010001, and namely first low 4 lt 2 becomes 0100, and such 0 and 1 can control the selection of many grades by pin P2.6, P2.7; High 4 is 0001, and algorithmic procedure is for move to left 1 by 0x02, and namely the 3rd (P3.2) is 1, controls the closed of No. 2nd relay.Due to pin P3.1, P3.2, P3.3, P3.4 instead of P3.0, P3.1, P3.2, P3.3 of employing, so select the numerical value that moved to left representated by high 4 by 0x02, namely 0x02,0x03,0x04,0x05 respectively corresponding pin P3.1, P3.2, P3.3, P3.4 control the closed of No. 4 relays respectively.
Beneficial effect of the present invention is as follows:
Compared with prior art, the present invention utilizes No. four gating circuits and circuit realiration of transferring the files only utilizes a high-operational amplifier module to realize the conducting of 4 tunnel current source signal, because 4 road signals share a high-operational amplifier module, both provided cost savings, turn eliminate the systematic error (even if the chip of same model also can exist fine distinction) of 4 road signals, the constant-current accuracy that the present invention is produced is higher; In addition, the present invention directly utilizes signal generator to produce sinusoidal ac signal, without transformer and spwm conversion, so can not produce harmonic wave; Finally, whole solution principle is simple, and device used is less, and cost is lower, not easily breaks down.
In the embodiment of control method of the present invention; the sequence number of described each step can not be used for the sequencing limiting each step; for those of ordinary skill in the art, under the prerequisite not paying creative work, the priority of each step is changed also within protection scope of the present invention.
The above is the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the prerequisite not departing from principle of the present invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.