Wiznet makers

Lihan__

Published February 23, 2026 ©

34 UCC

8 WCC

3 VAR

0 Contests

0 Followers

0 Following

Original Link

Arduino Ethernet DHT11 Temperature and Humidity Logging, Mobile Stats

An always-on environmental monitoring node that reads temperature and humidity from a DHT11 sensor and pushes live data to a cloud logging platform — accessible

COMPONENTS
PROJECT DESCRIPTION

Arduino Uno + W5500 Ethernet Shield IoT Temperature & Humidity Logger with Mobile Dashboard

An always-on environmental monitoring node that reads temperature and humidity from a DHT11 sensor and pushes live data to a cloud logging platform — accessible from any smartphone or browser, anywhere in the world, with zero server setup required.


PROJECT DESCRIPTION

1. Project Background and Technical Goals

Monitoring environmental conditions — room temperature, greenhouse humidity, lab cooling room status — traditionally requires either expensive industrial sensors with dedicated displays, or complex self-hosted server infrastructure. This project was initiated to demonstrate that a minimal, low-cost combination of Arduino Uno, an Ethernet Shield based on the W5500 chip, and a DHT11 sensor can deliver professional-quality remote data logging and mobile-accessible dashboards with no server management overhead.

The device connects to the internet via a standard ADSL/Ethernet router and pushes sensor readings to the LoggingForest cloud platform using HTTP. The platform handles storage, visualization, and mobile access automatically. The result is a standalone, always-on monitoring node: place it anywhere with a power source and an Ethernet cable, and temperature and humidity data is immediately visible on any smartphone, desktop, or browser — anywhere in the world.

The project is also validated with DHT22 and industrial-grade AM2305 sensors, making it directly applicable to more demanding environments such as greenhouses, server rooms, wine cellars, and cold storage facilities where measurement precision beyond DHT11's integer-resolution matters.


2. Key Technical Elements and Selection Reasons (Methodology)

Components were selected for long-term reliability, low power consumption, and zero-maintenance cloud integration.

Arduino UNO R3 (ATmega328P): Selected as the core controller for its universal availability, stable platform maturity, and compatibility with the W5500 Ethernet Shield via the hardware SPI bus. Its straightforward programming model allows the firmware to remain minimal — the entire application loop fits in a simple read-then-POST cycle with no operating system complexity.

W5500 Ethernet Shield: The WIZnet W5500 chip provides the hardware TCP/IP stack that transforms the Arduino into an internet-connected device. Rather than implementing TCP/IP in software on the ATmega328P, the W5500 handles all protocol processing in dedicated silicon — IP addressing, TCP connection management, HTTP request framing — over SPI. This hardware offloading is essential for an always-on logging node: the ATmega328P remains free to focus on sensor reading and data formatting, while the W5500 guarantees reliable packet delivery even under continuous 24/7 operation.

DHT11 Temperature & Humidity Sensor: A cost-effective, single-wire digital sensor providing temperature (0–50°C, ±2°C accuracy) and humidity (20–80% RH, ±5% accuracy) readings without any analog-to-digital conversion or signal conditioning circuitry. Its 3-pin interface (VCC, DATA, GND) requires only a 10kΩ pull-up resistor and a single digital pin on the Arduino — minimizing wiring complexity for remote deployments.

LoggingForest Cloud Platform: The cloud service handles data ingestion, storage, time-series visualization, and mobile-responsive dashboards. Authentication is managed via API keys assigned per device. By offloading persistence and visualization entirely to the cloud, the Arduino firmware requires no local data storage, no web server code, and no display hardware — the device's sole responsibility is reading the sensor and POSTing the data.

Ethernet ADSL Router: The wired Ethernet connection via the W5500 shield ensures deterministic, always-on internet connectivity. Unlike Wi-Fi, wired Ethernet requires no reconnection logic in the firmware and is immune to wireless interference — critical for an unattended monitoring node that must deliver data reliably 24 hours a day.


3. In-depth Analysis of Hardware Operating Principles (Hardware Mechanics)

The system operates as a simple two-stage pipeline: DHT11 reads environmental data → W5500 delivers it to the cloud.

DHT11 Single-Wire Protocol: The DHT11 communicates via a proprietary single-wire protocol on its DATA pin. The Arduino initiates a measurement by pulling the line LOW for 18ms, then releases it. The DHT11 responds with a 40-bit serial transmission: 8 bits of humidity integer, 8 bits of humidity decimal (always 0 for DHT11), 8 bits of temperature integer, 8 bits of temperature decimal (always 0 for DHT11), and an 8-bit checksum. The DHT library on Arduino decodes this protocol automatically and returns validated temperature and humidity values.

W5500 SPI Connection and Hardware TCP/IP Initialization: The W5500 Ethernet Shield connects to the Arduino's SPI bus (MOSI pin 11, MISO pin 12, SCK pin 13, CS pin 10). At startup, Ethernet.begin(mac) initializes the W5500's internal TCP/IP stack and requests a DHCP-assigned IP address from the router. Once initialized, the W5500 maintains the network link independently — the Arduino sketch does not need to manage MAC/IP/TCP protocol state at all, only issue high-level socket commands.

HTTP POST Data Submission Cycle: After each sensor reading, the Arduino opens a TCP connection to the LoggingForest API endpoint via the W5500, sends an HTTP POST request containing the temperature and humidity values along with the device's API key, and closes the connection. The cloud platform acknowledges the data and stores it with a server-side timestamp. The cycle repeats at a configurable interval — typically every 60 seconds for standard monitoring, or more frequently for high-resolution logging.

Power Considerations for Remote Deployment: For installations away from USB power (outdoor greenhouse, remote room), a USB charger or 5V DC supply powers the Arduino. A waterproof enclosure with a cable pass-through for the DHT11 sensor and Ethernet cable provides weatherproofing. A jack switch for power allows controlled restarts without disassembly.

 

Detailed System Flow

Step 1: Arduino and Sensor (DHT11)

The sensor measures temperature and humidity at 30-second intervals.

  • "The current temperature in the living room is 24 degrees Celsius, and the humidity level is 65%."

Step 2: Ethernet Shield (W5500)

The measured data is automatically transmitted to the cloud via the internet.

  • This operates identically to automatically publishing a daily diary entry to an online blog.

Step 3: LoggingForest Cloud Platform

All data is stored and organized in systematic graph format.

  • This functions in the same manner as reviewing transaction history in a banking application.

Step 4: User Smartphone

Users can access and verify information anytime and anywhere through the application or website.

  • "The current living room temperature is 26 degrees Celsius." "The humidity level is within the appropriate range."

4. Communication Interface: The Role and Necessity of W5500

The W5500 is the component that elevates this project from a local display to a globally accessible cloud-connected monitoring system.

Hardware TCP/IP Stack for 24/7 Cloud Connectivity: The ATmega328P has no networking hardware. Without the W5500, the Arduino could not participate in TCP/IP communication at any level. The W5500 integrates a complete 10/100 Ethernet MAC, PHY, and TCP/IP stack in a single chip, communicating with the Arduino over SPI at up to 80MHz. For a cloud logging application, where every measurement must successfully traverse the full HTTP stack (TCP connection → HTTP POST → response parsing → TCP close), having this entire pipeline handled in hardware is what makes 24/7 reliable operation achievable on a microcontroller with limited processing resources.

DHCP and Dynamic Network Configuration: The W5500 supports automatic DHCP IP address assignment via Ethernet.begin(mac). This means the logging node requires no manual network configuration — plug it into any Ethernet router and it automatically obtains a valid IP address, subnet mask, gateway, and DNS server. For deployment in locations where the maker has no control over network settings (office, greenhouse, friend's lab), this zero-configuration networking is essential.

Wired Ethernet vs. Wi-Fi for Unattended Logging: A DHT11 logger is fundamentally a set-and-forget device — it should operate autonomously for days, weeks, or months without human intervention. Wi-Fi connections require reconnection handling in firmware when the network drops or the router reboots, adding significant complexity and failure modes. The W5500-based wired connection maintains a stable, persistent link that automatically recovers at the physical layer when network issues resolve, without requiring any application-level reconnection logic in the Arduino sketch.

API Key Authentication via HTTP Headers: The LoggingForest platform authenticates each device by its API key, which is embedded in the HTTP POST request headers by the Arduino sketch. The W5500 handles the TCP/IP transport transparently, and the Arduino constructs the HTTP headers as simple string concatenation — no TLS/SSL is required for the LoggingForest API, keeping the firmware straightforward while maintaining device-level authentication.


5. Software Implementation and Optimization (Software & Coding)

The firmware is structured around a minimal read-transmit loop with no local storage and no display overhead.

Library Dependencies:

  • Ethernet.h — Arduino Ethernet library, abstracts W5500 SPI communication into EthernetClient objects
  • DHT.h — Adafruit DHT sensor library, handles single-wire protocol decoding and checksum validation
  • SPI.h — Hardware SPI bus driver, required by the Ethernet library for W5500 communication

Network Initialization (setup): The Arduino assigns a MAC address to the W5500 (hardcoded in firmware, must be unique on the LAN) and calls Ethernet.begin(mac) to trigger DHCP negotiation. A 1-second delay follows to allow the W5500 to complete DHCP and establish the link. The DHT sensor is initialized with dht.begin().

Main Loop (loop): The core logic executes in three steps. First, dht.readTemperature() and dht.readHumidity() are called to obtain validated readings — if the DHT library returns NaN (sensor read failure), the cycle is skipped and retried on the next iteration. Second, an EthernetClient object opens a TCP connection to the LoggingForest API server. Third, an HTTP POST request is constructed with the device API key in the headers and the temperature/humidity values in the request body, then transmitted via the W5500. The client reads the server acknowledgment, closes the connection, and delays until the next logging interval.

Sensor Compatibility: The same firmware with a single #define change (DHT11DHT22 or AM2305) supports the higher-precision DHT22 (temperature: -40–80°C with 0.1°C resolution, humidity: 0–100% RH with 0.1% resolution) and the industrial AM2305 (identical to DHT22 in a wired-probe form factor). This makes the project directly reusable for precision applications — simply swap the sensor and update the define.

LoggingForest Platform Configuration: Each device requires a registered account and an API key from the LoggingForest platform (https://loggingforest.com). The API key is a short string embedded directly in the Arduino sketch. The platform automatically creates time-series charts, mobile-responsive dashboards, and configurable alert thresholds once data begins arriving — no additional configuration is required.


6. Project Result and Conclusion

This project demonstrates that permanent, cloud-connected environmental monitoring can be implemented with three hardware components: an Arduino Uno, a W5500 Ethernet Shield, and a DHT11 sensor.

Technical Achievement: The completed device provides continuous temperature and humidity monitoring with data accessible from any browser or smartphone worldwide, within seconds of each measurement. The W5500's hardware TCP/IP stack ensures reliable HTTP delivery over the ADSL internet connection under continuous 24/7 operation — a reliability requirement that a software-based TCP/IP stack on the ATmega328P could not meet without significantly more complex firmware.

Deployment Flexibility: The project explicitly supports four categories of deployment environments: indoor rooms, outdoor locations (with weatherproof enclosure), greenhouses, and laboratory or industrial cooling rooms. The sensor upgrade path to DHT22 or AM2305 covers the full temperature and humidity range encountered in all these environments.

Accessibility: The complete hardware list — Arduino UNO R3, Ethernet Shield, DHT11 module, Ethernet cable — is available from any major electronics supplier. Setup requires only Arduino IDE, two library installations, and a LoggingForest API key. A maker with no prior networking experience can have a working cloud-logging node within an hour.

Conclusion: By combining the DHT11 sensor's simplicity with the W5500's reliable hardware networking and the LoggingForest platform's zero-overhead cloud infrastructure, this project delivers an accessible, low-cost, and genuinely deployable IoT environmental monitoring solution — demonstrating that real-world cloud connectivity requires neither complex firmware nor expensive hardware.


한국어 설명

1. 프로젝트 배경 및 기술적 목표

온도와 습도 같은 환경 조건을 모니터링하려면 전통적으로 고가의 산업용 센서와 전용 디스플레이가 필요하거나, 복잡한 자체 서버 인프라를 구축해야 했습니다. 이 프로젝트는 Arduino Uno, W5500 칩 기반 이더넷 쉴드, DHT11 센서의 최소한의 조합만으로도 전문가 수준의 원격 데이터 로깅과 모바일 접근 가능한 대시보드를 서버 관리 없이 구현할 수 있음을 보여주기 위해 시작되었습니다.

장치는 표준 ADSL/이더넷 라우터를 통해 인터넷에 연결하고 HTTP를 사용하여 LoggingForest 클라우드 플랫폼에 센서 데이터를 전송합니다. 플랫폼이 저장, 시각화, 모바일 접근을 자동으로 처리합니다. 결과물은 독립형 상시 가동 모니터링 노드입니다. 전원과 이더넷 케이블이 있는 곳이라면 어디에든 설치하면, 온도와 습도 데이터가 전 세계 어디서든 스마트폰, 데스크톱, 브라우저에서 즉시 확인 가능합니다.

이 프로젝트는 DHT22 및 산업용 AM2305 센서와도 검증되어, 정밀한 측정이 필요한 온실, 서버실, 와인 저장고, 냉동 창고 등 더 까다로운 환경에도 직접 적용 가능합니다.

2. 핵심 기술 요소 및 선정 이유 (Methodology)

장기 신뢰성, 저전력 소비, 유지보수 없는 클라우드 통합을 기준으로 부품을 선정하였습니다.

Arduino UNO R3 (ATmega328P): 보편적인 구입 가능성, 안정적인 플랫폼 성숙도, SPI 버스를 통한 W5500 이더넷 쉴드와의 호환성을 이유로 핵심 컨트롤러로 선정되었습니다. 단순한 프로그래밍 모델 덕분에 펌웨어가 최소화될 수 있습니다 — 전체 애플리케이션 루프는 단순한 읽기-POST 주기로 구성됩니다.

W5500 이더넷 쉴드: WIZnet W5500 칩이 Arduino를 인터넷 연결 장치로 변환하는 하드웨어 TCP/IP 스택을 제공합니다. ATmega328P에서 TCP/IP를 소프트웨어로 구현하는 대신, W5500이 전용 실리콘에서 모든 프로토콜 처리를 담당합니다 — IP 주소 지정, TCP 연결 관리, HTTP 요청 구성이 SPI를 통해 처리됩니다. 이 하드웨어 오프로딩은 상시 가동 로깅 노드에 필수적입니다.

DHT11 온도 & 습도 센서: 아날로그-디지털 변환이나 신호 컨디셔닝 회로 없이 온도(0~50°C, ±2°C 정확도)와 습도(20~80% RH, ±5% 정확도) 수치를 제공하는 저비용 단선 디지털 센서입니다. 3핀 인터페이스(VCC, DATA, GND)는 10kΩ 풀업 저항 하나와 Arduino의 디지털 핀 하나만 필요합니다.

LoggingForest 클라우드 플랫폼: 데이터 수집, 저장, 시계열 시각화, 모바일 반응형 대시보드를 처리하는 클라우드 서비스입니다. 장치당 할당된 API 키로 인증이 관리됩니다. 지속성과 시각화를 클라우드에 완전히 위임하여, Arduino 펌웨어에 로컬 저장소, 웹 서버 코드, 디스플레이 하드웨어가 필요 없습니다.

이더넷 ADSL 라우터: W5500 쉴드를 통한 유선 이더넷 연결이 결정론적이고 상시 가동되는 인터넷 연결을 보장합니다. Wi-Fi와 달리, 유선 이더넷은 펌웨어에 재연결 로직이 필요 없고 무선 간섭에 면역입니다.

3. 하드웨어 작동 원리에 대한 심층 분석 (Hardware Mechanics)

시스템은 단순한 2단계 파이프라인으로 동작합니다: DHT11이 환경 데이터를 읽음 → W5500이 클라우드로 전달.

DHT11 단선 프로토콜: DHT11은 DATA 핀의 독자적인 단선 프로토콜로 통신합니다. Arduino가 라인을 18ms 동안 LOW로 당겨 측정을 시작하면, DHT11이 40비트 직렬 전송으로 응답합니다: 습도 정수 8비트, 습도 소수 8비트(DHT11은 항상 0), 온도 정수 8비트, 온도 소수 8비트(DHT11은 항상 0), 체크섬 8비트. DHT 라이브러리가 이 프로토콜을 자동으로 디코딩하여 검증된 온도와 습도 값을 반환합니다.

W5500 SPI 연결 및 하드웨어 TCP/IP 초기화: W5500 이더넷 쉴드가 Arduino SPI 버스(MOSI 핀 11, MISO 핀 12, SCK 핀 13, CS 핀 10)에 연결됩니다. 시작 시 Ethernet.begin(mac)W5500의 내부 TCP/IP 스택을 초기화하고 라우터로부터 DHCP 할당 IP 주소를 요청합니다. 초기화 후 W5500이 네트워크 링크를 독립적으로 유지합니다.

HTTP POST 데이터 전송 주기: 각 센서 읽기 후 Arduino는 W5500을 통해 LoggingForest API 엔드포인트로 TCP 연결을 열고, 장치 API 키와 함께 온도 및 습도 값이 포함된 HTTP POST 요청을 전송하고, 연결을 닫습니다. 클라우드 플랫폼이 데이터를 서버 사이드 타임스탬프와 함께 저장합니다.

원격 배포를 위한 전원 고려사항: USB 전원에서 멀리 떨어진 설치(야외 온실, 원격 방)의 경우 USB 충전기 또는 5V DC 전원이 Arduino에 공급됩니다. 방수 인클로저가 DHT11 센서와 이더넷 케이블을 위한 케이블 관통구와 함께 방수 기능을 제공합니다.

 

구체적인 시스템 흐름

1. Arduino 및 센서 (DHT11)

센서는 30초 간격으로 온도와 습도를 측정합니다.

  • "현재 거실의 온도는 24도이며, 습도는 65%입니다."

2. 이더넷 쉴드 (W5500)

측정된 데이터를 인터넷을 통해 클라우드로 자동 전송합니다.

  • 마치 일기장을 매일 자동으로 온라인 블로그에 게시하는 것과 동일합니다.

3. LoggingForest 클라우드

모든 데이터가 저장되고 체계적인 그래프 형식으로 정리됩니다.

  • 마치 은행 애플리케이션에서 통장 거래 내역을 확인하는 방식과 동일합니다.

4. 사용자 스마트폰

언제 어디서든 애플리케이션 또는 웹사이트에 접속하여 확인할 수 있습니다.

  • "현재 거실의 온도가 26도이군요" "습도는 적정 범위에 있습니다"
data.jpg

4. 통신 인터페이스: W5500의 역할과 필요성

W5500은 이 프로젝트를 로컬 디스플레이에서 전 세계 접근 가능한 클라우드 연결 모니터링 시스템으로 끌어올리는 핵심 부품입니다.

24/7 클라우드 연결을 위한 하드웨어 TCP/IP 스택: ATmega328P에는 네트워킹 하드웨어가 없습니다. W5500 없이는 Arduino가 어떤 레벨에서도 TCP/IP 통신에 참여할 수 없습니다. W5500은 완전한 10/100 이더넷 MAC, PHY, TCP/IP 스택을 단일 칩에 통합하여 SPI를 통해 최대 80MHz로 Arduino와 통신합니다. 클라우드 로깅 애플리케이션에서 전체 HTTP 스택(TCP 연결 → HTTP POST → 응답 파싱 → TCP 닫기)을 하드웨어에서 처리하는 것이 처리 자원이 제한된 마이크로컨트롤러에서 24/7 안정적 운영을 가능하게 합니다.

DHCP 및 동적 네트워크 구성: W5500Ethernet.begin(mac)을 통해 자동 DHCP IP 주소 할당을 지원합니다. 즉, 로깅 노드에 수동 네트워크 구성이 필요 없습니다 — 어떤 이더넷 라우터에 꽂아도 자동으로 유효한 IP 주소, 서브넷 마스크, 게이트웨이, DNS 서버를 획득합니다.

무인 로깅을 위한 유선 이더넷 vs. Wi-Fi: DHT11 로거는 본질적으로 설치 후 방치(set-and-forget) 장치입니다. Wi-Fi 연결은 네트워크가 끊기거나 라우터가 재부팅될 때 펌웨어에 재연결 처리 로직이 필요합니다. W5500 기반 유선 연결은 네트워크 문제가 해결될 때 물리 계층에서 자동으로 복구되며, Arduino 스케치에 애플리케이션 레벨 재연결 로직이 전혀 필요 없습니다.

HTTP 헤더를 통한 API 키 인증: LoggingForest 플랫폼은 Arduino 스케치가 HTTP POST 요청 헤더에 포함하는 API 키로 각 장치를 인증합니다. W5500이 TCP/IP 전송을 투명하게 처리하고, Arduino는 HTTP 헤더를 단순한 문자열 연결로 구성합니다.

5. 소프트웨어 구현 및 최적화 (Software & Coding)

펌웨어는 로컬 저장소와 디스플레이 오버헤드 없이 최소한의 읽기-전송 루프를 중심으로 구성됩니다.

라이브러리 의존성: Ethernet.h(Arduino Ethernet 라이브러리, W5500 SPI 통신을 EthernetClient 객체로 추상화), DHT.h(Adafruit DHT 센서 라이브러리, 단선 프로토콜 디코딩 및 체크섬 검증 처리), SPI.h(하드웨어 SPI 버스 드라이버, W5500 통신에 필요).

네트워크 초기화 (setup): Arduino가 MAC 주소를 W5500에 할당하고 Ethernet.begin(mac)을 호출하여 DHCP 협상을 시작합니다. W5500이 DHCP를 완료하고 링크를 확립하도록 1초 지연이 따릅니다. DHT 센서는 dht.begin()으로 초기화됩니다.

메인 루프 (loop): 핵심 로직은 세 단계로 실행됩니다. 첫째, dht.readTemperature()dht.readHumidity()가 검증된 수치를 얻기 위해 호출됩니다. DHT 라이브러리가 NaN(센서 읽기 실패)을 반환하면 주기가 건너뛰어지고 다음 반복에서 재시도됩니다. 둘째, EthernetClient 객체가 LoggingForest API 서버로 TCP 연결을 엽니다. 셋째, 헤더에 장치 API 키와 요청 본문에 온도/습도 값이 포함된 HTTP POST 요청이 W5500을 통해 전송됩니다.

센서 호환성: #define 하나만 변경(DHT11DHT22 또는 AM2305)하면 더 높은 정밀도의 DHT22(온도 0.1°C 해상도, 습도 0.1% 해상도)와 산업용 AM2305를 지원합니다.

LoggingForest 플랫폼 구성: 각 장치는 LoggingForest 플랫폼(https://loggingforest.com)에서 등록된 계정과 API 키가 필요합니다. API 키는 Arduino 스케치에 직접 임베드되는 짧은 문자열입니다. 데이터가 도착하기 시작하면 플랫폼이 시계열 차트, 모바일 반응형 대시보드, 설정 가능한 알림 임계값을 자동으로 생성합니다.

6. 프로젝트 결과 및 결론

이 프로젝트는 Arduino Uno, W5500 이더넷 쉴드, DHT11 센서 세 가지 하드웨어 부품만으로 영구적인 클라우드 연결 환경 모니터링을 구현할 수 있음을 증명합니다.

기술적 성과: 완성된 장치는 전 세계 어디서든 브라우저나 스마트폰에서 각 측정 후 수초 이내에 접근 가능한 지속적인 온도 및 습도 모니터링을 제공합니다. W5500의 하드웨어 TCP/IP 스택이 24/7 연속 운영 하에 ADSL 인터넷 연결을 통한 신뢰할 수 있는 HTTP 전달을 보장합니다.

배포 유연성: 프로젝트는 실내, 야외(방수 인클로저 사용), 온실, 실험실 및 산업용 냉각 시설 등 네 가지 배포 환경 범주를 명시적으로 지원합니다. DHT22 또는 AM2305로의 센서 업그레이드 경로가 이 모든 환경에서 발생하는 전체 온도 및 습도 범위를 커버합니다.

접근성: 전체 하드웨어 목록 — Arduino UNO R3, 이더넷 쉴드, DHT11 모듈, 이더넷 케이블 — 은 주요 전자 부품 공급업체에서 구입 가능합니다. 설정에는 Arduino IDE, 두 개의 라이브러리 설치, LoggingForest API 키만 필요합니다.

결론: DHT11 센서의 단순성, W5500의 신뢰할 수 있는 하드웨어 네트워킹, LoggingForest 플랫폼의 제로 오버헤드 클라우드 인프라를 결합하여, 접근 가능하고 저비용이며 실제로 배포 가능한 IoT 환경 모니터링 솔루션을 완성하였습니다 — 실제 클라우드 연결에 복잡한 펌웨어나 고가의 하드웨어가 필요하지 않음을 증명합니다.

Documents
Comments Write