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.
Figure 2-2-4 Buzzer alarm module
2.2.5 Temperature and humidity button module
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.
Figure 2-2-6 1602LCD and DHT11 schematic diagram
2.3 Hardware Implementation Control and Physical Finished Products
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.
Figure 2-3-1 Hardware Image 1
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.
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.
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
- Popular Resources
- Popular amplifiers
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
- MCU Principles and Interface Technology C51 Programming (Edited by Zhang Yigang)
- Quick Reference Manual for Common Electrical Technical Data
- Chip Manufacturing: A Practical Tutorial on Semiconductor Process Technology (Sixth Edition)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- CATL releases October battle report
- Battery industry in October 2024: growth momentum remains unabated!
- Mercedes-Benz will launch the eCitaro equipped with NMC4 batteries to provide high energy density and long life
- Many companies have announced progress on solid-state batteries. When will solid-state batteries go into mass production?
- Xsens Sirius Series Inertial Sensors Enable 3D Inertial Navigation in Harsh Environments
- Infineon's Automotive Landscape: From Hardware to Systems
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- Siemens plc dismantled by myself
- Award-winning live broadcast: Microchip's trusted platform for the CryptoAuthentication family
- What is the Internet of Things? What is the concept of the Internet of Things?
- DSP 2407 Book Request
- 【Repost】Understand RFID wireless radio frequency identification technology in one article
- Use money to dismantle Huawei Honor 8
- 【GD32E503 Review】+ cJSON Porting Test
- Is one of the two MOS tubes in the step-down switching power supply chip used to replace the diode?
- [RVB2601 Creative Application Development] + Indoor Environment Monitoring Platform
- CCS+C6678LE Ethernet interface test sample code