汽車檢測換氣系統(tǒng)設(shè)計_第1頁
汽車檢測換氣系統(tǒng)設(shè)計_第2頁
汽車檢測換氣系統(tǒng)設(shè)計_第3頁
汽車檢測換氣系統(tǒng)設(shè)計_第4頁
汽車檢測換氣系統(tǒng)設(shè)計_第5頁
已閱讀5頁,還剩52頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)

文檔簡介

摘要適宜、安全的車內(nèi)環(huán)境對于人們在乘坐汽車時有著重要影響,但是對于車內(nèi)環(huán)境檢測與換氣系統(tǒng)監(jiān)測裝置方面涉及較少,因此本文中的主要研究對象就是在現(xiàn)有的汽車檢測換氣系統(tǒng)加入傳感器與換氣裝置,保障汽車內(nèi)良好的條件。針對人們對于車內(nèi)環(huán)境改善的需求,本文研究了依托于STM32單片機(jī)的汽車檢測換氣系統(tǒng),通過JW01氣敏傳感器和GY-906-BBC溫度傳感器對車內(nèi)氧氣、二氧化碳、甲醛的濃度含量以及溫度進(jìn)行檢測。當(dāng)單片機(jī)接收到氣敏傳感器信息時,如果超標(biāo)會產(chǎn)生報警聲,以提醒人們注意車內(nèi)空氣情況及時開窗通風(fēng)。當(dāng)汽車熄火后,如果檢測到溫度高于40℃,閃光警報確保進(jìn)氣和排氣直流風(fēng)扇同時運(yùn)行,使車廂內(nèi)外的溫度能夠在較短的時間內(nèi)達(dá)到相同,起到車室內(nèi)的換氣降溫雙重作用。經(jīng)測試,該系統(tǒng)能在汽車內(nèi)的對于人體有害的氣體濃度超標(biāo)時發(fā)出提醒并在汽車熄火后仍能保障車內(nèi)的換氣、降溫設(shè)備起到作用,避免車內(nèi)有害氣體過度造成的危害,具有很強(qiáng)的實用價值。關(guān)鍵詞:STM32單片機(jī);氣敏傳感器;換氣

AbstractAppropriateandsafeinteriorenvironmenthasanimportantimpactonpeoplewhenridingincars,butthereislessinvolvementininteriorenvironmentdetectionandventilationsystemmonitoringdevices.Therefore,themainresearchobjectofthispaperistoaddsensorsandventilationdevicestotheexistingvehicledetectionandventilationsystemtoensuregoodconditionsincars.Inviewofpeople'sdemandforimprovingtheinteriorenvironmentofthecar,thispaperstudiesthevehicledetectionandventilationsystembasedonSTM32singlechipcomputer,whichdetectstheconcentrationandtemperatureofoxygen,carbondioxideandformaldehydeinthecarthroughJW01gassensorandGY-906-BBCtemperaturesensor.Whenthesingle-chipcomputerreceivestheinformationfromthegassensor,ifitexceedsthestandard,itwillgenerateanalarmsoundtoremindpeopletopayattentiontotheairconditioninthecarandopenthewindowforventilationintime.Whenthecarisflameout,ifthetemperatureisdetectedtobehigherthan40℃,theflashingalarmensuresthattheairinletandexhaustDCfansoperateatthesametime,sothatthetemperatureinsideandoutsidethecarcanreachthesamelevelinashorttime,whichplaysthedualroleofairexchangeandcoolinginsidethecar.Aftertesting,thesystemcansendawarningwhentheconcentrationofharmfulgasesinthecarexceedsthestandard,andcanstillensuretheventilationandcoolingequipmentinthecartoplayaroleafterthecarisstopped,andavoidtheharmcausedbyexcessiveharmfulgasesinthecar,whichhasstrongpracticalvalue.Keywords:STM32singlechip;gassensor;ventilati第3章PLC和組態(tài)軟件基礎(chǔ)目錄TOC\o"1-3"\h\u第1章緒論 參考文獻(xiàn)趙樹廉,來飛,李克強(qiáng),陳濤,孟璋劼,唐逸超,吳思宇,田浩東.基于數(shù)字孿生技術(shù)的智能汽車測試方法研究[J].汽車工程,2023,45(01):42-51.丁奕.自動駕駛汽車測試技術(shù)與應(yīng)用進(jìn)展研究[J].時代汽車,2022,(15):7-9.周杰,張礦偉.單片機(jī)技術(shù)在新型汽車領(lǐng)域的應(yīng)用研究[J].科技創(chuàng)新與生產(chǎn)力,2021,(12):140-142.翟秀軍,趙羽佳,劉曉明.基于安全溫度控制的智能汽車報警裝置設(shè)計[J].自動化與儀表,2021,36(02):69-72+98.杜曉輝.基于單片機(jī)的汽車行駛智能記錄儀研發(fā)[J].微型電腦應(yīng)用,2020,36(11):137-139.HerzigerAtar,SintovNicoleD..GiveitaTry!Howelectricvehicletestdrivesinfluencesymbolismperceptionsandadoptionintent[J].JournalofEnvironmentalPsychology,2023,85.[AppliedInformationReceives10thExperimentalLicenseforC-V2XConnectedVehicleTestingfromFederalCommunicationsCommission[J].Telecomworldwire,2022.KeslerSelami,BoyaciOmer,TumbekMustafa.DesignandImplementationofaRegenerativeModeElectricVehicleTestPlatformforEngineeringEducation[J].Sustainability,2022,14(21).GuoXiaoyu,ZhangYunlong.MaturityinAutomatedDrivingonPublicRoads:AReviewoftheSix-YearAutonomousVehicleTesterProgram[J].TransportationResearchRecord,2022,2676(11).KeysightOffersNewAutomotiveTestSolutionforMobileIndustryProcessorInterface[J].WirelessNews,2022.余卓平,邢星宇,陳君毅.自動駕駛汽車測試技術(shù)與應(yīng)用進(jìn)展[J].同濟(jì)大學(xué)學(xué)報(自然科學(xué)版),2019,47(04):540-547.王榮旭,紀(jì)少波,鄧輝,閆現(xiàn)禮,陳秋霖,李倫,于澤庭.電動汽車測試臺架控制系統(tǒng)設(shè)計[J].內(nèi)燃機(jī)與動力裝置,2019,36(02):51-56.吳海龍,孫曉明,盧晨.車內(nèi)臺架測試平臺的電動汽車檢測換氣系統(tǒng)[J].河南科技大學(xué)學(xué)報(自然科學(xué)版),2018,39(02):48-53+7.劉長偉.基于車輪六分力的汽車動態(tài)測試系統(tǒng)研究[D].西華大學(xué),2017.于杰.單片機(jī)在電動汽車行駛中的自動控制作用[A].天津市電子學(xué)會、天津市儀器儀表學(xué)會.第三十一屆中國(天津)2017’IT、網(wǎng)絡(luò)、信息技術(shù)、電子、儀器儀表創(chuàng)新學(xué)術(shù)會議論文集[C].天津市電子學(xué)會、天津市儀器儀表學(xué)會:天津市電子學(xué)會,2017:280-283.李桂偉.汽車測試數(shù)據(jù)管理系統(tǒng)開發(fā)及應(yīng)用研究[D].河北工業(yè)大學(xué),2017.洪昊,夏澤斌,李宗仁.基于LabVIEW平臺利用GPS架構(gòu)的汽車實時橫擺角速度測試系統(tǒng)開發(fā)[J].寧德師范學(xué)院學(xué)報(自然科學(xué)版),2017,29(01):72-77+93.孫曉暉,和紅梅,王志勇.基于單片機(jī)汽車行駛記錄儀的設(shè)計[J].河北工程技術(shù)高等??茖W(xué)校學(xué)報,2017,(01):33-37.周昊,蔡雄友,阮太元.基于單片機(jī)的智能汽車駕駛安全輔助系統(tǒng)設(shè)計與制作[J].福建電腦,2017,33(02):122-123.李斌,姚松麗,寧文坤,王凱凱.基于單片機(jī)的汽車安全系統(tǒng)設(shè)計[J].機(jī)械工程師,2016,(08):117-118.

附錄附錄A工作原理圖圖A.工作原理圖

附錄B程序清單#include"delay.h"#include"sys.h"#include"string.h"#include"LCD1602.h"#include"myiic.h"#include"mlx90614.h"#include"math.h"#include"adc.h"#include"usart2.h"u16CO2=0;u16kqm=0;u16kq_up=10;//溫度上限u16kqm_up=5;u16o2=0;int16_ttempd=0;u16temp_up=40;//溫度上限doubletemp;//溫度變量浮點(diǎn)數(shù)u8error=0;u8status;u8snr,buf[16],TagType[2],SelectedSnr[4],DefaultKey[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};#definekey_1GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_4)#definekey_2GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_6)#definekey_3GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_2)#definekey_4GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_1)#definekey_5GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0)#defineLED_HGPIO_SetBits(GPIOA,GPIO_Pin_8)#defineLED_LGPIO_ResetBits(GPIOA,GPIO_Pin_8)#definebuzzer_HGPIO_SetBits(GPIOA,GPIO_Pin_11)#definebuzzer_LGPIO_ResetBits(GPIOA,GPIO_Pin_11)#definefeng1_HGPIO_SetBits(GPIOA,GPIO_Pin_10)#definefeng1_LGPIO_ResetBits(GPIOA,GPIO_Pin_10)#definefeng2_HGPIO_SetBits(GPIOA,GPIO_Pin_9)#definefeng2_LGPIO_ResetBits(GPIOA,GPIO_Pin_9)#definerelay_HGPIO_SetBits(GPIOA,GPIO_Pin_5)#definerelay_LGPIO_ResetBits(GPIOA,GPIO_Pin_5)inti,a,b;//定義整數(shù)voidread_temp()//讀取溫度參數(shù)時用戶編號{ temp=SMBus_ReadTemp();//讀取溫度 b=(int)(temp*10)%10;//小數(shù)點(diǎn)后一位 a=(int)temp;//取整 tempd=a*10+b;}voidGPIO_STM32_Init(void){GPIO_InitTypeDefGPIO_InitStructure;//打開PB口時鐘 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE); GPIO_InitStructure.GPIO_Pin=GPIO_Pin_8|GPIO_Pin_11|GPIO_Pin_5|GPIO_Pin_9|GPIO_Pin_10; GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP; GPIO_Init(GPIOA,&GPIO_InitStructure); RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE); GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6|GPIO_Pin_2|GPIO_Pin_1|GPIO_Pin_0|GPIO_Pin_4; GPIO_InitStructure.GPIO_Mode=GPIO_Mode_IPU; GPIO_Init(GPIOA,&GPIO_InitStructure); }//設(shè)置溫度voidset_temp(){ LCD_Write_Com(0x80);//第1行第1列位置 LCD_Write_Data('T');//第1行第1列顯示 LCD_Write_Data('e');//第1行第2列顯示 LCD_Write_Data('m');//第1行第3列顯示 LCD_Write_Data('p');//第1行第4列顯示 LCD_Write_Data('');//第1行第5列顯示 LCD_Write_Data('u');//第1行第6列顯示 LCD_Write_Data('p');//第1行第7列顯示 LCD_Write_Data('>');//第1行第8列顯示 LCD_Write_Data('0'+temp_up/10);//上限十位取數(shù) LCD_Write_Data('0'+temp_up%10);//上限個位取數(shù) LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Com(0xc0); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data('');LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); for(;;) { if(key_2==0)//按下2鍵 { while(key_2==0)//等待按鍵 { temp_up++;//溫度上線+ if(temp_up>=99)//如果上限》+99 temp_up=99; LCD_Write_Com(0x88);//第1行第九列 LCD_Write_Data('0'+temp_up/10);//上限十位取數(shù) LCD_Write_Data('0'+temp_up%10);//上限個位取數(shù) delay_ms(200); //延時 } } if(key_3==0)//按下3鍵 { while(key_3==0)//等待按下 { temp_up--;//溫度上線- if(temp_up<=0)//如果上限<=0 temp_up=0;//上限=0 LCD_Write_Com(0x88);////第1行第九列位置 LCD_Write_Data('0'+temp_up/10);//上限十位取數(shù) LCD_Write_Data('0'+temp_up%10);//下限十位取數(shù) delay_ms(200); } } if(key_4==0)//按下4鍵 { while(key_4==0)//等待按鍵 delay_ms(500); break;//返回 } } }//設(shè)置空氣voidset_kq(){ LCD_Write_Com(0x80);//第1行第1列位置 LCD_Write_Data('C');//第1行第1列顯示 LCD_Write_Data('O');//第1行第2列顯示 LCD_Write_Data('2');//第1行第3列顯示 LCD_Write_Data('');//第1行第4列顯示 LCD_Write_Data('');//第1行第5列顯示 LCD_Write_Data('u');//第1行第6列顯示 LCD_Write_Data('p');//第1行第7列顯示 LCD_Write_Data('>');//第1行第8列顯示//上限十位取數(shù) LCD_Write_Data('0'+kq_up%1000/100); LCD_Write_Data('.');LCD_Write_Data('0'+kq_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kq_up%10);//上限個位取數(shù) LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Com(0xc0); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data('');LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); for(;;) { if(key_2==0)//按下2鍵 { while(key_2==0)//等待按鍵 { kq_up+=1;//溫度上線+ if(kq_up>=500)//如果上限》+99 kq_up=500; LCD_Write_Com(0x88);//第1行第九列 LCD_Write_Data('0'+kq_up%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+kq_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kq_up%10);//上限個位取數(shù) delay_ms(200); //延時 } } if(key_3==0)//按下3鍵 { while(key_3==0)//等待按下 {if(kq_up>1) kq_up-=1;//溫度上線- if(kq_up<=0)//如果上限<=0 kq_up=0;//上限=0 LCD_Write_Com(0x88);////第1行第九列位置 LCD_Write_Data('0'+kq_up%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+kq_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kq_up%10);//下限十位取數(shù) delay_ms(200); } } if(key_4==0)//按下4鍵 { while(key_4==0)//等待按鍵 delay_ms(500); break;//返回 } } LCD_Write_Com(0x80);//第1行第1列位置 LCD_Write_Data('K');//第1行第1列顯示 LCD_Write_Data('Q');//第1行第2列顯示 LCD_Write_Data('');//第1行第3列顯示 LCD_Write_Data('');//第1行第4列顯示 LCD_Write_Data('');//第1行第5列顯示 LCD_Write_Data('u');//第1行第6列顯示 LCD_Write_Data('p');//第1行第7列顯示 LCD_Write_Data('>');//第1行第8列顯示//上限十位取數(shù) LCD_Write_Data('0'+kqm_up%1000/100); LCD_Write_Data('.');LCD_Write_Data('0'+kqm_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kqm_up%10);//上限個位取數(shù) LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Com(0xc0); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data('');LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); for(;;) { if(key_2==0)//按下2鍵 { while(key_2==0)//等待按鍵 { kqm_up+=1;//溫度上線+ if(kqm_up>=500)//如果上限》+99 kqm_up=500; LCD_Write_Com(0x88);//第1行第九列 LCD_Write_Data('0'+kqm_up%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+kqm_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kqm_up%10);//上限個位取數(shù) delay_ms(200); //延時 } } if(key_3==0)//按下3鍵 { while(key_3==0);//等待按下 {if(kqm_up>1) kqm_up-=1;//溫度上線- if(kqm_up<=0)//如果上限<=0 kqm_up=0;//上限=0 LCD_Write_Com(0x88);////第1行第九列位置 LCD_Write_Data('0'+kqm_up%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+kqm_up%100/10);//上限十位取數(shù) LCD_Write_Data('0'+kqm_up%10);//下限十位取數(shù) delay_ms(200); } } if(key_4==0)//按下4鍵 { while(key_4==0)//等待按鍵 delay_ms(500); break;//返回 } }}voidread_key(){ if(key_1==0) { while(key_1==0); set_temp(); delay_ms(200); set_kq(); LCD_1602Clear(); }}voidwarn(){ if(CO2>60) { o2=15; } elseif(CO2>50) { o2=16; } elseif(CO2>40) { o2=17; } elseif(CO2>30) { o2=18; } elseif(CO2>20) { o2=19; } elseif(CO2>10) { o2=20; } elseif(CO2<10) { o2=21; } if(tempd/10>temp_up) { feng1_H; feng2_H; } else { feng1_L; feng2_L; } if(kqm>kqm_up||CO2>kq_up){ relay_H; LED_H; buzzer_H; delay_ms(200); LED_L; buzzer_L; delay_ms(200); } else { relay_L; LED_L; buzzer_L; } }//顯示用戶界面welcomevoiddisplay(){ LCD_Write_Com(0x80);//LCD1602LCD_Write_Data('C'); LCD_Write_Data(':'); LCD_Write_Data('0'+CO2%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+CO2%100/10); LCD_Write_Data('0'+CO2%10); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data('');LCD_Write_Data('K'); LCD_Write_Data(':'); LCD_Write_Data('0'+kqm%1000/100); LCD_Write_Data('.'); LCD_Write_Data('0'+kqm%100/10); LCD_Write_Data('0'+kqm%10); LCD_Write_Com(0xc0);//LCD1602 LCD_Write_Data('H'); LCD_Write_Data(':'); LCD_Write_Data('0'+tempd/100); LCD_Write_Data('0'+tempd%100/10); LCD_Write_Data('.'); LCD_Write_Data('0'+tempd%10); LCD_Write_Data(0xb2); LCD_Write_Data('C'); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data('');LCD_Write_Data('Y'); LCD_Write_Data(':'); LCD_Write_Data('0'+o2/10); LCD_Write_Data('0'+o2%10); LCD_Write_Data('%');}voiddisplay_1(){ LCD_Write_Com(0x80);//LCD1602 LCD_Write_Data('O'); LCD_Write_Data('F'); LCD_Write_Data('F'); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Data(''); LCD_Write_Com(0xc0);//LCD1602 LCD_Write_Dat

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論