You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode What is a microcontroller? A whole computer on one chip

How embedded systems work: the hidden computers in everyday things, and how engineers build them

Sensors and actuators: how a tiny computer feels and moves the world

A microcontroller only feels tiny changes of electricity on its pins. Yet one can tell one cat from another and keep the wrong one out. Two kinds of parts let it reach the real world: sensors and actuators.

  1. 1 Rono follows the wires from the pins. The first one runs to the reader, a ring of copper wire around the tunnel, the short passage a cat walks through.readertunnelthe chipRono

    Rono follows the wires from the pins. The first one runs to the reader, a ring of copper wire around the tunnel, the short passage a cat walks through.

  2. 2 When a cat is in the tunnel, the reader sends out weak radio waves. They wake the cat's tag, which answers with its number, and the reader passes that number to the chip as an electric signal.900 2150 0441 7the chip

    When a cat is in the tunnel, the reader sends out weak radio waves. They wake the cat's tag, which answers with its number, and the reader passes that number to the chip as an electric signal.

  3. 3 A part that turns something of the world into a signal for the chip is a sensor. This one turns a cat into a number.sensorthe chipin

    A part that turns something of the world into a signal for the chip is a sensor. This one turns a cat into a number.

  4. 4 The second wire goes the other way, from the chip to a small motor that moves a little bar, the latch. A part like this motor, which turns a signal from the chip into an action, is an actuator.the chipactuatoroutlatch

    The second wire goes the other way, from the chip to a small motor that moves a little bar, the latch. A part like this motor, which turns a signal from the chip into an action, is an actuator.

  5. 5 So the flap feels the world through its sensor and moves it through its actuator. Everything is in place to stop the grey cat, but something must still decide when to open.sensorthe chipactuatorinoutwho decides?

    So the flap feels the world through its sensor and moves it through its actuator. Everything is in place to stop the grey cat, but something must still decide when to open.

  6. Quick check

    A smart night light.A smart night light turnson by itself when the roomgets dark. What is its sensor,and what is its actuator?

    A smart night light.

    Show the answer

    The sensor is the part that feels the light and turns it into a signal. The actuator is the lamp, which turns the chip's signal into light in the room.

  7. Go further

    The real names of the pins and of the radio.GPIO"general purposeinput/output": the pins aprogram can read or set,like the latch pin21ADCturns a signal that can takeany level, like the one of athermometer, into a numberPWMa pin switched on and offvery fast, to give a motoronly part of its powerRFIDthe name of the radio waythe reader and thecat's tag talk

    The real names of the pins and of the radio.

Next episode Firmware: the program that runs in an endless loop inside a device

Share this comic

More comics