【正文】
期間,該引腳還用于輸入編程脈沖(PROG)。P2口是一個擁有內部上拉電阻的8位雙向I/O 口,P2的輸出緩沖器也是能夠驅動4個TTL邏輯電平。第二,最多可以支持64k的外部存儲的擴展。第二點是單片機在智能儀表上的應用,它不僅能夠提高其性能價格比,簡化儀器儀表的硬件結構,還能夠提高測量的自動化程度與精度。 單片機的介紹所謂單片機就是在由各種部件共同集成在一個硅片上的微型計算機。 感煙探測器就目前而言,感煙探測器主要分為四種,分別是光電感應探測器、管道抽吸式感煙探測器、離子感煙探測器以及最近幾年出現的激光感煙探測器。CAI3461BH與單片機相連接,時刻顯示單片機所輸出的信號,液晶顯示模塊既可顯示氣體的數值也可以顯示周圍環(huán)境的溫度,: 工作原理圖 火災報警系統(tǒng)的類型就目前而言,在火災自動報警系統(tǒng)中根據探測器的種類不同,火災自動報警系統(tǒng)可分為4種。它可以實現聲光報警、報警值的設置以及濃度值的顯示等功能。關鍵字:火災自動報警系統(tǒng);DS18B20;MQ2;ADC0832Abstract This thesis by microcontroller and sensor technology, design a set of microcontrollerbased automatic fire alarm system. The design of the core selection ATMEL Corporation AT89S52 MCU. AT89S52 microcontroller with low power consumption, high performance and other features, and is patible with standard MCS51 instruction set and 80C51 pin structure. The design uses a temperature sensor and smoke sensor signal acquisition, temperature sensors use the United States produced DALLAS DS18B20 digital temperature sensor, the sensor temperature signal can be directly converted into a digital signal to the microcontroller, and can set the temperature alarm value, the circuit simple structure, functions more plete. Smoke sensor selection MQ2 type semiconductor bustible gas sensors smoke sensor, the sensor is sensitive sensor, the bustible gas concentration in the air or a current signal into a voltage, the A / D converter converts the analog ADC0832 digital amount and sent to microcontroller. Final selection LED module shows realtime gas concentrations and temperatures. This microcontrollerbased automatic fire alarm system function more perfect, the structure is relatively simple, has a strong practical value.Key words:Automatic fire alarming system。DS18B20。結構計較簡單,價格計較便宜,性能較為穩(wěn)定,有著不錯的使用價值。 感光型火災自動報警系統(tǒng)物質在燃燒的過程中會產生光的輻射,感光型的火災自動報警系統(tǒng)就是通過感應物質燃燒中產生的光的特性,即擴散火焰的閃爍頻率與火焰的光強度,來觸發(fā)火災自動報警系統(tǒng)的。光電感應探測器上有著一個光敏元件與一個發(fā)光的元件,正常工作的情況下,發(fā)光元件會發(fā)出光,經過透鏡的作用照到光敏元件上,電路保持暢通,當有煙霧產生時,煙霧會阻斷光的傳射,光敏電阻上所接收到的光明顯減少,這時光敏電阻就會把光強弱的變化轉換為電的變化,經過放大電路的作用報警。就目前而言,大規(guī)模的集成電路技術已經有了很好的發(fā)展,可以在一塊芯片上集成中央處理器(CPU)、數據存儲器(RAM)、程序存儲器(ROM)、定時器計數器和輸入/輸出(I/O)接口電路等主要的計算機部件。第三點是單片機在分布式多機系統(tǒng)中的應用。第三,擁有3個16位的定時器/計數器與8個中斷源。當向P2端口書寫“1”時,內部上拉電阻會將端口拉高,這樣可以被當做輸入端口來使用。如有必要,可通過對特殊功能寄存器(SFR)區(qū)中的8EH單元的D0位置位,可禁止ALE操作。DS18B20擁有以下特點:測量范圍比較寬,達到55℃~+125℃。EEPROM 非易失性記憶體,用于存放長期需要保存的數據,上下限溫度報警值和校驗數據,DS18B20共3位EEPROM,并在RAM都存在鏡像,以方便用戶操作。 MQ2氣體傳感器的指標MQ2型傳感器的一般對于液化石油氣與天然氣等煙霧有著很高的靈敏度,尤其對烷類的煙霧MQ2型傳感器表現得更加敏感。第四,當5V電源供電時輸入電壓范圍在0到5V之間。但因為DO端和DI端在通信時并未同時有效的,并且與單片機的接口是雙向的,所以在電路的設計過程中可以把DO與DI 并聯連接在一根數據線上。 氣體采集模塊如圖所示。與共陽極的數碼管類似,共陰極的數碼管是把所有LED的陰極連接到共同接點,而每個LED的陽極分別為a、b、c、d、e、f、g及dp。第五步,將數據線拉升至高電平。然后點燃一根香煙進行測試,將香煙燃燒釋放出的氣體對準MQ2型煙霧傳感器,顯示出的示數明顯低于甲烷氣體顯示的示數,且在釋放出氣體一段時間后,LED燈才亮,蜂鳴器才發(fā)出報警聲音。諸如地鐵、輕軌、高鐵等新型交通工具漸漸融入了我們的生活,一些新型的建筑材料也走進了我們家庭與工作環(huán)境。在畢業(yè)設計的過程中我也學到了很多新的知識,知道了電子產業(yè)的知識是需要不斷更新的。 smoke sensorI. INTRODUCTION Automatic fire alarm control system has experienced a process from the simple to the plex and intelligence system increasingly in China. The characteristic is automatic fire detection and alarm technology has a great progress along with puting and detection technology development. At present, automatic fire alarm control system was used in bulk storage plant, shopping malls, highlevel office buildings, hotels and other places. They were used in a number of collections focused on one area of intelligent alarm control method with higher levels of bustype alarm control system, and in some residential areas and mercial buildings were installed by a single automatic fire alarm detection device. These alarm detection devices fail to report sometimes, or misinformation. Its reliability is not high because of using single sensor. Therefore, it is needed to develop a simple structure, low cost, high reliability, fast responding, automatic fire detection system.II. GENERAL PROJECT OF THE SYSTEM The hardware block diagram shown in Figure 1, hardware by temperature sensors, smoke sensors, signal processing module, MCU modules and automatic alarm module. Non electrical quantity that is through the sensing element sensors (smoke sensors and temperature sensors) will be onsite temperature, smoke and other nonelectrical signal into an electrical signal, as well as signals for signal processing to convert analog quantity to digital quantity. Finally, the sampled data were processed and pared with the limits by MCU system. This system can produce local and remote autoalarm signals. Figure 1. Automatic fire alarm system structureⅢ. THE HARDWARE COMPONENTSA. Atmega16The system used by the . Atmel’s microcontroller ATmega16 microcontroller. ATmega16 is based on the AVR RISC architecture to enhance lowpower 8bit CMOS microcontroller. Because of its advanced instruction set and a single clock cycle instruction execution time, ATmega16 data throughput of up to 1 MIPS / MHz. Thereby mitigate the system in the power and the contradiction between the processing rate. ATmega16 has the following characteristics: 16K bytes insystem programmable Flash (with the ability to read and write at the same time, that is, RWW), 512 bytes EEPROM, 1K bytes SRAM, 32 generalpurpose I / O port lines, 32 generalpurpose working registers, for the JTAG boundary scan interface, support the onchip debugging and programming, 3 has a more flexible mode of timer / counter (T / C), chip internal / external interrupts, programmable serial USART, there are initial conditions detector universal serial interface, 8channel 10bit with optional differential input stage programmable gain (TQFP package) of the ADC, with onchip oscillator of programmable watchdog timer, an SPI serial port, as well as six can be selected by software powersaving mode.The chip is based on Atmel highdensity nonvolatile memory technology production onchip ISP Flash allows the program memory through the ISP serial i