Introduction
Weather matters to all of us; good weather changes our moods, mind, and feelings. However, sometimes unexpected weather ruins our plan. It’s either a trip with our friends or a party with relatives if the weather is not better; it can spoil everything. And, therefore it is necessary to predict the weather, but for this, we need weather stations. So, here in this article, we will discuss How to make Weather Station using Attiny85 & SSD1306 OLED.
The weather station is basically the device used for weather observation and data collection. First and foremost, it gathers the most crucial information: temperature, atmospheric pressure, humidity, and so on. Here we are making a basic weather station with a DHT22.

PCBWay offers high-quality PCB prototyping and assembly at an affordable price, starting at just $5 for 5 PCBs. With fast turnaround, great customer support, and easy online ordering, it’s a top choice for hobbyists and professionals alike.
Hardware Components
The following components are required to make Mini Weather Station Circuit
S.no | Component | Value | Qty |
---|---|---|---|
1. | Attiny85 | – | 1 |
2. | OLED Display Module | SSD1306 | 1 |
3. | Temp. & Humidity Sensor | DHT22 | 1 |
4. | PCB | – | 1 |
5. | SMD Resistor | 10k, 10k, 220 | 1, 1, 1 |
6. | SMD Switch | – | 2 |
7. | Power Supply | 3-5V | 1 |
8. | Jumper wires | – | – |
DHT22 Pinout

For a detailed description of pinout, dimension features, and specifications download the datasheet of DHT22
Mini Weather Station Circuit

Connection Table
DHT22 | OLED Display | ATtiny85 |
VCC | Vcc | Vcc |
GND | GND | GND |
DAT | – | PB3 |
– | – | PB0 |
– | SCL | PB4 |
– | SDA | PB1 |
– | RES | Vcc |
– | DC | GND |
– | CS | PB3 |
Code
// Circuits DIY
// For Complete Details Visit -> https://circuits-diy.com
#include "SSD1306_minimal.h"
#include <avr/pgmspace.h>
#define DEG "\xa7" "C"
SSD1306_Mini oled; // Declare the OLED object
void splash() {
oled.startScreen();
oled.clear(); // Clears the display
oled.cursorTo(0, 0); // x:0, y:0
oled.printString(" WEATHER STATION ");
oled.cursorTo(0, 10); // x:0, y:23
oled.printString("Temperature");
oled.cursorTo(0, 20); // x:0, y:23
oled.printString("Humidity");
oled.cursorTo(0, 30); // x:0, y:23
oled.printString("PCBWay.com");
}
void setup() {
oled.init(0x3C); // Initializes the display to the specified address
oled.clear(); // Clears the display
delay(1000); // Delay for 1 second
splash(); // Write something to the display (refer to the splash() method
}
void loop() {
}
Working Explanation
The working of this mini weather station is a simple DHT22 sensor sending data to the ATtiny85 microcontroller at D2 Digital Pin. ATtiny85 displays the received data using I2C communication on OLED Display.
Applications and Uses
Agriculture
Farms, and indeed agriculture on any scale, rely on weather data to direct many parts of their operations, such as the Irrigation of crops To help with planting decisions, keep an eye on the growing circumstances. Thus, this can help in agriculture.
Outdoor Sports
Many sports and leisure activities rely on the weather. Modern weather stations, with their capacity to automatically upload live weather data to a display, allow players to examine actual weather conditions before deciding to start.
Weather Enthusiast
Information for anyone interested in keeping a close eye on the weather, whether