Temperature and humidity detection system based on single chip microcomputer

Publisher:rocky96Latest update time:2022-04-25 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

insert image description here

Figure 2-2-3 Reset circuit, crystal oscillator circuit


2.2.4 Buzzer Alarm Module


This design uses a buzzer alarm circuit, as shown in the figure. When the rated current of the buzzer is ≤30mA, and for the STC89C51 microcontroller, the current of the P3.2 port is 15mA, the current of the P3.2 port of the microcontroller alone cannot drive the buzzer, and a transistor must be used to amplify the current. PNP transistors are usually used. When the temperature or humidity of the external environment exceeds the preset value, the base level becomes low, the buzzer is turned on and sounds, and an alarm is realized.

insert image description here

Figure 2-2-4 Buzzer alarm module


2.2.5 Temperature and humidity button module

insert image description here

Figure 2-2-5 Button module


2.2.6 System Display Module


The display module uses a 1602 dot matrix character LCD, which is one of the most widely used LCD screens in industrial control systems. It has high display quality, is easy to drive, and can display a variety of content after programming.


DHT11 is a digital temperature and humidity sensor that can directly transmit the collected temperature and humidity of the current environment in digital form. DHT11 uses a single bus communication, so you only need to connect an I/O port of the microcontroller to the communication interface of DHT11 to realize data collection and transmission.

insert image description here

Figure 2-2-6 1602LCD and DHT11 schematic diagram


2.3 Hardware Implementation Control and Physical Finished Products

insert image description here

Operation Instructions:
S1: Reset key S2: Set/Save S3: Value plus S4: Value minus
1. After the system is powered on, LCD1602 displays the temperature and humidity values ​​of the current environment. Press the S2 setting key to enter the adjustment mode of the preset temperature upper limit, humidity upper limit, humidity lower limit, and temperature lower limit in sequence.
2. Press the S3 value plus key to increase the preset value.
3. Press the S4 value minus key to decrease the preset value.
4. After the setting is successful, press the S2 setting key to exit and return to the normal monitoring mode.

insert image description here

Figure 2-3-1 Hardware Image 1

insert image description here
Figure 2-3-2 Hardware Picture 2


3 System Software Design


The system software design adopts a modular design, including the main program, temperature detection subroutine, humidity detection subroutine, data storage, subroutine reading, and LCD display subroutine. The core part of the temperature and humidity monitoring system during software design will use a loop to complete data collection and data comparison. The system operates normally after power-on, and performs temperature and humidity detection and processing.

 

insert image description here

Figure 3-1 Software design flow chart


4 Conclusion


This article designs a temperature and humidity detection, alarm, and control system for a computer classroom. The cost-effective single-chip microcomputer STC89C51 processes the sensor data, and collects and processes the temperature and humidity data through the temperature and humidity sensor. The 1602LCD display shows the real-time temperature and humidity values. When the measured value exceeds the set temperature and humidity value, the single-chip microcomputer drives the buzzer module to realize the alarm function, control the equipment to start automatically, and adjust the indoor temperature and humidity to restore it to the normal range. Combining the above functions, a system based on the DHT11 sensor and the C51 single-chip microcomputer can be constructed to realize the stable and simple temperature and humidity environmental data monitoring function.


[1] [2]
Reference address:Temperature and humidity detection system based on single chip microcomputer

Previous article:Design of electronic scale system based on single chip microcomputer
Next article:Design of traffic light system based on single chip microcomputer

Recommended posts

Introduction to RF Gain Blocks for Radio Range and Reliability
Radiofrequency(RF)PCBdesignhasmanyuncertaintiesinthecurrentlypublishedtheoriesandisoftendescribedasa"blackart".Generallyspeaking,forcircuitsbelowthemicrowavefrequencyband(includinglow-frequencyandlow-frequencydigi
灞波儿奔 RF/Wirelessly
[Telink's new generation of low-power, high-performance multi-protocol wireless kit B91 review] Home Assistant installation
HomeAssistantinstallation First,IwantedtoconnecttheB91totheInternet,butthemanufactureronlygavemeoneboard.Thiswasaheadacheforawhile,soIhadtodigouttheRaspberryPi4Iboughtbeforeandpreparetobuildtheo
damiaa Domestic Chip Exchange
CC3200LaunchPad modified infrared thermometer
CC3200LaunchPad,asshowninthepicture,Iwon'tcommentmuch,theperformanceandsoonshouldbeOK,buteveryoneknowsthecostperformanceof8266(especiallytheprice),generallypeopleuse8266whenplayingwithwifi.ThisCC3200LaunchP
Jacktang Wireless Connectivity
These are almost the only terms used to measure antennas.
AntennaBasics Let'sstartbylookingatantennasandantennabasics.Supposeonedayyouarewalkingdownthestreetandakindbutimpatientpersonrunsuptoyouandasksyoutodesignanantennaforthem."Sure",youquicklyrespond,adding"Wh
btty038 RF/Wirelessly
Broadband Matching Network_Huang Xiangfu《Scanned Version》
Downloaditandhavealook. Good,veryhelpful
btty038 RF/Wirelessly
【Beetle ESP32 C6 mini development board】--2.点亮LED
ThisarticledescribeshowtodrivetheLEDonthedevelopmentboard. 1.Understandtheprinciples TheuserLEDiscontrolledbytheGPIO15pinofESP32-C6-FH4andlightsupwhenthelevelishigh.Theschematicdiagramisasfollows Figu
dirty RF/Wirelessly
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号