Blog
Guides

How Rebels Software Built an ESP32- Powered Smart Battery Monitoring System with Blynk

Learn how Rebels Software used an ESP32‑S3 and Blynk to ship an industrial battery‑monitor—with real‑time SoC, dashboards, and alerts—in one sprint, and how you can build one too.

Published

July 17, 2025

Tags

Rebel Software
Editor’s Note: This guest post is authored  by Bart Szczepański, CTO at  Rebels Software, one of Blynk’s trusted partners. With a master’s degree in Electronics & Telecommunications, Bart helps clients navigate the complex world of industrial IoT—pairing custom hardware with the flexibility of Blynk Cloud. (He’s also a tech enthusiast, trail runner, proud husband, and dad.)In the article below, Bart explains how his team combined their ESP32‑based Dunamis v2.0 battery monitor with Blynk’s dashboards, alerts, and automations to move from prototype to field‑ready solution in a single sprint.

Build a cloud-connected smart battery monitoring solution with a custom Rebels Software device and the Blynk IoT platform. This project demonstrates how we integrated our ESP32-based Dunamis v2.0 smart battery monitor with Blynk to achieve real-time voltage, current, and State-of-Charge tracking - complete with a user-friendly dashboard and proactive alerts.

In this article, you’ll learn:

  • Rapid IoT Dashboard Setup: How we used Blynk Device Templates and Datastreams (Virtual Pins) to create real-time mobile & web dashboards for live battery data visualization—no additional front-end code.
  • Hardware & Firmware Integration: The key components of our battery monitoring device (two 12V batteries, sensors, ESP32-S3) and how its firmware was modified for reliable data streaming.
  • System-Level Architecture: Why running FreeRTOS and using modular tasks improves stability and performance.
  • Developer-Friendly IoT: Why using Blynk’s platform enabled fast prototyping and how this approach appeals to both engineers (firmware/API) and technical decision-makers (time-to-market, TCO).

Building a Smart Battery Monitoring System

When developing a connected product, choosing the right tools can mean the difference between a quick success and a tedious slog. In this project, Rebels Software set out to build a smart battery monitoring system for industrial batteries (like those in forklifts) and decided to integrate it with Blynk’s IoT platform for cloud connectivity and visualization. The goal was to demonstrate end-to-end functionality: from embedded hardware readings to a cloud dashboard with alerts, all achieved in a short timeframe.

Dunamis v2.0 - our custom battery monitor, is designed to track the health of large battery packs. It measures key parameters such as battery voltage, current, and even electrolyte level. From these, it computes the battery’s State of Charge (SoC) and other health indicators. To test the system under real-world conditions, we built a demo setup with actual hardware. We then used Blynk to rapidly create a polished interface, showing that even complex IoT data can be made easily accessible to end users.

Hardware Test Setup and Capabilities

Our test rig consists of two 12 V DC batteries wired in series, a programmable DC load, and a charger. The Dunamis v2.0 unit is connected to the battery pack to monitor voltage and current in real time. By applying simple algorithms in firmware, it also estimates State of Charge (SoC).

Hardware test setup with two 12 V batteries in series (simulating a 24 V industrial battery pack). The Dunamis v2.0 device monitors voltage and current via attached sensor leads and a shunt. A DC electronicload (Atorch CL24R) applies a controlled discharge, while a charger replenishes the batteries.

The DC Load (Atorch CL24R) simulates a forklift’s power draw under a constant current setting, and the charger connects during recharge phases. This allows us to test charging and discharging cycles in a safe, repeatable way.

At the heart of the system is an ESP32-S3 microcontroller, running FreeRTOS. We structured the firmware with modular tasks - one for reading sensors, one for local SD card logging, and one for handling Blynk cloud communication. This ensured that the system could handle real-time measurements while staying responsive and reliable, even under variable loads or Wi-Fi connectivity issues.

Why Blynk? – Rapid IoT Integration for Cloud Dashboard

Before starting this project, we knew we needed a way to visualize data and interact with the device remotely without spending weeks building a custom app and backend. Blynk was a perfect fit - it offers a rich, developer-friendly platform for managing devices, building dashboards, and setting up automations.

What made Blynk particularly appealing was the speed of setup. We created a Device Template in minutes, defined four Datastreams (Virtual Pins)V oltage full, voltage mid, current, SoC), and built an intuitive dashboard with gauge and chart widgets. No frontend code required.

The resulting dashboard was instantly available on both the web console and the mobile app - a unified experience with minimal effort. We were even able to customize widgets with our branding and fine-tune the display with no additional development time.

Blynk’s automation engine also allowed us to create rules like “Send a notification when SoC drops below 20%” — with just a few clicks. This kind of no-code logic helped us demonstrate alerting and edge case monitoring effortlessly.

Firmware Integration with Blynk

Once the dashboard was ready, it was time to connect our device.

1. Define Your Template

We defined three virtual pins on Blynk:

  • V0 – Battery Voltage Full
  • V1 – Battery Voltage Mid
  • V2 – Battery Current
  • V3 – SoC (%)

We then dragged gauge and chart widgets onto the dashboard and linked them to the corresponding data streams.

2. Sending Data from ESP32

On the firmware side, we used Blynk’s ESP32 library. Every second, we collected sensor data and sent it using:

// Send sensor data to Blynk every second
Blynk.virtualWrite(V0, voltageFull);
Blynk.virtualWrite(V1, voltageMid);
Blynk.virtualWrite(V2, current);
Blynk.virtualWrite(V3, soc)

This kept the dashboard updated in near-real-time.

3. Managing Reliability with FreeRTOS

Wi-Fi hiccups and unstable network conditions are common in real-world deployments. To make the system resilient:

  • We placed Blynk communication into its own FreeRTOS task, isolated from sensor processing.
  • We added reconnection logic to automatically restore Wi-Fi and Blynk sessions via Blynk.connect() with exponential back-off.
  • If connectivity was lost, data would still be logged locally to an SD card for later sync.

// Create main wifi task
xTaskCreatePinnedToCore(
   conn_manager_init_task,   // Task function
   "conn_mgr_init_task",     // Task name
   16384,                    // Stack size (bytes)
   NULL,                     // Task parameters
   TASK_PRIORITY_CON_MGR,    // Priority
   NULL,                     // Task handle
   0                         // Run on core 0
);

The result: a smooth, consistent data flow to the cloud, without loss or crashing.

Live Demo Results

We ran multiple charge/discharge cycles and monitored the results remotely via Blynk.

  • During discharge, current readings turned negative and SoC decreased steadily.
  • During charging, current flipped positive and voltage rose predictably.
  • Threshold-based alerts were triggered when SoC fell below 20%, notifying us via push and email.
  • The Blynk chart widgets showed smooth transitions between states and allowed zooming in for detail.
All of this was achieved without any custom frontend code - just smart configuration and robust device logic.

Why This Matters

This project is a proof-of-concept showing that:

  • A serious, professional-grade embedded device (like Dunamis v2.0) can integrate seamlessly with Blynk Cloud and its fully managed MQTT/HTTPS infrastructure.
  • Developers can focus on hardware and application logic, not boilerplate cloud infrastructure.
  • Dashboards, alerts, and remote access can be set up in hours, not weeks.

For technical teams and IoT-focused businesses, this integration drastically reduces time to market. You get the flexibility of custom firmware and hardware, combined with Blynk’s proven cloud platform.

Final Thoughts

By combining Rebels Software’s IoT expertise with the power and simplicity of Blynk, we quickly delivered a working battery monitoring solution that’s production ready. Our experience with the Dunamis v2.0 testbed proves that even industrial-grade hardware can be up and running with cloud dashboards, alerts, and data visualization in record time.

If you're building connected products - whether for energy storage, asset tracking, or smart infrastructure - Blynk can help you move faster. And if you need a partner who knows how to bring embedded devices to life, Rebels Software is here to help.

Ready to build your own industrial battery monitor?

⟶ Get Started with Blynk | ⟶ Talk to Rebels Software

Get latest news from Blynk

Over 500,000 people already signed up our newsletter. We never spam.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Other publications for you: