CN103528628A - Humiture data acquisition method - Google Patents

Humiture data acquisition method Download PDF

Info

Publication number
CN103528628A
CN103528628A CN201310522775.0A CN201310522775A CN103528628A CN 103528628 A CN103528628 A CN 103528628A CN 201310522775 A CN201310522775 A CN 201310522775A CN 103528628 A CN103528628 A CN 103528628A
Authority
CN
China
Prior art keywords
temperature
humidity
physical quantity
humidity sensor
data
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.)
Pending
Application number
CN201310522775.0A
Other languages
Chinese (zh)
Inventor
张清波
李荣正
戴国银
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai University of Engineering Science
Original Assignee
Shanghai University of Engineering Science
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai University of Engineering Science filed Critical Shanghai University of Engineering Science
Priority to CN201310522775.0A priority Critical patent/CN103528628A/en
Publication of CN103528628A publication Critical patent/CN103528628A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)

Abstract

本发明公开了一种温湿度数据采集方法,基于相接的单片机和温湿度传感器,包括下列步骤:对所述温湿度传感器进行复位;发送测量温度指令;进行温度测量,得到温度数据;将温度数据转换为温度物理量;发送测量湿度指令;进行湿度测量,得到湿度数据;将湿度数据为湿度物理量,并对湿度物理量进行修正;所述温湿度传感器将得到的温度物理量和修正后的湿度物理量传给所述单片机。本发明能简单有效地实现传感器复位,同时,根据温、湿度间的关系提高湿度测量的准确性。

The invention discloses a method for collecting temperature and humidity data, which is based on a connected single-chip microcomputer and a temperature and humidity sensor, comprising the following steps: resetting the temperature and humidity sensor; sending a temperature measurement command; performing temperature measurement to obtain temperature data; The data is converted into a physical quantity of temperature; the instruction of measuring humidity is sent; the humidity is measured to obtain humidity data; the humidity data is converted into a physical quantity of humidity, and the physical quantity of humidity is corrected; the temperature and humidity sensor transmits the obtained physical quantity of temperature and the corrected physical quantity of humidity to the microcontroller. The invention can simply and effectively realize sensor reset, and at the same time, improve the accuracy of humidity measurement according to the relationship between temperature and humidity.

Description

一种温湿度数据采集方法A method for collecting temperature and humidity data

技术领域technical field

本发明涉及一种温湿度数据采集方法。The invention relates to a temperature and humidity data collection method.

背景技术Background technique

目前,温湿度传感器广泛应用于农业及畜牧业领域,特别是对于一些经济作物的生长种植的幼苗期,环境温湿度要求极为严格,且需要进行详细的记录,人工检测记录既不方便,又容易造成误差,因此,温湿度传感器发挥着极为重要的作用。一般配合单片机,温湿度传感器实现温度的采集和传输。为了测量的准确性,温湿度传感器的复位为不可缺的一步,如何简单、有效地实现其复位是本申请人致力于解决的问题。另外,研究表明,温度和湿度有着密不可分的关系,气体的相对湿度,受温度影响很大,在一定的温度条件下,空气的湿度也要保持相对的稳定。因此,如何根据温度提高湿度测量的准确性也是本申请致力于解决的问题。At present, temperature and humidity sensors are widely used in the fields of agriculture and animal husbandry, especially for the seedling stage of the growth and planting of some economic crops. The environmental temperature and humidity requirements are extremely strict and detailed records are required. Manual detection and recording are both inconvenient and easy. Therefore, the temperature and humidity sensor plays an extremely important role. Generally cooperate with single-chip microcomputer and temperature and humidity sensor to realize the collection and transmission of temperature. For measurement accuracy, the reset of the temperature and humidity sensor is an indispensable step. How to realize the reset simply and effectively is a problem that the applicant is committed to solving. In addition, studies have shown that temperature and humidity are inseparable. The relative humidity of the gas is greatly affected by temperature. Under certain temperature conditions, the humidity of the air should also remain relatively stable. Therefore, how to improve the accuracy of humidity measurement according to temperature is also a problem that this application is dedicated to solving.

发明内容Contents of the invention

本发明的目的在于克服现有技术的缺陷而提供一种温湿度数据采集方法,能简单有效地实现传感器复位,同时,根据温、湿度间的关系提高湿度测量的准确性。The object of the present invention is to overcome the defects of the prior art and provide a temperature and humidity data collection method, which can simply and effectively realize sensor reset, and at the same time, improve the accuracy of humidity measurement according to the relationship between temperature and humidity.

实现上述目的的技术方案是:The technical scheme for realizing the above-mentioned purpose is:

一种温湿度数据采集方法,基于相接的单片机和温湿度传感器,包括下列步骤:A method for collecting temperature and humidity data, based on a connected single-chip microcomputer and a temperature and humidity sensor, comprising the following steps:

步骤S1,复位,所述单片机向所述温湿度传感器发送N次时钟信号,N≥9且为整数;所述温湿度传感器接收信号后等待时间T,再接收下一次命令;Step S1, reset, the single-chip microcomputer sends N clock signals to the temperature and humidity sensor, N≥9 and is an integer; the temperature and humidity sensor waits for time T after receiving the signal, and then receives the next command;

步骤S2,所述单片机向所述温湿度传感器发送测量温度指令;Step S2, the single-chip microcomputer sends a temperature measurement command to the temperature and humidity sensor;

步骤S3,所述温湿度传感器对周围进行温度测量,得到温度数据;Step S3, the temperature and humidity sensor measures the surrounding temperature to obtain temperature data;

步骤S4,所述温湿度传感器将温度数据按相应程序和公式转换为温度物理量,显示并存储;Step S4, the temperature and humidity sensor converts the temperature data into a physical quantity of temperature according to a corresponding program and formula, displays and stores it;

步骤S5,所述单片机向所述温湿度传感器发送测量湿度指令;Step S5, the single-chip microcomputer sends a measurement humidity instruction to the temperature and humidity sensor;

步骤S6,所述温湿度传感器对周围进行湿度测量,得到湿度数据;Step S6, the temperature and humidity sensor measures the surrounding humidity to obtain humidity data;

步骤S7,所述温湿度传感器将湿度数据按相应程序和公式转换为湿度物理量,并根据温度物理量以及对应于该温度物理量预设的湿度偏差值,对湿度物理量进行修正,将修正后的湿度物理量显示并存储;Step S7, the temperature and humidity sensor converts the humidity data into a physical quantity of humidity according to the corresponding program and formula, and corrects the physical quantity of humidity according to the physical quantity of temperature and the preset humidity deviation value corresponding to the physical quantity of temperature, and converts the physical quantity of humidity after correction display and store;

步骤S8,所述温湿度传感器将得到的温度物理量和修正后的湿度物理量传给所述单片机。Step S8, the temperature and humidity sensor transmits the obtained temperature physical quantity and the corrected humidity physical quantity to the single-chip microcomputer.

上述的温湿度数据采集方法,其中,所述的时间T为11ms。In the above temperature and humidity data collection method, the time T is 11 ms.

上述的温湿度数据采集方法,其中,所述温湿度传感器存储有湿度偏差表,该湿度偏差表记录有对应于各温度物理量的各湿度偏差值。In the above method for collecting temperature and humidity data, the temperature and humidity sensor stores a humidity deviation table, and the humidity deviation table records each humidity deviation value corresponding to each temperature physical quantity.

本发明的有益效果是:本发明通过向传感器发送至少9次时钟信号,实现其复位,简单有效。同时,通过存储湿度偏差表,根据温度对湿度进行修正,提高湿度测量的准确性。The beneficial effects of the present invention are: the present invention realizes the reset by sending the clock signal to the sensor at least 9 times, which is simple and effective. At the same time, by storing the humidity deviation table, the humidity is corrected according to the temperature to improve the accuracy of humidity measurement.

附图说明Description of drawings

图1是本发明的温湿度数据采集方法的流程图。Fig. 1 is a flow chart of the temperature and humidity data collection method of the present invention.

具体实施方式Detailed ways

下面将结合附图对本发明作进一步说明。The present invention will be further described below in conjunction with accompanying drawing.

请参阅图1,本发明的温湿度数据采集方法,基于相接的单片机和温湿度传感器,包括下列步骤:Please refer to Fig. 1, the temperature and humidity data acquisition method of the present invention, based on the connected single-chip microcomputer and temperature and humidity sensor, comprises the following steps:

步骤S1,对温度传感器进行复位,单片机向温湿度传感器发送N次时钟信号,N≥9且为整数;温湿度传感器接收信号后等待时间T,再接收下一次命令;本实施例中,T为11ms;Step S1, reset the temperature sensor, the microcontroller sends N clock signals to the temperature and humidity sensor, N≥9 and is an integer; the temperature and humidity sensor waits for T after receiving the signal, and then receives the next command; in this embodiment, T is 11ms;

步骤S2,单片机向温湿度传感器发送测量温度指令;Step S2, the single-chip microcomputer sends a temperature measurement command to the temperature and humidity sensor;

步骤S3,温湿度传感器对周围进行温度测量,得到温度数据;Step S3, the temperature and humidity sensor measures the surrounding temperature to obtain temperature data;

步骤S4,温湿度传感器将温度数据按相应程序和公式转换为温度物理量,显示并存储;Step S4, the temperature and humidity sensor converts the temperature data into a physical quantity of temperature according to the corresponding program and formula, displays and stores it;

步骤S5,单片机向温湿度传感器发送测量湿度指令;Step S5, the single-chip microcomputer sends a measurement humidity command to the temperature and humidity sensor;

步骤S6,温湿度传感器对周围进行湿度测量,得到湿度数据;Step S6, the temperature and humidity sensor measures the surrounding humidity to obtain humidity data;

步骤S7,温湿度传感器将湿度数据按相应程序和公式转换为湿度物理量,并根据温度物理量以及对应于该温度物理量预设的湿度偏差值,对湿度物理量进行修正,将修正后的湿度物理量显示并存储;其中,对应于各温度物理量的各湿度偏差值记录在湿度偏差表内,该湿度偏差表存储在温湿度传感器内;湿度偏差值根据实际情况确定,例如,当湿度偏差值为百分数时,湿度物理量乘以湿度偏差值得到的结果即为修正后的湿度物理量;Step S7, the temperature and humidity sensor converts the humidity data into a physical quantity of humidity according to the corresponding procedures and formulas, and corrects the physical quantity of humidity according to the physical quantity of temperature and the preset humidity deviation value corresponding to the physical quantity of temperature, and displays and displays the corrected physical quantity of humidity storage; wherein, each humidity deviation value corresponding to each temperature physical quantity is recorded in the humidity deviation table, and the humidity deviation table is stored in the temperature and humidity sensor; the humidity deviation value is determined according to the actual situation, for example, when the humidity deviation value is a percentage, The result obtained by multiplying the humidity physical quantity by the humidity deviation value is the corrected humidity physical quantity;

步骤S8,温湿度传感器将得到的温度物理量和修正后的湿度物理量传给单片机,单片机通过诸如:Zigbee网络、GPRS网络等将数据传送到终端机,进行分析处理,得到分析结果,实现各种应用。Step S8, the temperature and humidity sensor transmits the obtained temperature physical quantity and the corrected humidity physical quantity to the single-chip microcomputer, and the single-chip microcomputer transmits the data to the terminal through the Zigbee network, GPRS network, etc. for analysis and processing, and obtains the analysis results to realize various applications .

以上实施例仅供说明本发明之用,而非对本发明的限制,有关技术领域的技术人员,在不脱离本发明的精神和范围的情况下,还可以作出各种变换或变型,因此所有等同的技术方案也应该属于本发明的范畴,应由各权利要求所限定。The above embodiments are only for the purpose of illustrating the present invention, rather than limiting the present invention. Those skilled in the relevant technical fields can also make various changes or modifications without departing from the spirit and scope of the present invention. Therefore, all equivalent The technical solutions should also belong to the category of the present invention and should be defined by each claim.

Claims (3)

1.一种温湿度数据采集方法,基于相接的单片机和温湿度传感器,其特征在于,包括下列步骤:1. a temperature and humidity data acquisition method, based on the connected single-chip microcomputer and temperature and humidity sensor, is characterized in that, comprises the following steps: 步骤S1,复位,所述单片机向所述温湿度传感器发送N次时钟信号,N≥9且为整数;所述温湿度传感器接收信号后等待时间T,再接收下一次命令;Step S1, reset, the single-chip microcomputer sends N clock signals to the temperature and humidity sensor, N≥9 and is an integer; the temperature and humidity sensor waits for time T after receiving the signal, and then receives the next command; 步骤S2,所述单片机向所述温湿度传感器发送测量温度指令;Step S2, the single-chip microcomputer sends a temperature measurement command to the temperature and humidity sensor; 步骤S3,所述温湿度传感器对周围进行温度测量,得到温度数据;Step S3, the temperature and humidity sensor measures the surrounding temperature to obtain temperature data; 步骤S4,所述温湿度传感器将温度数据按相应程序和公式转换为温度物理量,显示并存储;Step S4, the temperature and humidity sensor converts the temperature data into a physical quantity of temperature according to a corresponding program and formula, displays and stores it; 步骤S5,所述单片机向所述温湿度传感器发送测量湿度指令;Step S5, the single-chip microcomputer sends a measurement humidity instruction to the temperature and humidity sensor; 步骤S6,所述温湿度传感器对周围进行湿度测量,得到湿度数据;Step S6, the temperature and humidity sensor measures the surrounding humidity to obtain humidity data; 步骤S7,所述温湿度传感器将湿度数据按相应程序和公式转换为湿度物理量,并根据温度物理量以及对应于该温度物理量预设的湿度偏差值,对湿度物理量进行修正,将修正后的湿度物理量显示并存储;Step S7, the temperature and humidity sensor converts the humidity data into a physical quantity of humidity according to the corresponding program and formula, and corrects the physical quantity of humidity according to the physical quantity of temperature and the preset humidity deviation value corresponding to the physical quantity of temperature, and converts the physical quantity of humidity after correction display and store; 步骤S8,所述温湿度传感器将得到的温度物理量和修正后的湿度物理量传给所述单片机。Step S8, the temperature and humidity sensor transmits the obtained temperature physical quantity and the corrected humidity physical quantity to the single-chip microcomputer. 2.根据权利要求1所述的温湿度数据采集方法,其特征在于,所述的时间T为11ms。2. The method for collecting temperature and humidity data according to claim 1, wherein the time T is 11 ms. 3.根据权利要求1所述的温湿度数据采集方法,其特征在于,所述温湿度传感器存储有湿度偏差表,该湿度偏差表记录有对应于各温度物理量的各湿度偏差值。3. The method for collecting temperature and humidity data according to claim 1, wherein the temperature and humidity sensor stores a humidity deviation table, and the humidity deviation table records each humidity deviation value corresponding to each temperature physical quantity.
CN201310522775.0A 2013-10-29 2013-10-29 Humiture data acquisition method Pending CN103528628A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310522775.0A CN103528628A (en) 2013-10-29 2013-10-29 Humiture data acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310522775.0A CN103528628A (en) 2013-10-29 2013-10-29 Humiture data acquisition method

Publications (1)

Publication Number Publication Date
CN103528628A true CN103528628A (en) 2014-01-22

Family

ID=49930824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310522775.0A Pending CN103528628A (en) 2013-10-29 2013-10-29 Humiture data acquisition method

Country Status (1)

Country Link
CN (1) CN103528628A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108981801A (en) * 2018-06-29 2018-12-11 西南大学 Humiture collection circuit and its control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000143005A (en) * 1998-11-06 2000-05-23 Fuji Photo Film Co Ltd Recording medium package and printer
CN101853033A (en) * 2009-03-31 2010-10-06 上海工程技术大学 A multi-point temperature reading conversion method
CN102589615A (en) * 2012-02-02 2012-07-18 高鹤 Current type temperature and humidity sensor
CN102589614A (en) * 2012-02-02 2012-07-18 高鹤 Digital temperature and humidity detection device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000143005A (en) * 1998-11-06 2000-05-23 Fuji Photo Film Co Ltd Recording medium package and printer
CN101853033A (en) * 2009-03-31 2010-10-06 上海工程技术大学 A multi-point temperature reading conversion method
CN102589615A (en) * 2012-02-02 2012-07-18 高鹤 Current type temperature and humidity sensor
CN102589614A (en) * 2012-02-02 2012-07-18 高鹤 Digital temperature and humidity detection device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张新强: "基于ARM微控制器的嵌入式系统在烟叶初烤中的应用与研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
王琛: "环境参数监测系统研制", 《中国优秀硕士学位论文全文数据库 工程科技Ⅰ辑》 *
陈扬: "烟草仓库环境无线监测系统设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108981801A (en) * 2018-06-29 2018-12-11 西南大学 Humiture collection circuit and its control method

Similar Documents

Publication Publication Date Title
CN107941666A (en) The dynamic calibration method and monitor that a kind of humiture for eliminating particulate matter influences
CN203224388U (en) Static box for measuring animal waste greenhouse gas emission rate
CN206362374U (en) A kind of measurement harvester suitable for aerostatics
CN107884322A (en) The dynamic calibration method and monitor that a kind of chemical constituent for eliminating particulate matter influences
CN103528628A (en) Humiture data acquisition method
CN204348063U (en) Warmhouse booth wireless digital humiture display device
CN108225399A (en) A kind of general modification method of sensing system
CN203561319U (en) plant height measuring ruler
CN202994049U (en) Radial tree growth monitor
CN107144492A (en) A kind of stalk moisture the cannot-harm-detection device and method towards crop
CN204027602U (en) Based on the agriculture Internet of Things supervising device of Fibre Optical Sensor
CN203011349U (en) Plant stem diameter measurement apparatus
CN203432524U (en) A portable grassland ecosystem field investigation quadrat frame
CN206848270U (en) A kind of equipment for detecting soil different depth trace element
CN202661104U (en) Humiture detection device of vegetable greenhouse
CN203191341U (en) Soil humidity detector
CN203706251U (en) A sugarcane seed bud counting system based on resistor type foil gauges
CN204650328U (en) A kind of environment of vegetable greenhouse supervisory system
CN204575487U (en) For the ventilation property test device of wrappage
CN211178573U (en) Height self-adjusting greenhouse crop growth environment monitoring device
CN201867354U (en) Cotton cloth hygroscopic moisture detector
CN204214555U (en) A kind of temperature sensor
CN204758155U (en) Greenhouse temperature and humidity measurement takes notes appearance
CN206420404U (en) A kind of simple and efficient height of seedling measuring scale
CN204650617U (en) Instrument use registering instrument

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20140122