ESP8266 NodeMCU Weather Station with Multiple Sensors and Battery Power
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This project integrates multiple sensors and modules with an ESP8266 NodeMCU to acquire data, store it on an SD card, display it on an OLED screen, and create a web server to show and graph all the collected data. The system also includes power management components to ensure reliable operation.
Component List
ESP8266 NodeMCU
- Description: A microcontroller with built-in WiFi capabilities.
- Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN
Adafruit BMP388
- Description: A barometric pressure sensor.
- Pins: VCC, 3.3V, GND, SCK/SCL, SDO/ADR, SDI/SDA, CS, INT
DHT22
- Description: A temperature and humidity sensor.
- Pins: VCC, OUT, GND
DS3231 RTC
- Description: A real-time clock module.
- Pins: 32K, SQW, SCL, SDA, VCC, GND
Adafruit TSL2591 High Dynamic Range Digital Light Sensor
- Description: A light sensor.
- Pins: VCC, 3.3V, GND, SCL, SDA, INT
0.96" OLED
- Description: A small OLED display.
- Pins: GND, VDD, SCK, SDA
Micro SD Card Module
- Description: A module for interfacing with an SD card.
- Pins: cs, sck, mosi, miso, vcc, gnd
Adafruit PCF8591
- Description: An analog-to-digital converter.
- Pins: VCC, GND, SCL, SDA, OSC, AOUT, AIN3, AIN2, AIN1, AIN0
Photocell (LDR)
- Description: A light-dependent resistor.
- Pins: pin 0, pin 1
YL-83 Rain Sensor - Control Board
- Description: A rain sensor control board.
- Pins: VCC, GND, DO, AO, POS, NEG
YL-83 Rain Sensor - Detection Board
- Description: A rain sensor detection board.
- Pins: POS, NEG
TP4056
- Description: A lithium battery charger module.
- Pins: OUT-, B-, B+, OUT+, IN-, IN+
PowerBoost 1000 Basic Pad Terminal
- Description: A power supply module to boost voltage to 5V.
- Pins: VBAT, GND, ENABLE, LBO, 5.0V
18650 in holder
- Description: A holder for a 18650 lithium-ion battery.
- Pins: GND, VCC
Resistors
- Description: Various resistors used in the circuit.
- Pins: pin1, pin2
- Properties:
- 10k Ohms
- 4.7k Ohms
- 330 Ohms
Zener Diodes
- Description: Zener diodes used for voltage regulation.
- Pins: cathode, anode
Wiring Details
ESP8266 NodeMCU
- D1 (SCL): Connected to SCL pins of RTC DS3231, Adafruit BMP388, Adafruit TSL2591, 0.96" OLED, and Adafruit PCF8591.
- D2 (SDA): Connected to SDA pins of RTC DS3231, Adafruit BMP388, Adafruit TSL2591, 0.96" OLED, and Adafruit PCF8591.
- D3: Connected to DO pin of YL-83 Rain Sensor - Control Board and pin1 of a 10k Ohm resistor.
- D4: Connected to OUT pin of DHT22 and pin2 of a 10k Ohm resistor.
- D5 (SCK): Connected to sck pin of Micro SD Card Module.
- D6: Connected to pin1 of a 4.7k Ohm resistor.
- D7 (MOSI): Connected to mosi pin of Micro SD Card Module.
- D8: Connected to cs pin of Micro SD Card Module.
- 3V3: Connected to VCC pins of DHT22, YL-83 Rain Sensor - Control Board, Adafruit BMP388, Adafruit TSL2591, and Adafruit PCF8591.
- GND: Connected to GND pins of DHT22, YL-83 Rain Sensor - Control Board, Adafruit BMP388, Adafruit TSL2591, Adafruit PCF8591, 0.96" OLED, Micro SD Card Module, and RTC DS3231.
- VIN: Connected to 5.0V pin of PowerBoost 1000 Basic Pad Terminal.
Adafruit BMP388
- 3.3V: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- SCK/SCL: Connected to D1 (SCL) pin of ESP8266 NodeMCU.
- SDI/SDA: Connected to D2 (SDA) pin of ESP8266 NodeMCU.
DHT22
- VCC: Connected to 3V3 pin of ESP8266 NodeMCU.
- OUT: Connected to D4 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
DS3231 RTC
- VCC: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- SCL: Connected to D1 (SCL) pin of ESP8266 NodeMCU.
- SDA: Connected to D2 (SDA) pin of ESP8266 NodeMCU.
Adafruit TSL2591 High Dynamic Range Digital Light Sensor
- 3.3V: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- SCL: Connected to D1 (SCL) pin of ESP8266 NodeMCU.
- SDA: Connected to D2 (SDA) pin of ESP8266 NodeMCU.
0.96" OLED
- VDD: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- SCK: Connected to D1 (SCL) pin of ESP8266 NodeMCU.
- SDA: Connected to D2 (SDA) pin of ESP8266 NodeMCU.
Micro SD Card Module
- vcc: Connected to 3V3 pin of ESP8266 NodeMCU.
- gnd: Connected to GND pin of ESP8266 NodeMCU.
- sck: Connected to D5 (SCK) pin of ESP8266 NodeMCU.
- mosi: Connected to D7 (MOSI) pin of ESP8266 NodeMCU.
- miso: Connected to a Zener Diode cathode.
- cs: Connected to D8 pin of ESP8266 NodeMCU.
Adafruit PCF8591
- VCC: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- SCL: Connected to D1 (SCL) pin of ESP8266 NodeMCU.
- SDA: Connected to D2 (SDA) pin of ESP8266 NodeMCU.
- AIN1: Connected to pin 0 of Photocell (LDR).
- AIN2: Connected to AOUT pin of Adafruit PCF8591.
- AIN3: Connected to AO pin of YL-83 Rain Sensor - Control Board.
Photocell (LDR)
- pin 0: Connected to AIN1 pin of Adafruit PCF8591.
- pin 1: Connected to pin1 of a 10k Ohm resistor.
YL-83 Rain Sensor - Control Board
- VCC: Connected to 3V3 pin of ESP8266 NodeMCU.
- GND: Connected to GND pin of ESP8266 NodeMCU.
- DO: Connected to D3 pin of ESP8266 NodeMCU.
- AO: Connected to AIN3 pin of Adafruit PCF8591.