<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">OALibJ</journal-id><journal-title-group><journal-title>Open Access Library Journal</journal-title></journal-title-group><issn pub-type="epub">2333-9705</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/oalib.1108247</article-id><article-id pub-id-type="publisher-id">OALibJ-113889</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Biomedical&amp;Life Sciences</subject><subject> Business&amp;Economics</subject><subject> Chemistry&amp;Materials Science</subject><subject> Computer Science&amp;Communications</subject><subject> Earth&amp;Environmental Sciences</subject><subject> Engineering</subject><subject> Medicine&amp;Healthcare</subject><subject> Physics&amp;Mathematics</subject><subject> Social Sciences&amp;Humanities</subject></subj-group></article-categories><title-group><article-title>
 
 
  The Detection System of Automobile Interior Environment Based on Single Chip Microcomputer
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Jiahao</surname><given-names>Ma</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Dong</surname><given-names>Wu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Muhuan</surname><given-names>Huang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Mechanical and Control Engineering, Guilin University of Technology, Guilin, China</addr-line></aff><pub-date pub-type="epub"><day>01</day><month>12</month><year>2021</year></pub-date><volume>08</volume><issue>12</issue><fpage>1</fpage><lpage>9</lpage><history><date date-type="received"><day>30,</day>	<month>November</month>	<year>2021</year></date><date date-type="rev-recd"><day>12,</day>	<month>December</month>	<year>2021</year>	</date><date date-type="accepted"><day>15,</day>	<month>December</month>	<year>2021</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  With the development of the country and the continuous increase of GDP per capita, people enjoy life more and more, and at the same time pay more and more attention to the quality of the living environment around them, and factors such as changes in temperature and humidity in the air and the size of dust concentration will increase. In order to ensure people’s health and quality of life, the research on detection system of automobile interior environment is of great significance. The detection system of automobile interior environment originally designed uses the STC89C52 chip as the main control processor, combined with temperature and humidity detection module, A/D conversion module, display module, alarm module, and Bluetooth module to achieve automatic detection of ambient temperature, humidity, alarm and other functions. The paper first analyzes the overall design scheme of detection system, and then elaborates the design and implementation of detection system from both hardware and software aspects. The expected function of the system is to detect the temperature, humidity and PM2.5 values in the internal environment of the car, and to transmit and display the detected results on the LCD1602 liquid crystal display. Wireless transmission can be achieved through the HC-06 Bluetooth module, and the module needs to be used with mobile devices. If the detected PM2.5 value is not in the limited range, the buzzer will sound, accompanied by the LED light. The research results show that the automobile interior environment detection system designed in this paper is innovative. Compared with the existing domestic products of the same type, it has the advantages of simple operation, stable system and fast response speed, and basically meets the main functions of the design requirements and has certain practical application reference value.
 
</p></abstract><kwd-group><kwd>Single Chip Microcomputer</kwd><kwd> Temperature and Humidity</kwd><kwd> Dust Sensor</kwd><kwd> Bluetooth</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Since entering the 21st century, economy in China has developed rapidly, people’s quality of life has been continuously improved, and the use of automobiles in daily life has become more and more common. The domestic automobile industry has experienced a blowout development in response to the globalization of the automobile industry [<xref ref-type="bibr" rid="scirp.113889-ref1">1</xref>]. The air quality in the narrow, confined space inside the car is not optimistic. The survey shows that by comparing the air quality in the following vehicles: ferries, trains, trams, and cars, it is found that the degree of environmental pollution in cars is generally higher than that of the other types. In 2002, on the highway from Dalian to Shenyang, a car owner drove a new car into a car accident. After the investigation, it was discovered that the accident was caused by dizziness caused by excessive smell in the car [<xref ref-type="bibr" rid="scirp.113889-ref2">2</xref>] [<xref ref-type="bibr" rid="scirp.113889-ref3">3</xref>]. In recent years, with the development of our society, environmental pollution has increasingly become one of the hot issues of concern to the whole society. Among them, the air pollution in large and medium cities and industrial dense areas is particularly prominent, which directly affects human health and quality of life [<xref ref-type="bibr" rid="scirp.113889-ref4">4</xref>]. Therefore, the detection of harmful gases is very important. In the past, the main detection method was manual detection; but now, with the development of science and technology, the main use of single-chip control technology is used for detection. The most obvious advantage of the single-chip microcomputer is that it can be embedded in various instruments and equipment. This is impossible for a supercomputer [<xref ref-type="bibr" rid="scirp.113889-ref5">5</xref>]. Now, Internet, multimedia equipment and wireless communication technology continue to move forward [<xref ref-type="bibr" rid="scirp.113889-ref6">6</xref>].</p><p>Data show that since the 1970s, foreigners have begun to study temperature and humidity control technology. In the beginning, it was collecting local data and information, and backing up and regulating them. This kind of analog tools and meters mostly appeared in the form of combination. It took another ten years before the distributed control technology was developed. Researchers in our country started relatively late in this area, and only started after the distributed control system was developed in foreign countries. In the beginning, most of the domestic engineers learned about the temperature and humidity microcomputer monitoring system through learning foreign developed measurement and control technology. And the system only monitors a single factor in the environmental components, such as temperature, humidity, etc.</p><p>The task of this project is to use the 52 microcontroller as the control core, combined with the sensor module, completing design of the system. The specific functions are as follows:</p><p>1) With the single-chip microcomputer as the core, cooperate with each module to realize the real-time measurement of the temperature, humidity and PM2.5 concentration of the car’s internal environment.</p><p>2) Acoustic and visual alarm is realized, that is, the buzzer sounds at the same time, the LED light flashes, the method is to compare the detected PM2.5 value with the original value, if it exceeds the set range, it can alarm.</p><p>3) Real-time transmission of the detected data by Bluetooth.</p><p>4) Long-term uninterrupted loop detection.</p><p>5) The detected data can be displayed on the LCD1602 LCD screen in real time.</p><p>6) The PM2.5 concentration exceeding the limit can be set by pressing the button and can be saved.</p></sec><sec id="s2"><title>2. Overall Design of the Detection System of Automobile Interior Environment</title><sec id="s2_1"><title>2.1. The System Structure Diagram of the Detection System</title><p>The process of design of the detection system structure diagram is based on the expected goals of the detection system. It is planned to use buttons and Bluetooth app to control the entire detection system. At the same time, an alarm function needs to be set in the detection system, so the overall block diagram of the system can be obtained. The hardware system block diagram is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>. As shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>, the design is divided into seven modules, including temperature and humidity sensor module, alarm module, power module, display module, button module, Bluetooth module and dust sensor module. The detection module is divided into temperature and humidity detection module and dust detection module.</p></sec><sec id="s2_2"><title>2.2. The Working Principle of the Detection System</title><p>Turn on the power and the system initializes. The dust detection module starts to detect the concentration of PM2.5, and transmits the detected data to the single-chip microcomputer through the ADC analog-to-digital conversion module. At the same time, the temperature and humidity sensor also starts to detect the temperature and humidity value, and then transmits it to the single-chip microcomputer. After processing by the single-chip microcomputer, the value is displayed on the LCD1602 liquid crystal display, through the Bluetooth module, the display content can be synchronized. Change the parameter limit range through the button module. If the measured data is not in the limit range, the alarm module will act.</p></sec></sec><sec id="s3"><title>3. Hardware Design of the Detection System</title><sec id="s3_1"><title>3.1. Hardware Circuit Schematic</title><p>The detection system microcontroller I/O port and resource allocation table is shown in <xref ref-type="table" rid="table1">Table 1</xref>.</p></sec><sec id="s3_2"><title>3.2. Selection and Demonstration of the Main Control Chip</title><p>AT89C52RC can write the program into the MCU serially through the serial data receiving terminal RXD and the serial data transmitting terminal TXD, which can facilitate the user to debug the software of the MCU without making any changes to the hardware. Its industrial grade operating temperature range is −40˚C - +85˚C, commercial grade 0˚C - 75˚C, and the package is a 40-pin PDIP package [<xref ref-type="bibr" rid="scirp.113889-ref7">7</xref>]. Considering the cost, the interface of the 52 single-chip microcomputer can meet the function.</p></sec><sec id="s3_3"><title>3.3. Selection and Justification of Temperature and Humidity Sensor</title><p>In order to improve comfort, the two physical terms of temperature and humidity must first be addressed. In this part, we use a sensor that detects both temperature and humidity (temperature and humidity Sensor), its symbol is denoted as DHT11. In order to make the measurement more accurate, the sensor will be calibrated with high precision in the humidity research room before</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> The detection system microcontroller I/O port</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Modules</th><th align="center" valign="middle" >I/O Ports</th></tr></thead><tr><td align="center" valign="middle" >Temperature and humidity sensor module</td><td align="center" valign="middle" >P2.0</td></tr><tr><td align="center" valign="middle" >Dust sensor module</td><td align="center" valign="middle" >P32</td></tr><tr><td align="center" valign="middle" >Display module</td><td align="center" valign="middle" >P0.0 - P0.7</td></tr><tr><td align="center" valign="middle" >HC05 Bluetooth module</td><td align="center" valign="middle" >P3.0, P3.1</td></tr><tr><td align="center" valign="middle" >Alarm module</td><td align="center" valign="middle" >P33</td></tr><tr><td align="center" valign="middle" >Push button module</td><td align="center" valign="middle" >P34, P35</td></tr></tbody></table></table-wrap><p>leaving the factory. The coefficients obtained after calibration will be stored in the OTP memory by way of programming. In the process of daily use testing, just write a program to call these coefficients in it. Advantage of temperature and humidity sensor is embodied in the high degree of integration, which makes it occupy a small area; the use of single-line serial communication reduces the power consumption a lot. Its signal transmission distance is more than 20 meters, enabling it to be applied to more complex environments. <xref ref-type="fig" rid="fig2">Figure 2</xref> is the temperature and humidity sensor.</p></sec><sec id="s3_4"><title>3.4. Selection and Justification of the Dust Sensor</title><p><xref ref-type="fig" rid="fig3">Figure 3</xref> is the dust sensor. In addition to temperature and humidity, the system designed in this subject can also detect the concentration of PM2.5 in the air. The required instrument is a dust collector, its model is GP2Y1010AUOF, which is developed by Sharp Technology Corporation of Japan. Its working principle is the same as that of photosensitive. Its main components are phototransistors and infrared light-emitting diodes, which are installed in the sensor in a diagonal form. It can detect very small things such as dust particles and particulates in cigarettes, and the concentration of particulates can be checked by the pulse level output by the sensor. When the sensor is energized, its interior will emit LED light in a certain direction. When air passes through its middle position, the LED light will emit refraction. By measuring the returned light, the concentration of particulate matter can be calculated.</p></sec><sec id="s3_5"><title>3.5. Selection and Justification of Bluetooth Module</title><p>In this design, not only the measured data information can be displayed in real</p><p>time, but also the measured data can be displayed on the mobile phone through the wireless sensor. The above functions can be realized by using a Bluetooth sensor, and its model is HC-06, which is shown in <xref ref-type="fig" rid="fig4">Figure 4</xref>. Its advantage is its high degree of integration, which is reflected in the master-slave integrated design, which makes it more convenient for people to use. When the mobile phone is connected to Bluetooth, it will be used as a serial port, because the communication protocol of the Bluetooth module itself will be ignored at this time. The working principle is that one device sends information data to the shared communication channel, and another paired device can obtain the corresponding data information in the channel. Bluetooth technology is a low-power, high-rate wireless data transmission technology. It uses frequency hopping technology. Compared with other systems operating in the 2.4 GHz frequency band, Bluetooth technology has faster frequency hopping and shorter data packets, making the Bluetooth system more efficient [<xref ref-type="bibr" rid="scirp.113889-ref8">8</xref>] [<xref ref-type="bibr" rid="scirp.113889-ref9">9</xref>].</p></sec></sec><sec id="s4"><title>4. Software Design of the Detection System</title><p>The main program mainly cooperates with the hardware modules to realize the corresponding functions of the system, including the collection, processing, display and transmission of temperature and humidity data, PM2.5 concentration data to the mobile phone, and realize the call of each sub-function, etc. The main program flowchart is shown in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</p><p><xref ref-type="fig" rid="fig5">Figure 5</xref> is the main program flow chart. Turn on the power and the system initializes. Each module starts to detect the environmental parameters, and sends the measured data to the LCD1602 LCD screen for display, and then transmits and displays it to the mobile phone through the Bluetooth device. Judge whether the key is pressed through the program. If it is pressed, the key subroutine will be called to change the alarm value of the dust concentration. By comparing the PM2.5 concentration data with the set alarm value, if the collected data exceeds the alarm value, the buzzer will start to operate, accompanied by the lighting of the LED light, to achieve audible and visual alarm.</p></sec><sec id="s5"><title>5. Product Commissioning</title><p><xref ref-type="fig" rid="fig6">Figure 6</xref> is the system debugging diagram. It can be seen from the above figure that the system can work normally, the LCD screen display can normally display</p><p>temperature and humidity, dust concentration and alarm value, and can be displayed on the mobile phone through the communication module. Update the data every 2s on the phone. It can be seen from the above figure that the first line of the LCD screen displays the measured temperature and humidity values, and the second line displays the measured dust concentration value and the concentration alarm limit value. The alarm value can be set by pressing the button.</p><p><xref ref-type="fig" rid="fig7">Figure 7</xref> is the LCD screen display results. As shown in <xref ref-type="fig" rid="fig7">Figure 7</xref>, the first line of the LCD screen displays the measured temperature value and humidity value, and the second line displays the measured dust concentration value and the concentration alarm limit value. The alarm value can be set by pressing the button. And the measured data is compared and analyzed with the actual data, and the error of the data does not exceed 5%.</p><p><xref ref-type="fig" rid="fig8">Figure 8</xref> is the mobile phone test results. As shown in <xref ref-type="fig" rid="fig8">Figure 8</xref>, through the Bluetooth module, the mobile phone can receive and display the measurement results and each measurement data is basically consistent to ensure the accuracy of the measurement.</p></sec><sec id="s6"><title>6. Conclusions</title><p>The automotive internal environment detection system based on the single-chip microcomputer can successfully detect the temperature, humidity and dust concentration in the environment. It can be displayed on the LCD1602 LCD screen, connected via Bluetooth, and can also be displayed on the mobile phone. The dust alarm value can be set by pressing the key, and the set value can be saved. The system has low manufacturing cost and is suitable for use in cars, wooden door processing plants, ceramic tile manufacturing plants, laboratories and other places.</p><p>This design successfully detects the temperature, humidity and dust concentration in the current environment, and realizes the function of alarm when the dust concentration exceeds the limit, and it can be displayed on the LCD1602 liquid crystal display, and can also be transmitted to the mobile phone through the Bluetooth module. Finally, there can be further improvements in the design process:</p><p>1) The system cannot alarm the value of temperature and humidity, but can only alarm if the dust concentration exceeds the limit;</p><p>2) The mobile phone can only display the measured value, and cannot set the limit value;</p><p>3) There are too many substances harmful to the human body in the environment, such as CO, etc. However, due to the high design difficulty, other detection modules are not added to this system.</p></sec><sec id="s7"><title>Acknowledgements</title><p>This research was supported by the Doctoral Research Initiation Fund of Guilin University of Technology (GUTQDJJ2018068) and 2020 Guangxi University Middle-aged and Young Teachers’ Basic Research Ability Improvement Project (2020KY06024).</p></sec><sec id="s8"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest.</p></sec><sec id="s9"><title>Cite this paper</title><p>Ma, J.H., Wu, D. and Huang, M.H. (2021) The Detection System of Automobile Interior Environment Based on Single Chip Microcomputer. Open Access Library Journal, 8: e8247. https://doi.org/10.4236/oalib.1108247</p></sec></body><back><ref-list><title>References</title><ref id="scirp.113889-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Editorial Department (2012) Global Car Ownership and China Car Ownership. Time Auto, 1, 63.</mixed-citation></ref><ref id="scirp.113889-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Fang, Y. (2005) Grey Evaluation Method and Control Strategy of Air Quality in Cars. Huazhong University of Science and Technology, Wuhan.</mixed-citation></ref><ref id="scirp.113889-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Dai, L., Deng, D., Zhang, X., et al. (2004) Air Pollution in Automobiles and Healthy Driving. Journal of Beijing Union University (Natural Science Edition), 18, 60-65.</mixed-citation></ref><ref id="scirp.113889-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Yi, F. (2004) Source Analysis of Inhalable Particulate Matter in Urban Atmosphere. Master’s Thesis, Huazhong University of Science and Technology, Wuhan.</mixed-citation></ref><ref id="scirp.113889-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Wang, Z. (2004) The Progress of Modern Single-Chip Technology. Today Science and Technology, No. 9, 2-4+1</mixed-citation></ref><ref id="scirp.113889-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Yu, Q. and Yu, B. (2009) Detailed Explanation of Short-Range Wireless Communication. Beijing University of Aeronautics and Astronautics Press, Beijing.</mixed-citation></ref><ref id="scirp.113889-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Sun, Y., Wang, R. and Sun, H. (2005) ATMEL New AT89S52 Series Single-Chip Microcomputer and Its Application. Tsinghua University Press, Beijing.</mixed-citation></ref><ref id="scirp.113889-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, Y. (2003) Application of Bluetooth Technology in Smart Home. Beijing University of Technology, Beijing.</mixed-citation></ref><ref id="scirp.113889-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, J., Hao, X., Wei, W. and Huang, Y. (2016) The Design of PSM-Based ECRH Power Supply Control System. Journal of Power and Energy Engineering, 4, 91-102.  
https://doi.org/10.4236/jpee.2016.44009</mixed-citation></ref></ref-list></back></article>