CN112617266A - Tobacco flue-curing controller interface circuit compatible with two sensors and control method - Google Patents
Tobacco flue-curing controller interface circuit compatible with two sensors and control method Download PDFInfo
- Publication number
- CN112617266A CN112617266A CN202011500478.2A CN202011500478A CN112617266A CN 112617266 A CN112617266 A CN 112617266A CN 202011500478 A CN202011500478 A CN 202011500478A CN 112617266 A CN112617266 A CN 112617266A
- Authority
- CN
- China
- Prior art keywords
- sensor
- pin
- resistor
- switch
- interface circuit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A24—TOBACCO; CIGARS; CIGARETTES; SIMULATED SMOKING DEVICES; SMOKERS' REQUISITES
- A24B—MANUFACTURE OR PREPARATION OF TOBACCO FOR SMOKING OR CHEWING; TOBACCO; SNUFF
- A24B3/00—Preparing tobacco in the factory
- A24B3/10—Roasting or cooling tobacco
Landscapes
- Heterocyclic Carbon Compounds Containing A Hetero Ring Having Oxygen Or Sulfur (AREA)
Abstract
The invention discloses a tobacco leaf baking controller interface circuit compatible with a digital temperature sensor and an analog temperature sensor and a control method, and mainly relates to the field of tobacco leaf baking controllers; the voltage-stabilizing circuit comprises a voltage-dividing resistor R1, a pull-up resistor R2, a protection resistor R3, a filter capacitor C1, a filter capacitor C2, a voltage-stabilizing diode D1, a pull-up switch Q1 and a filter switch Q2; the invention conforms to the interface specification in the file of national tobacco draft (2009) 418, is compatible with a DS18B20 sensor and an NTC-10K-B3950 thermistor, realizes that one interface can be connected with two sensors, and a controller can automatically identify the type of the sensor and switch to a corresponding software program.
Description
Technical Field
The invention relates to the field of tobacco leaf baking controllers, in particular to a tobacco leaf baking controller interface circuit compatible with a digital temperature sensor and an analog temperature sensor and a control method.
Background
According to the bulk curing barn technical specification in national tobacco integrated [ 2009 ] 418, DS18B20 digital sensors are adopted as dry-bulb and wet-bulb temperature sensors, 4 dry-bulb temperature sensors are used in each curing barn, the dry-bulb temperature sensors are respectively arranged on the upper shed, the wet-bulb temperature sensors are arranged on the upper shed, the dry-bulb temperature sensors are arranged on the lower shed, the wet-bulb temperature sensors are arranged on the lower shed, a 6-core connecting wire is shared, and temperature and humidity sensors are formed, wherein pins 1-6 are defined in sequence: the sensor comprises an upper shed dry ball, an upper shed wet ball, a lower shed dry ball, a lower shed wet ball, a power supply, a ground, a sensor main line with the length of 5m, an upper shed branch line with the length of 2.5m and a lower shed branch line with the length of 1.5 m.
The technical specification is made for a coal-fired curing barn according to the technical conditions at the time, but with the continuous appearance of novel curing barns (heat pump curing barns, solar curing barns and the like), the requirements for the sensor in the technical document can not meet the actual requirements gradually.
Firstly, a DS18B20 digital sensor is specified in the original standard, and the sensor is a temperature sensor product of the DALLAS company in the United states and is an imported chip and is in danger of supply interruption and production halt;
secondly, the length of a sensor main line required by the heat pump curing barn is not less than 10 meters, which is not in accordance with the technical specification;
in addition, after the DS18B20 adopts the lightning protection and filter circuit, especially when the length of the main line exceeds 10 meters, the error probability of the controller for reading the sensor data is greatly increased, the requirement on software design is high, and meanwhile, the anti-interference capability is reduced.
In a heat pump curing barn, in order to avoid the defect of DS18B20, part of manufacturers adopt a thermistor instead, the common specification is NTC-10K-B3950, and a singlechip measures the temperature by utilizing an analog AI pin, but the mode has several problems:
firstly, the regulation of the national tobacco draft No. (2009) 418 file is not met;
secondly, the specification and the interface standard of the thermistor sensor for the curing barn are not specified, the specification and the interface of each manufacturer are not uniform, once the sensor fails, the sensor is not easy to purchase in the market, and inconvenience is brought to a user;
in addition, due to the fact that the thermistor sensors are not uniform, interchangeability does not exist among the curing barn controllers adopting the thermistor sensors, and once the controllers break down, the controllers of other manufacturers cannot be used for replacement.
Disclosure of Invention
The invention aims to solve the problems in the prior art, provides an interface circuit of a tobacco leaf baking controller compatible with two sensors and a control method thereof, conforms to the interface specification in the national tobacco institute of technology (2009) 418, is compatible with a DS18B20 sensor and an NTC-10K-B3950 thermistor, realizes that one interface can be connected with the two sensors, and a controller can automatically identify the types of the sensors and switch the types of the sensors to corresponding software programs.
In order to achieve the purpose, the invention is realized by the following technical scheme:
the tobacco leaf baking controller interface circuit compatible with the two sensors is characterized in that one end of the tobacco leaf baking controller interface circuit compatible with the two sensors is connected with a sensor pin, and the other end of the tobacco leaf baking controller interface circuit compatible with the two sensors is connected with a singlechip pin;
the tobacco leaf baking controller interface circuit compatible with the two sensors comprises a voltage dividing resistor R1, a pull-up resistor R2, a protection resistor R3, a filter capacitor C1, a filter capacitor C2, a voltage stabilizing diode D1, a pull-up switch Q1 and a filter switch Q2;
one end of the protective resistor R3 is connected with a sensor pin, and the other end of the protective resistor R3 is connected with a singlechip pin;
one end of the voltage dividing resistor R1 is connected between the protective resistor R3 and the sensor pin;
one end of the pull-up resistor R2 is connected between the protection resistor R3 and the sensor pin, and the other end of the pull-up resistor R2 is connected with the pull-up switch Q1;
one end of the filter capacitor C1 is connected between the protective resistor R3 and the sensor pin, and the other end of the filter capacitor C1 is grounded;
one end of the voltage stabilizing diode D1 is connected between the protective resistor R3 and the sensor pin, and the other end of the voltage stabilizing diode D1 is grounded;
one end of the filter capacitor C2 is connected between the protection resistor R3 and the single chip microcomputer pin, the other end of the filter capacitor C2 is connected with the filter switch Q2, and one end, far away from the filter capacitor C2, of the filter switch Q2 is grounded.
Preferably, the pull-up switch Q1 is a P-type MOS transistor.
Preferably, the filtering switch Q2 is an N-type MOS transistor.
A control method of a tobacco flue-curing controller interface circuit compatible with two sensors comprises the following steps:
s1, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting low level, and setting the pin of the singlechip TP1 to be in the digital IO mode;
s2, detecting whether the DS18B20 is online, and if so, entering the step S3; if not, go to step S4;
s3, reading the temperature data according to the DS18B20 program, and judging whether the temperature data are read correctly; if the temperature data are correct, storing the temperature data; if not, DS18B20 fails; then proceeds to step S6;
s4, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting high level, and setting the pin of the singlechip TP1 to be in an analog AI mode;
s5, reading the temperature data according to the thermistor program, and judging whether the temperature data is read correctly; if the temperature data are correct, storing the temperature data; if not, the thermistor is in failure or the sensor is not connected; then proceeds to step S6;
and S6, updating the sensor type and the fault mark.
Compared with the prior art, the invention has the beneficial effects that:
1. the device conforms to the file No. 2009/418 of national tobacco institute, is compatible with a DS18B20 sensor, and has interchangeability with the existing curing barn controller.
2. The NTC-10K-B3950 thermistor can be adopted to measure the temperature, the controller software can automatically identify the type of the sensor, different software programs are switched, and the novel heat pump curing barn can be used.
3. The two sensors share the same interface, so that users do not need to access different interfaces according to the types of the sensors, and the use is convenient.
Drawings
FIG. 1 is a circuit diagram of the present invention;
FIG. 2 is a control flow diagram of the present invention.
Detailed Description
The invention will be further illustrated with reference to the following specific examples. It should be understood that these examples are for illustrative purposes only and are not intended to limit the scope of the present invention. Further, it should be understood that various changes or modifications of the present invention may be made by those skilled in the art after reading the teaching of the present invention, and these equivalents also fall within the scope of the present application.
Example (b):
as shown in the attached figure 1, the invention relates to a tobacco flue-curing controller interface circuit compatible with two sensors.
IN the circuit diagram, IN-TP1 is connected with a sensor pin, TP1 is connected with a singlechip pin, the singlechip pin with the multiplexing function of a digital IO port and an analog AI port is selected, SW1 represents a control signal for switching the two sensors, and the signal is sent by the singlechip.
The filter capacitor C1 and the voltage stabilizing diode D1 in the circuit filter and protect the sensor signal in voltage limiting mode.
When the sensor is a thermistor, a voltage dividing resistor R1 in the circuit is used as a voltage dividing resistor, and VREF is the reference voltage of the AD converter of the singlechip.
A pull-up resistor R2 in the circuit is used as a pull-up resistor when the sensor is DS18B20, a pull-up switch Q1 is used as a switch for controlling whether the R2 has a pull-up effect, Q1 is a P-type MOS tube and is connected between a resistor and VDD, and the VDD is the working voltage of a digital circuit of the single chip microcomputer.
A protection resistor R3 in the circuit is a resistor connected between a sensor pin and a singlechip pin, is used for limiting the current between the two pins and has a protection effect.
The filter capacitor C2 in the circuit is used as a filter capacitor when the sensor is a thermistor, and a filter switch Q2 is used as a switch for controlling whether the C2 has a filter function, and Q2 is an N-type MOS tube and is connected between the capacitor and the ground wire of the circuit board.
The pull-up switch Q1 and the filter switch Q2 in the circuit are controlled by SW1 signals, when SW1 is high level, the pull-up switch Q1 is turned off, the filter switch Q2 is turned on, the circuit is suitable for the thermistor sensor, when SW1 is low level, the pull-up switch Q1 is turned on, the filter switch Q2 is turned off, and the circuit is suitable for the DS18B20 sensor.
As shown in fig. 2, a method for controlling an interface circuit of a tobacco flue-curing controller compatible with two sensors includes the steps of:
s1, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting low level, and setting the pin of the singlechip TP1 to be in the digital IO mode;
s2, detecting whether the DS18B20 is online, and if so, entering the step S3; if not, go to step S4;
s3, reading the temperature data according to the DS18B20 program, and judging whether the temperature data are read correctly; if the temperature data are correct, storing the temperature data; if not, DS18B20 fails; then proceeds to step S6;
s4, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting high level, and setting the pin of the singlechip TP1 to be in an analog AI mode;
s5, reading the temperature data according to the thermistor program, and judging whether the temperature data is read correctly; if the temperature data are correct, storing the temperature data; if not, the thermistor is in failure or the sensor is not connected; then proceeds to step S6;
and S6, updating the sensor type and the fault mark.
The temperature is first read according to the program of the DS18B20 sensor, if the reading fails, it is indicated not to be DS18B20 but to be a thermistor, and then the temperature is read according to the program of the thermistor, while it is determined whether the sensor is connected or failed.
The invention designs an interface specification which accords with the file of No. 2009/418 of national tobacco Integrated institute (2009) by utilizing the characteristic that the signal pin of the DS18B20 sensor is acquiescently recognized as the open leakage state, is compatible with the DS18B20 sensor and the NTC-10K-B3950 thermistor, realizes that one interface can be connected with two sensors, and the controller can automatically recognize the types of the sensors and switch to a corresponding software program.
Claims (4)
1. Tobacco flue-curing controller interface circuit of compatible two kinds of sensors, its characterized in that: one end of the tobacco leaf baking controller interface circuit compatible with the two sensors is connected with a sensor pin, and the other end of the tobacco leaf baking controller interface circuit is connected with a singlechip pin;
the tobacco leaf baking controller interface circuit compatible with the two sensors comprises a voltage dividing resistor R1, a pull-up resistor R2, a protection resistor R3, a filter capacitor C1, a filter capacitor C2, a voltage stabilizing diode D1, a pull-up switch Q1 and a filter switch Q2;
one end of the protective resistor R3 is connected with a sensor pin, and the other end of the protective resistor R3 is connected with a singlechip pin;
one end of the voltage dividing resistor R1 is connected between the protective resistor R3 and the sensor pin;
one end of the pull-up resistor R2 is connected between the protection resistor R3 and the sensor pin, and the other end of the pull-up resistor R2 is connected with the pull-up switch Q1;
one end of the filter capacitor C1 is connected between the protective resistor R3 and the sensor pin, and the other end of the filter capacitor C1 is grounded;
one end of the voltage stabilizing diode D1 is connected between the protective resistor R3 and the sensor pin, and the other end of the voltage stabilizing diode D1 is grounded;
one end of the filter capacitor C2 is connected between the protection resistor R3 and the single chip microcomputer pin, the other end of the filter capacitor C2 is connected with the filter switch Q2, and one end, far away from the filter capacitor C2, of the filter switch Q2 is grounded.
2. The two-sensor compatible tobacco flue-curing controller interface circuit of claim 1, wherein: the pull-up switch Q1 is a P-type MOS tube.
3. The two-sensor compatible tobacco flue-curing controller interface circuit of claim 1, wherein: the filtering switch Q2 is an N-type MOS tube.
4. A method of controlling the interface circuit of the tobacco curing controller compatible with two sensors according to any one of claims 1 to 3, comprising the steps of:
s1, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting low level, and setting the pin of the singlechip TP1 to be in the digital IO mode;
s2, detecting whether the DS18B20 is online, and if so, entering the step S3; if not, go to step S4;
s3, reading the temperature data according to the DS18B20 program, and judging whether the temperature data are read correctly; if the temperature data are correct, storing the temperature data; if not, DS18B20 fails; then proceeds to step S6;
s4, setting the pin of the singlechip SW1 to be in a digital IO mode and outputting high level, and setting the pin of the singlechip TP1 to be in an analog AI mode;
s5, reading the temperature data according to the thermistor program, and judging whether the temperature data is read correctly; if the temperature data are correct, storing the temperature data; if not, the thermistor is in failure or the sensor is not connected; then proceeds to step S6;
and S6, updating the sensor type and the fault mark.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011500478.2A CN112617266B (en) | 2020-12-17 | 2020-12-17 | Tobacco flue-curing controller interface circuit compatible with two sensors and control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011500478.2A CN112617266B (en) | 2020-12-17 | 2020-12-17 | Tobacco flue-curing controller interface circuit compatible with two sensors and control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112617266A true CN112617266A (en) | 2021-04-09 |
CN112617266B CN112617266B (en) | 2022-03-01 |
Family
ID=75316749
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011500478.2A Active CN112617266B (en) | 2020-12-17 | 2020-12-17 | Tobacco flue-curing controller interface circuit compatible with two sensors and control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112617266B (en) |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3024328A1 (en) * | 1980-06-27 | 1982-01-21 | B.A.T. Cigaretten-Fabriken Gmbh, 2000 Hamburg | Measuring physical value using parallel electrical model - reducing measurement delay using auxiliary sensor and differential circuit |
CN204679881U (en) * | 2015-06-18 | 2015-09-30 | 国网山东省电力公司枣庄供电公司 | A kind of temperature collection circuit being applicable to single-chip microcomputer |
CN105807814A (en) * | 2016-02-23 | 2016-07-27 | 中国烟草总公司广东省公司 | Natural gas tobacco flue-curing house temperature control circuit |
CN205432084U (en) * | 2016-02-23 | 2016-08-10 | 中国烟草总公司广东省公司 | A double-limit temperature alarm circuit for solar flue-cured tobacco houses |
CN205646781U (en) * | 2016-04-21 | 2016-10-12 | 深圳怡化电脑股份有限公司 | Power supply overvoltage protection circuit |
CN106533424A (en) * | 2016-11-02 | 2017-03-22 | 西安电子科技大学 | Interface circuit compatible with resistive and capacitive sensors |
CN207281217U (en) * | 2017-08-22 | 2018-04-27 | 秦皇岛尼特智能科技有限公司 | A kind of amplifier circuit of compatibility electric current and temperature detection |
CN208423764U (en) * | 2018-03-12 | 2019-01-22 | 浩海威半导体(深圳)有限公司 | A kind of overvoltage crowbar based on triode |
CN109497615A (en) * | 2018-09-29 | 2019-03-22 | 深圳市合元科技有限公司 | A kind of output control circuit |
CN109696186A (en) * | 2017-10-20 | 2019-04-30 | 英飞凌科技股份有限公司 | Reading circuit for resistance sensor and capacitance type sensor |
CN209512929U (en) * | 2019-03-27 | 2019-10-18 | 重庆源播科技有限公司 | Digital tobacco flue-curing temperature and humidity integrative sensor and temperature and humidity control system |
-
2020
- 2020-12-17 CN CN202011500478.2A patent/CN112617266B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE3024328A1 (en) * | 1980-06-27 | 1982-01-21 | B.A.T. Cigaretten-Fabriken Gmbh, 2000 Hamburg | Measuring physical value using parallel electrical model - reducing measurement delay using auxiliary sensor and differential circuit |
CN204679881U (en) * | 2015-06-18 | 2015-09-30 | 国网山东省电力公司枣庄供电公司 | A kind of temperature collection circuit being applicable to single-chip microcomputer |
CN105807814A (en) * | 2016-02-23 | 2016-07-27 | 中国烟草总公司广东省公司 | Natural gas tobacco flue-curing house temperature control circuit |
CN205432084U (en) * | 2016-02-23 | 2016-08-10 | 中国烟草总公司广东省公司 | A double-limit temperature alarm circuit for solar flue-cured tobacco houses |
CN205646781U (en) * | 2016-04-21 | 2016-10-12 | 深圳怡化电脑股份有限公司 | Power supply overvoltage protection circuit |
CN106533424A (en) * | 2016-11-02 | 2017-03-22 | 西安电子科技大学 | Interface circuit compatible with resistive and capacitive sensors |
CN207281217U (en) * | 2017-08-22 | 2018-04-27 | 秦皇岛尼特智能科技有限公司 | A kind of amplifier circuit of compatibility electric current and temperature detection |
CN109696186A (en) * | 2017-10-20 | 2019-04-30 | 英飞凌科技股份有限公司 | Reading circuit for resistance sensor and capacitance type sensor |
CN208423764U (en) * | 2018-03-12 | 2019-01-22 | 浩海威半导体(深圳)有限公司 | A kind of overvoltage crowbar based on triode |
CN109497615A (en) * | 2018-09-29 | 2019-03-22 | 深圳市合元科技有限公司 | A kind of output control circuit |
CN209512929U (en) * | 2019-03-27 | 2019-10-18 | 重庆源播科技有限公司 | Digital tobacco flue-curing temperature and humidity integrative sensor and temperature and humidity control system |
Also Published As
Publication number | Publication date |
---|---|
CN112617266B (en) | 2022-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108896107B (en) | Single-bus temperature and humidity integrated sensor chip and communication method thereof | |
CN112617266B (en) | Tobacco flue-curing controller interface circuit compatible with two sensors and control method | |
CN104375543A (en) | Internal temperature and humidity measurement method of power distribution cabinet | |
CN209085796U (en) | A kind of separated electronic product sharing a temperature sensor thermometric | |
CN203520209U (en) | Digital circuit-based temperature-humidity measurement and control system | |
CN211349064U (en) | Control device of heat pump dryer | |
CN201440221U (en) | Two-path temperature control circuit | |
CN211044047U (en) | Warehouse temperature and humidity controller | |
CN101833350B (en) | Midpoint voltage self-adaptation device of magnetic resistor network and self-adaptation method | |
CN212965881U (en) | Temperature and humidity adjusting system | |
CN206311236U (en) | Intelligent temperature sensor for measuring middle head of high-voltage cable | |
CN208257787U (en) | A kind of communication interface circuit | |
CN208571577U (en) | Thermal-shutdown circuit | |
CN213069603U (en) | Take humiture detection's automatic machine of watering flowers circuit structure | |
CN112634598A (en) | Wireless data acquisition device, acquisition method, self-adaption method and use method | |
CN207649679U (en) | A kind of device for automatic identification Temperature Humidity Sensor | |
CN202998317U (en) | Video matrix self-adaption video ring circuit | |
CN208316284U (en) | Digitize power module | |
CN207281164U (en) | A kind of heat pump switchgear remote monitoring system | |
CN112634597A (en) | LORA-based heating and ventilation electric regulating valve remote controller | |
CN200952833Y (en) | Temperature control device for digital control constant temperature water delivery device | |
CN205827641U (en) | A kind of network sensor device of new structure | |
CN206556194U (en) | A kind of air detection instrument with Xingfeng capsule | |
CN210373383U (en) | Analog quantity measuring channel overvoltage protector for electric heating steam boiler | |
CN210954756U (en) | Photosensitive temperature controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |