PMS7003 with Arduino MEGA2560 - Public Lab

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

To measure particulate matter i got the PMS7003 Sensor. Does anyone know a proper wiring diagram and a code that works with arduino? Hello,afirsttimerhere.ThanksinAdvanceforanyonekindenoughtooffermeadvice. ihaveb... PublicLabisanopencommunitywhichcollaborativelydevelopsaccessible,opensource,Do-It-Yourselftechnologiesforinvestigatinglocalenvironmentalhealthandjusticeissues. PublicLab Topics Topics Agriculture Airquality Climatechange Disasterresponse Education Indoorairquality Landuse Lawandpolicy Lead Microplastics Noise Odor Oilandgas Organizing Soil Stormwater Transportation Waste Waterquality Wetlands close| Alltopics» Community GetStarted» People Places Projects Events Questions Chat Tools Methods Kits KitsInitiative Store Software MapKnitter Infragram SpectralWorkbench CodeCommunity Aboutus AboutPublicLab Blog Newsletter Careers Contact Store Donate Signup Login Store Donate Signup × Signupwith Username Placeholder Email Placeholder Chooseimageordragonehere Createapassword Placeholder PasswordConfirmation Placeholder Bio IfyoucannotusetheReCaptchatoverifyyouarenotabot,usethisalternativeverification. Bysigningup,youagreetotheCodeofConduct,whichappliestoallonlineandin-personspacesmanagedbythePublicLabcommunityandnon-profit.YoualsoagreetoourPrivacyPolicy. Asanopensourcecommunity,webelieveinopenlicensingofcontentsothatothermembersofthecommunitycanleverageyourworklegally--withattribution,ofcourse.ByjoiningthePublicLabsite,youagreetoreleasethecontentyouposthereunderaCreativeCommonsAttributionSharealikelicense,andthehardwaredesignsyoupostundertheCERNOpenHardwareLicense1.1(fulltext).Thishastheaddedbenefitthatothersmustsharetheirimprovementsinturnwithyou. Signup or Login Login or signuptojointhePublicLabcommunity Username Password Login Rememberme Forgotyourpassword?Resetithere Question:PMS7003withArduinoMEGA2560 vinushi1995isaskingaquestionaboutair-quality: Followthistopic byvinushi1995| July21,201904:12| #20210 Hello,afirsttimerhere.ThanksinAdvanceforanyonekindenoughtooffermeadvice. ihavebeentryingtomakeanairqualitymonitorusingtheAircastingapp.TomeasureparticulatematterigotthePMS7003Sensor.Doesanyoneknowaproperwiringdiagramandacodethatworkswitharduino?I'vebeentryingsomecodesbuthavebeenencounteringproblemsinmostofthem.Thisisthelatestcodei'vebeenusinganditseemstobegivingvaluesin100swhichisveryhigh includeSoftwareSerialmySerial(10,11);//ArudinoUnoportRX,TXvoidsetup(){//fordebugingSerial.begin(115200);//UsesoftwareserialmySerial.begin(9600);}voidloop(){//putyourmaincodehere,torunrepeatedly:staticintCheckFirst=0;staticintpm_add[3][5]={0,};staticintpm_old[3]={0,};intchksum=0,res=0;;unsignedcharpms[32]={0,};if(mySerial.available()>=32){for(intj=0;j<32;j++){pms[j]=mySerial.read();if(j<30)chksum+=pms[j];}if(pms[30]!=(unsignedchar)(chksum>>8)||pms[31]!=(unsignedchar)(chksum)){}if(pms[0]!=0x42||pms[1]!=0x4d)Serial.print("Dustrawdatadebugging:");Serial.print("1.0ug/m3:");Serial.print(pms[10]);Serial.print(pms[11]);Serial.print("");Serial.print("2.5ug/m3:");Serial.print(pms[12]);Serial.print(pms[13]);Serial.print("");Serial.print("10ug/m3:");Serial.print(pms[14]);Serial.println(pms[15]);}delay(2000);}
Share Tweet 3Comments    silentsairam commented over2yearsago Goodtoseeyourproject. 1.InthecodetheTX,RXpinsmentionBoardassociatedasArduinoUNObutyouareusingMega.Kindlycheckthepinconnections. RXpinofBoardastobeTXpinofPMsensorandsameforTXaswell. Linkswhereyoucanfinddetailedinformation👍 https://publiclab.org/notes/cfastie/11-28-2018/nano-particle-monitoring ThislinkisfromAdafruit.CheckfortheboardandPMsensorvariantandmodifyaccordingly. https://learn.adafruit.com/pm25-air-quality-sensor?view=all Hopethishelps. Isthisaquestion?ClickheretopostittotheQuestionspage.    vinushi1995 commented over2yearsago @silentsairamThankyousomuchfortheadvice!Isurewilllookintoit.😃    drewc228 commented almost2yearsago [email protected]?IamhavingasimilarproblemwiththePMS7003.Iamusingsimilarcodetoyours.ItdoesappeartoworkwiththePMS5003whichissimilarbutabitlargerfootprint.ButwhenIusethe7003withthesamecodeIalsoamgettingvaluesthatare10x-20xlargerthanexpected.Notsurewhatiscausingthisasitisclaimedthatthetwosensorsareelectricallyidenticalandusethesamedataprotocol.Appreciateanythoughts/suggestionsfromforummembers. Isthisaquestion?ClickheretopostittotheQuestionspage. Replytothiscomment... Logintocomment Logintocomment Askrelatedquestion» Addalocation Learnaboutlocationprivacy Thisispartof: 1014notes createdbyvinushi1995over2yearsago first-time-poster 160following Follow 160notes createdbyvinushi1995over2yearsago arduino 27following Follow 3more&nbsp pms7003 pm2.5 include 90notes createdbyvinushi1995over2yearsago question:air-quality



請為這篇文章評分?