DEV Community

Cover image for ESP8266 ultrasonic distance monitoring using KiwisIoT.
manikanda balamurugan S
manikanda balamurugan S

Posted on

ESP8266 ultrasonic distance monitoring using KiwisIoT.

IoT-Based IR Object Detection Using ESP8266 NodeMCU and KiwisIoT

Introduction

Have you ever wondered how we can detect objects and monitor them remotely using IoT?

In this project, I developed an IoT-based object detection system using an ESP8266 NodeMCU and an IR sensor. The system detects nearby objects and sends the detection status to the KiwisIoT dashboard through Wi-Fi.

The main objective is to understand how sensors, microcontrollers, wireless communication, and IoT platforms work together in a real-time monitoring application.

Components Required

Hardware Components

  • ESP8266 NodeMCU
  • IR Sensor Module
  • Jumper Wires
  • USB Cable
  • Computer

Software Requirements

  • Arduino IDE
  • ESP8266 Board Package
  • KiwisIoT Arduino Library
  • KiwisIoT Account
  • Wi-Fi Connection

Circuit Connections

The IR sensor is connected to the ESP8266 NodeMCU.

IR Sensor ESP8266 NodeMCU
VCC 3.3V (if supported)
GND GND
OUT D7

The sensor sends a digital signal to the ESP8266 based on object detection.

How Does It Work?

  1. The IR sensor detects whether an object is present.
  2. The ESP8266 reads the digital output using digitalRead().
  3. If the sensor output is LOW, the status becomes DETECTED.
  4. If the sensor output is HIGH, the status becomes NOT DETECTED.
  5. The ESP8266 sends the status to KiwisIoT using Wi-Fi.
  6. The dashboard displays the object detection status.

Arduino Programming

I used Arduino IDE to program the ESP8266 NodeMCU.

The program uses:

  • ESP8266WiFi library for Wi-Fi connectivity.
  • KiwisIoT library for IoT communication.
  • digitalRead() for reading sensor values.
  • if-else conditions for object detection.
  • kiwisiot.send() to send information to the dashboard.

Arduino Code:

Code image created

KiwisIoT Dashboard

The KiwisIoT platform is used to monitor the object detection status remotely.

The ESP8266 sends the sensor information through Wi-Fi, and the dashboard displays two possible statuses:

  • DETECTED
  • NOT DETECTED

This helps monitor object presence without continuously checking the physical sensor.

Applications

  • Object Detection Systems
  • Entry Monitoring
  • Smart Parking Concepts
  • Obstacle Detection
  • Industrial Automation
  • IoT Monitoring Systems

What I Learned

Through this project, I learned how to connect an IR sensor with an ESP8266 NodeMCU, read digital sensor values, establish Wi-Fi communication, and send real-time data to an IoT dashboard.

This project improved my practical understanding of IoT, Arduino programming, sensor interfacing, and embedded systems.

Future Improvements

  • Adding a buzzer for object detection alerts.
  • Integrating multiple IR sensors.
  • Adding mobile notifications.
  • Storing detection history in a cloud database.
  • Developing an automated monitoring system.

Conclusion

This project demonstrates how an IR sensor, ESP8266 NodeMCU, and KiwisIoT platform can be combined to build a simple real-time object monitoring system.

It was a valuable learning experience that helped me explore the practical applications of IoT and embedded systems.

I hope this project helps other beginners who are interested in learning IoT and hardware development.

Top comments (0)