Wireless Weather Monitoring: Arduino NRF-Based System

Greetings Tech Enthusiasts! We’re excited to introduce our latest project designed to assist in various settings like homes, offices, and more. Presenting our weather monitoring system employing Arduino as the primary controller for executing instructions. This system effectively tracks surrounding temperature and humidity levels.

Utilizing an NRF transceiver, our weather monitoring station facilitates the transmission and reception of data. This Arduino-based weather station proves particularly useful for monitoring temperature in remote areas that might be inaccessible or challenging to stay in. For instance, imagine monitoring temperature and humidity on a mountain; this system can be incredibly beneficial in such scenarios.

Introduction

The weather monitoring system employing Arduino represents a straightforward Arduino project, facilitating temperature and humidity monitoring through a single sensor. The DHT11 sensor, chosen for its capacity to measure temperature and humidity, is utilized in this setup. Additionally, an Arduino Uno aids in computation and presentation of the gathered information on the display.

Inside the DHT11 sensor reside components dedicated to temperature and humidity detection. The project comprises two distinct systems: a transmitter and a receiver, each equipped with NRF modules for communication.

The NRF module offers robust data transmission capabilities, hence its selection for communication purposes in this setup. In the transmitter section, the DHT11 sensor provides output to the transmitter microcontroller, which in turn transmits this information via the transmitter NRF to the receiver. Subsequently, the receiver NRF receives the identical information and relays it to the Arduino microcontroller situated at the receiver’s end. Finally, the Arduino within the weather station exhibits this information on the display for viewing.

Construction of weather monitoring system

Components required

Utilize the following components for this project:
– Arduino Uno
– DHT11 Sensor
– NRF Module
– 16×2 LCD Display
– Jumper Wires

To assemble the Transmitter setup, interconnect the DHT11 sensor and NRF module with the Arduino as outlined in the circuit diagram. Subsequently, upload the code onto the same Arduino.

For the Receiver configuration, link the LCD and NRF module to the Arduino following the provided weather monitoring circuit diagram. Then, proceed to upload the code into the Arduino designated for the receiver setup.

Weather monitoring station circuit diagram

Weather monitoring station Arduino Code

Transmitter Code

#include “DHT.h”
#include
#include “RF24.h”
#include

#define DHTPIN 2
#define DHTTYPE DHT11

RF24 radio (9, 10); // CE, CSN
const byte address[6] = “00001”;
//const int led_pin = 13;

struct package
{
float temperature ;
float humidity ;
};

typedef struct package Package;
Package data;

DHT dht(DHTPIN, DHTTYPE);

void setup()
{
Serial.begin(9600);
// pinMode(led_pin, OUTPUT);
dht.begin();
radio.begin(); //Starting the Wireless communication
radio.openWritingPipe(address); //Setting the address where we will send the data
radio.setPALevel(RF24_PA_MIN); //You can set it as minimum or maximum depending on the distance between the transmitter and receiver.
radio.stopListening();
}

void loop()
{
// digitalWrite(led_pin, HIGH); // Flash a light to show transmitting
readSensor();
Serial.print(“HUmidity “);
Serial.print(data.humidity);
Serial.print(” Temperature “);
Serial.println(data.temperature);
radio.write(&data, sizeof(data));
// digitalWrite(led_pin, LOW);
delay(1000);
}

void readSensor()
{
data.humidity = dht.readHumidity();
data.temperature = dht.readTemperature();
}

Receiver code

#include
#include
#include
RF24 radio(9, 10); // CE, CSN
const byte address[6] = “00001”;
struct package
{
float temperature ;
float humidity ;
};

typedef struct package Package;
Package data;

void setup() {
Serial.begin(9600);
radio.begin();
radio.openReadingPipe(0, address);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();
}
void loop() {
if (radio.available()) {
// char text[32] = “”;
radio.read(&data, sizeof(data));
Serial.print(“Humidity “);
Serial.print(data.humidity);
Serial.print(” Temperature “);
Serial.println(data.temperature);

}

}

Weather monitoring station working

The weather monitoring system’s DHT11 sensor is designed to measure temperature and humidity using its built-in sensors. This sensor system consists of two sensors, one dedicated to temperature measurement and the other solely focused on humidity. An integrated circuit (IC) within the DHT11 operates by multiplexing the data, establishing a connection between the sensor and the Arduino to relay this information.

Upon receiving the data, the Arduino executes specific actions based on the provided code and the sensor library. To ensure accurate functioning, the Arduino calibrates the sensor using the uploaded code. This process is crucial in the creation of an IoT-based weather station.

Once the Arduino differentiates between the two distinct values, it transmits this information to the NRF module in the transmitter via the SPI protocol. The SPI protocol involves utilizing the MOSI, MISO, SCK, and RST pins of both the Arduino and the NRF module. Creating an Arduino weather station demands attention to these intricate details, but following the provided information allows for its construction.

Furthermore, the NRF module on the transmitting end establishes a connection with the NRF module on the receiving end using specific addresses programmed into both NRF modules for seamless communication between them.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top