Sitting in your room you start sweating or feel chill; you wonder how much would be the temperature in your room? or what would be the humidity? This happened with me some time back.

This lead to inception of Personal Weather Station, that monitors temperature, humidity, pressure and light intensity of your room and uploads it to a private channel on thingspeak.com.

Let's get started.

Step 1: Quick Video

Here is a small video, that summaries every thing in 5 mins.

Click here to watch on youtube

Step 2: Electronics Components Needed for Personal Weather Station

Description: We will use DHT11 to sense humidity, BMP180 to sense temperature and pressure and a Light Dependent Resistor(LDR) to get rough idea of light intensity. Arduino nano will gather data from these sensors and send to ESP8266 for uploading it to your private channel on thingspeak.com. We will power our Arduino nano from a 12V-2A wall adapter, sensors and ESP8266 will receive down converted voltage from LM2596 based buck converter.

List of components:

  1. BMP180 pressure and temperature sensor,
  2. DHT11 humidity sensor,
  3. Light Dependent Resistor (LDR),
  4. ESP8266 wifi module(firmware ready),
  5. Arduino nano,
  6. 2 Resistors- 51 KOhm and 4.7KOhm,
  7. LM2596 buck converter,
  8. DC jack,
  9. Switch and
  10. 12V-2A wall adapter.

Step 3: Tools and Extra Items Needed for Personal Weather Station

Description: We will use wire stripper for stripping wire, file for smoothing cuts/holes on enclosure, glue gun for placing components inside enclosure, screw driver to close the enclosure lid and solder iron with solder wire to assemble circuit on general purpose circuit board(GCB). 4x4x2 inch plastic box acts as enclosure. We will also need male and female berg strip along with female connectors for proper assembly on GCB.

List of Tools:

  1. Wire stripper,
  2. File,
  3. Glue gun,
  4. Screw driver and
  5. Solder iron and solder wire.

List of Extra items:

  1. 4x4x2 inch plastic box (I used this dimension, any nearby dimensions should be fine),
  2. General purpose circuit board,
  3. male and female berg strip and
  4. female connectors.

Step 4: Software Requirements

Description: In order to see the value of sensor data, we will need a private channel on thingspeak.com. We will need Arduino IDEto write arduino code for arduino nano. (I assume that you guys are in possession of PC/laptop and a wifi route with access to internet)

List of software requirements:

  1. Private channel on Thingspeak.com and
  2. Arduino IDE (Preferably latest version).

You can download latest version of Arduino IDE from arduino.cc.

Now lets create a private channel on thingspeak.com.

Step 5: Creating Private Channel on Thingspeak.com

To make a private channel on thingspeak.com follow these steps:

  1. Open your web browser and go to thingspeak.com and click on 'Sign Up' tab in right top corner, (Image no.1)
  2. Fill in the details and click on 'Create account', (Image no.2)
  3. Now click on 'New Channel' tab, (Image no.3)
  4. Again fill in details for channel and enable 4 fields (as we will be sending 4 sensor values), scroll down and click on 'Save Channel' tab, (Image no.4/5)
  5. On this page click on 'API Keys' tab and note down your 'Write API Key'.

That's all folks, now you have your private thingspeak channel.

Now lets put all electronics component together.

Step 6: Schematic for Personal Weather Station

Here I am attaching image of schematic for Personal Weather Station. I am also attaching fritzing file for the same. Connections are fairly simple.

  1. BMP180 connects to I2C port of arduino nano.
  2. LDR is connected in voltage divider fashion with 51 KOhm resistor and junction is connects to A1 pin of arduino nano.
  3. DHT11's data pin is pulled high with 4.7 KOhm resistor and connected to A0 pin of arduino nano.
  4. ESP8266's TX and RX connects to D10 and D11 of arduino nano respectively. ESP8266's CH_PD connects to 3.3V rail.
  5. Adjust LM2596 module's output to 3.3V by turning potentiometer on this module. Connect output of this module to Vcc and Gnd of BMP180,DHT11,LDR and ESP8266's Vcc and Gnd respectively.
  6. Input of LM2596 module comes from 12V-2A wall adapter which also connects to Vin and Gnd of Arduino nano.

We need to assemble this circuit on General Purpose Circuit board. Lets do that.

Step 7: Assembling Circuit on General Purpose Circuit Board (GCB)

Hardware tools and extra items from step 3 are now in business.

  1. Use female berg strip for Arduino nano and ESP8288's placement on GCB,
  2. Use solder iron and solder wire to connect them electrically to the board,
  3. Use female connectors to extend the reach of all sensors and LM2596 module as they will be stuck to the lid and wall of enclosure,
  4. Use male berg strip to make connecting points for female extensions made in 3,
  5. Realize circuit schematic on GCB using wires (strip them using wire stripper), or rail of melted solder wire and finally,
  6. Check for sorts before powering the circuit using a multimeter.

Now that all hardware is placed on GCB, let's look at the code.

Step 8: Code

Code for Personal Weather Station is fairly simple. I have commented code properly for ease of portability. Before you burn the code take care of following things.

  1. Make sure that all libraries are installed,
  2. Replace hyphens with SSID of your access point (wifi router) in line 14 of the code,
  3. Replace hyphens with PASSWORD of your wifi network in line 15 of the code,
  4. Replace hyphens with your thingspeak's private channel write API key in line 17 and
  5. While programming Arduino nano make sure that your 12V DC supply is OFF.

Here is the link to github (Personal Weather Station) for downloading code and libraries that I used.

Now that we have our hardware and software in place, only thing remaining is packaging.

Step 9: Enclosure Preperation

Now we need to make holes of various shape and size on the 4x4x2 inch box. We need to make holes for DC jack and switch on any preferred wall of enclosure. We also need to make holes for sensors on the lid of enclosure.

I have attached an image showing the dimensions of the holes that we need to make on the enclosure.

Use hot blade to cut through the plastic.

Use file to smooth the holes.

Now your enclosure is prepared to host your circuit.

Step 10: Closing the Lid

Put your assembled GCB inside the enclosure.

Place switch and DC jack in the holes on the wall; sensors on the holes of the lid. Finalize their position and use glue gun to fix them. Finally use screw driver to close the lid.

There you have it, your Personal Weather Station. Turn on the power supply and see your room's temperature, humidity, pressure and light intensity from any where in the world through your smartphone/PC/Laptop/Tablet on your thingspeak private channel.

Thats all for this instructable. Comment in case of any doubt. Thanks for reading.

<p>Hello, My build won't connect to the internet although I have loaded the correct SSID and password. The serial monitor reports</p><p>resetting esp8266</p><p>OK not found</p><p>connection closed</p><p>I would be grateful for any help!</p>
I am getting error exit status 1.<br>Pls help me. I have to submit my project on monday.
Pls help asap
Use firmware form https://github.com/jayraj4021/Personal-Weather-Station-14
How to connect.<br>How to program it?<br>Using aurdino ide?<br>Pls tell how to connect wifi module to computer?<br>
My esp8826 is not connecting to wifi.
<p>Arduino is excess. 8266 has enough power to pull the whole project and a lot more. For example look at the http://wifi-iot.com/?m=main</p>
<p>Thanks for the feedback.</p><p>I will definitely check out the link.</p>
<p>I have the same project and Instructables, but at a different site. Unfortunately, not in English language. I wanted to do the translation for Instructables, but did not have time :) If it is interesting - you can see it through a translator:</p><p><a href="https://translate.google.com/translate?hl=ru&sl=ru&tl=en&u=http%3A%2F%2Fmysku.ru%2Fblog%2Faliexpress%2F37928.html" rel="nofollow">https://translate.google.com/translate?hl=ru&amp;sl=ru...</a><br>I will be happy you think about the project (and - is it necessary to translate it here?)</p>
<p>Hey Naevus: I really like your version of the project, even reading it through google translate. There are parts that are perfectly clear and parts that are very, very funny (not your fault of course). I'm going to see what I can learn from your version. I agree that putting a Nano and an ESP together is overkill considering that the ESP is much more powerful. But maybe it made the project easier?</p>
<p>May be easier. But ESP8266 can be programmed via the Arduino IDE. Those. programming - no harder than Ardiono programming. IMHO.</p><p>ps Thank you for rating. Funny - that's exactly what I wanted :)</p>
<p>In your code, why is the call to setupEsp8266(); in the loop()? Shouldn't it be in the setup()? </p>
<p>Initially I kept setupEsp8266() in setup(), but I was facing datadrops for long time. </p><p>I tried a code in which I used to call setupEsp8266() in setup() and call it again when connection was not getting established in updateTemp(). still I had situation where esp8266 will get stuck and will not establish connection.</p><p>So I did this workaround thing of reseting it every time.</p><p>Following is the initial code-</p><p>#include &lt;SoftwareSerial.h&gt;</p><p>#include &lt;Wire.h&gt;</p><p>#include &lt;dht.h&gt;</p><p>#include &lt;Adafruit_BMP085.h&gt;</p><p>#define DEBUG 0</p><p>#define dht_pin A0 // defining pin A0 for DHT sensor</p><p>#define lightSensor A1 // defining pin A1 as input pin for LDR voltage divider</p><p>dht DHT;</p><p>Adafruit_BMP085 bmp;</p><p>SoftwareSerial esp8266Module(10, 11); // RX, TX</p><p>String network = &quot;Four&quot;; //your access point SSID</p><p>String password = &quot;nagarjuna*123&quot;; //your wifi Access Point password</p><p>#define IP &quot;; //IP address of thingspeak.com</p><p>String GET = &quot;GET /update?key=T34N8PMNGR7DL6BD&quot;; //replace with your channel key</p><p>int flag = 0; //just a monitoring variable</p><p>void setup()</p><p>{</p><p> if(DEBUG){</p><p> Serial.begin(9600); //Setting hardware serial baud rate to 9600</p><p> } </p><p> esp8266Module.begin(9600); //Setting softserial baud rate to 9600</p><p> if (!bmp.begin()) {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Could not find a valid BMP085 sensor, check wiring!&quot;);</p><p> }</p><p> while (1) {}</p><p> }</p><p> delay(2000);</p><p> while(flag == 0){</p><p> setupEsp8266(); //function to setup esp8266</p><p> } </p><p>}</p><p>void loop() </p><p>{</p><p> DHT.read11(dht_pin);</p><p> double humi = DHT.humidity;</p><p> double bmp_temp = bmp.readTemperature();</p><p> double bmp_pressure = bmp.readPressure();</p><p> int lightIntensity = analogRead(lightSensor);</p><p> updateTemp(String(bmp_temp) ,String(lightIntensity),String(bmp_pressure),String(humi));</p><p> delay(30000);</p><p>}</p><p>void setupEsp8266()</p><p>{</p><p> if(DEBUG){</p><p> Serial.println(&quot;Reseting esp8266&quot;);</p><p> }</p><p> esp8266Module.flush();</p><p> esp8266Module.println(F(&quot;AT+RST&quot;));</p><p> delay(7000);</p><p> if (esp8266Module.find(&quot;OK&quot;))</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Found OK&quot;);</p><p> Serial.println(&quot;Changing espmode&quot;);</p><p> } </p><p> flag = 1;</p><p> esp8266Module.flush();</p><p> changingMode();</p><p> delay(5000);</p><p> esp8266Module.flush();</p><p> connectToWiFi();</p><p> }</p><p> else</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;OK not found&quot;);</p><p> }</p><p> flag = 0;</p><p> }</p><p>}</p><p>void updateTemp(String voltage1,String voltage2,String voltage3,String voltage4)</p><p>{ </p><p> String cmd = &quot;AT+CIPSTART=\&quot;TCP\&quot;,\&quot;&quot;;</p><p> cmd += IP;</p><p> cmd += &quot;\&quot;,80&quot;;</p><p> esp8266Module.println(cmd);</p><p> delay(5000);</p><p> if(esp8266Module.find(&quot;Error&quot;)){</p><p> if(DEBUG){</p><p> Serial.println(&quot;ERROR while SENDING&quot;);</p><p> } </p><p> return;</p><p> }</p><p> cmd = GET + &quot;&amp;field1=&quot; + voltage1 + &quot;&amp;field2=&quot; + voltage2 + &quot;&amp;field3=&quot; + voltage3 + &quot;&amp;field4=&quot; + voltage4 + &quot;\r\n&quot;;</p><p> esp8266Module.print(&quot;AT+CIPSEND=&quot;);</p><p> esp8266Module.println(cmd.length());</p><p> delay(15000);</p><p> if(esp8266Module.find(&quot;&gt;&quot;))</p><p> {</p><p> esp8266Module.print(cmd);</p><p> if(DEBUG){</p><p> Serial.println(&quot;Data sent&quot;);</p><p> }</p><p> }else</p><p> {</p><p> esp8266Module.println(&quot;AT+CIPCLOSE&quot;);</p><p> if(DEBUG){</p><p> Serial.println(&quot;Connection closed&quot;);</p><p> } </p><p> flag = 0;</p><p> while(flag == 0)</p><p> {</p><p> setupEsp8266();</p><p> }</p><p> }</p><p>}</p><p>bool changingMode()</p><p>{</p><p> esp8266Module.println(F(&quot;AT+CWMODE=1&quot;));</p><p> if (esp8266Module.find(&quot;OK&quot;))</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Mode changed&quot;);</p><p> } </p><p> return true;</p><p> }</p><p> else if(esp8266Module.find(&quot;NO CHANGE&quot;)){</p><p> if(DEBUG){</p><p> Serial.println(&quot;Already in mode 1&quot;);</p><p> } </p><p> return true;</p><p> }</p><p> else</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Error while changing mode&quot;);</p><p> } </p><p> return false;</p><p> }</p><p>}</p><p>bool connectToWiFi()</p><p>{</p><p> if(DEBUG){</p><p> Serial.println(&quot;inside connectToWiFi&quot;);</p><p> } </p><p> String cmd = F(&quot;AT+CWJAP=\&quot;&quot;);</p><p> cmd += network;</p><p> cmd += F(&quot;\&quot;,\&quot;&quot;);</p><p> cmd += password;</p><p> cmd += F(&quot;\&quot;&quot;);</p><p> esp8266Module.println(cmd);</p><p> delay(15000);</p><p> if (esp8266Module.find(&quot;OK&quot;))</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Connected to Access Point&quot;);</p><p> } </p><p> return true;</p><p> }</p><p> else</p><p> {</p><p> if(DEBUG){</p><p> Serial.println(&quot;Could not connect to Access Point&quot;);</p><p> } </p><p> return false;</p><p> }</p><p>}</p>
<p>well done </p>
<p>I liked it. While the comments about component substitutions are good to see, this instructable is simple, straight-forward, and easy to follow. Good job.</p>
<p>only the LDR use analog input, so you can replace arduino+esp8266 with esp8266 only. ESP8266 has one analog input and some digital inputs. Use a Wemos D1 mini, for example. For less than 3$, you have usb power, 3.3V input/output pin, 5V input/output pin, 1 analog input, 9 digital pins </p>
<p>Great, I will definitely check out Wemos D1 mini.</p>
<p>Like a few of the other people that have commented, I too am wondering <br>about your choice of components. A different esp module such as the <br>esp-12 would have allowed you to eliminate the Arduino and similarly, a <br>Bosch BME280 sensor has pressure, temperature and humidity sensor all in<br> one very small package, that would have allowed you to eliminate the <br>DHT11. Why did you select the particular components that you did?</p>
<p>Thanks for the feedback, I appreciate that.</p><p>Regarding ESP8266, it gave me hard time to get it running. So once wifi connectivity was done I was ready to move forward with Arduino and not ESP8266. </p><p>Regarding BMP180, I was unaware of BME280. Thanks for the info.</p><p>Great feedback, I look forward to learn more about ESP8266 and improve the design.</p>
<p>excelente </p>
<p>love ur project. how about outdoor device? do you need different housing etc? thanx</p>
<p>We will need a battery or solar powered device; Housing is not water proof, need to take care of that too. </p>
<p>Nifty. <br></p>
Good job...

About This Instructable




More by victoryking:Raspberry Pi Vital Monitor Via OLED Never forget to turn off your GEYSER (auto turn off circuit) USB Powered Solder Fume Extractor 
Add instructable to: