一.系統(tǒng)概述
本次設計的火災檢測報警系統(tǒng)使用溫度傳感器進行溫度檢測,使用煙霧傳感器進行煙霧濃度檢測,檢測到的數(shù)據(jù)會通過顯示屏進行顯示,并且當檢測到煙霧濃度超限或者檢測到溫度超過設定閾值就會控制報警,并進行滅火。
二.仿真概述
1. 啟動仿真顯示屏上顯示溫度和煙霧濃度數(shù)據(jù),并且還會實時顯示設定的閾值。
2. 調節(jié)煙霧傳感器的滑動變阻器,當檢測到煙霧濃度超過設定閾值就會控制報警并進行滅火
3. 調節(jié)DS18B20的紅色按鈕,當檢測到溫度超過設定閾值就會控制報警并進行滅火
4.使用按鍵進行溫度和煙霧濃度的閾值設定,按下設置按鍵就能重新設置,設置完需要按下確認
三.程序設計
#include#include #include #include #include #include #include #include "PCF8591.h" int main(void) { u8 t,s,k,m=0,Tmax = 50,Smax=50; Key_Init(); Lcd1602_Init(); Led1_Init();//PC0 Beep_Init();//PA13 Ds18b20_Init();//PA12 PCF8591_Init(); Lcd1602_Write_String(0x80,2,(u8*)"T:"); Lcd1602_Write_String(0x86,2,(u8*)"!:"); Lcd1602_Write_String(0xc0,2,(u8*)"S:"); Lcd1602_Write_String(0xc6,2,(u8*)"!:"); Lcd1602_Write_String(0xc4,2,(u8*)"%"); while(1) { k =Key_detect(); Lcd1602_Write_Num8(0x8c,m); t =Ds18b20_Temp() ; s =PCF8591_ADC_Input(0x90,1); Lcd1602_Write_Num8(0x82,t); Lcd1602_Write_Num8(0x88,Tmax); Lcd1602_Write_Num8(0xc2,s); Lcd1602_Write_Num8(0xc8,Smax); if(Key2==0) { m++; if(m==3) m=0; } if(Key3==0) { m=0; } // if(m==1) { Lcd1602_Write_String(0xcA,1,(u8*)" "); Lcd1602_Write_String(0x8A,1,(u8*)"<"); if(Key0==0) Tmax++; else if(Key1==0) Tmax--; } else if(m==2) { Lcd1602_Write_String(0x8A,1,(u8*)" "); Lcd1602_Write_String(0xcA,1,(u8*)"<"); if(Key0==0) Smax++; else if(Key1==0) Smax--; } else if(m==0) { Lcd1602_Write_String(0x8A,1,(u8*)" "); Lcd1602_Write_String(0xcA,1,(u8*)" "); if(t>Tmax||s>Smax) { Beep_1;Led1_1; } else if(t ?
-
單片機
+關注
關注
6063文章
44915瀏覽量
646864 -
報警系統(tǒng)
+關注
關注
5文章
653瀏覽量
75702 -
STM32
+關注
關注
2289文章
11011瀏覽量
362344
原文標題:Proteus仿真實例_基于STM32單片機的火災檢測報警系統(tǒng)(仿真文件+程序)
文章出處:【微信號:小常硬件,微信公眾號:小常硬件】歡迎添加關注!文章轉載請注明出處。
發(fā)布評論請先 登錄
基于單片機的實時溫度檢測報警系統(tǒng)
如何對基于51單片機的CO2檢測報警系統(tǒng)進行Protues仿真
如何去實現(xiàn)基于單片機火災報警器系統(tǒng)煙霧檢測及溫度檢測設計
煙霧檢測火災報警系統(tǒng)的設計
基于單片機的多路溫度檢測報警系統(tǒng)的設計的程序和虛擬串口應用程序

基于單片機火災報警器系統(tǒng)煙霧檢測及溫度檢測設計(畢業(yè)設計資料)

9-基于51單片機的智能火災報警系統(tǒng)

評論