Cov txheej txheem:

SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1: 9 Cov Kauj Ruam
SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1: 9 Cov Kauj Ruam

Video: SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1: 9 Cov Kauj Ruam

Video: SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1: 9 Cov Kauj Ruam
Video: SENSLY / Light [music video] 2024, Kaum ib hlis
Anonim
SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1
SENSLY KUB rau RASPBERRY PI AIR QUALITY & GAS DETECTOR V1.1

Sensly yog lub ntsuas pa paug nqa tau muaj peev xwm txheeb xyuas cov pa phem hauv huab cua siv nws cov pa roj pa hauv pa kom sau cov ntaub ntawv hais txog ntau yam roj cua tam sim no. Cov ntaub ntawv no tuaj yeem pub ncaj qha rau koj lub smartphone rau lub sijhawm tiag tiag thawb ceeb toom hloov tshiab. Sensly siv cov cuab yeej ntsuas ntsuas uas paub tseeb tias nyeem tau zoo ntawm chaw ua haujlwm, hauv tsev, lossis ib puag ncig ua haujlwm. Kev paub txog cov ntaub ntawv no pab koj nqis tes ua thiab coj cov pa phem ntau nyob ib puag ncig koj.

Peb pab neeg ntawm Altitude Tech LTD yog cov kiv cua loj ntawm Raspberry Pi lub khoos phis tawj me. Peb yeej mob siab pab Raspberry Pi zej zog txhim kho lawv tus kheej lub cuab yeej Sensly thiab pib ua haujlwm ntawm kev sim thaum kawm txog ntau hom roj cua. Peb tau tsim lub Sensly Hat rau Raspberry Pi. Pib pib ntawm Kickstarter, peb zoo siab los muab cov khoom tsim tshiab no rau cov tsim khoom.

Yuav Ua Li Cas Siv Lub Ntsej Muag HAT

Xav txog kev siv Sensly Raspberry Pi HAT rau:

  1. Tsim koj tus kheej cov ntaub ntawv tiv thaiv huab cua thiab saib xyuas huab cua zoo nyob hauv thaj chaw deb.
  2. Saib xyuas huab cua zoo nyob ib puag ncig koj lub tsev.
  3. Siv nws rau kev sim tsev kawm ntawv.

Kauj Ruam 1: Qhov seem hauv lub thawv

Qhov Chaw Hauv Lub Thawv
Qhov Chaw Hauv Lub Thawv

Pib nrog kom tau txais txhua yam koj xav tau.

  • HLO Sensly
  • BME 280/680 ntsuas kub, av noo thiab ntsuas qhov ntsuas qhov ntsuas
  • Ntse PM10 Sensor
  • PM10 Kab
  • 40 Pin Raspberry Pi header

Kauj Ruam 2: Ua Kom Zoo Siab Txhua Tus Ua Ke

Muab Kev Ntseeg Txhua Yam Ua Ke
Muab Kev Ntseeg Txhua Yam Ua Ke
Muab Kev Ntseeg Txhua Yam Ua Ke
Muab Kev Ntseeg Txhua Yam Ua Ke
Muab Kev Ntseeg Txhua Yam Ua Ke
Muab Kev Ntseeg Txhua Yam Ua Ke

Cia peb muab nws ua ke:

  • Muab 40 tus pin header tso rau hauv tus pin qhov ntawm Sensly HAT ces tso Sensly HAT mus rau pi
  • Muab tus qauv BME 280 tso rau ntawm Sensly HAT kom ntseeg tau tias cov pins sib phim. Saib hauv qab tus qauv kom paub qhov kev taw qhia nws yuav tsum tau ntsib.
  • Txuas lub PM Sensor Cable rau hauv qhov chaw nres nkoj sau npe PM Header
  • Thaum qhov no ua tiav, peb tuaj yeem ua zog ntawm Raspberry Pi.
  • Vim yog lub hwj chim kos ntawm Sensly Hat thaum ua haujlwm tau zoo nws tau pom zoo tias koj siv lub raspberry pi them nyiaj los txhawb koj lub pi.

Kauj Ruam 3: Tshooj Ntxiv

Qhov Ntxiv
Qhov Ntxiv

Tau txais txhua yam rau koj raspberry pi

  • Raspberry pi 2 lossis 3
  • Saib xyuas
  • Keyboard thiab nas
  • Kev Sib Txuas Internet
  • HDMI Cable
  • Raspberry Pi 3 them nyiaj
  • Qhov tseeb version ntawm Raspbian Jessie

Kauj Ruam 4: Teeb Kho Raspberry Pi

Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi
Teeb tsa Raspberry Pi

Phau ntawv qhia teeb tsa raspberry pi yog tias koj xav tau los ntawm raspberry pi foundation

www.raspberrypi.org/learning/hardware-guid…

Qhov tseeb version ntawm Raspbian Jessie tuaj yeem pom ntawm qhov txuas hauv qab no.

www.raspberrypi.org/downloads/

Kauj ruam 5: Rub tawm Software

Rub tawm Software
Rub tawm Software
Rub tawm Software
Rub tawm Software
Rub tawm Software
Rub tawm Software

Teeb tsa Raspberry Pi txhawm rau txuas rau Sensly HAT.

Muaj ob peb txoj hauv kev los ua qhov no, ua ntej koj tuaj yeem rub tawm Raspbian duab ntawm no. Qhov no yuav tau npaj ua ntej ua haujlwm. Qhov thib ob, koj tuaj yeem rub tawm cov ntawv sau los ntawm

github.com/Altitude-Tech/Sensly_Install

Ua ntej tshaj plaws peb yuav tsum rub tawm cov ntawv sau siv cov lus txib. Nco ntsoov tias koj nyob hauv koj phau ntawv teev npe tsev

$ git clone

Tom qab ntawd peb hloov cov npe rau Sensly_Install nplaub tshev

$ cd/path/to/Sensly_Install

Tom ntej no, peb yuav tsum ua kom cov ntawv teeb tsa ua tiav.

$ chmod u+x./Sensly_Dev_Install.sh

Thaum kawg peb khiav tsab ntawv. Yuav muaj qee qhov kev ceeb toom uas koj yuav tsum tau ntaus hauv Y kom paub meej tias koj xav mus txuas ntxiv

$ sudo./Sensly_Dev_Install.sh

Thaum ua tiav nws koj tus pi yuav rov pib dua. Kom paub tseeb tias txhua yam ua haujlwm peb tuaj yeem ua raws cov lus txib hauv qab no.

$ i2cdetect -y 1

Koj yuav tsum muaj peev xwm pom txoj haujlwm 05 thiab 76 ntawm qhov screen.

Kauj ruam 6: Calibration Firmware

Calibration Firmware
Calibration Firmware

Yuav kom tuaj yeem khiav cov txheej txheem ntsuas, yuav tsum tau hloov kho cov kauj ruam. Thawj kauj ruam yog rub cov ntaub ntawv rau kev ntsuas ntsuas qhov tseeb ntawm:

$ git clone

Tam sim no peb yuav tsum tso lub Sensly tso rau hauv hom rau qhov Raspberry Pi thiab Sensly tau txuas nrog raws li tau hais los saum no. Upload hom tsuas yog rau version V1.1-1.4. Raspberry Pi tau txais lub zog los ntawm USB, tom qab ntawd Sensly tau txais lub zog los ntawm kab liab thiab dub.

Cov kab liab txiv kab ntxwv thiab daj tau hloov pauv rau kev sib tham.

Tom qab txhua yam txuas nrog yog lub sijhawm los ua haujlwm Firmware tsab ntawv.

$ sudo python Firmware_Updater_Calibration.py

Thaum hom upload tau ua tiav, txuas rau Sensly nyob rau sab saum toj ntawm Raspberry Pi thiab mus rau theem tom ntej.

Kauj Ruam 7: Calibrate Gas Sensors

Calibrate Cov Pa Roj Sensors
Calibrate Cov Pa Roj Sensors

Muaj qhov ua ntej cua sov/hlawv-nyob rau theem yuav tsum tau tshem tawm txheej txheej tiv thaiv lub ntsuas cua muaj thaum peb tau txais lawv los ntawm cov tuam ntxhab, qhov no feem ntau yog 48 teev thiab tsuas yog yuav tsum tau ua ib zaug. Tom qab ntawd, peb feem ntau pom zoo kom ntsuas lub ntsuas cua rau 15 feeb kom ruaj khov nyeem ua ntej txiav cov ntaub ntawv.

Tam sim no peb yuav tsum ntsuas cov Gas Sensors kom tuaj yeem xam PPM. Txhawm rau ua qhov no peb yuav tsum tso Sensly HAT rau hauv ib puag ncig huab cua huv. Qhov no tuaj yeem sab nraum lossis yog tias koj muaj cov khoom siv, hauv cua cua cua. Thaum huab cua koj tso rau hauv yuav cuam tshuam qhov raug ntawm lub ntsuas nws yuav tsis cuam tshuam qhov tseeb yog li yog tias koj tab tom nrhiav taug qab kev hloov pauv hauv koj huab cua zoo Sensly yuav haum. Sensly HAT los ua ntej thauj khoom nrog lub ntsuas qhov ntsuas qhov tseeb, yog li peb tuaj yeem yooj yim khiav cov ntawv ntsuas ntsuas kom pom R0 qhov tseem ceeb rau txhua lub ntsuas roj. Txhawm rau tuaj yeem tso Sensly hauv qhov chaw ntsuas ntsuas peb yuav tsum muaj peev xwm los khiav cov ntawv ntsuas ntsuas thaum Pi khau raj. Rau qhov no, peb yuav tsum rub tawm:

$ git clone

Tom ntej no, peb yuav tsum tso cov lus txib hauv qab no rau hauv cov ntawv

$ @reboot sudo nab hab sej /path/to/Sensly_Calibration.py

Cov lus txib yuav tsum nyob hauv "/etc/rc.local" raws li qhia hauv daim duab saum toj no. Txhawm rau ua qhov no peb yuav ntaus hauv lub davhlau ya nyob twg:

$ sudo nano /etc/rc.local

Tom qab ntawd peb kaw cov ntaub ntawv siv Ctrl+x ces Y. Qhov no yuav txhais tau tias txhua lub sijhawm koj pib koj Pi nws yuav ua haujlwm ntsuas qhov ntsuas.

Tam sim no koj tuaj yeem nqa nws mus rau koj ib puag ncig huab cua huv thiab tso nws tseg ib nrab teev, mus rau ib teev. Qhov ntev zoo dua.

Thaum qhov no ua tiav koj yuav tsum muaj cov ntaub ntawv hu ua Sensly_Calibration_ "date" _ "time".csv qhov twg "date" yuav raug hloov nrog hnub tam sim no khaws cia ntawm Raspberry pi thiab "time" tau hloov nrog lub sijhawm tam sim no. Cov ntaub ntawv no yuav suav nrog R0 qhov txiaj ntsig suav thaum lub sijhawm ntsuas ntsuas nruab nrab txhua 5 feeb. Txij li thaum tsab ntawv sau nruab nrab qhov nruab nrab, koj siv qhov kawg nkag rau hauv cov ntaub ntawv raws li R0 qhov tseem ceeb rau MQ2, MQ7 thiab MQ135. Qhov no yuav muab tso rau hauv Sensly.py cov ntaub ntawv. txhawm rau pab peb xam cov PPM qhov txiaj ntsig rau txhua qhov ntsuas pom roj

Kauj Ruam 8: Khiav Qhov Tseeb HAT

Khiav lub Sensly HAT
Khiav lub Sensly HAT
Khiav lub Sensly HAT
Khiav lub Sensly HAT
Khiav lub Sensly HAT
Khiav lub Sensly HAT

Yuav kom tuaj yeem ua haujlwm Sensly hauv kev ua haujlwm tag nrho peb yuav tsum hloov kho lub firmware kom nws tawm ntawm hom Calibration. Qhov no yog ua tiav los ntawm kev tshem kab uas tau ntxiv rau "/etc/rc.local" yog li lub rooj tsavxwm tsis nkag mus rau hauv kev ntsuas ntsuas txhua lub sijhawm pib pib, tom qab ntawv sau Firmware_Updater_Operation.py tsab ntawv, nrog Sensly txuas nrog zoo li hauv qib 6.

Tom qab ntawd peb khiav Firmware hloov tshiab los ntawm Sensly_Update_for_v1_1 cov npe raws li hauv qab no:

  • $ cd/tsev/pi/Sensly_Update_for_v1_1/
  • $ sudo python Firmware_Updater_Operation.py

Thaum Sensly firmware tau hloov kho tshiab, txuas nrog Sensly nrog Raspberry Pi li qub.

Tam sim no khiav cov ntawv Sensly.py:

nab hab sej /home/pi/Sensly/Sensly.py

Thaum kawg, txhawm rau pab koj kom khiav tsab ntawv tau txais txiaj ntsig peb mam li khiav cov lus txib crontab dua.

$ crontab -e

Tom qab ntawv ntxiv qhov no mus rau qhov kawg ntawm cov ntawv thaum tshem tawm peb cov ntawv nkag ua ntej

@reboot python /path/to/Sensly.py

Tam sim no txhua lub sijhawm koj khau raj koj lub pi Sensly HAT yuav tsum tau txiav cov ntaub ntawv mus rau SampleData nplaub tshev raws li cov ntaub ntawv csv. Kauj ruam kawg yog coj R0 qhov txiaj ntsig koj tau txais thaum lub sijhawm ntsuas ntsuas thiab muab tso rau hauv qhov tseem ceeb ntawm qhov tshuaj ntsuam kawg.

Cov lus qhia tom ntej peb yuav tso tawm yuav qhia koj yuav ua li cas txuas qhov no nrog cov lus pom zoo.

Kauj Ruam 9: Kauj Ruam Kawg

Kauj Ruam Kawg
Kauj Ruam Kawg

Thov qhia koj cov ntaub ntawv vim nws yuav pab peb txhim kho qhov zoo dua rau Sensly.

Yog tias koj xav tias koj muaj txuj ci los sau Ntawv Qhia Zoo siv Sensly tom qab ntawd yuav ib qho los ntawm peb lub khw thiab yog tias peb nyiam nws peb yuav thim koj cov nyiaj thiab txawm xa ntau yam zoo rau koj!

Pom zoo: