I think this is one of the coolest features of today's smartphones. It knows up, from down. Built into the circuitry is a tiny device that can detect changes in orientation and tell the screen to rotate. Now let me show you what it looks like using an old iPhone. There it is. It's an accelerometer. I'll tell you how this kind of chip works and how it's made but first some basics of accelerometers. They have two fundamental parts. A housing attached to the object whose acceleration we want to measure. And a mass that will tether to the housing can still move. Here it's a spring with a heavy metal ball. If we move the housing up, the ball lags behind stretching the spring. If we measure how much that spring stretches, we can calculate the force of gravity. You can easily see that three of these could determine the orientations of a three-dimensional object. Well, lying with a Z-axis perpendicular to gravity, only the ball on the X-axis spring shows extension. Turn this on its side so that the Z-axis points up and only the accelerometer along the spring on that axis stretches. So how does this phone and this chip measure changes in gravity? Well more complex than the simple ball and spring model. It has the same fundamental elements. Inside the chip, engineers have created a tiny accelerometer out of silicon. It has, of course, a housing that's fixed to the phone and a comb-like section that can move back and forth. That's the seismic mass equivalent to the ball. The spring in this case is the flexibility of the thin silicon tethering it to the housing. Now clearly, if we can measure the motion of this central section, we can detect changes in orientation. To see how that's done, examine three of the fingers on the accelerometer. The three fingers make up a differential capacitor. That means that if the center section moves, then current will flow. Engineers correlate the amount of flowing current to acceleration. This accelerometer fascinates me, but even more amazing is how they make such a thing. It would seem nearly impossible to make such an intricate device as this tiny smartphone accelerometer. At only 500 microns across, no tiny tools could craft such a thing. Instead, engineers use some unique chemical properties of silicon to etch the accelerometers fingers and H-shaped sections. Now to get an idea of how they do this, let me show you how to make a single cantilevered beam like a diving board in a small chunk of silicon. And apparently, engineers noticed that if they poured potassium hydroxide on a particular surface of crystalline silicon, it would eat away at the silicon until it forms a pure metal-shaped hole. This occurs because of the unique and crystal structure of silicon. To make a pyramidal hole in silicon, engineers cover all but a small square with a mask impervious to the potassium hydroxide. Now it only etches within the square-shaped cordoned off by the mask. The potassium hydroxide dissolves silicon faster in the vertical and in the horizontal direction. This is why it makes a pyramidal hole. Now to make a cantilevered beam, engineers follow these steps. First, mask the surface except for a U-shaped section. At first, the potassium hydroxide will cut two inverse pyramids side by side. As the etching continues, the potassium hydroxide begins to dissolve the silicon between these holes. If we wash it away at just the right point before it dissolves the silicon just underneath the mask, it will leave a small cantilevered beam hanging over a hole with a square bottom. Engineers make smartphone accelerometers using these same methods, but as you can picture, it takes a series of detailed masks to create the intricate structure of a smartphone accelerometer. Well complex, a key point is that the whole process can be automated. This is absolutely essential in the miniaturization of technology. Engineers now make all sorts of amazing things at this tiny scale. Several engines with gears that rotate 300,000 times a minute, nozzles and inkjet printers in my favorite, micro-mears that focus light in semiconductor lasers. I'm Bill Hammock, the engineer guy. This video is based on a chapter in the book, eight amazing engineering stories. The chapter features more information about this subject, learn more about the book,