When they work, touchscreens can make you feel like you've got the future in the palm of your hand. When they don’t, trying to use one can make you feel like a bit of a lunatic. If you’ve ever wondered how a small droplet of sweat can confuse such a high-tech interface, the answer lies in electrical charges.

In their latest issue, Popular Science explores the science behind what’s happening when your phone’s screen comes in contact with water. A touchscreen works by measuring the charges going across its grid of ultra-thin electrodes. Because your body is made primarily from highly-conductive water, when you press your finger to your screen it absorbs some of that charge. The phone is able to pinpoint your finger’s location on the screen’s grid by calculating how much the charge drops between two of the intersecting electrodes.

If traces of sweat or rain are present, that can also reduce the charge and confuse your phone's touchscreen. Engineers have tried tackling this problem in recent years by implementing a different approach to touch-sensing technology. “Self-capacitance” measures an increase in charge between an electrode on the screen and the ground you’re standing on, rather than just measuring the charge between two electrodes. Any water that ends up on your screen won't be grounded, which makes it easier for your phone to differentiate between water droplets and a finger. 

Using this method alone wouldn’t be very effective because the signal corresponds to whole rows or columns instead of just individual points on the grid. Actions that require multiple touches like zooming in or out could cause the screen to respond to points that aren’t really there. To solve this, some phones have combined the classic sensing method with the newer, waterproof one. By registering both types of signals, a screen can respond to multi-touch gestures and account for moisture at the same time. The next time your phone responds to your sweaty fingers, you know exactly which kind of tech to thank.

[h/t: Popular Science]