Share this

Rabbit Housing Temperature and Humidity Monitoring System Based on Digital Sensors

2026-04-06 07:51:05 · · #1
Abstract: To address the existing problems in temperature and humidity monitoring in factory rabbit farming, this paper studies and designs a temperature and humidity monitor based on digital sensors. The main circuit structure and working principle of the monitor are introduced, and the design of the temperature and humidity detection circuit and software is explained to simplify the hardware circuit structure, reduce costs, and improve accuracy. Field tests show that the monitor is reliable, has good anti-interference capabilities, and offers high cost-effectiveness. Keywords: digital sensor; temperature and humidity monitoring; single-chip microcomputer; anti-interference measures Abstract: To solve the problem of temperature and humidity measuring and controlling equipment used in rabbit hutches, a new equipment was developed using a digital sensor. This paper introduces the main circuit structure and working principle of the equipment, and expounds the design method of simplifying the structure of the hardware circuit, reducing the cost, and improving the measuring precision from the design of the temperature and humidity measuring circuit and software. The experiment proved that the equipment has more features, such as high reliability, good anti-interference, and a higher performance-price ratio. Key words: digital sensor; temperature and humidity measuring and controlling; single-chip microcomputer; anti-interference measure 1 Introduction Rabbit farming is an important part of modern animal husbandry, characterized by low investment and high efficiency. In recent years, with the opening of the international market and the increasing demand for rabbit meat products in the domestic consumer market, rabbit farming has gradually moved towards factory farming. However, we have found that in the process of rabbit farming, the growth of rabbits is affected to varying degrees because the temperature and humidity in the rabbit hutch cannot be well regulated. Currently, temperature and humidity management in rabbit hutches is still largely based on manual operation. Although related monitoring and control equipment has emerged in recent years, the typical design method involves multiple target parameters being collected by sensors and outputting analog signals. These analog signals are then input into a microcontroller system via data cables for A/D conversion and related processing. The disadvantages of this method are that each sensor requires a data cable to connect to the control motherboard, resulting in cumbersome wiring and high costs. Furthermore, since the signals transmitted are analog, they are susceptible to interference and experience significant signal loss. These drawbacks are particularly pronounced for large-scale rabbit hutch temperature and humidity monitoring. To improve the intelligence level of rabbit hutch management, we developed a temperature and humidity monitoring instrument based on digital sensors. 2 System Overall Design Concept This monitoring instrument uses a microcontroller as its control core and consists of three main parts: a detection module (including temperature and humidity detection), an information processing module, and a drive control module. The overall system structure diagram is shown in Figure 1. [align=center] Figure 1 System Structure Diagram[/align] When the system is working, the microcontroller starts, and the operator can input the set temperature and humidity ranges for the rabbit hutch via the keyboard. Temperature and humidity sensors installed in the rabbit hutch collect parameter signals and convert them directly into digital signals at the measurement site. These signals are then sent to a microcontroller in the control room via a twisted-pair cable. The signals are displayed on the display circuit and compared with set values. When the temperature or humidity in the rabbit hutch exceeds the set range, the microcontroller system outputs a command to activate the corresponding equipment; when the temperature and humidity are within the set range, the power to the activating equipment is cut off. 3. Detection Circuit Principle The temperature and humidity detection circuit uses a single-bus technology design. Simply run a twisted-pair cable from the microcontroller in the control room to the measurement site in the rabbit hutch, and then connect the various temperature and humidity sensors to it. The interface circuit is shown in Figure 2. The microcontroller's parallel interface P1.0 is used to connect to the single bus to achieve bidirectional data transmission. Each chip directly connected to the single bus has its own 64-bit ROM registration code, also known as the chip ID number. This registration code is photolithographically engraved into the chip by the manufacturer to ensure its unique identification. This is the key to achieving positioning and addressing communication on the single bus. [align=center]Figure 2 Schematic diagram of the detection circuit[/align] 3.1 Temperature detection circuit For detecting the temperature signal in the rabbit hutch, this system uses the DS1825 temperature sensor. The DS1825 is a low-cost, low-power single-bus digital temperature sensor manufactured by Dallas Semiconductor, USA. Its temperature measurement range is -55℃ to +125℃, with an accuracy of ±0.5℃ within the range of -10℃ to +85℃. Unlike traditional analog sensors that require signal conditioning circuits and A/D conversion circuits when interfaced with a microprocessor, it can be directly connected to the microprocessor bus. Each DS1825 has a unique 64-bit registration code and a 4-bit location address, which can identify specific temperature sensors in the system, reducing the lookup table range. The interface circuit between the DS1825 and the microcontroller is shown in Figure 2. Six DS1825s are connected to one I/O bus of the microcontroller to simultaneously measure the temperature at different locations. To avoid overlap when multiple sensors measure temperature simultaneously, we designed the circuit to provide six operating modes through different combinations of address input pins AD0, AD1, AD2, and AD3. 3.2 Humidity Detection Circuit For the humidity detection circuit, we used a combination of the HM1500LF humidity sensor and the DS2450 A/D converter. The HM1500LF is a low-cost linear voltage output humidity sensor manufactured by HUMIREL, France. It utilizes HUMIREL's patented HS1101 humidity-sensitive capacitor, has a humidity measurement range of 0–100%RH, an output voltage of 1–4VDC, an accuracy of ±3%RH (10–95%RH range), and an operating temperature range of -30℃ to +60℃. The DS2450 is a newly released networkable integrated A/D chip from Dallas Semiconductor, compliant with a single-bus protocol. It employs a successive approximation conversion principle, has four analog voltage input channels and two analog voltage input ranges (0V–2.56V and 0V–5.12V), one data output port (communication rate of 16.3kb/s, up to 142kb/s in overspeed mode), and its conversion accuracy can be selected arbitrarily between 2 and 16 bits. It is powered by a single 5V power supply, but parasitic power supply can also be used. The humidity detection circuit is shown in Figure 2. Six humidity sensors are connected to the four analog voltage input channels A, B, C, and D of one DS2450 chip and the A and B terminals of another DS2450 chip. The DATA terminals of the two DS2450 chips are connected to the same I/O bus. The circuit is powered by a +5V power supply. Using this circuit, the humidity detection signal is directly converted into a digital signal at the measurement site. Therefore, the HM1500LF and DS2450 combined constitute a single-bus digital humidity sensor module. 4. System Control Motherboard Design The system's hardware circuit configuration is shown in Figure 3. [align=center] Figure 3 System Hardware Circuit Configuration[/align] The monitor's microprocessor is the ATMEL series AT89C52 microcontroller, compatible with MCS-51. It is a low-voltage, high-performance CMOS 8-bit microcontroller with 8K of rewritable Flash read-only program memory and 256 bytes of random access data memory. The LED display circuit and keyboard circuit consist of one 8255, one 74HC245, one MC1413, and two 74HC374 chips. The display control bit code is output by the 74HC374, inverted by the MC1413, and used as the LED bit selection signal. The bit selection signal also serves as the keyboard column scan code. The number of rows scanned by the keyboard is read back by the 74HC245. The column scan code output by the 74HC374 is read by the 74HC245 and used to determine whether a key is pressed and what key is pressed. If no key is pressed, the value read back by the 74HC245 is high due to the pull-up resistor. If a key is pressed, the low level output of the 74HC374 is connected to the port of the 74HC245 through the key, thus the data read back from the 74HC245 will have a low bit. Based on the column signal output by the 74HC374 and the row signal read back by the 74HC245, it can be determined which key was pressed. The segment code of the LED display is output by another 74HC374. The drive control circuit consists of a 74LS04 driver and a solid-state relay. The air conditioner and dehumidifier are controlled by the execution signal output by the AT89C52 microcontroller. 5 System Software Design The system application program adopts a modular design method. The entire software program consists of a main program, interrupt service routines, and application subroutines. The main program mainly completes the system initialization and sets the initial temperature and humidity values ​​of the rabbit hutch; the interrupt service routines are used for process control of the entire temperature and humidity monitoring system. 5.1 Data Acquisition Subroutine Design In the temperature (humidity) acquisition subroutine, the system first initializes the DS1825 (DS2450), searches online for the DS1825 (DS2450) registration code, starts the A/D conversion, and reads the A/D conversion value from the analog input channel. To illustrate its programming method, the software flow of DS2450 operation is shown in Figure 4. [align=center] Figure 4 DS2450 Operation Software Flow[/align] 5.2 Anti-interference Measures in Software Design Since this system is directly used at the monitoring site, and the site environment generally contains various noises and interferences, digital filtering of the sampled values ​​is necessary. Considering that the measured objects are slowly changing temperature and humidity parameters, this system adopts a composite digital filtering technique using both low-pass filtering and weighted average filtering algorithms. Its input-output relationship is shown in Figure 5. [align=center]Figure 5 Input-output relationship of digital filter[/align] The low-pass filtering method is based on the characteristics of the inertial element. Its algorithm is: where is the filter coefficient; X(n) is the low-pass filter input value; C(n-1) is the previous low-pass filter output value; C(n) is the current low-pass filter output value. The weighted average filtering method multiplies n consecutive sampled values ​​by different weighting coefficients and then sums them. To highlight the effect of the most recent samples, the weighting coefficients are generally smaller first and then larger. The algorithm for weighted average filtering is: 6 Conclusion In the design, due to the use of low-cost, low-power single-bus digital temperature and humidity sensor modules to detect target parameters, and the implementation of certain anti-interference measures in the software, the overall circuit structure is simplified, its cost and power consumption are reduced, and its detection accuracy and reliability are improved. After its successful development, the instrument underwent repeated field tests and experiments. The temperature error was less than ±0.6℃, and the relative humidity error was less than ±4%RH. The test results demonstrate that the instrument's design is reasonable, its performance is reliable, and it fully meets the design requirements for practical applications. The innovation of this paper lies in combining computer digital transmission technology with the current status of rabbit hutch temperature and humidity monitoring equipment. Addressing the shortcomings of existing equipment, a new design method is proposed. A novel integrated chip is used to design a digital humidity detection module, which, in conjunction with a digital temperature sensor, utilizes single-bus technology to design a fully digital temperature and humidity monitoring instrument. To improve the reliability of the sampled data, a composite digital filter design is also presented. References [1] Liu Jianhua, Wu Qiurui, Shuo He et al. Development of heat meter based on single bus technology [J]. Microcomputer Information, 2005, 21 (5): 175-176. [2] Meng Qinghao, Zhai Zhenduo. Software and hardware design of multi-point temperature and humidity detection system for constant temperature warehouse [J]. Journal of Hebei University of Technology, 1997, 26 (4): 102-108. [3] Pan Xinmin, Wang Yanfang. Microcomputer control technology [M]. Beijing: Electronic Industry Press, 2003. [4] Wang Dahai. Design and application of new automatic temperature and humidity control system [J]. Electronic Engineer, 2002, 28 (3): 33-36. [5] Wang Xingzhi, Zhong Aiqin, Wang Lei et al. Principles and interface technology of AT89 series single-chip microcomputer [M]. Beijing: Beijing University of Aeronautics and Astronautics Press, 2004. [6] Dallas Semiconductor Corporation. Dallas Semiconductor Data Books [Z], 1995.
Read next

Precautions for the installation and maintenance of programmable logic controllers

Programmable Logic Controllers (PLCs) are a new type of general-purpose automation control device that integrates tradit...

Articles 2026-02-22