Wikipedia

Search results

Navigate

Saturday, April 4, 2020

ThingSpeak Arduino Weather Station

THINGSPEAK ARDUINO WEATHER STATION

Dipping your feet in IoT





Dipping your feet in IoT can be challenging as a beginner, not knowing where to start from the vast options available. God Bless Thingspeak . This blog will walk you through your first Thingspeak IoT project which is : 
a) Cheap and accessible 
b) Easy to understand 
c) RAD COOL .


The project - A temperature and humidity sensor beaming data to the Thingspeak Cloud using an Arduino and a ESP - 01 wifi module.


Things you'll need 


1. Arduino UNO
2. ESP - 01
                     
                                

3.DHT-11 sensor

                                                   

4.Breadboard
Breadboard Power Supply

5. Connecting Wires.

NOTE - Now you could use your arduino to power the sensor and the wifi module but a external source like a Breadboard Power Supply module will be better because the peak current demands of the wifi module in operation cannot be met by the board.          I've tried trust me


Alrighty let's dive right in . 





CONNECTIONS




 ESP -01

1. VCC - 3.3V
2. GND - GND 
3. CH_PD - 3.3V
4. RESET - 3.3V
5. TX -  2 ( Arduino)
6. RX -  3 (Arduino)


DHT - 11 

1. VCC - 5V
2. OUT - A0
3. GND - GND

Don't forget to set the jumper to 3.3V on the Breadboard Power Supply.

Now power on everything and if nothing burns or smokes out , so far so good.





SETTING UP  THINGSPEAK

Go to the thingspeak home page.

 

Sign up and create a New Channel with two fields Temperature and Humidity. 

On creating a new channel, you'll get something called the API Keys.


We'll use these later down the line.


SETTING UP THE ARDUINO IDE

Now this step is key to getting the code running. LIBRARIES. 
You'll use two in the code and a third to use the ones in the code.

 Highlighted in the red box.

SoftwareSerial.h is an inbuilt library so no problems there.

1.  The libraries you need to install on your own are the Adafruit Unified Sensor Library and the DHT sensor library  .                     

Download links 
Adafruit Unified Sensor Library- https://github.com/adafruit/Adafruit_Sensor

2.  Download both and add them using the Add.ZIP Library feature in the IDE.




Homestretch

The code is here - https://github.com/imalwaysontheinternet/Weather-Stasion

Or just copy the code from below and paste it in your sketch.


There are few things to do in the code before you upload it.

1. Paste your Write API key here

2. Enter your Wifi SSID and Password here.

Upload the code. If all was done correctly , your Thingspeak Channel should look like this.




Note there's an interval of 15 seconds between updates to the graphs.
If it still doesn't work write your problems in the comments below we're always happy to help.




4 comments:

  1. Success! This is absolutely brilliant, the clearest instructions I've found yet.
    Thank you very much.

    ReplyDelete
  2. Hi, I have followed all the given instructions and checked the ssid and password, still it gives "trying to reconnect" on the serial monitor. The wifi module esp -01 is not connecting. Please help me with this issue

    ReplyDelete
    Replies
    1. Hi OP here. Try again. Slowly this time

      Delete

WPL - C24 ft.Arduino Build