一.系統(tǒng)概述
本次設(shè)計的火災(zāi)檢測報警系統(tǒng)使用溫度傳感器進(jìn)行溫度檢測,使用煙霧傳感器進(jìn)行煙霧濃度檢測,檢測到的數(shù)據(jù)會通過顯示屏進(jìn)行顯示,并且當(dāng)檢測到煙霧濃度超限或者檢測到溫度超過設(shè)定閾值就會控制報警,并進(jìn)行滅火。
二.仿真概述
1. 啟動仿真顯示屏上顯示溫度和煙霧濃度數(shù)據(jù),并且還會實時顯示設(shè)定的閾值。
2. 調(diào)節(jié)煙霧傳感器的滑動變阻器,當(dāng)檢測到煙霧濃度超過設(shè)定閾值就會控制報警并進(jìn)行滅火
3. 調(diào)節(jié)DS18B20的紅色按鈕,當(dāng)檢測到溫度超過設(shè)定閾值就會控制報警并進(jìn)行滅火
4.使用按鍵進(jìn)行溫度和煙霧濃度的閾值設(shè)定,按下設(shè)置按鍵就能重新設(shè)置,設(shè)置完需要按下確認(rèn)
三.程序設(shè)計
#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 ?
-
單片機(jī)
+關(guān)注
關(guān)注
6067文章
44961瀏覽量
648904 -
報警系統(tǒng)
+關(guān)注
關(guān)注
5文章
653瀏覽量
75798 -
STM32
+關(guān)注
關(guān)注
2291文章
11022瀏覽量
363508
原文標(biāo)題:Proteus仿真實例_基于STM32單片機(jī)的火災(zāi)檢測報警系統(tǒng)(仿真文件+程序)
文章出處:【微信號:小常硬件,微信公眾號:小常硬件】歡迎添加關(guān)注!文章轉(zhuǎn)載請注明出處。
發(fā)布評論請先 登錄
基于單片機(jī)的實時溫度檢測報警系統(tǒng)
基于單片機(jī)的火災(zāi)報警系統(tǒng)
怎么實現(xiàn)基于STM32F103單片機(jī)智能火災(zāi)煙霧檢測報警器的設(shè)計?
如何對基于51單片機(jī)的CO2檢測報警系統(tǒng)進(jìn)行Protues仿真
如何去實現(xiàn)基于單片機(jī)火災(zāi)報警器系統(tǒng)煙霧檢測及溫度檢測設(shè)計
煙霧檢測火災(zāi)報警系統(tǒng)的設(shè)計
基于單片機(jī)的多路溫度檢測報警系統(tǒng)的設(shè)計的程序和虛擬串口應(yīng)用程序

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

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

540【畢設(shè)課設(shè)】基于單片機(jī)超聲波距離檢測報警系統(tǒng)設(shè)計

基于單片機(jī)的火災(zāi)報警系統(tǒng)設(shè)計Proteus仿真基礎(chǔ)資料包
基于STM32單片機(jī)的CO(一氧化碳)氣體檢測報警通風(fēng)系統(tǒng)仿真設(shè)計

基于STM32的酒精濃度檢測報警proteus仿真設(shè)計

評論