An input device lets data from the outside world into a computer. This lesson explains why input devices are needed and how the ten in the syllabus work: the barcode and QR code scanners, the digital camera, the keyboard, the microphone, the optical mouse, three kinds of touch screen, and the 2D and 3D scanners.
about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
Why a computer needs input devices
A computer can only process data that is inside it, as binary. Your voice, a barcode or the touch of a finger is not binary. An input device captures data from the outside world and turns it into a form the computer can process. Without input devices, the computer would have nothing to work on.
Scanners for codes
Barcode scanner. A light shines on the barcode. The dark bars reflect little light and the white spaces reflect a lot. A sensor picks up the pattern of reflected light and turns it into a number, the product code. The computer then looks the code up, for example to find a price.
QR code scanner. A QR code is a square pattern of small black and white squares, a two-dimensional code. The scanner, often the camera of a phone, takes an image of it. Software reads the pattern of squares. A QR code can hold far more data than a barcode, such as a web address or a ticket.
Cameras, keys, sound and the mouse
Digital camera. Light passes through a lens onto a sensor made of millions of light-sensitive cells, one for each pixel. Each cell turns the light into an electrical signal. It is converted to binary and saved as an image file.
Keyboard. Pressing a key completes a circuit under that key. The keyboard's processor works out which key it was and sends its character code to the computer.
Microphone. Sound waves make a thin sheet, the diaphragm, vibrate. The movement is turned into an electrical signal that matches the sound. The signal is then converted to binary.
Optical mouse. A light shines down onto the desk. A tiny sensor takes many pictures of the surface each second. The mouse compares each picture with the last, to work out how far and which way it moved. There is no ball and no moving part to wear out.
Touch screens
There are three kinds in the syllabus.
Three small diagrams side by side. Resistive: two flexible layers with a small gap, and a finger pressing the top layer down onto the bottom layer at one point. Capacitive: a glass layer with a charge on it, and a bare finger drawing some of the charge at the point it touches. Infra-red: a square screen crossed by a grid of beams from emitters on two edges to sensors on the opposite edges, with a finger breaking one beam across and one beam down.
Resistive. Two thin, flexible layers with a conductive coating are held apart by a tiny gap. A press pushes the top layer onto the bottom one and completes a circuit at that point. It works with a gloved finger or any pointer. It is cheap, but the screen is less clear and a sharp object can damage it.
Capacitive. A glass layer holds a small electric charge. A bare finger conducts electricity, so it draws some charge from the point it touches. Sensors find that point. It is clear and hard-wearing and it detects several fingers at once. An ordinary glove does not work, because it does not conduct.
Infra-red. Beams of infra-red light cross the screen in a grid, with sensors on the opposite edges. A finger or any object breaks a beam across and a beam down, and the crossing point gives the position. It works with gloves and on very large screens.
Scanners for paper and objects
2D scanner. A document lies on a sheet of glass. A bright light moves across it, and the reflected light is caught by a sensor. The scanner builds up a digital image of the page.
3D scanner. It scans a solid object from many angles, using lasers or light, and measures its shape. The result is a digital model of the object. It can be changed on a computer or sent to a 3D printer.
Practise with new numbers
Try it in Python
The program counts the pixels of a camera sensor and the touch points of an infra-red grid. You worked out file sizes like these in the chapter on data representation.
Common mistakes
Calling a QR code scanner a barcode scanner. A barcode is a row of bars. A QR code is a square grid of squares and holds more data.
Saying a capacitive screen works with any glove. It needs something that conducts, such as a bare finger.
Saying a microphone gives out sound. A microphone takes sound in. A speaker gives sound out.
Mixing up the two scanners. A 2D scanner makes an image of a flat page. A 3D scanner measures the shape of a solid object.
Remember these
An input device captures data from the outside world in a form the computer can process.
Barcode scanner: reflected light from bars. QR code scanner: an image of a square code that holds more data.
Resistive: two layers pressed together. Capacitive: a finger draws charge. Infra-red: a finger breaks beams.
2D scanner: flat pages. 3D scanner: the shape of solid objects.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Why does a computer need input devices?
Which kind of touch screen works by two flexible layers touching?
A nurse wearing thin rubber gloves cannot use a tablet's touch screen. Which kind of touch screen is it likely to be?
How does an optical mouse know that it has moved?
A designer wants a digital model of a clay figure, so that copies can be printed. Which input device should be used?