## 2 System Model
### Electrolyte Level Sensing  
Evaporation of the electrolyte from the cells of lead-acid batteries is a well-known and serious problem. It leads to performance degradation in terms of the power output and can damage the cells. These batteries require continuous monitoring to reduce operational charges, as explained earlier. Different techniques including capacitive liquid level sensors [18; 19; 20], resistive liquid level sensors [21], and ultrasonic level detectors [22] have been proposed already to overcome this problem. The capacitive sensors measure the change in capacitance between the two plates, produced by the changes in the liquid level. Two kinds of capacitive sensors are available; they are characterized by the type of the fluid, i.e., a fluid with a high dielectric constant and a fluid with a low dielectric constant.  
Figure 1: Block diagram of the proposed system. ADC: analog to digital converter; GUI: graphical user interface.  
Figure 2: Pin map detailed diagram of the proposed system with the corresponding input.  
A very small difference in the liquid level causes a small difference in capacitance that becomes difficult to measure; hence, accuracy is a major concern in liquid level sensors. Ultrasonic level sensors use the speed of sound to calculate the acid level. An ultrasonic signal is transmitted and is reflected back from the liquid level and received at the sensor. The sensor then measures the distance based on the speed of sound and the time difference between the transmission and reception. The problem with ultrasonic sensors is the transmitted beam pattern. The beam spreads as the signal travels along. The transmit pattern limits the use of ultrasonic sensors in narrow cells, as the signal can strike the wall of the container/cell resulting in a wrong calculation of the liquid level.  
The simplest and most cost-effective way of sensing the electrolyte level in a lead-acid battery is by using an electrode [23]. A metal rod/electrode is placed vertically in the electrolyte solution according to a target level. When the electrode touches the electrolyte, a current flows through the electrode. As the electrolyte evaporates or the liquid level drops below the target level, the contact between the rod and the electrolyte is lost and so is the current flow across the electrode.  
Based on this, we have developed a simple and yet cost-effective two-electrode-based electrolyte/liquid level sensor for our proposed method. The sensor can measure two different levels with a very high accuracy. The sensor is shown in Figure 3. Two electrodes are dipped inside the battery according to predefined targets. A thin film of electrolyte is always present on the inside walls of the cells, therefore, the electrodes are positioned so that they do not touch the walls. When the electrode touches the electrolyte, a current flows through the corresponding electrode connected across the negative terminal of the battery. The potential difference across the output of the electrodes and the battery negative terminal is stepped down using a LM7805 regulator, as high power can damage the microcontroller. The output is then fed to the microcontroller at ports PF2 and PF3. The microcontroller then senses the liquid level in the cell of the battery and sends the data to the server through the WizFi.