Grove - Laser PM2.5 Sensor (HM3301) - Seeed Wiki

文章推薦指數: 80 %
投票人數:10人

The Grove - Laser PM2.5 Sensor (HM3301) is a new generation of laser dust detection sensor, which is used for continuous and real-time detection of dust in ... SeeedWiki Tableofcontents Features Specification Typicalapplications HardwareOverview PinOut WorkingPrinciple PlatformsSupported GettingStarted PlayWithArduino Hardware Software SchematicOnlineViewer Resources Projects TechSupport edit Grove-LaserPM2.5Sensor(HM3301) TheGrove-LaserPM2.5Sensor(HM3301)isanewgenerationoflaserdustdetectionsensor,whichisusedforcontinuousandreal-timedetectionofdustintheair. Differentfromthepumpingdustdetectionsensor,theHM-3301innovativelyusesfanbladestodriveair,andtheairflowingthroughthedetectionchamberisusedasatestsampletoperformreal-timeandcontinuoustestondustofdifferentparticlesizesintheair. Thismoduleissuitablefordustdetectors,intelligentairpurifiers,intelligentairconditioners,intelligentventilationfans,airqualitytesting,hazemeters,environmentalmonitoringandrelativeproductsandapplications Features¶ Highsensitivityondustparticlesof0.3μmorgreater Real-time&continuousdetectionofdustconcentrationintheair Basedonlaserlightscatteringtechnology,readingsareaccurate,stable,andconsistent Lownoise Ultra-lowpowerconsumption Specification¶ Item Value OperatingVoltage 3.3V/5V Operatingtemperature -10~60℃ Operatinghumidity 10%~90%RH(non-condensing) Particalsize 3channels--2.5µm,5µm,10µm Range(PM2.5standardvalue) 1~500µg/m3(Effectiverange)1000µg/m3(Maximumrange) Resolution Concentration:1µg/m3Countingconcentration:1s/0.1L Stabilitytime 30secondsafterpower-on Interface I2C I2Caddress 0x40 Typicalapplications¶ Airpurifier/airconditioner Airqualitytestingequipment IndustrialPMvalueanalysis Dustandsmokedetectionandanalysis Real-timePM2.5,PM10,TSPdetector Multichannelparticlecounter Environmentaltestingequipment HardwareOverview¶ PinOut¶ WorkingPrinciple¶ TheHM-3301DustSensorisbasedontheadvancedMiescatteringtheory.Whenlightpassesthroughparticleswithquantitysameasorlargerthanwavelengthofthelight,itwillproducelightscattering.Thescatteredlightisconcentratedtoahighlysensitivephotodiode,whichisthenamplifiedandanalyzedbyacircuit.Withspecificmathematicalmodelandalgorithm,thecountconcentrationandmassconcentrationofthedustparticlesisobtained. TheHM-3301dustsensoriscomposedofmaincomponentssuchasafan,aninfraredlasersource,acondensingmirror,aphotosensitivetube,asignalamplifyingcircuitandasignalsortingcircuit. PlatformsSupported¶ Arduino RaspberryPi Caution Theplatformsmentionedaboveassupportedis/areanindicationofthemodule'ssoftwareortheoriticalcompatibility.WeonlyprovidesoftwarelibraryorcodeexamplesforArduinoplatforminmostcases.Itisnotpossibletoprovidesoftwarelibrary/democodeforallpossibleMCUplatforms.Hence,usershavetowritetheirownsoftwarelibrary. GettingStarted¶ PlayWithArduino¶ Hardware¶ Materialsrequired SeeeduinoV4.2 BaseShield Grove-LaserPM2.5Sensor(HM3301) GetOneNow GetOneNow GetOneNow Note 1PleaseplugtheUSBcablegently,otherwiseyoumaydamagetheport.PleaseusetheUSBcablewith4wiresinside,the2wirescablecan'ttransferdata.Ifyouarenotsureaboutthewireyouhave,youcanclickheretobuy 2EachGrovemodulecomeswithaGrovecablewhenyoubuy.IncaseyoulosetheGrovecable,youcanclickheretobuy. Step1.ConnecttheGrove-LaserPM2.5Sensor(HM3301)toportI2CofGrove-BaseShield. Step2.PlugGrove-BaseShieldintoSeeeduino. Step3.ConnectSeeeduinotoPCviaaUSBcable. NoteIfwedon'thaveGroveBaseShield,WealsocandirectlyconnectthismoduletoSeeeduinoasbelow. Seeeduino GroveCable Grove-LaserPM2.5Sensor(HM3301) GND Black GND 5Vor3.3V Red VCC SDA White SDA SCL Yellow SCL Software¶ AttentionIfthisisthefirsttimeyouworkwithArduino,westronglyrecommendyoutoseeGettingStartedwithArduinobeforethestart. Step1.DownloadtheSeeed_PM2_5_sensor_HM3301LibraryfromGithub. Step2.RefertoHowtoinstalllibrarytoinstalllibraryforArduino. Step3.RestarttheArduinoIDE.Opentheexample,youcanopenitinthefollowingthreeways: OpenitdirectlyintheArduinoIDEviathepath:File→Examples→PM2.5sensor→basic_demo. Openitinyourcomputerbyclickthebasic_demo.inowhichyoucanfindinthefolderXXXX\Arduino\libraries\Seeed_PM2_5_sensor_HM3301-master\examples\basic_demo,XXXXisthelocationyouinstalledtheArduinoIDE. Or,youcanjustclicktheiconinupperrightcornerofthecodeblocktocopythefollowingcodeintoanewsketchintheArduinoIDE. #include"Seeed_HM330X.h" #ifdefARDUINO_SAMD_VARIANT_COMPLIANCE #defineSERIALSerialUSB #else #defineSERIALSerial #endif HM330Xsensor; u8buf[30]; constchar*str[]={"sensornum:","PM1.0concentration(CF=1,Standardparticulatematter,unit:ug/m3):", "PM2.5concentration(CF=1,Standardparticulatematter,unit:ug/m3):", "PM10concentration(CF=1,Standardparticulatematter,unit:ug/m3):", "PM1.0concentration(Atmosphericenvironment,unit:ug/m3):", "PM2.5concentration(Atmosphericenvironment,unit:ug/m3):", "PM10concentration(Atmosphericenvironment,unit:ug/m3):", }; err_tprint_result(constchar*str,u16value) { if(NULL==str) returnERROR_PARAM; SERIAL.print(str); SERIAL.println(value); returnNO_ERROR; } /*parsebufwith29u8-data*/ err_tparse_result(u8*data) { u16value=0; err_tNO_ERROR; if(NULL==data) returnERROR_PARAM; for(inti=1;i<8;i++) { value=(u16)data[i*2]<<8|data[i*2+1]; print_result(str[i-1],value); } } err_tparse_result_value(u8*data) { if(NULL==data) returnERROR_PARAM; for(inti=0;i<28;i++) { SERIAL.print(data[i],HEX); SERIAL.print(""); if((0==(i)%5)||(0==i)) { SERIAL.println(""); } } u8sum=0; for(inti=0;i<28;i++) { sum+=data[i]; } if(sum!=data[28]) { SERIAL.println("wrongcheckSum!!!!"); } SERIAL.println(""); SERIAL.println(""); returnNO_ERROR; } /*30s*/ voidsetup() { SERIAL.begin(115200); delay(100); SERIAL.println("Serialstart"); if(sensor.init()) { SERIAL.println("HM330Xinitfailed!!!"); while(1); } } voidloop() { if(sensor.read_sensor_value(buf,29)) { SERIAL.println("HM330Xreadresultfailed!!!"); } parse_result_value(buf); parse_result(buf); SERIAL.println(""); SERIAL.println(""); SERIAL.println(""); delay(5000); } AttentionThelibraryfilemaybeupdated.Thiscodemaynotbeapplicabletotheupdatedlibraryfile,sowerecommendthatyouusethefirsttwomethods. Step4.Uploadthedemo.Ifyoudonotknowhowtouploadthecode,pleasecheckHowtouploadcode. Step5.OpentheSerialMonitorofArduinoIDEbyclickTool->SerialMonitor.OrtaptheCtrl+Shift+Mkeyatthesametime.Setthebaudrateto115200. SuccessIfeverythinggoeswell,whenyouopentheSerialMonitoritmayshowasbelow: Serialstart 0 FF0002D 03F0450 2203203B 00000 00000 00 sensornum:0 PM1.0concentration(CF=1,Standardparticulatematter,unit:ug/m3):45 PM2.5concentration(CF=1,Standardparticulatematter,unit:ug/m3):63 PM10concentration(CF=1,Standardparticulatematter,unit:ug/m3):69 PM1.0concentration(Atmosphericenvironment,unit:ug/m3):34 PM2.5concentration(Atmosphericenvironment,unit:ug/m3):50 PM10concentration(Atmosphericenvironment,unit:ug/m3):59 NoteThestandardparticulatemattermassconcentrationvaluereferstothemassconcentrationvalueobtainedbydensityconversionofindustrialmetalparticlesasequivalentparticles,andissuitableforuseinindustrialproductionworkshopsandthelike.Theconcentrationofparticulatematterintheatmosphericenvironmentisconvertedbythedensityofthemainpollutantsintheairasequivalentparticles,andissuitableforordinaryindoorandoutdooratmosphericenvironments.Soyoucanseethattherearetwosetsofdataabove. SchematicOnlineViewer¶ Resources¶ [Zip]Grove-LaserPM2.5Sensor(HM3301)EagleFiles [Zip]Seeed_PM2_5_sensor_HM3301SoftwareLibrary [PDF]DatasheetHM3301 Projects¶ AtmosphericPollutionVisualization:Theairpollutionproblemattractsmoreandmoreattention.ThistimewetriedtomonitoringPM2.5withWioLTEandnewLaserPM2.5Sensor. TechSupport¶ Pleasedonothesitatetosubmittheissueintoourforum.



請為這篇文章評分?