# IOT micro weather station

**URL:** https://metastudio.org/t/iot-micro-weather-station/4640
**Category:** MakerSpace Chat
**Created:** [September 4, 2020, 10:16am UTC](https://metastudio.org/t/iot-micro-weather-station/4640 "2020-09-04T10:16:25Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 4, 2020, 10:16am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/1 "2020-09-04T10:16:25Z")

</div>

The system purpose is solution for weather monitoring that uses IoT to make its real time data easily accessible over a very wide range.

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 4, 2020, 11:55am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/2 "2020-09-04T11:55:55Z")

</div>

**Monitor Humidity and Temperature** using **DHT11 Sensor Module**

 ![WhatsApp Image 2020-09-04 at 4.41.34 AM](https://metastudio.org/uploads/default/original/2X/1/12802c148892665108aabc962638ece89a91b064.jpeg)

**Serial monitor output**

 ![WhatsApp Image 2020-09-04 at 4.41.36 AM](https://metastudio.org/uploads/default/original/2X/3/3e996b91242087de8171c547151afb6f6ba05818.jpeg)

---

<div class="post-metadata">

### Author: ![jtd](https://metastudio.org/user_avatar/metastudio.org/jtd/32/244_2.png) [@jtd](https://metastudio.org/u/jtd)
#### Post date: [September 5, 2020, 3:14pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/3 "2020-09-05T15:14:23Z")

</div>

There is no arduino?  
Will you require the laptop or PC to send the data to the internet?

---

<div class="post-metadata">

### Author: ![karnamdpdurga](https://metastudio.org/user_avatar/metastudio.org/karnamdpdurga/32/2079_2.png) [@karnamdpdurga](https://metastudio.org/u/karnamdpdurga)
#### Post date: [September 5, 2020, 4:26pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/4 "2020-09-05T16:26:01Z")

</div>

Looks like he used an ESP module or is it Node MCU? कौन सा है @Farhan

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 5, 2020, 5:01pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/5 "2020-09-05T17:01:16Z")

</div>

ya there is no arduino right now but I use it later with ESP-01(wifi module), right now I am using **Node MCU** only for testing purpose , sending data through WIFI module(Node MCU) .

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 5, 2020, 5:06pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/6 "2020-09-05T17:06:21Z")

</div>

Sir I use Node MCU becouse it has already ESP8266 module.

---

<div class="post-metadata">

### Author: ![karnamdpdurga](https://metastudio.org/user_avatar/metastudio.org/karnamdpdurga/32/2079_2.png) [@karnamdpdurga](https://metastudio.org/u/karnamdpdurga)
#### Post date: [September 5, 2020, 5:08pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/7 "2020-09-05T17:08:46Z")

</div>

Cool! So, what are you planning to do further, @Farhan?  
Looks like आप आराम से temperature और humdity measure कर रहे हो!

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 6, 2020, 6:40am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/8 "2020-09-06T06:40:11Z")

</div>

My further plan is-  
Arduino UNO+ ESP-01 ko interface kr k Server(ThingsBoard) pay data send kr na hai. or Rain Gauge bana reha hu

 ![WhatsApp Image 2020-09-02 at 11.58.04 AM](https://metastudio.org/uploads/default/original/2X/6/65731277eafc066bb715f2143d4b2bf11fc9450a.jpeg)

---

<div class="post-metadata">

### Author: ![drishtantmkawale](https://metastudio.org/user_avatar/metastudio.org/drishtantmkawale/32/7841_2.png) [@drishtantmkawale](https://metastudio.org/u/drishtantmkawale)
#### Post date: [September 6, 2020, 3:07pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/9 "2020-09-06T15:07:14Z")

</div>

This looks cool!  
The object or the instrument (maybe) that is swinging in the video, what is it?  
@Farhan

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 7, 2020, 6:01am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/10 "2020-09-07T06:01:20Z")

</div>

> **[Rain gauge](https://en.wikipedia.org/wiki/Rain_gauge)**
>
> A rain gauge (also known as udometer, pluvia metior, pluviometer, ombrometer, and hyetometer) is an instrument used by meteorologists and hydrologists to gather and measure the amount of liquid precipitation over a predefined area, over a period of time. It is used to determine the depth of precipitation (usually in mm) that occurs over a unit area and measure rainfall amount.
> The first known rainfall records were kept by the Ancient Greeks, at around 500 BCE.\[citation needed\]
> People living in ...

Please check **[color=#]Tipping bucket rain gauge working principle[/color]**

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 7, 2020, 6:51am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/11 "2020-09-07T06:51:58Z")

</div>

[https://www.allaboutcircuits.com/projects/build-a-wireless-tipping-bucket-rain-gauge-part-1assembling-the-base/](https://www.allaboutcircuits.com/projects/build-a-wireless-tipping-bucket-rain-gauge-part-1assembling-the-base/)

---

<div class="post-metadata">

### Author: ![karnamdpdurga](https://metastudio.org/user_avatar/metastudio.org/karnamdpdurga/32/2079_2.png) [@karnamdpdurga](https://metastudio.org/u/karnamdpdurga)
#### Post date: [September 10, 2020, 1:56pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/12 "2020-09-10T13:56:12Z")

</div>

So, you can now sense temperature, humidity and rainfall! What else are you planning besides these, @Farhan?

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [September 23, 2020, 2:46pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/13 "2020-09-23T14:46:41Z")

</div>

I’m using Arduino UNO and ESP-01 and sending data to **ThingsBoard** server when I had this problem,

**[WiFiEsp] Data packet send error (2)**  
**[WiFiEsp] Failed to write to socket 3**  
**[WiFiEsp] Disconnecting 3**

 ![WhatsApp Image 2020-09-23 at 5.38.53 PM](https://metastudio.org/uploads/default/original/2X/d/dd6da90e98d6ab85793ef64c6419e84d5464c66b.jpeg)

**Code**

```auto
#include "DHT.h"
#include <WiFiEspClient.h>
#include <WiFiEsp.h>
#include <WiFiEspUdp.h>
#include "SoftwareSerial.h"
#include <ThingsBoard.h>

#define WIFI_AP "YOUR_WIFI_AP"
#define WIFI_PASSWORD "YOUR_WIFI_PASSWORD"

#define TOKEN "YOUR_ACCESS_TOKEN"

// DHT
#define DHTPIN 4
#define DHTTYPE DHT22

char thingsboardServer[] = "YOUR_THINGSBOARD_HOST_OR_IP";

// Initialize the Ethernet client object
WiFiEspClient espClient;

// Initialize DHT sensor.
DHT dht(DHTPIN, DHTTYPE);

ThingsBoard tb(espClient);

SoftwareSerial soft(2, 3); // RX, TX

int status = WL_IDLE_STATUS;
unsigned long lastSend;

void setup() {
  // initialize serial for debugging
  Serial.begin(9600);
  dht.begin();
  InitWiFi();
  lastSend = 0;
}

void loop() {
  status = WiFi.status();
  if ( status != WL_CONNECTED) {
    while ( status != WL_CONNECTED) {
      Serial.print("Attempting to connect to WPA SSID: ");
      Serial.println(WIFI_AP);
      // Connect to WPA/WPA2 network
      status = WiFi.begin(WIFI_AP, WIFI_PASSWORD);
      delay(500);
    }
    Serial.println("Connected to AP");
  }

  if ( !tb.connected() ) {
    reconnect();
  }

  if ( millis() - lastSend > 1000 ) { // Update and send only after 1 seconds
    getAndSendTemperatureAndHumidityData();
    lastSend = millis();
  }

  tb.loop();
}

void getAndSendTemperatureAndHumidityData()
{
  Serial.println("Collecting temperature data.");

  // Reading temperature or humidity takes about 250 milliseconds!
  float humidity = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float temperature = dht.readTemperature();

  // Check if any reads failed and exit early (to try again).
  if (isnan(humidity) || isnan(temperature)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Serial.println("Sending data to ThingsBoard:");
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print(" %\t");
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" *C ");

  tb.sendTelemetryFloat("temperature", temperature);
  tb.sendTelemetryFloat("humidity", humidity);
}

void InitWiFi()
{
  // initialize serial for ESP module
  soft.begin(9600);
  // initialize ESP module
  WiFi.init(&soft);
  // check for the presence of the shield
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue
    while (true);
  }

  Serial.println("Connecting to AP ...");
  // attempt to connect to WiFi network
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to WPA SSID: ");
    Serial.println(WIFI_AP);
    // Connect to WPA/WPA2 network
    status = WiFi.begin(WIFI_AP, WIFI_PASSWORD);
    delay(500);
  }
  Serial.println("Connected to AP");
}

void reconnect() {
  // Loop until we're reconnected
  while (!tb.connected()) {
    Serial.print("Connecting to ThingsBoard node ...");
    // Attempt to connect (clientId, username, password)
    if ( tb.connect(thingsboardServer, TOKEN) ) {
      Serial.println( "[DONE]" );
    } else {
      Serial.print( "[FAILED]" );
      Serial.println( " : retrying in 5 seconds" );
      // Wait 5 seconds before retrying
      delay( 5000 );
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [October 5, 2020, 2:57pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/14 "2020-10-05T14:57:49Z")

</div>

There was a memory problem using the ESP-01 and the Arduino, so I am using the ESP-32,

Today(5 oct) we @karnamdpdurga @ravi312 discussed the following topics:

1. Discussion of schematic imported in KiCAD  

2. Footprints assignment of various components of weather station on ESP 32  

3. Rendering 3D view in KiCAD  

4.PCB

 ![WhatsApp Image 2020-10-05 at 8.12.04 PM](https://metastudio.org/uploads/default/original/2X/e/e33dde23fe16bd60071b3809ff5740a6f489f9a9.jpeg)

---

<div class="post-metadata">

### Author: ![Anool](https://metastudio.org/user_avatar/metastudio.org/anool/32/5837_2.png) [@Anool](https://metastudio.org/u/Anool)
#### Post date: [October 5, 2020, 3:29pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/15 "2020-10-05T15:29:11Z")

</div>

Missed joining today, but if you need any help with the hardware / KiCad, let me know.

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [October 6, 2020, 7:50pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/16 "2020-10-06T19:50:04Z")

</div>

Thank you Sir,  
Now everything is going well, if there is any problem then I will definitely ask you @Anool Sir

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [October 10, 2020, 8:34am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/17 "2020-10-10T08:34:56Z")

</div>

_ **PCB** _ designs in **_3D_ _view_** with KiCad’s.  
@Anool @karnamdpdurga @Ashish_Pardeshi @jtd

 ![esp32](https://metastudio.org/uploads/default/original/2X/0/047cef0125fa2da65c30016bc92bbb92aa0a2cb2.png)

 ![esp32-1](https://metastudio.org/uploads/default/original/2X/3/3f8ec46f94ae007757ff899237c9e32433d08dcd.png)

 ![esp32-2](https://metastudio.org/uploads/default/original/2X/c/cedabe963a8ca2910876eef828a32e8b27bbb966.png)

---

<div class="post-metadata">

### Author: ![jtd](https://metastudio.org/user_avatar/metastudio.org/jtd/32/244_2.png) [@jtd](https://metastudio.org/u/jtd)
#### Post date: [October 10, 2020, 11:34am UTC](https://metastudio.org/t/iot-micro-weather-station/4640/18 "2020-10-10T11:34:23Z")

</div>

Nice. Now try and create a footprint, a skill needed very often.

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [October 23, 2020, 7:21pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/19 "2020-10-23T19:21:09Z")

</div>

![WhatsApp Image 2020-10-22 at 2.09.58 PM](https://metastudio.org/uploads/default/original/2X/b/b31a70b38ccb459ae895bf10329035063c8786ff.jpeg)

**light intensity**

 ![l i](https://metastudio.org/uploads/default/original/2X/8/8f456ee86f5dc4fa175240eb2eaa052f5e7f3c7c.jpeg)

 ![l gr](https://metastudio.org/uploads/default/original/2X/4/462d4850244c470cb3a8934278af2ea45ae3de27.jpeg)

**Humidity leavel**

 ![h,i](https://metastudio.org/uploads/default/original/2X/3/348251baec7a7c96820866bfec6711ca27b5e801.jpeg)

 ![h gr](https://metastudio.org/uploads/default/original/2X/e/e68a3389b83c80268c2269dd8a0a7cab2e3584a3.jpeg)

**Temperature**

 ![te gr](https://metastudio.org/uploads/default/original/2X/8/8ccfd6995bfb15b537b4fcfeb5ba81ad642f2a55.jpeg)

 ![t,h,l,lo,gr](https://metastudio.org/uploads/default/original/2X/4/4540c9cdf005e34de7a60c11f8a70bc2cb5dea4d.jpeg)

**Wind Direction compass**

 ![wd](https://metastudio.org/uploads/default/original/2X/b/bc1b4fa4b44503df9e63a3dd8be3f344c8f21824.jpeg)

**wind speed**

 ![ws i](https://metastudio.org/uploads/default/original/2X/c/ca1b47f50963f21c3368f14d2addf962a97e344e.jpeg)

 ![ws gr](https://metastudio.org/uploads/default/original/2X/8/84d70dba0ff612a87b9bc16e0e7f264f3ca0bae5.jpeg)

 ![ws,rf,lo, gr](https://metastudio.org/uploads/default/original/2X/3/357437586b857f55426be6afcace011bea673cdf.jpeg)

---

<div class="post-metadata">

### Author: ![Farhan](https://metastudio.org/user_avatar/metastudio.org/farhan/32/5686_2.png) [@Farhan](https://metastudio.org/u/Farhan)
#### Post date: [October 23, 2020, 7:40pm UTC](https://metastudio.org/t/iot-micro-weather-station/4640/20 "2020-10-23T19:40:16Z")

</div>

Today I completed the Weather Station Project.  
@jtd@Anool @Ashish_Pardeshi @karnamdpdurga @GN@ravi312  
Thank you so much sir for helping me.

[Next page](https://metastudio.org/t/iot-micro-weather-station/4640.md?page=2)
