WATCH: How Does An Accelerometer Work?
Professor Bill Hammack of University of Illinois-Urbana Champaign has created a video that demonstrates how exactly an accelerometer in a smartphone works. In every accelerometer, there are springs made out of silicon that oscillate back and forth between contact points. They move based on the force of gravity. The contact points can measure the charge and figure out which way the smartphone is pointing. The springs are about the size of a pencil tip and they are made with tiny wafers of silicon. After watching this video you will know how your phone knows when to go in portrait or landscape mode.