Summary of the invention
The objective of the invention is to, a kind of thermometer of stepper motor drive finger is provided, its good overall linearity, the output of instrument electric current is stable, have the remote data transmittability, and the adjusting method of zero degree and full scale is simple.
The object of the present invention is achieved like this: the thermometer of stepper motor drive finger, comprise single-chip microcomputer, the stabilized power supply that is connected with car accumulator and the thermal resistance sensor that is used to gather the motor car engine oil temperature, comprise that also the variable quantity with thermal resistance sensor is converted into voltage signal and is input to the signal processing amplification circuit of handling in the single-chip microcomputer after amplifying, the signal processing amplification circuit is connected electrically between single-chip microcomputer and the thermal resistance sensor; And the motor-drive circuit that outputs to stepper motor after the output signal amplification with the single-chip microcomputer processing, motor-drive circuit is connected electrically between single-chip microcomputer and the stepper motor, and a linear transform circuit that is used for the voltage signal of single-chip microcomputer output is converted to current signal, linear transform circuit is electrically connected with the SPI output interface of single-chip microcomputer; 11 pin of single-chip microcomputer and 12 pin through lead draw respectively with circuit board on be provided with two be used for the full scale adjustment or adjust joint weld zero point; Stabilized power supply is connected with single-chip microcomputer, signal processing amplification circuit respectively by the output branch road.
Adopted such scheme, the signal processing amplification circuit is connected electrically between single-chip microcomputer and the thermal resistance sensor, one-level operational amplifier signal output pin is connected with its resistance one end by feedback resistance in the signal processing amplification circuit, resistance is used for the linearity correction of sensor, reduce sensor output voltage deviation with respect to desirable fitting a straight line in operating temperature range, after input stage was handled through the correction of signal processing amplification circuit and by single-chip microcomputer, the linearity of thermometer can be brought up in 0.2%.Motor-drive circuit is connected electrically between single-chip microcomputer and the stepper motor, by motor-drive circuit the single-chip microcomputer output signal is amplified, and can guarantee the stepper motor functional reliability.
Linear transform circuit is electrically connected with the SPI output interface of single-chip microcomputer, be used for the voltage signal of single-chip microcomputer output is converted to the linear transform circuit of current signal, pass through linear transform circuit, the voltage signal that single-chip microcomputer is handled can be converted to the current signal output of 4-20mA, as the remote transmission of thermal resistance sensor temperature signal, and deliver to the signal input of other unit of motor as these unit.Resistance is connected with stabilized power supply by reference diode, because the common mode voltage that two-level operating amplifier allows to import in the linear transform circuit is supply voltage-1.5V, can make two-level operating amplifier maximum common mode voltage be-3.3V by reference diode, reference diode guarantees the reliability and the stable output of linear transform circuit.
11 pin of single-chip microcomputer and 12 pin through lead draw respectively with circuit board on be provided with two be used for the full scale adjustment or adjust joint weld zero point, because thermal resistance sensor shows as resistance variations, adopt standard resistance box to replace potentiometer, input end is connected with standard resistance box (precision is 0.01 ohm), by the full scale adjustment or adjust interface zero point, by single-chip microcomputer to current zero point or expiry the degree correspondence voltage sample, by the Automatic Program correction of presetting in the single-chip microcomputer, realize adjustment to thermometer zero point or full scale.Therefore, adjust at zero point of the present invention and the full scale adjustment simple, and the whole adjustment time less than 2 minutes, and can reduce the inconsistent error of bringing of parameter of handling time and element, guarantee to adjust precision.
Stabilized power supply is connected with the signal processing amplification circuit by voltage reference circuit, comprise one the three adjustable shunting a reference source of end in the voltage reference circuit, shunting a reference source that three ends are adjustable not only possesses the low property of temperature correction temperature coefficient, and have good thermal stability and decoupling performance, the bridge circuit that can be in the signal processing amplification circuit provides the standard basis source, accentuator stability.In addition, three ends are adjustable, and the impedance of shunting a reference source exemplary dynamic is 0.2 Ω, can replace Zener diode with it in a lot of the application, for example, and digital voltmeter, but discharge circuit voltage controller power source, switch power or the like.Three ends are adjustable, and the reference potential of a 2.5V is contained in shunting a reference source inside, so when when the REF end is introduced the output feedback, device can be by the shunting from negative electrode to the anode wide range, the control output voltage.
This is invented in the open air and carries out testing experiment on the refuelling truck, once by corresponding test, has realized the remote transmission and the temperature linearity indication of data, satisfies the high reliability of its field work.The linearity of this thermometric instrument is higher than the parameter request of the field work in the test, and output 4-20mA gathers it being used for PLC, and precision meets the demands fully, and the data stabilization of transmission is reliable.It is the instrument of temperature transducer that this appliance circuit is fit to adopt PT100, CU50 and thermal resistor.
Below in conjunction with accompanying drawing, the specific embodiment of the present invention is described in further detail.For the person of ordinary skill in the field, from detailed description of the invention, above-mentioned and other purposes of the present invention, feature and advantage will be apparent.
Embodiment
With reference to Fig. 1 and Fig. 2, the thermometer of stepper motor drive finger of the present invention, the output voltage V BAT of car accumulator, the voltage range of VBAT be 20V between the 28V, be connected with stabilized power supply and indicating circuit backlight respectively by lead.Diode D1 anode in the stabilized power supply is connected with VBAT; Diode D1 negative electrode is drawn a power supply V3, and this power source voltage is 24V.Diode D1 negative electrode is connected with resistance R 1, resistance R 1 constitutes limiting filter circuit with capacitor C 2 and electrochemical capacitor C3, limiting filter circuit is by resistance R 1 restriction power supply supply current, simultaneously by capacitor C 2, electrochemical capacitor C3 filtering higher harmonics, stabilized power supply is possessed bear the performance that burst of pulses disturbs, and the immunity of electric transition conduction.The other end of resistance R 1 is connected with the input pin 3 of voltage stabilizer IC1, and voltage stabilizer IC1, resistance R 2, R3, R4, capacitor C 4 are formed mu balanced circuit, and voltage stabilizer IC1 adopts the LM317LH chip.After the voltage process stabilized power supply current limliting filtering and voltage stabilizing of car accumulator output, stable voltage VCC is exported by 2 pin of voltage stabilizer IC1.The output voltage that can be calculated stabilized power supply by component parameters given among the figure is:
VCC=1.25V(1+(R3//R4)/R2+Iadj*R2
Because the adjusting electric current of IC1 is very little, ignores the influence of Iadj, then the output value of circuit is approximately
VCC=1.25V(1+(R3//R4)/R3)
By R3=1.5k R4=20K R2=470
VCC=5.01V then.
2 pin of voltage stabilizer IC1 are connected with electrochemical capacitor C1 and C21 is used for energy storage, behind power cut-off, energy needed in the time of can guaranteeing that the monolithic organizational security is deposited corresponding data and stepper motor and resetted, making has enough energy to make step motor drive thermometer pointer get back to zero graduation after having a power failure.Stabilized power supply by the output branch road is connected with single-chip microcomputer, signal processing amplification circuit respectively, dial plate indicating circuit backlight, motor-drive circuit and linear transform circuit connection, provide required power supply to each circuit unit.
With reference to Fig. 1 and Fig. 3, the dial plate of thermometer indicating circuit backlight is made up of the branch road of three parallel connections of parallel connection, branch road one is made of resistance R 5 series connection light emitting diode D3, D4, branch road two is made of resistance R 6 series connection light emitting diode D5, D6, branch road three is made of resistance R 7 series connection light emitting diode D7, D8, and resistance R 5, R6, R7 play metering function for place branch road separately.Dial plate indicating circuit one end backlight is connected with V3, and the other end is connected with ground by diode D2.For the brightness that guarantees light emitting diode changes little, the series connection number that reduces light emitting diode among the present invention increases the resistance of current-limiting resistance, make reducing of electric current influence by voltage, as size of current in the branch road of R5, D3, D4 composition is (V3-VD3-VD4)/R5=(24V-3.4V)/4.7K=5mA, electric current is about 5.5mA when mains voltage variations is 28V, electric current is about 4.5mA when mains voltage variations is 20V, in ± 0.5mA, the brightness that has guaranteed light emitting diode changes and meets the demands whole electric current with the variation of voltage.
The thermal resistance sensor (not shown) that is used to gather the motor car engine oil temperature is connected with the signal processing amplification circuit by connector JP1, and employing PT100 or CU50 are as thermal resistance sensor among the present invention.With reference to Fig. 1 and Fig. 4, the signal processing amplification circuit is connected electrically between single-chip microcomputer and the thermal resistance sensor, and the signal processing amplification circuit is converted into the variable quantity of thermal resistance sensor voltage signal and is input in the single-chip microcomputer after amplifying and handles.The signal processing amplification circuit comprises bridge circuit, one-level operational amplifier U2A and the two-level operating amplifier U2B of three-wire system.Bridge circuit is made of thermal resistance sensor, resistance R 13, R14, R22, and thermal resistance sensor is connected with resistance R 13 by connector JP1, and the pin 2 of connector JP1 is connected with VCC, and pin 1 is connected with ground.The series arm that resistance R 13 1 ends R14 in parallel and R22 form, resistance R 22 1 ends are connected with the pin 3 of connector JP1, resistance R 14 1 ends together are connected with the output voltage V 2 of voltage reference circuit with R13, the resistance of resistance R 13 and R14 is much larger than the resistance of R22 and sensor, for thermal resistance sensor provides the electric current of about 1mA, this electric current is converted to voltage with the thermal resistance sensor changes in resistance.Thermal resistance sensor Placement three-wire system form, thermal resistance sensor is connected between 1,4 pin of JP1, and with pin 1,3 short circuits of JP1, can remove the zero error that conductor resistance brings like this, obtain the output voltage signal of 0~5V after amplification is handled through the computing amplification appliance, satisfy the scope (0~5V) of the A/D input voltage of single-chip microcomputer.The homophase input pin 3 of one-level operational amplifier U2A and reversed input pin 2 are connected with bridge circuit by resistance R 18, R21 respectively, its homophase input pin 3 is connected with ground by electrochemical capacitor C10, and its reversed input pin also is connected with output pin 1 by two resistance R 25, the R26 of series connection; The pin 8 of one-level operational amplifier is connected with power supply VCC, and is connected with ground by capacitor C 11, and its pin 4 is connected with ground, and one-level operational amplifier U2A signal output pin 1 is connected with resistance R 18 1 ends by feedback resistance R10; One-level operational amplifier signal output pin is connected with the homophase input pin 5 of two-level operating amplifier by resistance R 19, and homophase input pin 5 also is connected with ground by resistance R 20; The reverse input pin 6 of two-level operating amplifier U2B is connected with ground by resistance R 27, and oppositely input pin 6 is connected with its output pin 7 by two resistance R 23, the R24 of series connection; The pin 8 of two-level operating amplifier U2B is connected with VCC, and pin 4 is connected with ground; Two-level operating amplifier output pin 7 is connected with 41 pin of single-chip microcomputer U3 by resistance R 20.
With reference to Fig. 1 and Fig. 5, stabilized power supply is connected with the signal processing amplification circuit by voltage reference circuit, comprises one the three adjustable shunting a reference source of end in the voltage reference circuit, and shunting a reference source that three ends are adjustable is the TL431ALCP chip.The pin 1 of the adjustable shunting a reference source of this three end is connected with ground, its pin 3 is connected with the tap V3 of stabilized power supply by resistance R 8, its pin 1 is connected with pin 3 by two resistance R 16, the R9 of series connection, and resistance R 16 1 ends are connected with the pin 2 of the adjustable shunting a reference source of three ends, as feedback resistance.The voltage V2 of voltage reference circuit output 5V.The reference potential of a 2.5V is contained in the inside of TL431ALCP, when introducing the output feedback at its pin 2 (REF end), makes it control output voltage V 2 by the shunting from negative electrode to the anode wide range.When the resistance of R9 and R16 was determined, both introduced feedback to the dividing potential drop of V2, if V2 increases, feedback quantity increases, and the shunting of TL431ALCP also just increases, from and cause V2 to descend.Therefore, it is stable that the negative-feedback circuit of the degree of depth must equal the reference potential place at VI, at this moment V2=(1+R9/R16) Vref (Vref is the chip internal reference voltage).Select the free voltage output in can obtaining from 2.5V to the 36V scope of the value of different R9 and R16, especially, when R9=R16, V2=5V.R8 plays the restriction electric current, and maximum current is (24V-5V)/2K=9.5mA, has guaranteed that maximum input current is less than TL431ALCP maximal work electric current; This reference potential is exported to and is formed bridge circuit by R13, R14, R22 and thermal resistance sensor and provide with temperature and input voltage and change little burning voltage.
With reference to Fig. 1 and Fig. 6, single-chip microcomputer U3 adopts the 68HC908LJ12 cake core, 11 pin of single-chip microcomputer and 12 pin through lead draw respectively with circuit board on be provided with two be used for the full scale adjustment or adjust interface H2 welding zero point, H2 is two holes on circuit board.After single-chip microcomputer U3 receives the voltage signal of signal processing amplification circuit, by its inner A/D converter for being digital signal with this signal conversion, owing to need big electric current during the operation of stepper motor M1, single-chip microcomputer is drive stepping motor directly, therefore, be connected with stepper motor by motor-drive circuit with single-chip microcomputer at stepper motor, amplify, offer the stepper motor that is connected with the thermometer index by the electric current of motor-drive circuit with single-chip microcomputer output.Motor-drive circuit is made of four AND NOT gate U1A, U1B, U1C, U1D, the output pin 45,46,59,60 of single-chip microcomputer is corresponding respectively to be connected with U1D, U1C, U1B, U1A, the output terminal of each AND NOT gate is corresponding respectively to be connected with the terminal 1,2,3,4 of stepper motor, and each AND NOT gate all adopts the MC74ACT08 chip.
With reference to Fig. 1 and Fig. 7, linear transform circuit is electrically connected with the SPI output interface of single-chip microcomputer, be used for the voltage signal of single-chip microcomputer output is converted to the linear transform circuit of current signal, linear transform circuit comprises the D/A converter U4 that is connected with single-chip microcomputer SPI interface, and the V/I change-over circuit that is electrically connected with D/A converter.The SPI interface of single-chip microcomputer is its pin 17,25,26,27, and the pin 1,2,3,4 of D/A converter U4 is corresponding respectively to be connected with the pin 25,17,27,26 of single-chip microcomputer.D/A converter U4 is one 10 figure place weighted-voltage D/A converter, and its SPI interface with single-chip microcomputer is exported the voltage signal that 10 position digital signals are converted into 0.4V-2.0V.D/A converter U4 adopts TLC561 5 cake cores, and the pin 5 of D/A converter U4 is connected with ground, and its pin 6 is a feedback input end, and its pin 8 is connected with VCC, and its pin 7 is connected with the V/I change-over circuit by resistance R 30.The V/I change-over circuit comprises one-level operational amplifier U8B, the first transistor Q5, two-level operating amplifier U8A and second crystal, three plate pipe Q6; The homophase input pin 5 of one-level operational amplifier U8B is connected with the D/A converter output terminal by resistance R 30, its reversed input pin 6 is connected with ground by resistance R 54 in the lump with the emitter of the first transistor Q5, and its output pin 7 is connected with the base stage of the first transistor Q5.The collector electrode of the first transistor Q5 is connected with the V3 tap of stabilized power supply by resistance R 53, also can directly be connected with the car accumulator output terminal, and resistance R 53 is connected with the V3 of stabilized power supply by reference diode D18.The collector electrode of the first transistor Q5 is connected with the homophase input pin of two-level operating amplifier U8A; The reversed input pin of two-level operating amplifier U8A is connected with V3 by resistance R 55 in the lump with the emitter of the second transistor Q6, the output pin 1 of two-level operating amplifier U8A is connected with the base stage of the second transistor Q6, and the second transistor Q6 collector electrode is connected with connector JP2.U8B, Q5, R54 form a Constant Current Load, and the size of electric current is by the 5 pin Control of Voltage of U8B.The input current of U8A is minimum, electric current that resistance R 53 flows through and the electric current on the R54 equate that the resistance of resistance R 53 and R54 equates that the voltage at resistance R 54 two ends and R53 both end voltage equate, the output voltage of the voltage at R54 two ends and D/A equates at this moment, and scope is 0.4V-2V.Because the characteristic of amplifier, two terminal potentials of the input after stable equate, the voltage of resistance R 55 and R54 both end voltage equate, the voltage at resistance R 55 two ends and the output voltage of D/A equate, the voltage of resistance R 55 is controlled by the output voltage of D/A, output current I scope is that (0.4V/R55=4mA, 2.0V/R55=20mA), electric current and voltage are the linear conversion relation to 4-20mA.Realized, the linear conversion of electric current and electric V-I, and by connector J2 output, the 4-20mA of output is used for the remote transmission of temperature signal and delivers to the standard input signal of other unit of motor as these unit.Concrete connecting means is during use: 2 pin of connector J2 be connected publicly, 1 pin of J2 is connected to the current input terminal of other parts.
When the present invention worked, car accumulator output voltage V BAT offered single-chip microcomputer and motor-drive circuit respectively, as its standard operation voltage by the burning voltage output that the IC1 in the stabilized power supply is converted to 5V; The tap voltage of stabilized power supply V3 directly offers the dial plate backlight circuit and linear transform circuit makes its work.The burning voltage of the 5V of stabilized power supply output is converted into voltage-reference by the voltage reference circuit with temperature correction, and this reference potential flows to by R13, R14, R22 and thermal resistance sensor forms bridge circuit.Become bridge circuit that the resistance variations of thermal resistance sensor is converted into voltage signal, this voltage signal is amplified to voltage signal about 1V through the differential amplifier circuit of the one-level operational amplifier U2A formation of signal processing amplification circuit; The amplification circuit that constitutes by two-level operating amplifier U2B amplifies 3 times again, obtains the voltage signal in the 0-5V scope after the processing.Two-level operating amplifier U2B delivers to voltage signal by current-limiting resistance R20 the pin 41 (ADIN end) of single-chip microcomputer U3.This voltage signal at first is sent to the A/D converter of single-chip microcomputer inside, aanalogvoltage to input carries out sample quantization, the data that obtain of sampling are converted into the digital signal of stepper motor by software algorithm, are sent to motor-drive circuit and linear transform circuit respectively by each output pin.Wherein motor-drive circuit amplifies the digital signal of above-mentioned single-chip microcomputer output, is sent to the line bag of stepper motor M1 by motor-drive circuit, and stepper motor M1 drives the rotation of thermometer index, the corresponding temperature value of indication on linear dial.Linear transform circuit at first carries out D/A converter to signal and converts analog voltage signal to, and by the V/I change-over circuit analog voltage signal linear conversion is become the 4-20mA current signal, and by connector J2 output.The current signal of output is used for the remote transmission of temperature signal and delivers to the signal input of other unit of motor as these unit.
Zero point of the present invention, adjustment process was: input end (1,4 ends of connector JP1) is connected with standard resistance box (precision is 0.01 ohm), adjust the value of resistance box, the resistance value of correspondence when making its numerical values recited be zero point, 2 pin (via hole) of H2 are shorted to ground with lead, single-chip microcomputer is immediately to the voltage sample of correspondence at current zero point, as the initial zero of thermometer,, realize that software directly returns to zero with the deduction voltage deviation at zero point.
Full scale adjustment process of the present invention is: input end (1,4 ends of JP1) is connected to standard resistance box (precision is 0.01 ohm), adjusts the value of resistance box, the resistance value of correspondence when making its numerical values recited be full scale; 1 pin of H2 is shorted to ground with lead, and single-chip microcomputer is immediately to the voltage sample of current full scale correspondence, as the full scale of thermometer, during computing this voltage as peak voltage, realize that software directly adjusts full scale.
Though the present invention discloses as above with preferred embodiment; right its is not in order to limit the present invention; any person of ordinary skill in the field; without departing from the spirit and scope of the invention; when can doing a little change and improvement, so the present invention's protection domain is as the criterion when looking the claim person of defining.