{"id":499,"date":"2024-03-31T14:29:35","date_gmt":"2024-03-31T14:29:35","guid":{"rendered":"https:\/\/www.zonetronik.com\/en\/?p=499"},"modified":"2024-03-31T15:25:49","modified_gmt":"2024-03-31T15:25:49","slug":"arduino-battery-capacity-tester","status":"publish","type":"post","link":"https:\/\/www.zonetronik.com\/en\/arduino-battery-capacity-tester\/","title":{"rendered":"Battery capacity tester for Lithium, NiMH, and NiCd batteries with Arduino"},"content":{"rendered":"<p>The growing global interest in IoT and electric vehicles is driving a surge in the utilization of Lithium-Ion\/Lithium-Polymer\/NiCd\/NiMH batteries. These batteries are being increasingly employed across various devices and applications due to their high energy storage capacity relative to size. However, this heightened demand is also giving rise to an influx of batteries with misleading ampere-hour ratings in the market. Such false ratings pose a significant risk, potentially resulting in project failures, particularly in IoT endeavors where developers rely on battery ratings for on-time calculations.<\/p>\n<p>To address the risks associated with this issue, today&#8217;s tutorial focuses on constructing a battery capacity tester. This tester is designed to accurately determine the energy storage capacity of Lithium-Ion\/Lithium-Polymer\/NiCd\/NiMH batteries with voltages below 5 volts, thereby mitigating the potential failures caused by inaccurate battery specifications.<\/p>\n<p>There are numerous battery testing projects available on the internet, each with its own unique approach. However, for today&#8217;s tutorial, we will focus on the work of Instructables user Sam Moshiri. His project stands out for its high-quality build and its compact, standalone design. Moshiri aimed to create a device that could easily measure the capacity of nearly any type of battery (&lt; 5V) using an adjustable constant load setup with an LCD for displaying battery capacity.<\/p>\n<p>The concept behind the constant load current setup is straightforward. By drawing a consistent current from a battery over a specific duration, it becomes possible to calculate the true ampere-hour capacity of the battery based on the voltage drop observed during that time. To achieve this constant load current, Moshiri utilized a resistor network featuring an LM358 operational amplifier and a MOSFET. The setup includes two push buttons (for adjusting load current) and a third push-button to reset the board for testing another battery. The battery&#8217;s voltage is fed into one of the analog pins on an Arduino Nano, which monitors the voltage drop corresponding to the preset current draw, calculates the battery capacity, and displays the result on a 16\u00d72 LCD display.<\/p>\n<p>By the end of this tutorial, you will not only understand how to determine battery capacity but also how to design for constant load\/current draw and incorporate a 16\u00d72 LCD display with an Arduino.<\/p>\n<h2>Required components<\/h2>\n<p>The necessary components for this project include an Arduino Nano, a 16&#215;2 LCD display, an LM358N operational amplifier, various resistors (4.7k\u03a9 (2), 47\u03a9 (2), 1M\u03a9, 10k\u03a9, 3R), capacitors (100nF (6), 100uF-16V, 1000uF-16V), three tactile switches, an IRF3710 MOSFET, jumper wires, a battery holder, and a variable power supply. While the project was implemented on a PCB for compactness, all components used are of the DIP type to facilitate soldering for individuals of varying soldering proficiency levels. The Arduino Nano was chosen for its ease of soldering onto a PCB, though alternative boards could have been utilized for similar purposes.<\/p>\n<h2>Schematics<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-501\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO.png\" alt=\"schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO\" width=\"1018\" height=\"786\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO.png 1018w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO-300x232.png 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO-768x593.png 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/schematic-BATTERY-CAPACITY-TESTER-USING-ARDUINO-500x386.png 500w\" sizes=\"auto, (max-width: 1018px) 100vw, 1018px\" \/><\/p>\n<p>Below is a comprehensive Bill of Materials (BOM) illustrating how each component corresponds to the schematics provided above:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-502\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/bom.jpg\" alt=\"\" width=\"496\" height=\"358\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/bom.jpg 496w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/bom-300x217.jpg 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/p>\n<p>For PCB creation, Sam utilized the SamacSys component libraries due to their adherence to industrial IPC standards and their availability as free resources. These libraries were installed using the Altium Library plugin. The developed PCB is depicted in the image below, alongside the assembled version of the board.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-503\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/unnamed-file.jpg\" alt=\"\" width=\"850\" height=\"568\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/unnamed-file.jpg 850w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/unnamed-file-300x200.jpg 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/unnamed-file-768x513.jpg 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/unnamed-file-500x334.jpg 500w\" sizes=\"auto, (max-width: 850px) 100vw, 850px\" \/><\/p>\n<h2>Code<\/h2>\n<p>The code for this project is relatively simple. Essentially, we&#8217;ll monitor the time it takes for a battery to reach a predefined &#8220;low&#8221; value, then calculate the battery&#8217;s capacity using the depletion rate and the preset constant load current it experienced. This entire process will be displayed interactively on an LCD.<\/p>\n<p>To streamline the code, we&#8217;ll utilize the Arduino LiquidCrystal library along with the JCButton library. The LiquidCrystal library, which comes pre-installed on Arduino, will handle interactions with the 16&#215;2 LCD. Meanwhile, the <a href=\"https:\/\/github.com\/JChristensen\/JC_Button\" target=\"_blank\" rel=\"noopener\">JCButton library<\/a>, downloadable from the provided link, will manage the state of the tactile buttons, detecting presses, long presses, etc., and also handling debounce.<\/p>\n<p>As customary, I&#8217;ll provide a brief explanation of how the code operates, focusing on sections that may be challenging to grasp.<\/p>\n<p>The code begins by importing the two libraries that will be utilized.<\/p>\n<blockquote><p>#include &lt;LiquidCrystal.h&gt;<br \/>\n#include &lt;JC_Button.h&gt;<\/p><\/blockquote>\n<p>Afterward, we establish a variable to store the minimum allowable battery level and several other variables to hold various values. The &#8220;Current&#8221; array comprises a sequence of values corresponding to the rotation of the R7 potentiometer, which dictates the load current.<\/p>\n<blockquote><p>const float Low_BAT_level = 3.2;<br \/>\n\/\/Current steps with a 3R load (R7)<br \/>\nconst int Current[] = {0, 37, 70, 103, 136, 169, 202, 235, 268, 301, 334, 367, 400, 440, 470, 500, 540};<\/p>\n<p>const byte RS = 2, EN = 3, D4 = 4, D5 = 5, D6 = 6, D7 = 7;<br \/>\nconst byte PWM_Pin = 10;<br \/>\nconst byte Speaker = 12;<br \/>\nconst int BAT_Pin = A0;<br \/>\nint PWM_Value = 0;<br \/>\nunsigned long Capacity = 0;<br \/>\nint ADC_Value = 0;<br \/>\nfloat BAT_Voltage = 0;<br \/>\nbyte Hour = 0, Minute = 0, Second = 0;<br \/>\nbool calc = false, Done = false;<\/p><\/blockquote>\n<p>Following that, we instantiate the Liquid Crystal library by specifying the Arduino pins to which the LCD is connected, including EN (Enable), RS (Register Select), and other necessary pins, as arguments.<\/p>\n<blockquote><p>LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);<\/p><\/blockquote>\n<p>We also create instances of the button library for the two major buttons (up and down).<\/p>\n<blockquote><p>Button UP_Button(16, 25, false, true);<br \/>\nButton Down_Button(15, 25, false, true);<\/p><\/blockquote>\n<p>With this done, we move to the void setup() function. We start the function by setting the pinMode of the buzzer and PWM pin as output.<\/p>\n<blockquote><p>void setup() {<\/p>\n<p>pinMode(PWM_Pin, OUTPUT);<br \/>\npinMode(Speaker, OUTPUT);<\/p><\/blockquote>\n<p>After this, we initialize the two buttons we created along with the LCD.<\/p>\n<blockquote><p>UP_Button.begin();<br \/>\nDown_Button.begin();<br \/>\nlcd.setCursor(0, 0);<br \/>\nlcd.begin(16, 2);<\/p><\/blockquote>\n<p>Upon initializing the LCD, display a splash screen featuring the project name and version. After a 3-second delay, clear the display and prompt the user with the &#8220;Load Adj: up\/Down&#8221; button, indicating it is ready for the user to adjust the load current setting.<\/p>\n<blockquote><p>lcd.print(&#8220;Battery Capacity&#8221;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;Measurement v1.0&#8221;);<br \/>\ndelay(3000);<br \/>\nlcd.clear();<br \/>\nlcd.print(&#8220;Load Adj:UP\/Down&#8221;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;0&#8221;);<\/p>\n<p>}<\/p><\/blockquote>\n<p>Next is the void loop() function. We start the function by reading the tact buttons<\/p>\n<blockquote><p>void loop() {<br \/>\nUP_Button.read();<br \/>\nDown_Button.read();<\/p><\/blockquote>\n<p>Each time the Up button is pressed, it adds 5 to the Pwm_Value variable which is used as the load current indicator. The inverse is true for the Down button. For each of the button pressed, the user is provided with visual feedback of the increase or decrease in the PWM_value, on the Display.<\/p>\n<blockquote><p>if (UP_Button.wasReleased() &amp;&amp; PWM_Value &lt; 80 &amp;&amp; calc == false) { PWM_Value = PWM_Value + 5; analogWrite(PWM_Pin, PWM_Value); lcd.setCursor(0, 1); lcd.print(&#8221; &#8220;); lcd.setCursor(0, 1); lcd.print(String(Current[PWM_Value \/ 5]) + &#8220;mA&#8221;); } if (Down_Button.wasReleased() &amp;&amp; PWM_Value &gt; 1 &amp;&amp; calc == false)<br \/>\n{<br \/>\nPWM_Value = PWM_Value &#8211; 5;<br \/>\nanalogWrite(PWM_Pin, PWM_Value);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8221; &#8220;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(String(Current[PWM_Value \/ 5]) + &#8220;mA&#8221;);<br \/>\n}<\/p><\/blockquote>\n<p>If the Up button is long pressed (indicated by 1000ms), the system switches mode as it assumes the user has selected a load current that satisfies them. The mode switch involves invoking the timer interrupt() function which handles all the calculations involved with determining the capacity of the battery. This cycle is repeated as the loop continues.<\/p>\n<blockquote><p>if (UP_Button.pressedFor(1000) &amp;&amp; calc == false)<br \/>\n{<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\nlcd.clear();<br \/>\ntimerInterrupt();<br \/>\n}<\/p><\/blockquote>\n<p>The timerInterrupt() function handles most of the project\u2019s heavy lifting. It continuously monitors the battery voltage and as long as it\u2019s not yet at the preset Low_BAT_Level, it increments the time. As soon as the measured battery voltage becomes less than the Low_BAT_Level, it stops the time increment and uses it to estimate the capacity of the battery. At this point, the buzzer is turned on and off in a pattern to indicate the completion of the process.<\/p>\n<blockquote><p>void timerInterrupt() {<br \/>\ncalc = true;<br \/>\nwhile (Done == false) {<br \/>\nSecond ++;<br \/>\nif (Second == 60) {<br \/>\nSecond = 0;<br \/>\nMinute ++;<br \/>\nlcd.clear();<br \/>\n}<br \/>\nif (Minute == 60) {<br \/>\nMinute = 0;<br \/>\nHour ++;<br \/>\n}<br \/>\nlcd.setCursor(0, 0);<br \/>\nlcd.print(String(Hour) + &#8220;:&#8221; + String(Minute) + &#8220;:&#8221; + String(Second));<br \/>\nlcd.setCursor(9, 0);<br \/>\nADC_Value = analogRead(BAT_Pin);<br \/>\nBAT_Voltage = ADC_Value * (5.0 \/ 1024);<br \/>\nlcd.print(&#8220;V:&#8221; + String(BAT_Voltage));<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;BAT-C: Wait!&#8230;&#8221;);<\/p>\n<p>if (BAT_Voltage &lt; Low_BAT_level)<br \/>\n{<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8221; &#8220;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nCapacity = (Hour * 3600) + (Minute * 60) + Second;<br \/>\nCapacity = (Capacity * Current[PWM_Value \/ 5]) \/ 3600;<br \/>\nlcd.print(&#8220;BAT-C:&#8221; + String(Capacity) + &#8220;mAh&#8221;);<br \/>\nDone = true;<br \/>\nPWM_Value = 0;<br \/>\nanalogWrite(PWM_Pin, PWM_Value);<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\n}<\/p>\n<p>delay(1000);<br \/>\n}<br \/>\n}<\/p><\/blockquote>\n<p>The complete code for the project is available below and also attached under the download section.<\/p>\n<blockquote><p>#include #include<\/p>\n<p>const float Low_BAT_level = 3.2;<\/p>\n<p>\/\/Current steps with a 3R load (R7)<br \/>\nconst int Current[] = {0, 37, 70, 103, 136, 169, 202, 235, 268, 301, 334, 367, 400, 440, 470, 500, 540};<\/p>\n<p>const byte RS = 2, EN = 3, D4 = 4, D5 = 5, D6 = 6, D7 = 7;<br \/>\nconst byte PWM_Pin = 10;<br \/>\nconst byte Speaker = 12;<br \/>\nconst int BAT_Pin = A0;<br \/>\nint PWM_Value = 0;<br \/>\nunsigned long Capacity = 0;<br \/>\nint ADC_Value = 0;<br \/>\nfloat BAT_Voltage = 0;<br \/>\nbyte Hour = 0, Minute = 0, Second = 0;<br \/>\nbool calc = false, Done = false;<\/p>\n<p>LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);<\/p>\n<p>Button UP_Button(16, 25, false, true);<br \/>\nButton Down_Button(15, 25, false, true);<\/p>\n<p>void setup() {<\/p>\n<p>pinMode(PWM_Pin, OUTPUT);<br \/>\npinMode(Speaker, OUTPUT);<\/p>\n<p>analogWrite(PWM_Pin, PWM_Value);<\/p>\n<p>UP_Button.begin();<br \/>\nDown_Button.begin();<\/p>\n<p>lcd.setCursor(0, 0);<br \/>\nlcd.begin(16, 2);<br \/>\nlcd.print(&#8220;Battery Capacity&#8221;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;Measurement v1.0&#8221;);<br \/>\ndelay(3000);<br \/>\nlcd.clear();<br \/>\nlcd.print(&#8220;Load Adj:UP\/Down&#8221;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;0&#8243;);<\/p>\n<p>}<\/p>\n<p>void loop() {<br \/>\nUP_Button.read();<br \/>\nDown_Button.read();<\/p>\n<p>if (UP_Button.wasReleased() &amp;&amp; PWM_Value &lt; 80 &amp;&amp; calc == false) { PWM_Value = PWM_Value + 5; analogWrite(PWM_Pin, PWM_Value); lcd.setCursor(0, 1); lcd.print(&#8221; &#8220;); lcd.setCursor(0, 1); lcd.print(String(Current[PWM_Value \/ 5]) + &#8220;mA&#8221;); } if (Down_Button.wasReleased() &amp;&amp; PWM_Value &gt; 1 &amp;&amp; calc == false)<br \/>\n{<br \/>\nPWM_Value = PWM_Value &#8211; 5;<br \/>\nanalogWrite(PWM_Pin, PWM_Value);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8221; &#8220;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(String(Current[PWM_Value \/ 5]) + &#8220;mA&#8221;);<br \/>\n}<br \/>\nif (UP_Button.pressedFor(1000) &amp;&amp; calc == false)<br \/>\n{<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\nlcd.clear();<br \/>\ntimerInterrupt();<br \/>\n}<\/p>\n<p>}<\/p>\n<p>void timerInterrupt() {<br \/>\ncalc = true;<br \/>\nwhile (Done == false) {<br \/>\nSecond ++;<br \/>\nif (Second == 60) {<br \/>\nSecond = 0;<br \/>\nMinute ++;<br \/>\nlcd.clear();<br \/>\n}<br \/>\nif (Minute == 60) {<br \/>\nMinute = 0;<br \/>\nHour ++;<br \/>\n}<br \/>\nlcd.setCursor(0, 0);<br \/>\nlcd.print(String(Hour) + &#8220;:&#8221; + String(Minute) + &#8220;:&#8221; + String(Second));<br \/>\nlcd.setCursor(9, 0);<br \/>\nADC_Value = analogRead(BAT_Pin);<br \/>\nBAT_Voltage = ADC_Value * (5.0 \/ 1024);<br \/>\nlcd.print(&#8220;V:&#8221; + String(BAT_Voltage));<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8220;BAT-C: Wait!&#8230;&#8221;);<\/p>\n<p>if (BAT_Voltage &lt; Low_BAT_level)<br \/>\n{<br \/>\nlcd.setCursor(0, 1);<br \/>\nlcd.print(&#8221; &#8220;);<br \/>\nlcd.setCursor(0, 1);<br \/>\nCapacity = (Hour * 3600) + (Minute * 60) + Second;<br \/>\nCapacity = (Capacity * Current[PWM_Value \/ 5]) \/ 3600;<br \/>\nlcd.print(&#8220;BAT-C:&#8221; + String(Capacity) + &#8220;mAh&#8221;);<br \/>\nDone = true;<br \/>\nPWM_Value = 0;<br \/>\nanalogWrite(PWM_Pin, PWM_Value);<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, HIGH);<br \/>\ndelay(100);<br \/>\ndigitalWrite(Speaker, LOW);<br \/>\n}<\/p>\n<p>delay(1000);<br \/>\n}<br \/>\n}<\/p><\/blockquote>\n<h2>Demo<\/h2>\n<p>Once the code is finalized and your PCB is prepared, connect the Arduino Nano to your computer and upload the code. Upon successful upload, the LCD should display the splash screen as depicted in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-504\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/battfirst-demo-image-1.jpg\" alt=\"\" width=\"1021\" height=\"700\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/battfirst-demo-image-1.jpg 1021w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/battfirst-demo-image-1-300x206.jpg 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/battfirst-demo-image-1-768x527.jpg 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/battfirst-demo-image-1-500x343.jpg 500w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/><\/p>\n<p>After uploading the code, the next step is to power the board using an external power supply and connect a battery to it, as demonstrated in the image below. It&#8217;s important to note that, according to the current design, the board should only be powered with a maximum of 9V.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-505\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt.jpg\" alt=\"\" width=\"1024\" height=\"544\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt.jpg 1024w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-300x159.jpg 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-768x408.jpg 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-500x266.jpg 500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>With the power supply and battery connected, set your desired load Current using the up and down buttons then press and hold the up button till you hear the buzzer beeps, to kick start the process.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-506\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/Screen-Shot-2020-01-11-at-12.11.25-AM.png\" alt=\"\" width=\"940\" height=\"706\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/Screen-Shot-2020-01-11-at-12.11.25-AM.png 940w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/Screen-Shot-2020-01-11-at-12.11.25-AM-300x225.png 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/Screen-Shot-2020-01-11-at-12.11.25-AM-768x577.png 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/Screen-Shot-2020-01-11-at-12.11.25-AM-500x376.png 500w\" sizes=\"auto, (max-width: 940px) 100vw, 940px\" \/><\/p>\n<p>As the process proceeds, an update will be provided on the screen, showing the time that has elapsed and the voltage of the battery.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-507\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-progress.jpg\" alt=\"\" width=\"1024\" height=\"547\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-progress.jpg 1024w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-progress-300x160.jpg 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-progress-768x410.jpg 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-progress-500x267.jpg 500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>At the end of the process, the battery\u2019s true capacity is displayed as shown in the image below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-508\" src=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-final-capacity.jpg\" alt=\"\" width=\"1014\" height=\"700\" srcset=\"https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-final-capacity.jpg 1014w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-final-capacity-300x207.jpg 300w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-final-capacity-768x530.jpg 768w, https:\/\/www.zonetronik.com\/en\/wp-content\/uploads\/2024\/03\/batt-final-capacity-500x345.jpg 500w\" sizes=\"auto, (max-width: 1014px) 100vw, 1014px\" \/><\/p>\n<p>That\u2019s it. For the demo, a battery rated 8800mAh was used but at the end of the test, the battery was discovered to only have an energy capacity of 1190mAh.<\/p>\n<p>That\u2019s it for this tutorial guy\u2019s thanks for reading. As usual, you can reach out to me via the comment section if you have any questions or difficulties replicating the project.<\/p>\n<p>Source :\u00a0<a href=\"https:\/\/www.zonetronik.com\/electronics-lab-com\/\">electronics-lab.com (CC BY-SA 4.0)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The growing global interest in IoT and electric vehicles is driving a surge in the utilization of Lithium-Ion\/Lithium-Polymer\/NiCd\/NiMH batteries. These batteries are being increasingly employed across various devices and applications due to their high energy storage capacity relative to size. However, this heightened demand is also giving rise to an influx of batteries with misleading&hellip;&nbsp;<a href=\"https:\/\/www.zonetronik.com\/en\/arduino-battery-capacity-tester\/\" rel=\"bookmark\"><span class=\"screen-reader-text\">Battery capacity tester for Lithium, NiMH, and NiCd batteries with Arduino<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"off","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","iawp_total_views":84,"footnotes":""},"categories":[2],"tags":[],"class_list":["post-499","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects"],"_links":{"self":[{"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/posts\/499","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/comments?post=499"}],"version-history":[{"count":3,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/posts\/499\/revisions"}],"predecessor-version":[{"id":511,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/posts\/499\/revisions\/511"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/media\/500"}],"wp:attachment":[{"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/media?parent=499"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/categories?post=499"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zonetronik.com\/en\/wp-json\/wp\/v2\/tags?post=499"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}