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.
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:
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:
List of Extra items:
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:
- Private channel on Thingspeak.com and
- 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:
- Open your web browser and go to thingspeak.com and click on 'Sign Up' tab in right top corner, (Image no.1)
- Fill in the details and click on 'Create account', (Image no.2)
- Now click on 'New Channel' tab, (Image no.3)
- 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)
- 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.
- BMP180 connects to I2C port of arduino nano.
- LDR is connected in voltage divider fashion with 51 KOhm resistor and junction is connects to A1 pin of arduino nano.
- DHT11's data pin is pulled high with 4.7 KOhm resistor and connected to A0 pin of arduino nano.
- ESP8266's TX and RX connects to D10 and D11 of arduino nano respectively. ESP8266's CH_PD connects to 3.3V rail.
- 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.
- 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.
- Use female berg strip for Arduino nano and ESP8288's placement on GCB,
- Use solder iron and solder wire to connect them electrically to the board,
- 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,
- Use male berg strip to make connecting points for female extensions made in 3,
- Realize circuit schematic on GCB using wires (strip them using wire stripper), or rail of melted solder wire and finally,
- 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.
- Make sure that all libraries are installed,
- Replace hyphens with SSID of your access point (wifi router) in line 14 of the code,
- Replace hyphens with PASSWORD of your wifi network in line 15 of the code,
- Replace hyphens with your thingspeak's private channel write API key in line 17 and
- 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.