You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Every computer system begins with input: turning the physical world — a keypress, a barcode, a temperature, a pen mark on a form — into digital data the processor can act on. This lesson examines the operating principles of representative input devices, the criteria for choosing the right one for a scenario, and how they are deployed in real-world systems.
This lesson develops OCR H446 section 1.1.3 (input, output and storage) as it applies to input devices. It covers the operating principles of representative devices — barcode and QR readers, optical mark recognition (OMR), sensors, and pointing devices — explains how each converts a physical quantity into digital data (often via an analogue-to-digital converter), and applies selection criteria to choose an appropriate device for a given scenario, anchored in real applications. It links to data representation (sampling, 1.4) and to embedded/control systems.
An input device is hardware that lets a user, or the environment, enter data or instructions into a computer. Its essential job is transduction: converting some physical phenomenon (light, pressure, sound, motion) into an electrical signal, and — where that signal is continuous — digitising it with an analogue-to-digital converter (ADC) so the CPU can process discrete values. Keeping this "physical quantity → electrical signal → digital data" chain in mind is the key to explaining any input device in an exam.
| Type | Operating principle |
|---|---|
| Optical mouse | An LED illuminates the surface; a tiny camera captures thousands of low-resolution images per second; an on-board DSP compares successive images to compute the direction and speed of movement |
| Laser mouse | As optical, but a laser gives a sharper image, so it tracks more precisely and on more surfaces (e.g. glossy desks) |
| Mechanical (ball) mouse | A rolling ball turns two perpendicular rollers; encoders read X and Y rotation. Now obsolete |
The mouse reports relative movement (ΔX, ΔY) and button events over USB or Bluetooth. The DPI (dots per inch) setting controls sensitivity — higher DPI means the pointer moves further per unit of hand motion, valued in gaming and CAD.
Beneath the keys lies a key matrix of rows and columns. Pressing a key bridges one intersection; the controller scans the matrix, identifies the closed junction, and emits a unique scan code. The scan code is delivered to the CPU (typically via an interrupt — a direct link to the FDE lesson), and the operating system maps it through a character map (ASCII/Unicode) to a character. The same physical key can therefore produce different characters depending on the active keyboard layout.
Touchscreens are the input device examiners most often ask you to compare on operating principle, so it is worth understanding the underlying physics of the two dominant types rather than memorising a table.
Capacitive — measuring stored charge. A capacitive screen is built from a transparent conductor, usually indium tin oxide (ITO), patterned as a grid of fine electrodes and printed onto the glass. A small voltage holds an electrostatic field across this grid, and each electrode intersection stores a tiny, stable capacitance (the ability to hold charge). The human body is a conductor at earth potential, so when a finger approaches an intersection it draws charge away, changing the capacitance at that point. The controller continuously scans every row/column intersection, and the coordinate where the measured capacitance drops identifies the touch. Because every intersection is measured independently, the controller can locate several touches at once, which is what enables pinch-to-zoom and other multi-touch gestures. The cost is that the touch must be conductive: a thick glove or a plastic stylus draws no charge, so nothing registers. The most common variant in phones, projected capacitive (PCAP), places the sensing grid behind a single robust sheet of glass, giving the durable, scratch-resistant front face you expect on a modern handset.
Resistive — completing a circuit. A resistive screen is mechanically simpler: two flexible transparent conductive layers are held a fraction of a millimetre apart by tiny insulating spacer dots, with an air gap between them. A steady voltage is applied across one layer so that voltage varies smoothly from one edge to the other (a voltage divider). When the user presses — with a finger, a gloved finger, a stylus, anything — the top layer flexes and touches the bottom layer, completing a circuit at that point. The bottom layer reads the voltage at the contact point, which corresponds to the X coordinate; the controller then swaps the roles of the layers to read the Y voltage. Because it responds to pressure, not conductivity, a resistive screen works with any object and through gloves — but the flexing layers wear out with use, the extra layers reduce optical clarity, and reading one contact point at a time makes true multi-touch hard. This is exactly why resistive screens persist in industrial control panels, older ATMs and point-of-sale terminals where gloved or stylus operation and low cost matter more than gesture support.
| Type | Operating principle |
|---|---|
| Capacitive | A transparent ITO electrode grid holds an electrostatic field; a conductive finger draws off charge and changes the capacitance at the touched intersection, which sensors measure to locate it. Supports multi-touch but needs a conductive touch |
| Resistive | Two conductive layers separated by a gap; pressure makes them touch and complete a circuit, and the resulting voltage-divider reading gives the X then Y position. Works with any object (gloved finger, stylus) but usually single-touch |
| Infrared | A grid of IR LEDs and detectors around the bezel; a finger breaks the beams, and the interrupted rows/columns give the position. Robust and large-format, but bulky and costly |
| Feature | Capacitive | Resistive | Infrared |
|---|---|---|---|
| Sensing principle | Change in stored charge | Pressure completing a circuit | Interrupted light beams |
| Multi-touch | Yes | Usually no | Yes |
| Accuracy | High | Moderate | High |
| Works with gloves | No (unless special) | Yes | Yes |
| Durability | Good (glass front) | Layers wear over time | Good |
| Cost | Moderate–high | Low | High |
| Typical use | Phones, tablets | ATMs, industrial panels | Large kiosks, displays |
A barcode encodes a number as a pattern of black and white bars of varying width. The reader shines a laser or LED across the symbol and a photodetector measures the reflected light: white bars reflect strongly, black bars absorb. Decoding turns this reflected-light trace into digits in three steps. (1) As the beam sweeps, the photodetector output rises and falls, producing a timing trace of high (white) and low (black) pulses. (2) The decoder measures the relative widths of those pulses — in a symbology such as EAN-13, every digit is encoded as a fixed arrangement of bars and spaces whose widths fall into a small set of multiples of one base unit, so absolute speed does not matter, only the ratios. (3) The pattern of widths for each character is matched against the symbology's lookup table to recover the digit, and finally the trailing check digit is recomputed from the others to confirm the read is valid. Because the data runs in one direction, the beam must cross the bars roughly perpendicularly — which is why supermarket scanners sweep a laser in multiple directions (a star or cross pattern) so that some sweep crosses the bars cleanly whatever the package orientation.
A QR ("Quick Response") code stores data in a 2D matrix of black and white squares (modules). A camera captures the whole image and decoding proceeds geometrically. The software first locates the three large square finder patterns in the corners; their fixed 1:1:3:1:1 light/dark ratio is recognisable from any rotation, which lets the decoder establish the code's orientation, de-skew (perspective-correct) the image, and work out the module grid spacing. It then samples the centre of each grid cell as a binary 1 or 0, reads format information (the error-correction level and mask pattern), reverses the mask, and finally runs Reed–Solomon error correction over the bit-stream. That last step is what makes QR codes so robust: the redundant symbols let the decoder reconstruct the original data even when a fraction of the modules are dirty, creased or obscured — so a partly damaged code still reads correctly, where a 1D barcode with no error correction would simply fail.
| Feature | Barcode (1D) | QR Code (2D) |
|---|---|---|
| Data capacity | Low (≈ up to 20 digits) | High (thousands of characters) |
| Data type | Usually numeric | Alphanumeric, URLs, binary |
| Reading direction | One direction | Any orientation |
| Error correction | None | Built-in (Reed–Solomon) |
| Reader | Laser scanner or camera | Camera + software |
Two distinct reader technologies sit behind these encodings, and they share their physics with the rest of this lesson. A laser scanner sweeps a single moving spot across the symbol and times the reflected pulses — fast and cheap for 1D barcodes but blind to a 2D matrix, since it samples along just one line. An imager instead takes a picture of the whole symbol with the very CCD or CMOS image sensor described in the next section, then decodes it in software; because it captures a full 2D image it can read 1D barcodes and QR codes, in any orientation, and even several at once. This is precisely why phone cameras and modern handheld scanners — all imager-based — have largely displaced laser scanners wherever 2D codes are needed.
The camera at the heart of a QR reader, document scanner, optical mouse or phone is itself an input device, and the spec's "operating principles" remit extends to how a camera turns light into data. Both common sensor technologies start the same way: a grid of millions of photosites (pixels), each a tiny well that accumulates electric charge in proportion to the light falling on it during the exposure — the photoelectric effect. They differ entirely in how that charge is read out and converted to a number.
| Feature | CCD (Charge-Coupled Device) | CMOS (active-pixel sensor) |
|---|---|---|
| Charge readout | Charge is shifted across the chip row by row to a single output amplifier and ADC | Each pixel has its own amplifier; rows are addressed and read in place |
| Image quality / noise | Historically higher quality, very low noise | Slightly noisier, but the gap has narrowed greatly |
| Power consumption | Higher | Much lower |
| Cost & integration | More expensive; separate support chips | Cheap; ADC and logic integrate on the same chip |
| Speed / readout | Slower (serial shift) | Fast (parallel, per-pixel) |
| Typical use | Scientific/astronomical imaging, some scanners | Phones, webcams, most modern cameras and readers |
In a CCD, the per-pixel charges are passed bucket-brigade fashion along each row to a single, high-quality amplifier and analogue-to-digital converter at the edge of the chip — giving very uniform, low-noise images, but consuming more power and needing extra support circuitry. In a CMOS sensor, each pixel has its own transistor amplifier and the charge is converted to a voltage right where it sits; pixels are then addressed like memory cells and read in parallel. This on-chip integration makes CMOS far cheaper, lower-power and faster — which is exactly why it dominates the input devices you actually use: smartphone cameras, webcams, barcode/QR readers and the image sensor inside an optical mouse. (CMOS's one classic weakness, the rolling-shutter skew from reading rows sequentially, is why a fast-spinning propeller can look bent in a phone photo.)
Optical mark recognition detects the presence or absence of marks in predefined positions on a specially designed form — the technology behind multiple-choice answer sheets, lottery slips and paper ballots. The form is fed through an OMR reader: a light source illuminates each candidate position and a photodetector measures reflected light. A pencil or pen mark absorbs light (low reflection); a blank position reflects strongly. The reader maps each reading to a mark/no-mark decision at known coordinates, so the position of the mark — not its shape — carries the meaning.
This makes OMR extremely fast and accurate for high-volume, fixed-format data capture, but it can only read marks at predefined spots; it cannot interpret handwriting (that is OCR's job) and depends on well-aligned, correctly filled forms.
OMR vs OCR: OMR reads where a mark is (a shaded bubble); Optical Character Recognition (OCR) interprets the shape of written or printed characters into text. Do not confuse the two — a frequent exam slip.
A sensor detects a physical quantity and converts it into an electrical signal; because most physical quantities vary continuously, the signal is typically passed through an ADC to produce digital readings at a chosen sample rate (a direct link to sound/analogue sampling in module 1.4).
| Sensor | Measures | Example use |
|---|---|---|
| Temperature | Heat | Heating control, weather stations, greenhouses |
| Pressure | Force/pressure | Scales, altimeters, tyre-pressure monitors |
| Light (LDR) | Light intensity | Automatic street lighting, screen auto-brightness |
| Moisture | Water content | Automated irrigation |
| pH | Acidity/alkalinity | Water treatment, aquaria |
| Infrared | IR radiation | Motion detectors, remote controls |
| Accelerometer | Acceleration/tilt | Phone screen rotation, fitness trackers, airbags |
| Proximity | Distance | Parking sensors, automatic taps, phone screen-off on calls |
Sensors are the input half of a feedback control system: the system continuously compares a sensor reading against a desired set point and drives an actuator (an output device) to close the gap.
flowchart LR
SP["Set Point<br/>(desired value)"] --> CMP["Compare"]
CMP --> CS["Control System / Processor"]
CS --> ACT["Actuator"]
ACT --> PROC["Physical Process"]
PROC --> SENS["Sensor (feedback)"]
SENS --> CMP
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.