You are on page 1of 38
About Us (htps:/fiotdesignpro.corn/aboutus) Contact (htipsiiotdesignpro.comicontact) thtepsulmvnn.facebook.comiloT-Design-Pro- 204393472235331) (petpsifewittercomiloTDesignProt) @ (tosu/wupincerest.corniotdesignpro) BYIIBESION —sercasersineoesne cOUATELS) NVSUNENS) NOUSERREEHONES TORE : one —— a 8 lOTMORCTS-iNTTPS/NOTDESENFRO.COMCOTFROJETS) WHELESSFROTOCOLS~0_\OTPLATFORMS “0 inh Connon robe oT Wireless Weather Station using Arduino, ESP8266 and b fresno ihingSpeak & iistesser3e Clobal warming hs lead to unpredicable clmaes researchers around the word are using weather — @PP owre stata to observe ecrd and sayae weather pterns wo sty eimate charges and prove weather Bidirectional NS forecasts. These Weather stations normally comprise of few sensors to measure environmental Diode (https://bit.ty/3wL16VW) irectonal TVS Diode i fabriates Ina proprietary scan avalanche parameters and a monitoring or logging system to analyze these parameters. n this tutorial we wil earn how to build a wireless loT-based weather station that can measure citcal environmental parameters lke Temperature, Humidity, and Pressure. Also since our weather station is loT enabled, we can send these parameters to a ThingSpeak (https://iotdesignpro.com/thingspeak-projects) channel (loT cloud) ° where we can store, analye, and access the data remotely We have abo Bulla simlar weather station cypress Using RasperyP (htps/otdesignpro.com/prolec/at-basedraspberypneatherstaton-sig-dht Semiconductor and-bmp!80-sensorearier, whlch pretty much smart this projet. Sense Expansion it (https /bity/ALsIET2) Incerfacea variety of sensors wth ne P50C™ 5 MCU platform ® re connectivity @ Multi-Band GNss ‘We will be using the Arduino board along with the DHT11 sensor, BMP180 sensor, and an ESP8265 wifi module. The DHT11 sensor senses the temperature and humidity, while the BMP180 sensor calculates the pressure, and £58266 is used for internet connectivity. In our previous project, we already learned {0 use the DHTI1 sensor fo monitor temperature and humidity with Arduino (ntpsiliotdesignpro.com/projects/temperature-humidity-monitoring-over thingspeak-using-arduino: (esp8266), here in this project, we are adding another sensor (BMP180) to make a complete weather station using Arduino. Sending these dal the world and we can also view the logged data whien will be stored on their website and even graph it ‘over time to analyze. to ThingSpeak enables live monitoring from anywhere in ‘Ceramic Antennas (nttpsu/bitsy/3ehetx8) Aoternas ate designe to offer precise and reliable lest Information through the us of mut Bice otto croutons ay ‘ealog Devices ne, C5024 emer f-oweases the Lre200 sok notsaap fuse ith gh Men pA Technology pictsri6qeo Curiosity Nano Kit (€v70C97) Cheepsu/itayumvrey FCF 6080 Cri Nano Kkis2 compa arate lao 0 Pct fri Bosch BMPS@1 Barometric Pressure Sensor (nttpsrbitsy/36gkIFD) Sensor features wide 3004P2 to ‘2sonPa measurement range and Vishay / Dale Sf y ROW Thi lm Components Required Chip Resistors: (hitpsumitayr36tHLAm) + £58266 Wi Shiela fm rectarglysemigrecion + DHTII Sensor restos + BMP 180 Sensor + Breadboard + Arduino Uno ‘Adafrult SHTAO Temperature & + Jumper Wires Humidity Sensor choos Board (ttps//bity/3IFeNRD) ircuit Diagram Aste SHTe0 Temperature sod Te complete circuit for Arduino based loT Weather Station is shown below. fourthgeneration sensor andis designed with a true BC interface RECENT PROJECTS How lof Solutions Are Transforming The Global ‘Automobile Industry Unews/how-ot- solutions-are- transforming-the- global-automobile- Industry) + 05 oct 2078 fritzing The OHTHT (hitpsifiotdesignpro.com/tags/dhtT1) sensor is powered by the SY pin of the Arduino (ntapsiiotdesignpro.conviotarduino-projects) and its data pin Is connected to pin $ for oneewire ‘communication. The 8MP180 sensor is powered by the 3.3V pin of Arduino and its data pins SCL (Serial ‘lock and SOA (Serial Data) are connected tothe AA and AS pin of Arduino for [2c communication. The €5P8266 (nttpsl/otdesignpro.com/tags/esp8266) module {s also powered by the 3.3V pin of the [Arduino and its Tx and Rx pins are connected to Digital pins 2 and 3 of Arduine for serial communication. You can use the below table asa reference for making your connections, Why Microsoft Silently Delays its Latest loT Security Offerings Unews/why- rmicrosoft-sitently delays-its-latestlot- securty-offerings) + 29Sep 2023 SwitchBot Hub 2:4- Inet Smart Home Hub Capable of Connecting toa Variety of Home ‘Automation Devic news /switchbot hhub-2-4in-t-smart- hhome-hub-capable- of-connecting-to-a vvariety-of-home- automation) + 28Sep, 2023 S.No. 104 Pin Name espaz6s vec ESP8266 RST P8266 CH-PD ESPAZG6 RX P8266 TX 5P8266 GND emPrao vec ‘BMP180 GND BMP1E0 SDA, BMP 10 sc DHT-11 vec. DHT-11 Data DHT-11 GND Arduino Pin 3av av 33V 1% How To Protect Industrial and Customer lot Devices From Matware, Reveals Kaspersky (news/how-to- protect-industrial- and-customer-ot devices-from- malware-reveals- kaspersky) +27 Sep 2023 Find Out How Godrej Plans To Transform Smart Home With Al and lot Technologies Unewsitind-out- hhow-godrej-plans- to-transform-smart- home-with-ai-and- lot-technologies) Setting up your ThingSpeak Channel ‘ThingSpeak is an open data platform that allows you to aggregate, visualize, and analyze lve data in the loud. You can control your devices using ThingSpeak, you can send data to ThingSpeak from your devices, and even you can create instant visualizations of live data, and send alerts using web services like Twitter and Twila, ThingSpeak has integrated support from the numerical computing software MATLAB, MATLAB allows ThingSpeak users to write and execute MATLAB code to perform preprocessing visualizations, and analyses. TingSpeak takes a minimum of 15 seconds to update your readings. We have also done other interesting projects with ThingSpeak tke + NodeMCU Temperature and Humidity Monitoring (httpsl/otdesignpro.com/projects/ct-based: ‘temperature-humicity-monitaring-over-thingspeak-using-esp8266) + ESP32 Temperature and Humidity Monitoring (htips/iotdesignpro.comiprojects/how-to-send-data-to thingspeak-cloud-using-esp32) '* Sending data to ThingSpeak could using Raspberry Pi (https://iotdesignpro.com/projects/now-to-send- datato-thingspeak-cloud-using-raspberry-pi) Experienced and Professional 10 Shree Rarr Packers move Step 1: ThingSpeak Account Setup To create a channel on TingSpeak, st you need to Sign upon ThingSpeak Incase if you already have {an account on ThingSpeak, signin using your id and password For creating your account go to wwwthinspeak com (httpz/vmw:thinspeak.com) Understand Your Things a ees Click on Sing up if you don't have an account and if you already have an account, click on signin. After licking on signup, illin your details. After this, verify your alli and click on continue, Step 2: Create a Channel for Your Data ‘Once you Sign in after your account verifation, Create @ new channel by clicking the “New Channer button. ChannelID 744809 Name er Staton Description 40 Field Humicity 2 snes Field2 temp “ Field3 Pressure “ “fter clicking on "New Channel” enter the Name and Description of the data you want to upload on this channel. Enter the name of your data Humidity in Feld, ‘Temp in Fleld2, and Pressure in Field3. If you want to use ‘more Fields, you can check the box next to the Field option and enter the name and description of your data, [After this, click on the save channel button to save your detail Step 3: API Key To send data to ThingSpeak, we needa unique API key, which we wil use late in our code to upload our sensor data to Tingspeak Website Click on the AP Keys" buton to get your unique API Ky for uploading your sensor data Private View Public’ Channel Settings Sharing Write API Key $y ow copy your ‘rite API Key We wil use this API key in our code. “ode Explanation he programming part plays a very important role to perform all the operations in a project. As usual ‘complete code i given at the end, Start the code by including all the required libraries and defining all the feinctude include [ter this, enter the WIFI name, password of your W-Fi router, and then also enter the API key that you copied from the Thingspeak channel define ssid “Enter Your WEFS Mane Here" // “KIEL Nae’ define pass “MIF Password 11 "Password! fdefine server = "apl.thingspeak.con” String apikey ="Enter the APE Key" In the void setup( function, it connects withthe Wi-Fi and starts the BMP1B80 and DHT11 sensors. void setup() { ire. begin()s pressure, begin()s 1/ enable debug serial to Serbat.begin(36ee); sheet delay(10)s d.begin()s Serial. begin(9600); Serial.printin("ar elay(s000); AE(Serdal Find "OK")) connecthiFS()s Using the void Transmission() function, we calculate the temperature, humidity, and pressure using the BMP1E0 and DHT11 sensors. void Trsetsston() « Ants_t h = dnt. renchunsdsty(); Antag_t t = dht.readTenperature(TEAPTYPE) ; char statu oubte 1,7, 00,35 status = pressure.startTenperature(); to 3 (states 1s 8) snes { etay(status); status = pressure. getTenperature(7); if (status |= 0) ‘ reasure.startPressure(2)s Af (status 1 0) ‘ 1/ West for the masurenent to complete delay(status) These commands are used to connect wit the ThingSpeak server and then print the temperature, humidity and pressure values in different fields. String end = “ATSCIPSTART=\"TCP\",\""s ced #= "184.106.153.249"; // apt. thingspeak.com end 2 “\",807; ser.println(end)s AF Ser. Find( Error") ‘SersalprintIn("ATSCIPSTART error”); to returns 17 prepare GET string string getstr = "GET /update?api_key="; eetste += apikeys getste 42 String(steTemp); getste 4="aField getste 42 string(strhumia); getstr getste 4= String(strPres); getstr 42 "\r\n\r\nrs field Running the loT Arduino Weather Station Now connect the Arduino with the laptop and choose the board and port correctly and then click Upload button. Af uploading the code, open the serial moniter. Make the baud rate of the serial monitor 9600. You will see your WI-FI I¢, password, and temperature, humidity, and pressure values on the serial monitor. Now navigate to the ThingSpeak channel and check your channel, you will see the temperature, humisity, and pressure values as shown in the below graphs. asthe Station esther Stason ‘This is how you can build Arduino Weather Station where the temperature, humidity, and pressure can bbe monitored from anywhere in the world over the internet. Code include WF include {include ‘include SFE_BMP180 pressure: Atdefine ONTPINS ‘Hdefine OMTTYPE DHT (DHT dht{OHTPIN, DHTTYPE); sHdefine TEMPTYPE “adefine ALTITUDE 160 Akitude from Bussero (Maly “define sid “Enter Your WiFi Name Here* 4! "WiFi Name" ‘define pass "WiFi Password 1/*Password! ‘define server = apithingspeak-com Suing apikey ="Entr the API Key’ char butler 10; to char tbutter0n © Gharh butter); char P_butfer(10} SofewareSerial ser2, 3 1 RX TX void setup ( Wire begina pressure begin: ‘enable debug serial Seral.begin9600) Serial print AT" elay’S000), iWseriatfineoxr I, connect; ? void loop) ‘ Tesmission( £58256 elay(so000) 1 60 seconds > void Tesmissiond ‘ inea_th= dntreadumidtys Int6..t = dhtreadTemperatureCTEMPTYPE), char stats; ouble TP,p0a status » pressure tartTemperaturet if(status = 0) t elaystatus) status = pressure getTemperaturem It{satus = 0) 4 status = pressure stanPressure(y in(status = 0) wo ¢ ‘1 Walt forthe measurement 1 complete: dela(sttus) ‘satus = pressure getPressure?.Ts if(status = 0) ‘ pO pressure sealevel?,ALTITUDE}:/! we're at 1685 meters (Boulder, CO} 12 = pressure althude(P 0) > ‘lseSerialprntn(etrar retrieving pressure messurementin > ‘lse SeriaLprinun(error starting pressure measurement" > ‘se Serial princherror retrieving temperature measurement" > fat temp =: feat nuit ‘eat Presson = pO; String strTemp = dtostftemp, 4, 1, buffer; String sttHumid = atostftwumidiy 4,1, buen String strPres = dtostrReression 4,2, P_buter Serial prnt Temperature: Serial printnsteTemp}: Serial. print Humidity: Serial. prntistHumniah Serial pring Pression" Seral.printnst?res ‘String emd = "AT+CIPSTART=\TCPV"\" cmd += "188.106.153.149" 1 apithingspeak com cmd += 80% serprintniems) isersind'Erra Serial. pintin’AT*CIPSTART error reture: > 40 ifsersfnar error SRS Serial printh"ATCIPSTART error > prepare GET string Sting esStr= "GET /update?apl key etSte += apikey, setSte felt ett SringlstrTemp setstr+"Bfile getSte = StringlstrHuric geist + "8elo3= etstr gett += Anti send data length ‘md = "ATFCIPSEND cmd += String(getstr length) serprintin(emd), ser printgetstn: ser tind» serprintgetst: > ebet ser printin@ATSCIPCLOSE" Malet user Serialprintn’AFCIPCLOSE", serprintingATORST"S char butferti0)=" Tags [ARDUINO /TAGS/ARDUINO) _ESPE2E6(/TAGS/ESPA266) 410 THINGSPEAK (TAGS/THINGSPEAK) RELATED ARTICLES. +0640, 2023 Bluetooth based Smart Phone Controlled Robot Car using ‘Arduino (/aticles/oluetooth- controlled-robot-car-using- arduino) WEATHER STATION (/TAGS/WEATHER STATION) ‘Arduino Launches WisGate Edge LoRaWAN Gateways in Collaboration with RAKwireless /news/arduino- launches-wisgate-edge- lorawan-gateways-in- collaboration-with- rakwireless) P32 Data Logging to Google Sheets with Google Scripts articles/esp32-data-logging to-google-sheets-with-google- scripts) » 490 20M 2022 +29 Mar, 2022 + 20Aug 2021 sreBSP32 based Advanced Portenta X8:Industrialgrade Howto Detect and Measure. Weather Station with @ME280 SOM with Linux OS Preloaded AC Current using Current and Live Weather data Onboard and Outstanding Transformer and Arduino Uiprojects/advanced-weather- Computational Density Uprojectsidetectand- station-using-esp32) inews/portenta-x®-industrial- _ measure-ac-current-using- ‘rade-som-with-linux-os: current-ransformer-and- preloaded-onboard-and- arduino) utstanding-computational) 49 COMMENTS eReK CHAU Banoroner Why is "connectWifi()" not... (comment/37797#comment-37 >ermatk 797) Sr eer hy gsconnectWii” not declared in this scape? | already built the hardware correctly (sea double checked, and the Arduino IDE provided isn't working Would ke lp as sn as pssble please, Thanks REPLY UCOMMENT/REPLYINODEZST/COMMENTI377=7) 2 emo DID U RECTIFY THAT ERROR (/comment/54527#commen meena +-54527) Seep METS oy RECTIFY THAT ERROR [REPLY (/COMMENT/REPLY/NODE/67/COMMENT/S4527) SHEESH a" Hi, connectwifi() function... (/comment/54543#com Perak ment-54543) Sse connector function Is missing in the code. add the below tines in your a it wl work boolean connect¥iFo¢ Serial printnAT+CHMODE=1", ser printi"AT=CWMODE=1"; "ATCWAP=Y cmde-SSI0; emdsens cemnd=PASS: emda Serial printing; sergrinti(emd} delay(S000); flsefindOR) Sera prntlnCOK" alse ( rm fale REPLY (/COMMENT/REPLY/NODE/67/COMMENT/S4543) Reap 2001 Where to add it (/comment/75429#comment-7 esrmena7se2a4cer ne 6429) rs) Where to addi [REPLY (/COMMENT/REPLY/NODE/67/COMMENT/75429) ee Hi, connectwifi() function... (/comment/54544#commen Pera 154544) Fetes ona connect function missing Inthe code. ada te below lines in your anit w ‘wor 10 boolean connecting ¢ chess Seralprintin’AT-CWMOD: ser prin (A ¥CWMODES delay20005 String nd="AT+CWA sb; 7 Seralpriintemd ser prieteerd deta(s0003 ieee sino OK) serial prin Oy eke return as: , > REPLY UCOMMENTIREPLY/NODE/S7/COMMENT/SAS44) 4 sansa 2021 if u can post the correct... (/comment/58932#comment-5893 Geamarenesaazscshimart) ifucan post e correct code postin web ‘or dont post the stupid code ios REPLY (/COMMENT/REPLY/NODEIS7/COMMENT/S8932) Bide zt Hey I am a beginner and idk... (/comment/70464#comment- Commeno4stecoree20464) Hey am a beginner and idk wnat to entrin ssid ane password, can you help me out7? (tsit the name and password of our wi?) REPLY (COMMENT/REPLY/NODE/S7/CONMENT/70468) 10 SAPEBRIVAN REX seh can u include the video... (/comment/71256#comment-7125 “enavonurassccrme) a can u include the video tutorial thanks man REPLY UCOMMENT/REPLY/NODE/S7/CONMENTI71256) sek ewe as can some one please post the... (/comment/72755#comment Geamnenu7275S¢canmen7 2755) ms an some one please post the corect code !dontknow where to add te Wi i above I delete the “connectWF*-e sill does nat compile see errors below)-Im a nowce any assistance appreciated ‘UserinicalGoogle Drive! ROJECTSNWeatherStation/seich juntdalsketch juntéain function Void set) ‘0sers/nicka/ Google Driver°ROJECTS/WeatherStation/sketch jun 4a/sketch juntéain 631.2; warning: 50 C++ forbids converting a string constant ‘char [Wwrte-sting sl if Serial nacoK' IK sketch junt4a:351: errr a function-definition isnt allowed here before token sketch junt4a:a21: error a funtion-definiion fs not allowed here before token sketch jun4a:131-2: error: expected Mattie libraries were found for "SPL" sea /Applicaions/Arouina.app/ContentsiJavayhardware/arduinofavlibraies(SPI "Malte libraries were found for “Ada Sensor h Used: /Usersick/Documents/Arduinofibraries/Adarui_Unified Sensor Mattie libraries were found for "WiFi Used: /Appictions/Arduina.2po/Contentsjava/ibraries WiFi Mattie libraries were found for ‘DHT 10 19, Used: /Usesiica/Bocuments/Arduinfbraries/DHT sensor. brary Mule ibraries were found for "wire Used! Applications duino.app/Contentsavamhardvare/arduinafawiorariesWire Mate braries were found fr "SotwareSerialn sea: /Applicaions/Aruino.app/Cantens/avafhardvare/arguinalaviibraries/Softwa reseral -Maltple ibravies were found for *SFE_BMP180 h Used: /Usersiica/DocumentsAvauinlibariestsre coat status 1 a function-efirition isnt allowed here before token REPLY UCOMMENTIREPLY/NODE/S7/CONMENTI72755) Awa 2 hoe 2 hinick, same error i got... /comment/73188#commen Uunanuratentorvert-73188) me hick same error got, fu got any output pleas etme know REPLY UCOMMENT/REPLY/NODE/S7/COMMENT/7318 EO snr a0 Hi Asheesh I too am... (/comment/84266#comment-84266) >ernain bl Asheesh Baaeay ASO" og am struggling with the code. Ive picked this project as my frst real-world buld as |Ipave a need for a weather station and it's good to work on something with a prac tse rather than something abstract. ‘The function-definition and uppercase-lowercase errors is where I'm having problems. Could you possibly re-post the corrected code? In the meantime 'm going to attempt y ur loT Based Temperature and Humidity Monitoring ver ThingSpeak using Arduino UNO and €5P8266° Many thanks! Ades REPLY (COMMENT/REPLY/NODE/S7/COMMENT/84266) 0 aan {expuneords erg SER writing to let you... (/comment/101496#comment-1 eemalnk 01496) ere eH ust writing to letyou be aware of what a exceptional experience my frend’ child found visting yuor web bog, She even learned some pieces, which included what is ke to have awonderful helping nature to le many people with ne trouble understand ¢ tain very confusing subject matter, You actually did mare than my expected results. T hanks for dsplaying those priceless, safe, explanatory and also unique guidance on yo Ur topic to hel REPLY UCOMMENT/REPLY/NODE/67/COMMENT/101496) sotden ose Frees on gon gooledkiasisehy desired to say... (/comment/101497#comment-10 rime m2 1497) Prema noresraccmmdrecsely desired to say thanks yet again. Im not certain the things that would have ous handle inthe absence of these tactics discussed by you over such a problem. actual Iywas an absolute scary affiuty for me, however witnessing your expert approach y processed that forced me to weep with fulllmens.'m just happy for the support an ermat -157086) ere STORES reo voce my aitudefor your geneosky giving supporto men and women tht ‘must nave help on your subject matter. Your personal dedication to geting the solio| along was pretty functional and have specifically allowed ladles ust Ike me co get tot hele dreams. his helpful gudelines means awhale lac tome and extremely more o.m ylfice workers. Warm regards: ror al of us REPLY (COMMENT/REPLY/NODE/67/COMMENT/157086) ees” mais commenting to let.../comment/157223#eomment- ee oma (eamtthsr2zancommdl® also commenting to let you understand ofthe awesome experience my d2ug ‘ndergone viewing yuor web blog. She learned so many issues, which include how tii ke to have an excellent giving mindset to have men and women wth ease fll rasp @ ‘number of tricky matters. You truly did more than my expected results. Thank you for Aistributing such informative, trustworthy, educational and even unique thoughts on y cur topic to Etnel REPLY {COMMENT/REPLY/NODE/S7/COMMENT/157223) nike dunks guraa. "Spot on with this write-up....(/comment/158963#comment-1 steele 58963) peg) anem “or on with his writes, 1 eally suppose this website wants way more consider 1B mos key be again to learn rather more, thanks fr that inf. REPLY (/COMMENT/REPLY/NODE/67/COMMENT/158963) Gitcoudetase, Your homé osu 2023 -159381) GSomtenvtsoserremmeduhome is valueble fr me, Thanks? ‘S938 valueble for me... (/comment/159381#commen REPLY (COMMENT/REPLY/NODE/67/COMMENT/155381) adidas yeezy creparmmrasisr Yee=tHsRRS a lot for providing... /comment/161121#comment-1 Perma 61121) Geomerenutotr2Nc rks 3 lot for providing individuals with such a terrific chance to aiscover important secrets from this web st. realy is very super’ plus suffed with fun for me personall Yyand my office co-norkers to vist your web ste a the east 3 mes per week find o| tthe fesh things you have. And indeed, rm just actually happy forthe surprising info ‘mation you give. Some 3 areas on this page ae surly the most sutabe Ive ever hac. REPLY (COMMENT/REPLY/NODE/67/COMMENT/161121) ‘supreme tht awwsup nealhig website online is... (/comment/164123#comment-16412 ‘water 2028 3) a an {rapier 4*98P) good publish, i. (/comment/164342#comment-164342) REPLY UCOMMENT/REPLY/NODE/67/COMMENT/164342) DD NEW COMMENT The content ofthis feld i kept private and willnat be shown publicly. comment + No HTML tags allowed: About text formats (fi + Lines and paragraphs break automatically, '* Web page addresses and email addresses turn into links automatically, 10 loTDesignPro isa one-of-a-kind, internet of Things Community cused on exploring the latest udvancements and technologies in he fleld of lo. POPULAR HARDWARE PLATFORMS. + Raspberry Pi (rreps:fiotdesignpro.comiraspberry piprojects) * Arduino: (hntps:/iotdesignpro.comfot- arduino-projects) + £58266 (hrepsiiotdesignpro.com/esp8266. projects) + ese32 (psifiotdesignpro.comfesp32- projects) Copyright © loTDesignPro 2023, Al Rights Reserves. INFORMATION About Us (eps:otdesignpro.comvabout- Contact us (htpsifotdesignpro.conveontact) Cookie Policy (heps:lotdesignpro.com/cooke policy) Privacy Policy (hteps:atdesignpro.comiprivacy policy) NEWSLETTER SUBSCRIPTION Stay Informed - Subscribe to our Newsleter. SUBSCRIBE

You might also like