Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Nano Weather Station with AHT10 Sensor and Wi-Fi Connectivity

View and Edit Project In Cirkit DesignerImage of Arduino Nano Weather Station with AHT10 Sensor and Wi-Fi Connectivity

Circuit Documentation

Summary

This circuit is designed to interface an Arduino Nano with an AHT10 temperature and humidity sensor, an ESP8266-01 WiFi module, and a Serial Enabled 16x2 LCD. The Arduino Nano reads temperature and humidity data from the AHT10 sensor, displays it on the LCD, and sends it over WiFi using the ESP8266-01 module. The circuit is powered by a Step Down Module and a Mini 360 Buck Converter.

Component List

  1. Mini 360 Buck Converter

    • Description: A DC-DC step-down converter used to step down voltage.
    • Pins: IN-, OUT-, OUT+, IN+
  2. AHT10

    • Description: A temperature and humidity sensor.
    • Pins: Vcc, Gnd, SCL, SDA
  3. Step Down Module

    • Description: A module used to step down voltage from 24V to 5V.
    • Pins: 24v IN+, GND, 12v IN+, 5v OUT+, 5v OUT-
  4. Arduino Nano

    • Description: A small, complete, and breadboard-friendly board based on the ATmega328.
    • Pins: D1/TX, D0/RX, RESET, GND, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11/MOSI, D12/MISO, VIN, 5V, A7, A6, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13/SCK
  5. Rocker Switch

    • Description: A simple on/off switch.
    • Pins: 1, 2
  6. Wifi module ESP8266-01

    • Description: A WiFi module used for wireless communication.
    • Pins: RX, GPIO0, GPIO2, GND, +3V3, Reset, CH-PD Chip power down, TX
  7. Serial Enabled 16x2 LCD - Black on Green 5V

    • Description: A 16x2 character LCD with serial interface.
    • Pins: GND, RX, VDD, RS, R/W, E, DB4, DB5, DB6, DB7, BL+, PGM, PGC, PGD, VPP

Wiring Details

Mini 360 Buck Converter

AHT10

Step Down Module

Arduino Nano

Rocker Switch

Wifi module ESP8266-01

Serial Enabled 16x2 LCD - Black on Green 5V

Code Documentation

/*
 * Arduino Nano Circuit Project
 * This code interfaces with an AHT10 sensor, an ESP8266-01 WiFi module,
 * and a Serial Enabled 16x2 LCD. It reads temperature and humidity data
 * from the AHT10 sensor, displays it on the LCD, and sends it over WiFi.
 */

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_AHT10.h>
#include <SoftwareSerial.h>

Adafruit_AHT10 aht;
SoftwareSerial espSerial(0, 1); // RX, TX

void setup() {
  Serial.begin(9600);
  espSerial.begin(9600);
  Wire.begin();

  if (!aht.begin()) {
    Serial.println("AHT10 not found");
    while (1) delay(10);
  }
  Serial.println("AHT10 found");

  pinMode(4, OUTPUT); // LCD RS pin
  digitalWrite(4, LOW); // Initialize LCD
}

void loop() {
  sensors_event_t humidity, temp;
  aht.getEvent(&humidity, &temp);

  Serial.print("Temperature: ");
  Serial.print(temp.temperature);
  Serial.print(" C");
  Serial.print(" Humidity: ");
  Serial.print(humidity.relative_humidity);
  Serial.println(" %");

  // Send data to ESP8266
  espSerial.print("Temperature: ");
  espSerial.print(temp.temperature);
  espSerial.print(" C");
  espSerial.print(" Humidity: ");
  espSerial.print(humidity.relative_humidity);
  espSerial.println(" %");

  // Display data on LCD
  digitalWrite(4, HIGH); // Enable LCD
  delay(10);
  digitalWrite(4, LOW); // Disable LCD

  delay(2000); // Wait 2 seconds before next read
}

This code initializes the AHT10 sensor and the ESP8266-01 WiFi module. It reads temperature and humidity data from the AHT10 sensor, displays it on the Serial Enabled 16x2 LCD, and sends it over WiFi using the ESP8266-01 module. The LCD is controlled via the RS pin connected to D4 of the Arduino Nano.