system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do smartphones measure remaining battery capacity?
gpt
2 main ways. 


A battery is like an inflated balloon. You can pump it up with air to inflate it. Then, you can release that air and use the air pressure to do some work—say, blow out a candle. 

If you inflate the balloon all the way, the force of the air that comes out is high. If you inflate it halfway, the force is weaker. So you could measure how inflated a balloon is by measuring the pressure of the air as it comes out. 

*Voltage* is what we call pressure when it's electricity. Voltage is electric pressure. The voltage at the battery terminal is higher when the battery is more charged for the same reason the air pressure is higher in a more well-inflated balloon. There are more electrons pushing into each other trying to get out. 

The other way you could measure the remaining air in the balloon is to count how much air came out. If you put 10 breaths worth in there, and it takes 1 breath's worth to blow out a candle, and you used the balloon to blow out 5 candles—youve got 5 breaths worth remaining. 

*Coulombs* are what we call breaths when it's electricity. Coulombs are a measurement of electrical charge. At a given voltage, they can do a specific amount of work in a circuit. Some battery systems count coulombs by keeping track of how much work was done. This way is harder to do, but can be more accurate than measuring voltage.