Mini Arduino Weather Station
by Technoesolution2020 in Circuits > Arduino
1163 Views, 6 Favorites, 0 Comments
Mini Arduino Weather Station
Hello guy's welcome back to "Techno-E-Solution" in this article I'll show you how to make a Mini Weather Station Using Arduino nano & DHT 11 temperature sensor, To display the value of temperature I used OLED Display. We use DHT 11 temperature sensor because it measures the environmental temperature as well as it measures the surrounding humidity. This sensor measures humidity means the water drops in the air, usually, there are two electrodes in the DHT11 sensor which measure the electrical resistance between the two electrodes, so we use Arduino to read the DHT11 sensor value & then the Arduino converts this value & print the temperature on the DIsplay. So without wasting any time let's make it...
Follow me on:-
| YOUTUBE | INSTAGRAM | FACEBOOK | INSTRUCTABLES | DAILYMOTION | HACKSTER |
If you like this project subscribe to us on Youtube, So without wasting time Let's get started..............
MATERIAL REQUIRED
To make this project we need some components (Best Buy Links are Provided):-
[ Above link are affiliated if you buy from the above link, We got some bonus from it. ]
CIRCUIT DIAGRAM
Follow the Above circuit diagram to make the connection:-
Arduino >> OLED Display
5V - VCC
GND - GND
A4 - SDA
A5 - SCL
Arduino >> DHT11 Sensor
5V - (+ve) Pin
GND - (-ve) Pin
D3 - Out Pin
ARDUINO CODE
Copy the following code & Upload it to the Arduino.
I provide the Arduino Code file at bottom of the following Code.
/* * Hello friends Welcome To Techno-E-Solution * Here is the code for Mini Whether Station Using Arduino * Upload the following code to your Arduino * Subscribe to Our Youtube Chaneel :- https://www.youtube.com/channel/UC_5HS4mSYyrLXwtX... */ #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <DHT.h> #include <Adafruit_Sensor.h> #include <Fonts/FreeSans9pt7b.h> #include <Fonts/FreeSansBold9pt7b.h> #define dataPin 3 #define DHTTYPE DHT11 DHT dht(dataPin, DHTTYPE); #define SCREEN_WIDTH 128 // OLED display width, in pixels #define SCREEN_HEIGHT 64 // OLED display height, in pixels #define OLED_RESET 5 Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET); #define LOGO_HEIGHT 64 #define LOGO_WIDTH 128 const unsigned char myBitmap [] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x3f, 0x9f, 0xe7, 0x1c, 0xe7, 0x1c, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x7b, 0xdf, 0xe7, 0x1c, 0xe7, 0x9c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x73, 0xdc, 0x77, 0x1c, 0xe7, 0xdc, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x7f, 0x9c, 0x77, 0x1c, 0xe7, 0xfd, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xee, 0x7f, 0x1c, 0x77, 0x1c, 0xe7, 0x7d, 0xc3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x73, 0x9c, 0xf3, 0x9c, 0xe7, 0x3c, 0xe3, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xef, 0x73, 0xdf, 0xe3, 0xfc, 0xe7, 0x3c, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x83, 0x31, 0xcf, 0x81, 0xf0, 0xe7, 0x1c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x73, 0xbf, 0x87, 0x9f, 0xf7, 0x1c, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0xf3, 0x3f, 0x87, 0x9f, 0xf7, 0x1c, 0xfe, 0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x0e, 0xf7, 0x30, 0x0f, 0x83, 0x87, 0x1c, 0xe0, 0x73, 0x80, 0x07, 0x38, 0x00, 0x00, 0x0f, 0xc0, 0x06, 0xff, 0x3f, 0x8d, 0xc3, 0x87, 0xfc, 0xfe, 0x7f, 0x80, 0x03, 0xf0, 0x00, 0x01, 0xc7, 0x8e, 0x07, 0xfe, 0x3f, 0x9d, 0xc3, 0x87, 0xfc, 0xfe, 0x7f, 0x00, 0x01, 0xe3, 0x80, 0x01, 0xc7, 0x8e, 0x07, 0xde, 0x30, 0x1f, 0xe3, 0x87, 0x1c, 0xc0, 0x77, 0x03, 0xf9, 0xe7, 0x80, 0x00, 0x0f, 0xc0, 0x07, 0x9e, 0x3f, 0xbf, 0xe3, 0x87, 0x1c, 0xfe, 0x73, 0x80, 0x03, 0xf0, 0x00, 0x00, 0x1c, 0xe0, 0x03, 0x8e, 0x3f, 0xb8, 0x63, 0x87, 0x1c, 0xfe, 0x73, 0xc0, 0x07, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xbf, 0xe7, 0x8f, 0xf3, 0x8f, 0xc7, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x9f, 0xe7, 0xcf, 0xf3, 0x9c, 0xe7, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x07, 0xc1, 0xc3, 0xb8, 0x77, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x87, 0x0e, 0xe1, 0xc3, 0xb8, 0x77, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc7, 0x0e, 0xe1, 0xc3, 0xb8, 0x77, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0xc7, 0x1f, 0xe1, 0xc3, 0x9c, 0xe7, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x87, 0x1c, 0x71, 0xc3, 0x9f, 0xe7, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x03, 0x18, 0x31, 0x83, 0x07, 0x83, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; void setup() { Serial.begin(9600); dht.begin(); // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { // IF YOU GOT ERROR ON THIS LINE JUST CHAGE ( Address 0x3C To 0x3D for 128x64 ) Serial.println(F("SSD1306 allocation failed")); for(;;); } testdrawbitmap(); delay(1000); } void loop() { float h = dht.readHumidity(); // read humidity float t = dht.readTemperature(); // read temperature float hic = dht.computeHeatIndex(t, h, false); // compute head index for temp in °C // Printing the results on the serial monitor Serial.print("Temperature = "); Serial.print(t); Serial.print(" *C "); Serial.print(" Humidity = "); Serial.print(h); Serial.println(" % "); display.clearDisplay(); display.setTextSize(1); // Draw 2X-scale text display.setTextColor(WHITE); display.setFont(&FreeSansBold9pt7b); display.setCursor(0,13); display.print(F("Temp: ")); display.setFont(&FreeSans9pt7b); display.drawCircle(105, 2, 2, WHITE); display.print(t); display.println(F(" C")); display.setFont(&FreeSansBold9pt7b); display.print(F("Humid: ")); display.setFont(&FreeSans9pt7b); display.print(h); display.println(F("%")); display.setFont(&FreeSansBold9pt7b); display.print(F("Feels: ")); display.setFont(&FreeSans9pt7b); display.print(hic); display.println(F(" C")); display.drawCircle(103, 45, 2, WHITE); display.display(); delay(2000); // Delays 2 secods, as the DHT22 sampling rate is 0.5Hz } void testdrawbitmap(void) { display.clearDisplay(); display.drawBitmap( (display.width() - LOGO_WIDTH ) / 2, (display.height() - LOGO_HEIGHT) / 2, myBitmap, LOGO_WIDTH, LOGO_HEIGHT, 1); display.display(); delay(2000); }
Downloads
PROJECT SETUP
I built this circuit on a breadboard.
NEXT PCB
If you want a Printed circuit board go through the NEXTPCB
Gerber File of the PCB :- Click To Download
NextPCB is a high-quality PCB Manufacturer. With professional PCB manufacturing capabilities, our PCB engineers with more than 10 years of experience will double-check your engineering files.
NextPCB is certified by IATF16949, ISO9001, ISO14001, UL, CQC, RoHS and REACH; more importantly, we handle the whole process including the PCB prototype, PCB manufacturing, PCB assembly, testing, and final shipment. We are capable of assembling BGA, Micro-BGA, QFN, and other leadless package parts. We also have an online parts shop, you can choose any parts you need.
DEMO & TESTING
Here is the detailed video on a project, We hope this video will be helpful to you. If you got this video helpful subscribe to our youtube channel.