Remote Low-Cost Web-Based Battery Monitoring System and Control Using LoRa Communication Technology

: Batteries are a complex electrochemical device that exhibit non-linearity and stochastic behavior which rely upon the operational conditions and environmental factors, making battery monitoring a vital feature throughout its application. This paper introduces a novel web-based battery monitoring and control system that utilizes Long Range (LoRa) communication technology, an integral part of the Internet of Things (IoT). The system is implemented with the ESP32 microcontroller, with an emphasis on affordability in broader applications. The system provides comprehensive real-time online data by integrating a combination of multiple sensors. The proposed system seeks to address the limitations of existing communication technology by utilizing the benefits of LoRa, a technology that facilitates effective long-range, low-energy communication which makes it particularly well-suited for real-time monitoring applications. In addition, a control operation enables users to regulate crucial aspects of batteries, such as their charging and discharging. The research conducted a meticulous experimental evaluation of the proposed system at different operations, and the results successfully aligned with the main objective and aims of the research. The proposed system successfully enables real-time remote monitoring and user control, long-term data visualization through data logging, and assessment of battery conditions. Data logging was introduced to enhance the utilization of future battery evaluation, such as State-of-Charge (SOC), State-of-Health (SOH) and Remaining Useful Life (RUL). As a result, the developed system makes it suitable for many applications requiring effective energy storage solutions, such as renewable energy and Electric Vehicle (EV) applications.


Introduction
Batteries have a significant role in modern society, providing energy for a wide range of uses, including portable electronic gadgets, Electric Vehicles (EVs), renewable energy storage infrastructure, and many other applications.Ensuring optimum functionality, lifespan, and safety of these batteries is crucial, requiring monitoring and control systems to guarantee their efficient and constant operation [1].With the remarkable increase in the use of battery-powered solutions in daily life, there is a growing need for advanced battery monitoring systems.Battery monitoring has significant importance not only in personal electronic devices but also in significant applications like EVs.EV are highly promising as the most sustainable and eco-friendly mode of transportation on account of their low to zero COx and NOx emissions while in use.The automotive industry and manufacturers have made major advances in EV technology in recent years, resulting in enhanced performance and reduced production costs [2].In the context of EVs, batteries serve as more than just energy storage devices; they serve as the essential component accelerating the electric transport transition.Battery failure or mediocre performance in an EV may have significant effects on both operating efficiency and the general feasibility and acceptability of electric transportation.Ensuring the safety and reliability of EV, as well as establishing confidence in the transition to EV as the primary form of transportation, requires an oversight of battery health.This involves real-time monitoring as well as immediate responses and measures to hazards and irregularities that could lead to battery fire.
Standard battery monitoring systems often encounter obstacles that restrict their extensive implementation.The adoption of comprehensive monitoring systems is hindered by the complex and expensive installation and maintenance, as well as a limited communication range.In light of these difficulties, this study presents a method for monitoring batteries; a Remote Low-Cost Web-Based Battery Monitoring System.This system utilizes the ESP32 microcontroller and LoRa communication technology to overcome the limitations of conventional solutions.It offers a cost-efficient and user-friendly platform for managing batteries remotely.The simple graphical abstract of the proposed battery monitoring and control system is shown in Figure 1 below.Battery monitoring provides an important function in the current situation, characterized by the growing use of renewable energy and the widespread use of Internet of Things (IoT) devices.Remote monitoring and control of batteries improves the safety and reliability of energy systems.This paper presents the development, fabrication and implementation, and assessment of the proposed battery monitoring system.By examining its design, methodology, and application scenarios, the purpose is to demonstrate an effective and practical solution.
Additionally, this study aims to add to the continuing discussion on energy management by highlighting the crucial significance of battery monitoring.

Battery Monitoring System
The substantial research on battery monitoring systems is driven by their crucial role in improving the performance and safety of batteries.The literature on battery monitoring systems highlights the crucial importance of these systems in ensuring the reliability and long lifespan of batteries in various applications.Prior research has mostly concentrated on addressing the difficulties posed by the non-linear and stochastic nature that characterize batteries.The goal is to enhance their effective use, reliability, safety, and longevity.
Recent research [3][4][5] has resulted in the incorporation of multiple features and sensors to offer a more extensive assessment of the battery's condition which in turn provide a lot more information regarding the current status of the batteries where the data can be used to ultimately optimize battery performance.However, most of the proposed solutions are complex and costly.

Internet of Things (IoT) Based Monitoring System
The Internet of Things (IoT) refers to several technologies such as radio frequency identification, electronic sensors, smart technology, nanotechnology, and others, which are used for information processing and acquisition.It is regarded as the third phase of the information industry, after the computer, internet, and the wireless communications network.Currently, it is extensively used in industrial, transportation, environmental, defense and military, among other sectors [6][7][8].Previous research [6] has conducted a thorough and systematic Few studies, notably those in [9][10][11] have examined the use of IoT in battery monitoring systems and emphasize the significance to have real-time monitoring in order to recognize the intricacies of using batteries in a variety of applications, which are in line with the main focus of this proposed study.
A research proposed in [9] introduced a straightforward battery monitoring system using the Internet of Things (IoT) concept.The system uploads data of the battery parameters to the cloud by employing an open source NodeMCU Wi-Fi module for the ESP8266.The data is then sent to a platform called ThinkSpeak, developed by MathWorks.The author also noted that the data can be collected and stored on the cloud, allowing for convenient retrieval and analysis at any time.Nevertheless, despite the simplicity of this approach, the use of Wi-Fi for smartphone connections restricts the retrieval of data due to the complexity of needing an internet connection or cellular data outside of the local network.Moreover, the restricted coverage area of Wi-Fi might be a constraint.
The study in [10] proposed a battery monitoring system for EV batteries.This system was built on a hardware platform utilizing the open-source Node-RED environment.The use of the Message Queuing Telemetry Transport (MQTT) protocol is what made the system an essential component of the Internet of Things (IoT).This is a communication protocol that allows for the transmission of data in a lightweight network.The protocol is used for machine-to-machine (M2M) communication, using a publish/subscribe communication architecture.A broker is a fundamental aspect for MQTT transmission of data, and Transmission Control Protocol/Internet Protocol (TCP/IP) is utilized to establish a connection between the client and broker server.The broker's responsibilities involve upholding client subscriptions to certain topic, receiving published messages related to those topics, and distributing those messages to subscribing clients for updates [12].In the event of a disconnection between a client and broker, the broker must initiate a new connection with the right clients in order to resume the communication transmission.
In [11], the implementation of a battery monitoring system using an Arduino microcontroller and SIM808 module was proposed.The SIM808 is a multifunctional module that combines the functionalities of Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), and Global Positioning System (GPS).The device utilizes the most recent GSM/GPS module SIM808 from SIMCOM, which is compatible with GSM/GPRS Quad-Band network and incorporates GPS technology for satellite navigation.The proposed battery monitoring system utilizes the SIM808 module to transmit the data to the internet, allowing users to access it via a web-based system.The web-based site can display the GPS position and the measured voltage data of the battery.However, the absence of a data logging ability and the one-minute update delay with GPRS cellular data speed can have significant implications for battery safety.Furthermore, the need to subscribe to a SIM data plan will contribute to the overall long-term expenses of the system.

Long Range (LoRa) Technology
The Long Range (LoRa) communication technology is well recognized for its low-power and long-range characteristics [13], which makes it well-suited for battery monitoring.LoRa is often cited in literature as a costeffective communication option, particularly in situations where it may be difficult to inexpensively create a large-scale communication infrastructure.Researchers explored LoRa as a method to facilitate cost-effective and reliable transmission of data for battery monitoring devices.The potential of LoRa in the context of the Internet of Things (IoT) was investigated by [14][15][16], which emphasized its benefits in facilitating effective long-distance, low-power communication.This is consistent with the selection to use LoRa technology in the proposed system, highlighting its significance and efficiency in tackling the communication difficulties encountered by conventional monitoring systems.The comparison of a few different wireless communication protocols can be seen in Table 1 provided below.A wireless Photovoltaic (PV) monitoring system utilizing LoRa technology was implemented in [14].The monitoring system was employed to monitor the real-time temperature of both the front and back surfaces of the photovoltaic panel.A gateway device establishes communication with the smart meter using RS485 protocol.It retrieves various electrical parameters from the photovoltaic power generation system, such as power generation capacity, voltage, current value, instantaneous power, and inverter frequency.Subsequently, it transmits the collected data to the server by means of GPRS.The network publishing software and upper computer software that are used to gather, store, process, and publish the data that the field acquisition device collects are included in the server.The presented findings indicate that in a densely populated space, the communication range of LoRa may extend up to 515 meters.Furthermore, when the communication rate is 3255.21bps, the data collecting device employing LoRa can achieve a battery life of 2.93 years with a battery capacity of 3600mAh.Another implementation of LoRa may be observed in [15].This application focuses on managing smart waste bins by employing the LoRa communication protocol exclusively for transmitting data regarding the bin's position, real-time status, and fill level.
Author in [16] proposed a LoRa-based appliance monitoring and control system.A link was created between an android phone and a microcontroller (ESP32) via Wi-Fi.The LoRa module used the Wide Area Network (WAN) communication protocol to provide the switching capabilities inside the designated region.This specific protocol is referred to as LoRaWAN.The proposed approach additionally utilizes a developed android application, which serves as an effective implementation for a user-friendly graphical interface.The results yielded accurate environmental data, highlighting the system's exceptional performance across a range of up to 12 kilometers.The suggested intelligent system, characterized by its modular architecture, demonstrated remarkable efficacy in remotely managing and monitoring household appliances, while using relatively little power.The use of a WAN in the method undeniably enhances the range across which data can be transmitted.However, LoRaWAN necessitates the use of an external gateway to create a link between the transmitter and receiver.While LoRaWAN does not inherently depend on the internet, this proposed research involves the use of gateways that are linked to the internet.Similarly, LoRaWAN was employed in [17] and [18] to monitor PV systems and detect fires in rural areas, respectively.The system described in [18], relies on an internet connection and a server, both of which incur significant expenses and contribute to higher overall power consumption.This trade-off between functionality and cost is a crucial factor in determining the costeffectiveness of solution proposed in this paper.

Electric Vehicle Battery Monitoring
The research from [19][20][21][22] all proposed a real-world application for a battery monitoring system, with particular emphasis on its application in EVs.The system in [22] monitors the battery to detect dead cells, highlighting the significance of monitoring battery lifespan and safety.Hence, battery monitoring systems have a wider scope of use that goes beyond conventional fields, making them relevant in fields like EVs.
Furthermore, the integration of IoT technology into EV has attracted interest due to its ability to improve real-time monitoring, predictive maintenance, overall efficiency, and advanced data analytics for future optimization of EV batteries.Hence, this paper proposed system's ability to be used in EV applications complements the increasing significance of battery health management in the electrification of transportation.Additionally, it contributes to the advancement of intelligent and connected transportation systems through IoT.
As researchers delve into methods to make EV technologies more cost-effective, the literature emphasizes the significance of providing battery monitoring capabilities that are affordable to a wide range of users.
As a whole, all the study highlights the interconnection of many research endeavors, with each one providing vital insights for the advancement of efficient battery monitoring systems.This encompasses an exploration of advanced communication technologies, microcontroller selection, and a comprehension of the intricacies of battery behavior.Therefore, the justification for the proposed system is based on the collective knowledge and progress demonstrated in all these research endeavors.
Few contributions of this paper: 1. To overcome the limitation of existing short distance (10-100 m) communication technologies, the research has designed an IoT system with an ESP32 module and LoRa for long range communication via transmitting and receiving data with low power consumption.2. The proposed method has implemented a web-based monitoring and control system designed to observe and provide real-time information on various sensor data.3. Control feature that allows the control of critical battery aspect, specifically charging and power output.4. A few tests of operation were conducted in various real-world scenarios to evaluate system performance.5. Data logging capability that enables long-term analysis of battery monitoring and future use of optimization

System Design
In order to effectively conduct the development and the implementation of the Remote Low-Cost Web-Based Battery Monitoring System, the methodology is compartmentalized into hardware and software.The system consists of two components: the sensor side, where all the sensors are located, and the remote side, where all the data is transmitted to and received for monitoring and control.

Hardware Description
The design emphasizes a low-cost hardware configuration without compromising functionality.The microcontroller unit, selected for its cost-effectiveness and efficiency, functions as the central processing unit.The choice of sensors, such as temperature, humidity, voltage, and current sensors, is based on costeffectiveness while ensuring they align with all the requirements for reliable data acquisition.The objective of this cost-effective approach is to enhance the accessibility and viability of the battery monitoring system for a wider array of applications.

Microcontroller Setup
The TTGO LoRa32 SX1276 OLED ESP32 microcontroller, which is shown in Figure 4 below, is used as the main processing unit for the monitoring system.The Arduino Integrated Development Environment (IDE) was used to program the ESP32, taking advantage of its interoperability and wide library support.The configuration involved pairing the microcontroller with the chosen sensors in order to collect data in real-time.Recent studies highlight the increasing use of the ESP32 microcontroller in battery monitoring systems due to its adaptability and cost, making it an ideal choice for IoT applications.The ESP8266 microcontroller, featured in [9] and widely used across several fields, is a predecessor to the ESP32 microcontroller.The integration of the ESP32 into the proposed system aligns with the objective, highlighting its applicability and scalability in developing cost-effective monitoring solutions.Table 2 shows that the current pricing of the microcontroller is fairly affordable considering its extensive functionality and benefits compared to comparable microcontrollers often utilized in different IoT applications.In addition, the inclusion of an OLED display on the board allows for an intuitive display of crucial data and system status during the development and experimental testing phases of the project.This feature enhances user-friendliness and provides an interactive experience without requiring external displays.Hence, the integration of OLED and LoRa in the microcontroller facilitates the development of projects that benefit from wireless communication and instantaneous visual feedback, providing benefits in terms of user-friendliness, compactness, and energy conservation.The microcontroller is supplied by a portable, independent battery as its power source.In this particular instance, a 5000mAh battery is used to deliver 5V to the USB serial port of the ESP32.As per the study conducted by [14], their system can operate for up to 2.93 years with a 3600mAh battery due to the low power consumption characteristics of the LoRa technology.

LoRa Communication Protocol Integration
Incorporating LoRa technology was done to overcome the limitation of the existing communication protocol, namely Wi-Fi, in IoT applications with limited range.The LoRa module enabled effective wireless communication between the ESP32 microcontroller and another data receiver.The architecture of the system was specifically developed to ensure seamless communication and efficient transmission of data across long distances while minimizing energy usage.The LoRa transceiver module included into the TTGO LoRa32 board is chosen for its cost-effective implementation and energy-efficient communication capabilities.The purpose of this decision is to reduce the cost on end-users, particularly in situations when the expense of upgrading communication infrastructure would be overly costly.The cost-effectiveness of LoRa technology enhances the affordability of the system while ensuring reliable transmission of data across great distances.

Sensor Integration and Calibration
Voltage, current, humidity, and temperature sensors were integrated into the system.Calibration procedures were implemented to ensure accurate and reliable data readings.This step was crucial in enhancing the precision of the monitoring system, aligning the collected data with real-world battery parameters.
The system utilizes a DHT11 sensor to measure temperature and humidity.The temperature and humidity ranges of the DHT11 sensor are 0°C to 50°C and 20% to 90%, respectively.It is an inexpensive digital sensor for these measurements.The notable parameters of this device are its temperature accuracy of ±2°C and humidity accuracy of ±5%, with a temperature resolution of 1°C and humidity resolution of 1%.The sensor consumes relatively little power and can run on a 3.5V to 5.5V supply voltage.The device's small size, userfriendly interface, and ability to work seamlessly with widely used microcontrollers such as the ESP32, making it well-suited for a wide range of projects.The DHT11 Temperature and Humidity sensor schematic diagram and hardware is shown in Figure 5.The system utilizes a voltage sensor that operates on a resistor voltage divider circuit with a specific resistor value of 30k Ω and 7.5k Ω resistor.The voltage divider formula can be seen in Equation 1.This configuration enables the sensor to accurately monitor voltages ranging from 0 to 25V.The module functions by using a resistor circuit to divide the input voltage, resulting in a proportional output that is compatible with microcontrollers equipped with Analog-to-Digital converters (ADC).Figure 6 shows the voltage sensor schematic diagram and hardware component.The ESP32 allows for the measurement of analog values, enabling the detection of variations in voltage within the range of 0 V to 3.3 V.The measured voltage is then mapped to a range of values between 0 and 4095 as the ESP32 is equipped with a 12-bit ADC, where 0 corresponds to 0V and a reference voltage of 3.3V corresponds to 4095.Nevertheless, the ADC in different microcontrollers is unique and ideally should exhibit linearity.However, this is not the case, which necessitates the calibration of the values.The voltage sensor in this system is calibrated by comparing the difference in values between a precision laboratory test bench multimeter.This difference is then used to derive the offset factor, as given in Equation 2.
The ACS712 current sensor is used in this system to monitor both the current output load and the charging current input.The ACS712 is a current sensor that utilizes the Hall effect to precisely measure electrical current in circuits without the need for direct contact.The main characteristics include availability in three different current ranges (5A, 20A, 30A), low noise operation, and a linear output voltage that is directly proportional to the current.The sensor has a known sensitivity factor, which enables precise calibration and interpretation of its output.The sensitivity of the 5A module is 185 mV/A, 20A module is 100 mV/A, and the 30A module is 66 mV/A.The ACS712 can simply be connected to microcontrollers, allowing it to be used in a wide range of applications.It is equipped with an integrated overcurrent protection system to provide better reliability in situations when preventing excessive current is essential.In summary, the ACS712 is an excellent cost-effective component in many applications that need accurate and reliable current measurements due to its precise measurement capabilities.The ACS712 Current sensor schematic diagram and hardware component is shown in Figure 7 below.This ACS712 current sensor voltage input is 5V which the TTGO LoRa32 board has as opposed to a standard ESP32, which only operates on 3.3V.However, the TTGO LoRa32 12-bit ADC still utilizes 3.3V as its reference voltage output, which must be translated and mapped into the ADC in the same way as the voltage sensor above.The accurate current value of the sensor can be determined using Equation 4 and 5 below.When the analog value is measured at 0A, the voltage is found to be 2.5V, this voltage will be used to be subtracted in the calculation, considering its sensitivity.Similar to the voltage sensor mentioned previously, the calibration process included comparing the sensor's current output value with the accurate measurement obtained from the precise laboratory test bench multimeter.The sensitivity factor was then calculated to make necessary offset adjustments.
Sensitivity Factor Sensor Sensitivity (5) Concerning measurement, the accuracy of the voltage and current sensor and its calibration can be influenced by multiple factors and interferences.One of these factors is the resistance in the wire, which is impacted by both the length and the surface area of the wire.The resistance affects the accuracy and calibration of the sensor, with the length being directly proportional and the surface area being inversely proportional to the resistance.
The final component of hardware required in the system is a relay switch, which regulates power flow in the system.This feature ensures a crucial safety factor in the system, as it gives the user the ability to regulate the power flow for the charging and load output of the system remotely.The 2-channel 5V relay module is specifically developed for regulating high-current output by using digital signal.Every individual relay channel on the module has the capability to independently open or close an electrical circuit.The relay modules are equipped with optocouplers to provide input signal isolation, safeguarding the controlling circuit from possible current inrush or voltage spike.The relay modules are often used in many different applications where there is a need to switch to higher-voltage or higher-current devices using low-voltage control signals.The relay module used in this study is a 10A relay module.The 2-channel Relay module schematic diagram and hardware component is shown in Figure 8 below.

Software Description
The entire system is programmed with the Arduino IDE software.The Arduino IDE is an intuitive development environment that utilizes a streamlined version of C++ to program microcontrollers.When working with the ESP32 microcontroller, developers could improve the Arduino IDE by adding an ESP32 board support package.This allows for intuitive programming of the ESP32 microcontroller using the familiar IDE, making it especially well-suited for IoT applications.The Arduino IDE allows users to effortlessly develop, build, and upload code to Arduino and ESP32 boards, enabling a wide range of applications without the need for considerable low-level programming knowledge.
Figure 9 shows the flowchart that illustrates the operation of the software and programming.Programming plays a significant role in the development phase of this battery monitoring system, which will be explained in this section.
Before taking measurements of temperature, humidity, current, and voltage at the sensor side, the system will first initialize the LoRa module, sensors, relay switches, and output devices.Subsequently, the analog value obtained from the sensor is measured and then read by the ESP32 ADC.Subsequently, this data is processed using the formula outlined in the previous section.Since LoRa transmits data in packet form, the sensor readings were compiled and transmitted as a single packet before the measured value was sent.The system's transmission rate was set to transmit one packet per second, ensuring receiving of real-time data for monitoring and analysis.Since the system functions as a two-way communication, the microcontroller additionally remains in a state of waiting for any transmissions detected from the remote side of the system.Once a packet is detected and received from the remote side, the system will evaluate the packet to identify the suitable course of action for the relay switch status and the output devices.This switch controls the opening or closing of the circuit of the battery system, which includes both the charging and load output.This program will iteratively operate to continuously measure sensor data and transfer it to the distant location, while also detecting any received packets.
At the remote side, the LoRa module and all input and output devices were also first initialized.Subsequently, a web server host using HTML is built and established that allows remote monitoring.Following that, the microcontroller remains in a waiting state to receive packets from the LoRa on the sensor side.Upon receiving the packet, the data will undergo processing and subsequently be sent to other parts of the system.As per the transmission rate defined in the system receiving real-time data, the received sensor data will be sent to the web server, which will update every second.The data will be fed into a condition with a predetermined threshold, which will trigger the corresponding output action, such as activating the LED and sounding the buzzer alert, serving as a notification to the user.The data will be recorded using a suitable data logger, which will be further explained in a later section.Simultaneously, the remote side will monitor the status of the button and transmit any changes as a packet to the sensor side, which controls the aforementioned relay switches.

Web-Based Monitoring Development
The development of a visually intuitive site was made feasible through the utilization of HTML to develop a user-friendly web-based interface hosted on the TTGO LoRa32 microcontroller.Real-time data was designed to be displayed through the site allowing remote monitoring and management of the battery system.To minimize development and maintenance expenses, the web-based interface is designed with simplicity in its main objective.In order to simplify real-time monitoring, excessive complications are omitted from the interface's design and functionality, while vital features that are necessary for effective monitoring are maintained.This methodology not only facilitates economic integration but also improves accessibility, thereby rendering the monitoring system accessible to a wide range of users.The web server holds an array of data, one of which is the time stamp of the most recent packet that was received.The representation of the developed web interface accessed via a smartphone web browser is presented in Figure 10.

Data Logging Implementation
In order to facilitate analysis and long-term visualization of data, a data logging tool was integrated in the system.The system employs a Data Streamer add-in in Microsoft Excel to perform direct storing to the datasheet.It is an add-in that enables the serial output of the ESP32 board to be linked via the COM port of a computer.
The Data Streamer add-in for Excel is an essential element of the system for the project, facilitating the smooth integration of real-time data streaming functionalities into the well-known Excel interface.This tool facilitates the real-time visualization and analysis of data streams, enabling users to make prompt decisions and gain deeper understandings.By establishing connections between Excel and a wide range of data sourcesincluding external databases, IoT devices, and sensors, this tool enables users to monitor data with ease.As a result, Excel has become the center for interactive data visualization and analysis in the system.Each data is distinguished by a comma (",") that is programmed to the serial print output of the Arduino IDE.This integration of data logging enabled a comprehensive evaluation of patterns and eased future analysis of the data.An additional viable option that can be readily executed in this setting is the utilization of microSD for data storage.However, for offline and real-time analysis and instant practical purposes such as testing and result validation, the logging data was stored directly.Figure 11

System Integration and Testing
For the purpose of validating the viability of the real-time monitoring system that we present, a prototype was built for testing in a real environment.The system prototype is illustrated in Figures 12 and 13.The results of tests indicate that battery information is transmitted to the user's phone and displayed thereon, allowing users to conveniently monitor the battery's status.
In the final stage, every component was seamlessly integrated, and the system was thoroughly evaluated to ensure proper operation.The testing process included evaluating the accuracy of the sensors, the reliability and stability of the LoRa communication, the alert notification system, the responsiveness of the web interface, and the ability for storing data recording.Few testing scenarios were implemented in order to replicate a wide range of operational conditions, thereby guaranteeing the system's resilience and adaptability where the testing and system integration processes are designed for cost efficiency.The strategy prioritizes the utilization of easily accessible resources to simulate scenarios, thereby reducing the reliance on specialized testing devices.The purpose of the testing phase is to efficiently identify potential issues so that iterative refinements can be implemented.By adopting this methodology, the complete deployment can be maintained at a manageable cost while maintaining the battery monitoring system's reliability.

Results and Experimental Analysis 4.1 Normal Operating Condition
The evaluation of the normal operating condition was conducted meticulously in this experimental study by applying a 10W load that was systematically applied 200 seconds after the experiment commenced.The intentional introduction of this load corresponds to a practical utilization scenario, allowing for a thorough examination of the battery's performance under situations that replicate real-world power consumption patterns.The experiment starts immediately after the charger or power supply is disconnected, introducing a temporary state that simulates typical user situations.This underlines the ability of the battery to smoothly transition and continue operating using stored energy.
The experimental timeframe of 1000 seconds was planned to ensure an extended period of observation, which enabled a comprehensive examination of the battery's dynamic response and stability while operating normally under sustained conditions.The voltage and current output data that were recorded, as illustrated in Figure 14, provide a comprehensive account of the battery's electrical performance.Simultaneously, monitoring of temperature and humidity, as illustrated in Figure 15, offers important insights into the impact of environmental factors on the electrochemical processes of the battery where these factors serve as catalysts for variations in performance.The electrical power output, graphically depicted in Figure 16, serves as a quantitative measure of the battery's ability to withstand the applied load.This metric facilitates a comprehensive assessment of the power delivery of the battery over a period of time, allowing for the detection of any observable trends, variations, or anomalies, where the understanding of these power dynamics is crucial for defining the performance envelope of the battery.Furthermore, under normal operating conditions, the intentional decision to keep remote side endpoints and fixed sensors at an exact distance of 50 meters introduces an additional level of controlled complexity to the investigation.By establishing a fixed distance, this experiment ensures that testing parameters are standardized, thereby reducing the impact of external factors, and increasing the reproducibility of the results.By providing a controlled yet representative operational environment, it enables a thorough assessment of the battery's performance.This ensures that the outcomes acquired are representative of the device's capabilities when subjected to consistent environmental and load conditions.

Data Logging Test
The inclusion of the Data Streamer add-in is a crucial component that significantly improves the results of the data logging evaluation in this project.This tool performs well in collecting and saving data, while also demonstrating great ability in providing real-time insights.It provides a higher degree of depth to the analysis and monitoring of the datasets.The incorporation of real-time data streams in Excel, made possible by the Data Streamer add-in, significantly enhances the efficiency of data management.This interface allows for immediate modifications and live analysis, permitting researchers to carefully observe and respond to sudden shifts in the obtained datasets.This connection enhances the general effectiveness and functionality of the data recording features in the project by providing immediate access to data.
However, it is crucial to acknowledge and resolve occasional interruptions in data collection that occurred in some cases, causing deviations from the expected one-second interval between data points.Although uncommon during the normal operating condition testing, it is essential to investigate possible reasons for such infrequent events.A conceivable reason may be a momentary interruption in transmission; however, such occurrences are considered quite uncommon.Identifying these sporadic data gaps is crucial for improving the accuracy of the data gathering system and requires further investigation to determine and fix the underlying reason.
Although there are occasional missing data points, a significant portion of the collected data aligns with the expected one-second intervals after configuring the sensor's transmission parameters.The consistent performance of the data logging system under regular working settings demonstrates its resilience, indicating its capacity to effortlessly send and record data within specific time parameters.
A few seconds of data that was recorded into Excel using the Data Streamer is provided in Table 3 to demonstrate the data recording procedure.This sample offers a concrete demonstration of the accuracy and synchronization obtained by the data logging system, highlighting its benefit in gathering and recording crucial information throughout the experimental process.

Notifications for User
The resilience of the user output notification, a crucial safety aspect, has been thoroughly examined by a comprehensive series of tests inside the system design.The testing process rigorously evaluates the system's response when the measured sensor values exceed certain criteria.During such occurrences, the system coordinates a prompt and conclusive response, initiating an alert and lighting a blinking red LED.The immediate and clear feedback mechanism is crucial for an alarm system, providing in-depth information about any possible dangers or abnormalities identified in the monitored battery system.
Furthermore, the user's ability to actively change the switch configuration is a prominent aspect of the experimental testing approach.Users are able to remotely control the circuit, allowing them to quickly open or close the circuit based on particular factors for both charging and load output.This user-controlled switch goes beyond being just a feature, it includes a dynamic aspect that not only improves user engagement but also provides the ability to make real-time decisions.This aspect of the system increases the encouragement in enhancing safety protocols in crucial circumstances, enabling users to rapidly deal with unexpected scenarios.
Figures 17 and Figure 18 show the visual representation that depicts a specific moment of the output notification in relation to the operational state.These visual representations not only emphasize the effectiveness of the user output notification system but also provide a concrete insight into the system's responsiveness and instantaneous feedback mechanisms.The thorough testing method, which includes a wide range of situations and possible irregularities such as the temperature, guarantees the reliability, accuracy, and promptness of the user output alerts.This, in turn, enhances the overall performance and safety qualifications of the battery monitoring system.

User Input Test
The experimental testing phase focused on evaluating the functioning of remote user input specifically examines the state of the user remote button switch.The state changes of the switch are carefully observed at all times as they go along the communication channel and are sent to the primary sensor side.Upon reaching the sensor side, this information plays a crucial function in controlling the relay switch, which in turn determines the regulation of the load output or charging in the battery system.
The test results produced from these investigations confirm the effective performance of the remote button switch functionality.The relay switch consistently changes its state in direct correlation with the relevant alterations in the remote button switch.This consistency highlights the effectiveness of the remote user input system in enabling smooth communication and control between the user interface and the sensor side control components.
However, a subtle issue occurred throughout these experimental attempts.The LoRa communication had occasional interruptions, resulting in brief gaps lasting about 5 to 10 seconds.These interruptions occurred before the relay switch changed to reflect the new state prompted by the remote button switch.Although these occasional delays were observed, they were determined to have a negligible effect on the overall functioning of the system.The system demonstrated robustness and reliability, successfully mitigating these few instances of delays, and preserving operational consistency.
The successful validity of this experiment highlights both the strong and reliable user input method and the basic dependability of the relay switch in effectively controlling the charging and load output with good responsiveness.The system's capacity to alleviate the impact of temporary interruptions in communication channels demonstrates its adaptive and robust design.Therefore, this thorough investigation establishes the remote user input capability as an essential and reliable element within the wider range of the battery monitoring system, confirming its effectiveness in practical operating situations.Figure 19 and Figure 20 shows the experimental demonstration of the User Input test, where both the charging and load switch is switched ON.

LoRa Range Capability
The comprehensive analysis of LoRa's range capabilities provides a very thorough and technical consideration, exploring the nuances involved in the experimental testing phase.This extensive investigation goes beyond the simple measurement of distance measurements and explores the many factors that determine the effectiveness of LoRa communication systems in real-world situations.
This thorough investigation reveals a convergence of theoretical capabilities and real limitations in the less dense setting, where the LoRa system demonstrated a formidable range of up to 1.3 kilometers.Tests done with the TTGO LoRa32 SX1276 ESP32 board revealed a theoretical range estimate of 7 kilometers, which is rather exceptional.Nevertheless, the execution encountered practical difficulties, particularly when confronted with environmental obstacles such as structures and foliage.Therefore, it is crucial to consider real-world obstacles while implementing LoRa systems in order to accurately estimate their range.
Table 4 shows the recorded data for the range testing in a less dense setting, including detailed information on the Received Signal Strength Indicator (RSSI) and the corresponding distances traveled.The RSSI measurement of -94, taken at a distance of roughly 1.35 km, is a significant observation point.This measurement coincides with a noticeable change in the surrounding landscape, characterized by a higher density of buildings and trees near a bend in the road.This numerical observation highlights the system's susceptibility to obstacles in its structure, revealing a crucial point where the power of the signal noticeably declines.Moving from less dense to a densely packed environment exacerbates the technical complexities of LoRa communication, as shown by the data presented in Table 5.By ensuring a clear line of sight to the building, solid communication was maintained while covering the first 200 meters.The increased density of buildings at around 400 meters creates an evident shift in the way the data transmission takes place.The RSSI value of -124 recorded for the last packet received from LoRa at the sensor side, which corresponds to a distance of 700 meters, demonstrates how blocked lines of sight significantly affect signal strength in a densely populated area.The tests' visual representations, Figures 21 and 22, are essential additions to the understanding of the quantitative data.These pictures are crucial for understanding the spatial difficulties of LoRa communication, providing a concrete representation of signal propagation difficulties in both minimal and densely populated environments.The detailed mapping of distances and topographical characteristics shows how environmental factors influence the functioning of the LoRa system.This thorough examination goes beyond the limitations of distance measures, uncovering the complex interaction between idealized theoretical distances and the practical obstacles presented by real-world surroundings.The investigation gives an idea of the intricate relationship between LoRa signal intensity, environmental obstacles, and their influence on communication resilience.These detailed insights not only enhance our knowledge of LoRa technology but also serve as a fundamental guide for maximizing the implementation of LoRa-based systems in any complex and varied communication ecosystems of today.The findings obtained from this comprehensive and technically sophisticated research provide guidance for making well-informed decisions, guaranteeing the optimal and productive use of LoRa communication in complex, reallife situations.

Discussion
Assuring the battery monitoring system's unwavering safety and reliability goes beyond its immediate function and becomes a complex undertaking with a range of technical complexities and practical implications.The significant ramifications of collecting and transmitting data in real-time, along with the extensive communication capabilities of LoRa technology, go beyond just identifying possible problems.They reinforce the safety architecture of battery systems by establishing a preventive barrier against systemic flaws.
In the intricate landscape of EV application, the safety matrix for EVs gets considerably more complicated owing to the specific requirement of their batteries.In addition to the usual concerns about temperature fluctuations and irregular charging, the system's real-time monitoring is crucial for addressing more complex challenges such as the deterioration of battery State of Health (SOH), uneven charge distribution, and the effects of high charging currents on the overall lifespan of the battery.Battery monitoring system not only ensures the prompt identification of any dangers but also allows proactive interventions, in line with the emerging trend of predictive maintenance in the automobile industry.
Furthermore, real-time monitoring not only addresses urgent safety issues but also plays a vital role in enhancing the overall efficiency of batteries in regard to data obtained from monitoring and logging.An indepth analysis of electrical and environmental factors, such as temperature, humidity, voltage, and current, provides a detailed insight of the battery's operating details.This understanding goes beyond the usual limits of reactive maintenance, promoting a transition towards proactive ways to address the difficulties related to battery deterioration.Therefore, the incorporation of machine learning algorithms into real-time monitoring systems is becoming a new area of focus, whereby the predictive analytics in this context not only predicts prospective problems but also coordinates proactive measures to enhance the operational efficiency of energy storage and discharge.
Moreover, investigating battery health in the wider framework of the Internet of Things (IoT) opens up a multitude of potential opportunities.Real-time monitoring data serves as a fundamental component for constructing complex models of batteries, allowing for virtual simulations and ongoing improvement of battery models.The combination of immediate data analysis with edge computing capabilities enables local decisionmaking, decreasing delay and improving system responsiveness.
The systematic collection of past performance data, made possible by the system's data recording capabilities, becomes a valuable resource for researchers and engineers.Historical data reveals hidden patterns and provides insights into long-term trends that go beyond the immediate operating scope.Integrating this data with sophisticated statistical models not only enhances the accuracy of predicting battery performance, but also plays a crucial role in determining the direction of future research.The collective usage of battery performance data across several sectors could eventually support the sustainable advancement of battery technology.
The choice of selecting the ESP32 microcontroller and LoRa technology as the technical foundation emphasizes not just a cost-efficient solution but also a deliberate endeavor to make sophisticated battery monitoring capabilities accessible to a broader set of users.Aside from the current hardware setup, continuous research efforts are dedicated to improving communication protocols and sensors.In addition, the investigation of alternative materials for sensor production and the incorporation of emerging wireless communication standards are included in the wider discussion, with the goal of expanding cost-effectiveness while upholding the stringent requirements for reliability and precision that are anticipated from modern monitoring systems.
Essentially, prioritizing cost-effective solutions does not imply sacrificing technical complexity.Instead, it demonstrates a commitment to ensuring that the advantages of sophisticated battery monitoring systems spread across many industries, beyond geographical and economic limitations.The current research environment is focused on reducing total costs and involves several areas such as improving software efficiency, establishing standardized protocols, and integrating modular sensors.This highlights the ever-changing nature of technology and its dedication to further development.
The true complexity and depth of battery monitoring systems are revealed in the delicate balance between safety, efficiency, data analytics, technological decisions, and cost considerations.In accordance with the full cost analysis in Table 6, the expenses related to implementing the proposed battery monitoring and control system using LoRa technology are not just expenditures, but rather investments in improving accessibility to energy storage monitoring where it highlights the cost-effectiveness of each item utilized.Every item signifies an informed choice, a trade-off in technical capability, and an insight into the changing field of battery monitoring technologies.

Future Improvements
Constant advancement is a fundamental characteristic of all technologies, that includes battery monitoring systems.Potential future developments in battery monitoring systems could involve the incorporation of advanced sensors, such as impedance sensors for more precise State-of-Health (SOH) evaluations and predictive algorithms for early anomaly detection, in order to provide even more precise readings in the IoT environment.Moreover, by augmenting the system's functionalities to include State-of-Charge (SOC) and SOH monitoring, it can provide a comprehensive resolution for EV battery management, thereby making a valuable contribution to the wider realm of IoT implementations within the EV sector.Furthermore, LoRa is not without its drawbacks, one of which is its restricted data bandwidth.The speed of data transmission may be impeded, which could potentially compromise the real-time monitoring capabilities.Additionally, reliance on the LoRa gateway constitutes a further limitation where the potential for a single point of failure is introduced by the use of a LoRa gateway.An additional limitation pertains to security considerations as it is imperative that IoT systems implement strong security measures.As a result, in order to address these limitations, exploration of the integration of multiple communication protocols should be implemented, thereby enhancing the system's adaptability, flexibility, and robustness against developments in communication technologies.In terms of its range capability, the LoRa range can be disrupted by a variety of factors, the majority of which are obstacles and structures.However, one factor that can be altered to significantly increase LoRa range is the improvement of its antenna.
With respect to the research, the data collected from the monitoring and control of this paper was intended to be used in the assessment of future battery development in order to enhance its efficiency.In addition to the successful implementation of the proposed approach, which primarily focuses on monitoring and control, there are a few additional factors that need consideration and are crucial with regard to Battery Management and Monitoring.Specifically, the factors of interest are battery capacity, Remaining Useful Life (RUL), SOC [21], and SOH.An essential factor in assessing the performance of batteries or any energy storage system is their aging and RUL.In a study by the author in [23], a method was introduced to predict RUL using an enhanced anti-noise adaptive long short-term memory (ANA-LSTM) neural network.This network incorporates highrobustness feature extraction and optimal parameter characterization, which are based on an improved dual closed-loop observation modeling strategy.In comparison to other optimum current approaches, there is a 51.80% drop in the maximum root mean square error, a 26.95% reduction in the mean absolute error, a 33.87% decrease in the highest mean absolute percentage error, and a 4.11% improvement in the R-squared value.The implemented multi-feature cooperation model achieves multi-scale parameter optimization and reliable Remaining Useful Life (RUL) prediction, therefore enhancing the practical use of lithium-ion batteries in industrial application.
Another study concerning the aging of batteries [24] introduced a method for estimating capacity in lowtemperature conditions by employing an enhanced iteration of robust multi-time scale Singular Filtering-Gaussian Process Regression-Long Short-Term Memory modeling (SF-GPR-LSTM).The SF-GPR-LSTM model optimizes carrier transportation synergistically, providing a theoretical basis for estimating the remaining capacity of batteries during their entire lifetime, even at very low temperatures.
Another study [25] proposed a method for predicting the RUL of supercapacitors using a combination of the Harris hawks optimization (HHO) algorithm and long short-term memory (LSTM) recurrent neural networks (RNNs).The HHO algorithm offers the benefits of a wide global search area and rapid convergence speed.Hence, the HHO method is used to enhance the reliability and stability of the system by optimizing the initial learning rate of LSTM RNNs and the number of hidden-layer units.The prediction results indicate that the HHO-LSTM model exhibits superior accuracy and resilience compared to the traditional LSTM and Gate Recurrent Unit (GRU) models.
The paper in [26] introduced a method for estimating SOH of lithium-ion batteries.This approach combines the use of Convolutional Neural Network (CNN), Wavelet Neural Network (WNN), and Wavelet Long Short-Term Memory (WLSTM) where the proposed estimation is based on the battery's aging characteristics.The experimental results obtained from the NASA Ames Prognostics Center of Excellence data set demonstrate that the proposed algorithm is highly effective for managing the health of Li-ion batteries.This is evident through a quantitative comparison with other widely used machine learning techniques, including back-propagation neural network, WNN, LSTM, WLSTM, convolutional neural network-long short-term memory neural network (CNN-LSTM), and Gaussian process regression.
A review article published by [27] conducted an analysis on the use of sensors in the monitoring system of energy storage devices, namely batteries and supercapacitors.The impact of inadequate monitoring on the efficiency of energy storage systems has been observed.Hence, in order to optimize the effectiveness of new energy storage devices without causing harm to the equipment, it is crucial to fully use sensing systems for precise monitoring of critical parameters such as voltage, current, temperature, and strain.The paper provides a comprehensive list of approaches with distinct novel features, along with a concise summary of their pros and cons to motivate researchers in relevant fields to investigate the early detection of safety incidents from their fundamental origins.
The aforementioned recent literature serves as a motivation for further development of the proposed system, consequently enhancing its practicality and implementation.Hence, considering the aforementioned proposed improvements, as well as any other factors not explicitly stated, the trajectory of the monitoring system is not fixed; rather, it is an ongoing and developing effort that anticipates continuous refinement and improvements.These proposed improvements have the potential to improve the system's capabilities, assure its adaptability to new technologies, and ensure its continued relevance in the future.

Conclusion
In conclusion, this study has presented a highly effective web-based monitoring and control system for batteries.This system utilizes LoRa communication technology inside the IoT framework, while simultaneously being cost-effective.The system integration provides extensive real-time online data, allowing users to remotely monitor and control critical battery operation including charging and discharging.The research successfully demonstrated the system's performance under different operating settings through extensive experimental assessment, thereby accomplishing its main objectives.The use of LoRa technology overcomes the constraints of current communication techniques by providing long-distance, energy-efficient communication that is wellsuited for real-time monitoring applications.Experimental evaluation of LoRa range capability testing reveals that it can extend beyond 1.35 kilometers in less densely populated areas; however, the range could be even greater if not for safety concerns in the area during the experimental test, as the same microcontroller hardware test demonstrates a range of over 7 kilometers on a different test.Although, in the range capability test for a high dense space, the communication transmission can only reach 700 meters.Data logging integration extends the system's functionalities, enabling long-term monitoring and assessment of battery states, including SOC and SOH.The implemented system is extremely versatile and has significant potential for many applications that need effective energy storage solutions, such as renewable energy and EV applications.The proposed monitoring and control system, characterized by its effective performance and user-friendly characteristics, has the potential to make a substantial contribution to the progress of battery technology and its wider applications in the changing field of sustainable energy.While it offers advantages such as cost-effectiveness and real-time monitoring and control, it also considers limitations such as restricted data transmission bandwidth and the associated security risks.The suggested improvements emphasize the system's dynamic attributes and its capacity for continuous advancement.After careful assessment, it is evident that this system is not a final product, but rather a notable research advancement that promotes further exploration and enhancement in the continuously developing field of energy management and control.

Figure 1 .
Figure 1.Graphical abstract of the proposed battery monitoring and control system.

Figure 2 .
Figure 2. Common block diagram of an Internet of Things (IoT) system.

Figure 3
below shows the block diagram of the entire system.

Figure 3 .
Figure 3. Block diagram of the battery monitoring system.(a) Sensor side.(b) Remote side.

Figure 9 .
Figure 9. Flowchart of the system software.(a) Sensor side.(b) Remote side.

Figure 10 .
Figure 10.Web-based interface of the LoRa Battery Monitoring System.
below shows an example of the live data storing on the Excel Data Streamer.

Figure 12 .
Figure 12.Sensor side of the Battery Monitoring System.

Figure 13 .
Figure 13.Remote side of the Battery Monitoring System.

Figure 14 .
Figure 14.Battery voltage and Current output on normal operating condition with load turned ON at 200 seconds.

Figure 15 .
Figure 15.Temperature and Humidity on normal operating condition with load turned ON at 200 seconds.

Figure 16 .
Figure 16.Power output on normal operating condition with load turned ON at 200 seconds.

Figure 17 .
Figure 17.Normal operating condition -Green LED enabled at remote side.

Figure 18 .
Figure 18.Red LED flashing at remote side due to hot temperature.

Figure 19 .
Figure 19.Remote side Charging and Load Switched ON.

Figure 20 .
Figure 20.Sensor side Relay Switch CLOSED for Charging/Load.

Figure 21 .
Figure 21.Range test site on a low dense space.(a) Map.(b) In-person view of the building at the distance.

Figure 22 .
Figure 22.Range test site mapping on a relatively dense building in between.

Table 2 .
Specification comparison of different microcontrollers.

Table 3 .
Data recorded sampled for 20 seconds on normal operating condition.

Table 4 .
Range test of the LoRa communication at a low dense space.

Table 5 .
Range test of the LoRa communication at a relatively high dense space.

Table 6 .
Overall cost of the proposed battery monitoring system.