Abstract
ESP Now Sensor System With Wi Fi is an open-source Internet of Things (IoT) project. ESP-Now is used for battery operated Sensors (based on ESP8266, ESP32) sending to a Gateway which also is connected with WiFi to the Internet (at the same time). While HW is standard ESP boards, the sensor code is optimized for lowest power consumption possible. Sensors operate in Deep Sleep mode in 5 minute cycles. It is built using C++, ESP8266, ESP32, Arduino. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an Internet of Things (IoT) mini project or final-year project.
1. Introduction
While HW is standard ESP boards, the sensor code is optimized for lowest power consumption possible. Sensors operate in Deep Sleep mode in 5 minute cycles. The WiFi module is active in the region of 60 ms per cycle.
The ESP-Now messages are "unnecessary" long and not just a few bytes as would be enough to send sensor data. However, I have standardized on a more general and longer format as the extra time to transmit a larger payload has quite a low impact on total energy consumption and battery lifetime.
From the above typical values, it is realized the major energy consumption is in the Deep Sleep mode why it is important to use ESP boards with low deep sleep currents. The LOLIN D1 Mini Pro V2.0.0 is the standard ESP board with the longest battery lifetime I have tested.
2. Objective
ESP-Now is used for battery operated Sensors (based on ESP8266, ESP32) sending to a Gateway which also is connected with WiFi to the Internet (at the same time).
This project demonstrates how C++, ESP8266, ESP32 can be applied to a real-world Internet of Things (IoT) problem.
4. Technology Stack
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Arduino IDE / PlatformIO or a C++ compiler (g++)
- Target board (e.g. Arduino, ESP32) where applicable
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/jonasbystrom/ESP-Now-Sensor-system-with-WiFi.git
cd ESP-Now-Sensor-system-with-WiFi- Battery and/or solar powered sensors and weather stations connected to home automations, to Blynk apps, to Thingspeak, MQTT, etc.
- Longer/safer reach and communication vs WiFi.
Full setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Add a mobile dashboard using Blynk or Firebase
- Store readings in a cloud database for history charts
- Add alerts via SMS / Telegram when thresholds are crossed
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- Which microcontroller / board and sensors are used and why?
- How does the device send data (Wi-Fi, MQTT, HTTP, Bluetooth)?
- Where is the sensor data stored and visualised?
- How is power consumption managed?
- How would you secure the device and its communication?
9. Source Code & License
This project is developed by jonasbystrom and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on an Internet of Things (IoT) project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Internet of Things (IoT) Internship