[summary of the invention]
In order to solve the above technical problems, the embodiment of the invention provides a kind of temperature measurement effect compared with detection circuit, answer
For motor, the motor includes temperature sensor, and the motor is connect with single-chip microcontroller, and the detection circuit includes:
Sample circuit, for obtaining the voltage signal of temperature sensor and being sent to single-chip microcontroller;
First switch circuit is connect with the sample circuit and single-chip microcontroller, for receiving the first control of single-chip microcontroller output
Signal processed, to control the operating mode of the sample circuit;
Second switch circuit is connect with the sample circuit and single-chip microcontroller, for receiving the second control of single-chip microcontroller output
Signal processed, to control the operating mode of the sample circuit;
When the sample circuit cut-in temperature sensor, single-chip microcontroller sends the according to the type of the temperature sensor
One control signal and second control signal are to the first switch circuit and second switch circuit, to control the sample circuit work
Make in operating mode corresponding with the type of temperature sensor, and obtains the electricity of the temperature sensor under the operating mode
Press signal.
Further, the sample circuit includes:
Filter circuit, and first switch circuit connection, for being filtered to the voltage signal;
Bleeder circuit is connect with the filter circuit, for forming partial pressure effect with temperature sensor;
First amplifying circuit is connect with the filter circuit, for amplifying presupposition multiple to the voltage signal;
Second amplifying circuit is all connected with first amplifying circuit, second switch circuit and single-chip microcontroller, for institute
Voltage signal is stated to amplify presupposition multiple and be sent to single-chip microcontroller.
Further, the filter circuit includes:
Common mode inductance, one end of the common mode inductance primary side provide first interface, and the primary side other end provides second interface, secondary
The one end on side and one end of first capacitor connect, and the other end on secondary side and the other end of first capacitor connect;
First capacitor, one end and the bleeder circuit and first switch circuit connection, other end ground connection.
Further, the bleeder circuit includes:
Forward voltage is accessed in first resistor, one end, and the other end is connect with one end of the first capacitor.
Further, first amplifying circuit includes:
Second resistance, one end are connect with one end of the first capacitor, and the other end is connect with the anode of the first amplifier;
First amplifier, negative terminal are connect with the other end of the 3rd resistor, and output end is connect with the second amplifying circuit;
3rd resistor, one end are connect with the other end of the first capacitor, and the other end is connect with one end of the 4th resistance;
4th resistance, one end are connect with one end of the second capacitor, and the other end is connect with the output end of the first amplifier;
Second capacitor, the other end are connect with the other end of the 4th resistance.
Further, second amplifying circuit includes:
Second amplifier, anode are connect with the output end of first amplifier, and negative terminal is connect with one end of the 5th resistance,
Output end is connect with one end of the 7th resistance;
5th resistance, one end are connect with one end of the 6th resistance, the other end and second switch circuit connection;
6th resistance, one end are connect with one end of third capacitor, and the other end is connect with the other end of the 7th resistance;
Third capacitor, the other end are connect with the other end of the 7th resistance;
7th resistance, the other end access the input port of the single-chip microcontroller.
Further, the first switch circuit includes:
First triode, one end are connect with the other end of the 8th resistance, other end ground connection, and control terminal is another with the 9th resistance
One end connection;
8th resistance, a termination are connect with the other end of the first resistor;
The first input port of the single-chip microcontroller is accessed in 9th resistance, one end.
Further, the first switch circuit further include:
Tenth resistance, one end are connect with one end of the 9th resistance, and the other end is connect with the other end of the 4th capacitor;
4th capacitor, one end are connect with the control terminal of the first triode, and the other end is connect with the other end of the first triode.
Further, the second switch circuit includes:
Second triode, one end are connect with the other end of the 5th resistance, other end ground connection, control terminal and the 11st electricity
The other end of resistance connects;
The second input port of the single-chip microcontroller is accessed in eleventh resistor, one end.
Further, the second switch circuit further include:
Twelfth resistor, one end are connect with one end of the first resistor, and the other end is connect with the other end of the 5th capacitor;
5th capacitor, one end are connect with the control terminal of second triode, and the other end is another with second triode
One end connection.
The beneficial effects of the present invention are: the detection circuit includes adopting the embodiment of the invention provides a kind of detection circuit
Sample circuit, for obtaining the voltage signal of temperature sensor and being sent to single-chip microcontroller;First switch circuit, with the sample circuit
And single-chip microcontroller connection, for receiving the first control signal of single-chip microcontroller output, to control the operating mode of the sample circuit;
Second switch circuit is connect with the sample circuit and single-chip microcontroller, for receiving the second control signal of single-chip microcontroller output, with
Control the operating mode of the sample circuit;When the sample circuit cut-in temperature sensor, single-chip microcontroller is according to the temperature
The type of sensor, sends first control signal and second control signal to the first switch circuit and second switch circuit,
It is obtained with controlling the sample circuit work in operating mode corresponding with the type of temperature sensor, and under the operating mode
Take the voltage signal of the temperature sensor.It is opened by obtaining the type of the temperature sensor of motor, and by single-chip microcontroller control
The work of circuit control sample circuit is closed in operating mode corresponding with the type of the temperature sensor, and uniformly made in the prior art
It is compared with the temperature that a kind of detection circuit detects the motor, the measurement error of the detection circuit is smaller, and thermometric effect is preferable.
[specific embodiment]
The application in order to facilitate understanding with reference to the accompanying drawings and detailed description carries out in more detail the application
It is bright.It should be noted that it can be directly to another yuan when an element is expressed " connection " another element
Part or elements placed in the middle there may be one or more therebetween.In addition, term " first ", " second " etc. are only used for description mesh
, it is not understood to indicate or imply relative importance.
Unless otherwise defined, technical and scientific term all used in this specification is led with technology of the invention is belonged to
The normally understood meaning of the technical staff in domain is identical.It is specific to be intended merely to description for used term in the description of the invention
Embodiment purpose, be not intended to limitation the present invention.Term "and/or" used in this specification includes one or more
Any and all combinations of relevant listed item.
In addition, as long as technical characteristic involved in the application difference embodiment disclosed below is not constituted each other
Conflict can be combined with each other.
Referring to Fig. 1, being a kind of structural schematic diagram of detection circuit provided in an embodiment of the present invention.As shown in Figure 1, described
Detection circuit 100 is applied to motor, and the motor includes temperature sensor, and the motor is connect with single-chip microcontroller, the detection electricity
Road 100 includes:
Sample circuit 10, for obtaining the voltage signal of temperature sensor and being sent to single-chip microcontroller;
First switch circuit 20 is connect with the sample circuit and single-chip microcontroller, for receiving the first of single-chip microcontroller output
Signal is controlled, to control the operating mode of the sample circuit;
Second switch circuit 30 is connect with the sample circuit and single-chip microcontroller, for receiving the second of single-chip microcontroller output
Signal is controlled, to control the operating mode of the sample circuit;
When the 10 cut-in temperature sensor of sample circuit, single-chip microcontroller is sent according to the type of the temperature sensor
First control signal and second control signal are to the first switch circuit 20 and second switch circuit 30, to control the sampling
Circuit 10 works in operating mode corresponding with the type of temperature sensor, and obtains the temperature under the operating mode and pass
The voltage signal of sensor then obtains the temperature of the motor according to the voltage signal.
Wherein, the sample circuit 10 includes the first interface and second interface of the temperature sensor of external motor, works as institute
When stating the temperature sensor access first interface and second interface, the sample circuit 10 obtains the electricity of the temperature sensor
Signal is pressed, and the voltage signal is handled, then the voltage signal after processing is sent to single-chip microcontroller.Because of the temperature
The resistance value of sensor can be changed with temperature, and change in resistance can cause the variation of voltage signal, therefore, measure temperature
The electric signal of sensor can obtain the temperature of temperature sensor, and then obtain the temperature of the motor where temperature sensor.
Wherein, the sample circuit 10 includes at least one operating mode, and the operating mode refers to according to first switch
The switch order that circuit 20 and second switch circuit 30 are sent, forms different circuit structures to the voltage of the temperature sensor
Signal is handled.
Wherein, first switch circuit 20 is used to receive the first control signal of single-chip microcontroller transmission, and according to control signal control
Sample circuit work processed is in different operating modes.Preferably, the first control signal includes high level and low level.
Wherein, second switch circuit 30 is used to receive the second control signal of single-chip microcontroller transmission, and according to control signal control
Sample circuit work processed is in different operating modes.Preferably, the second control signal includes high level and low level.It is preferred that
Ground, the first control signal include high level and low level.
It should be noted that the operating mode of the sample circuit 10 is by the first control signal and second control signal
It is controlled.For example, when the first control signal is high level, and second control signal is low level, the sampling electricity
The operating mode on road 10 is the first operating mode, and when the first control signal is low level, second control signal is high level
When, the operating mode of the sample circuit 10 is the second operating mode.
In addition, the circuit parameter of the sample circuit of different working modes is different, the circuit parameter can be according to different user
Demand carries out self-setting.
Specifically, the sample circuit 10 includes:
Filter circuit 11 is connect with first switch circuit 20, for being filtered to the voltage signal;
Bleeder circuit 12 is connect with the filter circuit and first switch circuit equal 11, is used for and temperature sensor shape
It is acted at partial pressure;
First amplifying circuit 13 is connect with the filter circuit 11, for amplifying default times to the voltage signal
Number;
Second amplifying circuit 14 is all connected with first amplifying circuit 13, second switch circuit 30 and single-chip microcontroller, is used
In amplifying presupposition multiple to the voltage signal and be sent to single-chip microcontroller.
Wherein, the filter circuit 11 filters out the impurity signal of the voltage signal, that is, is filtered.It is excellent
Selection of land, the filter circuit 11 can be made of inductance and capacitor.
Wherein, the bleeder circuit 12 with the temperature sensor for being divided, to control the electricity of the electric signal
Press size.Preferably, the bleeder circuit 12 can be made of resistance.It should be noted that the bleeder circuit 12 is to pass through institute
The switching signal for stating first switch circuit 20 is controlled.
Wherein, after first amplifying circuit 13 receives the voltage signal, the voltage signal is amplified to
The voltage signal of presupposition multiple, the presupposition multiple can be determined by the circuit parameter of first amplifying circuit 13, institute
Self-defining can be carried out according to the demand of user by stating presupposition multiple.
Wherein, second amplifying circuit 14 is connect with the second switch circuit 30, according to the second switch circuit
30 switching signal can form follower or amplifying circuit, when forming the amplifying circuit, the electric signal be amplified pre-
If multiple, retransmit to the single-chip microcontroller.
Specifically, the filter circuit 11 includes:
Common mode inductance L, one end of the common mode inductance L primary side provide first interface A, and the primary side other end provides second interface
One end of B, secondary side are connect with one end of first capacitor C1, and the other end on secondary side is connect with the other end of first capacitor C1;
First capacitor C1, one end are connect with the bleeder circuit 12 with first switch circuit 20, other end ground connection.
Wherein, the common mode inductance L is for the electromagnetic interference signal in filtered voltage signal, and the first capacitor C1 is to institute
Electric signal is stated to be filtered.
Specifically, the bleeder circuit 12 includes:
Forward voltage VCC is accessed in first resistor R1, one end, and the other end is connect with one end of the first capacitor C1.
Specifically, first amplifying circuit 13 includes:
Second resistance R2, one end are connect with one end of the first capacitor, and the other end and the positive of the first amplifier input
End connection;
First amplifier U1, reverse input end are connect with the other end of the 3rd resistor R3, output end and the second amplification
Circuit U 2 connects;
3rd resistor R3, one end are connect with the other end of the first capacitor C1, one end of the other end and the 4th resistance R4
Connection;
4th resistance R4, one end are connect with one end of the second capacitor C2, and the output end of the other end and the first amplifier U1 connect
It connects;
Second capacitor C2, the other end are connect with the other end of the 4th resistance R4.
Wherein, the power end of the first amplifier U1 is connect with one end of the 6th capacitor C6, and the 6th capacitor C6's is another
End ground connection.
Wherein, the first amplifier U1,3rd resistor R3, the 4th resistance R4 and the second capacitor C2 form amplifying circuit,
Presupposition multiple is amplified to the electric signal, the presupposition multiple is (R3+R4)/R3.In other words, user be adjusted R3 with
The resistance value of R4, so that the amplification factor be adjusted.
Specifically, second amplifying circuit 14 includes:
Second amplifier U2, positive input are connect with the output end of the first amplifier U1, reverse input end and
One end of five resistance R5 connects, and output end is connect with one end of the 7th resistance R7;
5th resistance R5, one end are connect with one end of the 6th resistance R6, and the other end is connect with second switch circuit 30;
6th resistance R6, one end are connect with one end of third capacitor C3, and the other end is connect with the other end of the 7th resistance R7;
Third capacitor C3, the other end are connect with the other end of the 7th resistance R7;
7th resistance R7, the other end access the input port Vin of the single-chip microcontroller.
Wherein, when the second switch circuit 30 is on state, the second amplifier U2, the 6th resistance R6, the
Three capacitor C3 and the 7th resistance R7 form amplifying circuit, amplify presupposition multiple, the presupposition multiple to the electric signal
For (R5+R6)/R5.In other words, the resistance value of R5 and R6 is adjusted in user, so that the amplification factor be adjusted.
When the second switch circuit 30 is off state, the second amplifier U2, the 6th resistance R6, third capacitor
C3 and the 7th resistance R7 forms voltage follower, and the input of single-chip microcontroller is sent to after handling the voltage signal
Mouthful.
Specifically, the first switch circuit 20 includes:
First triode Q1, one end are connect with the other end of the 8th resistance R8, other end ground connection, control terminal and the 9th resistance
The other end of R9 connects;
8th resistance R8, a termination are connect with the other end of the first resistor R1;
The first delivery outlet Vout1 of the single-chip microcontroller is accessed in 9th resistance R9, one end.
Wherein, the first switch circuit 20 further include:
Tenth resistance R10, one end are connect with one end of the 9th resistance R9, the other end of the other end and the 4th capacitor C4
Connection;
4th capacitor C4, one end are connect with the control terminal of the first triode Q1, and the other end is another with the first triode Q1's
End connection.
Wherein, R10 is pull down resistor, and C4 is filter capacitor, prevents the first triode Q1 from misleading.
Wherein, the first delivery outlet Vout1 of the single-chip microcontroller is for exporting first control signal.
Specifically, the second switch circuit 30 includes:
Second triode Q2, one end are connect with the other end of the 5th resistance R5, other end ground connection, control terminal and the tenth
The other end of one resistance R11 connects;
The second delivery outlet Vout2 of the single-chip microcontroller is accessed in eleventh resistor R11, one end.
Specifically, the second switch circuit 30 further include:
Twelfth resistor R12, one end are connect with one end of the eleventh resistor R11, and the other end is another with the 5th capacitor
One end connection;
5th capacitor C4, one end are connect with the control terminal of second triode, the other end and second triode
Other end connection.
Wherein, R12 is pull down resistor, and C5 is filter capacitor, prevents the second triode Q2 from misleading.
Wherein, the second delivery outlet Vout2 of the single-chip microcontroller is for exporting second control signal.
For example, the detection circuit is used for the temperature sensor to model PT100, PT1000, NTC and KTY84
Carry out temperature detection.The resistance value of the temperature sensor of the model PT100, PT1000, NTC and KTY84 is at different temperatures
Resistance value diversity ratio is larger.The first control signal be high level or low level, the second control signal be high level or
Person's low level.
When sensor is PT100, the first control signal of single-chip microcontroller output is low level, and second control signal is high electricity
Flat, the first triode Q1 is in off state, and the second triode Q2 is in the conductive state, first resistor R1 with it is described
Temperature sensor forms partial pressure, meanwhile, the voltage signal of the temperature sensor passes through the filter of common mode inductance L and first capacitor C1
After wave, then the amplifying circuit through the first amplifier U1,3rd resistor R3, the 4th resistance R4 and the second capacitor C2 composition is to institute
The presupposition multiple that electric signal amplifies (R3+R4)/R3 is stated, finally, because the second triode Q2 is in the conductive state, it is described through putting
The amplification that big electric signal is formed through the second amplifier U2, the 6th resistance R6, third capacitor C3 and the 7th resistance R7 again
Circuit amplifies the presupposition multiple of (R5+R6)/R5, finally exports to monolithic, single-chip microcontroller is calculated according to the voltage signal finally exported
The temperature of the temperature sensor out, to obtain the temperature of the motor.
When sensor is PT1000, the first control signal of single-chip microcontroller output is low level, and second control signal is low electricity
Flat, the first triode Q1 is in off state, and the second triode Q2 is in off state, first resistor R1 with it is described
Temperature sensor forms partial pressure, meanwhile, the voltage signal of the temperature sensor passes through the filter of common mode inductance L and first capacitor C1
After wave, then the amplifying circuit through the first amplifier U1,3rd resistor R3, the 4th resistance R4 and the second capacitor C2 composition is to institute
The presupposition multiple that electric signal amplifies (R3+R4)/R3 is stated, finally, because the second triode Q2 is in off state, it is described through putting
Big electric signal forms follower through the second amplifier U2, the 6th resistance R6, third capacitor C3 and the 7th resistance R7 again
It is handled, is finally exported to monolithic, single-chip microcontroller calculates the temperature of the temperature sensor according to the voltage signal finally exported
Degree, to obtain the temperature of the motor.
When sensor is NTC, the first control signal of single-chip microcontroller output is high level, and second control signal is low electricity
Flat, the first triode Q1 is in the conductive state, and the second triode Q2 be in off state, the temperature sensor and
8th resistance R8 is in parallel, and connects to form partial pressure with first resistor R1, meanwhile, the voltage signal of the temperature sensor is by altogether
After the filtering of mould inductance L and first capacitor C1, then through the first amplifier U1,3rd resistor R3, the 4th resistance R4 and second
The amplifying circuit of capacitor C2 composition amplifies the presupposition multiple of (R3+R4)/R3 to the electric signal, finally, because of the two or three pole
Pipe Q2 is in off state, and the enlarged electric signal is again through the second amplifier U2, the 6th resistance R6, third capacitor C3
And the 7th resistance R7 form follower and handled, finally export to monolithic, single-chip microcontroller according to the voltage signal finally exported,
The temperature of the temperature sensor is calculated, to obtain the temperature of the motor.
When sensor is KTY84, the first control signal of single-chip microcontroller output is high level, and second control signal is high electricity
Flat, the first triode Q1 is in the conductive state, and the second triode Q2 is in the conductive state, the temperature sensor with
8th resistance R8 is in parallel, and connects to form partial pressure with first resistor R1, meanwhile, the voltage signal of the temperature sensor is by altogether
After the filtering of mould inductance L and first capacitor C1, then through the first amplifier U1,3rd resistor R3, the 4th resistance R4 and second
The amplifying circuit of capacitor C2 composition amplifies the presupposition multiple of (R3+R4)/R3 to the electric signal, finally, because of the two or three pole
Pipe Q2 is in the conductive state, and the enlarged electric signal is again through the second amplifier U2, the 6th resistance R6, third capacitor C3
And the 7th resistance R7 formed amplifying circuit amplification (R5+R6)/R5 presupposition multiple, finally export to monolithic, single-chip microcontroller root
According to the voltage signal finally exported, the temperature of the temperature sensor is calculated, to obtain the temperature of the motor.
The embodiment of the invention provides a kind of detection circuit, the detection circuit includes sample circuit, for obtaining temperature
The voltage signal of sensor is simultaneously sent to single-chip microcontroller;First switch circuit connect with the sample circuit and single-chip microcontroller, is used for
The first control signal of single-chip microcontroller output is received, to control the operating mode of the sample circuit;Second switch circuit, and it is described
Sample circuit and single-chip microcontroller connection, for receiving the second control signal of single-chip microcontroller output, to control the sample circuit
Operating mode;When the sample circuit cut-in temperature sensor, single-chip microcontroller sends the according to the type of the temperature sensor
One control signal and second control signal are to the first switch circuit and second switch circuit, to control the sample circuit work
Make in operating mode corresponding with the type of temperature sensor, and obtains the electricity of the temperature sensor under the operating mode
Press signal.By obtaining the type of the temperature sensor of motor, and pass through single-chip microcontroller control switch circuit control sample circuit work
Make in operating mode corresponding with the type of the temperature sensor, detects institute using a kind of detection circuit with unified in the prior art
The temperature for stating motor is compared, and the measurement error of the detection circuit is smaller, and thermometric effect is preferable.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;At this
It under the thinking of invention, can also be combined between the technical characteristic in above embodiments or different embodiment, step can be with
It is realized with random order, and there are many other variations of different aspect present invention as described above, for simplicity, they do not have
Have and is provided in details;Although the present invention is described in detail referring to the foregoing embodiments, the ordinary skill people of this field
Member is it is understood that it is still possible to modify the technical solutions described in the foregoing embodiments, or to part of skill
Art feature is equivalently replaced;And these are modified or replaceed, each reality of the present invention that it does not separate the essence of the corresponding technical solution
Apply the range of a technical solution.