Skip to content
Tactiverge

Inside a Smartphone Camera

A stack of lenses thinner than a coin, moved by a magnet a few hundredths of a millimetre to bring your photo into focus.

A phone camera module is smaller than a sugar cube, yet it focuses, filters and measures light millions of times over. Most of what makes the photo good happens after the light lands, in a processor that turns raw numbers into an image.

Conceptual only. Do not open real devices: they can hold mains voltage, charged capacitors, sharp edges or springs.

1Explode it

Pull the smartphone camera apart.

fig. 03 · smartphone camera, coming apart

Parts of the smartphone camera, as a list

  1. Cover glass. A hard, clear window that protects everything behind it. Engineering idea: Every surface light crosses reflects a little of it. Thin anti-reflection coatings make those reflections cancel out, so more light gets through.
  2. Autofocus motor. A voice coil motor (VCM) wrapped around the lens slides it forward and back to focus. Engineering idea: Current in a coil sitting in a magnet's field feels a force, the same physics as a loudspeaker. Springs push back, so each current gives a lens position. The phone adjusts the current until the image is sharpest: a feedback loop.
  3. Lens stack. Five to seven tiny plastic or glass lenses bend light into a sharp image on the sensor. Engineering idea: One simple lens blurs colours and edges. Several lenses with unusual curved shapes each cancel some of the others' errors, so together they act like one near-perfect lens.
  4. Infrared-cut filter. Blocks infrared light that our eyes cannot see. Engineering idea: Silicon is sensitive to near-infrared, but your eyes are not. Without this filter, colours would look wrong, because the sensor would count light you never saw.
  5. Colour filter and microlenses. A mosaic of red, green and blue filters, one per pixel, topped with tiny lenses. Engineering idea: Each pixel can only count light, not see colour. The filter (often a Bayer pattern: two green, one red, one blue in every 2 × 2 block) means each pixel measures one colour, and the missing two are estimated from its neighbours.
  6. Image sensor. Millions of photodiodes turn light into electric charge, which is converted to numbers. Engineering idea: Light knocks electrons loose in silicon. Each pixel collects them for the exposure time, then an analog-to-digital converter turns the charge into a number. A photo is a grid of those numbers.
  7. Image signal processor. Turns the raw mosaic into a finished photo: fills in colours, removes noise, sharpens and balances. Engineering idea: A pipeline of image filters, many of them convolutions: small weighted grids slid over every pixel. Modern phones also merge several quick exposures into one to reduce noise.

2Part by part

What every piece is for.

  1. 01

    Cover glass

    A hard, clear window that protects everything behind it.

    the idea →Every surface light crosses reflects a little of it. Thin anti-reflection coatings make those reflections cancel out, so more light gets through.

    Design for manufacture

  2. 02

    Autofocus motor

    A voice coil motor (VCM) wrapped around the lens slides it forward and back to focus.

    the idea →Current in a coil sitting in a magnet's field feels a force, the same physics as a loudspeaker. Springs push back, so each current gives a lens position. The phone adjusts the current until the image is sharpest: a feedback loop.

    Motors, servos and steppersOpen-loop and closed-loop controlProportional control

  3. 03

    Lens stack

    Five to seven tiny plastic or glass lenses bend light into a sharp image on the sensor.

    the idea →One simple lens blurs colours and edges. Several lenses with unusual curved shapes each cancel some of the others' errors, so together they act like one near-perfect lens.

    Camera geometry and depth

  4. 04

    Infrared-cut filter

    Blocks infrared light that our eyes cannot see.

    the idea →Silicon is sensitive to near-infrared, but your eyes are not. Without this filter, colours would look wrong, because the sensor would count light you never saw.

    How sensors measure

  5. 05

    Colour filter and microlenses

    A mosaic of red, green and blue filters, one per pixel, topped with tiny lenses.

    the idea →Each pixel can only count light, not see colour. The filter (often a Bayer pattern: two green, one red, one blue in every 2 × 2 block) means each pixel measures one colour, and the missing two are estimated from its neighbours.

    Images as arrays of numbers

  6. 06

    Image sensor

    Millions of photodiodes turn light into electric charge, which is converted to numbers.

    the idea →Light knocks electrons loose in silicon. Each pixel collects them for the exposure time, then an analog-to-digital converter turns the charge into a number. A photo is a grid of those numbers.

    Analog-to-digital conversionImages as arrays of numbers

  7. 07

    Image signal processor

    Turns the raw mosaic into a finished photo: fills in colours, removes noise, sharpens and balances.

    the idea →A pipeline of image filters, many of them convolutions: small weighted grids slid over every pixel. Modern phones also merge several quick exposures into one to reduce noise.

    Convolution and image filtersPerception pipelines and how vision fails

3The system

How the parts talk to each other.

Almost every machine has the same shape: something senses, something decides, something acts on the world, and a measurement feeds back so the decision can improve.

Inputs(sense)

  • Light from the scene
  • Gyroscopehand shake
  • Shutter tap

Controller(think)

  • Image signal processorfocus + exposure + processing

Actuators(act)

  • Autofocus motor
  • Exposure and gain

The physical system(what changes)

  • Image on the sensor

Signals forward

  • Light from the scene to Image on the sensorthrough the lenses
  • Shutter tap to Image signal processortake photo
  • Gyroscope to Image signal processormotion
  • Image signal processor to Autofocus motorcoil current
  • Image signal processor to Exposure and gaintime and gain
  • Autofocus motor to Image on the sensorlens position
  • Exposure and gain to Image on the sensorbrightness

Feedback: the loop closes here

  • Image on the sensor feeds back to Image signal processorsharpness and brightness

4The maths

How far does the lens move to focus?

For a very distant object the sharp image sits exactly one focal length behind the lens. Closer objects focus a little further back, so the autofocus motor slides the lens forward by d_i − f.

the model

1/f = 1/d_o + 1/d_i → d_i = f·d_o / (d_o − f)

Lens-to-sensor distance
4.268 mm
Lens travel from infinity focus
18.1 µm
Go deeper: the worked numbers

Symbols

f
focal length (mm)
d_o
distance to the object (mm)
d_i
lens-to-sensor distance for a sharp image (mm)

Worked example

  1. 1.d_i = 4.25 × 1000 / (1000 − 4.25) = 4.268 mm
  2. 2.Move = 4.268 − 4.25 = 0.0181 mm
  3. 3.That is about 18 µm, less than the thickness of a human hair

5 · Your turn · Feedback control lab

Tune the autofocus loop

Autofocus is a feedback loop: measure sharpness, move the lens, measure again. In the Feedback lab, tune a controller to reach its target quickly without overshooting, then ask what overshoot would look like in a camera.

Start the challenge →

runs in your browser, nothing to unscrew

Keep going