A-Level Computer Science / Unit 3: Hardware, Memory and Control

3.1.3 Sound, Touch & VR

πŸ”’ Lesson slides are available to signed-in users. Sign in

Sound, Touch and Virtual Reality

Computers can receive sound and touch as input. They can also produce sound and images as output. This section follows how each device changes information from one form to another.

By the end of this section, you should be able to:

  • describe how a microphone changes sound into digital data;
  • describe how a speaker changes digital data into sound;
  • compare resistive and capacitive touch detection;
  • explain how a headset creates a 3D view and updates it when the user moves.
Input sends data to a computer. Output presents data from a computer in a form people can see or hear. A touchscreen can do both: it displays information and detects a touch.

Microphone: sound becomes digital data

A microphone is an input device. Sound waves make its thin diaphragm vibrate. In the moving-coil microphone shown here, the diaphragm moves a coil near a magnet. This movement produces a changing analogue electrical signal.

Sound waves Diaphragmvibrates Coil movesnear a magnet Analoguesignal ADCdigital data An analogue-to-digital converter (ADC) samples the signal and produces digital values.
Original process diagram: sound input to digital data.
Analogue-to-digital converter (ADC): hardware that samples an analogue signal and converts it into digital values for a computer to store or process.

Use the full process chain

Sound waves β†’ diaphragm vibrates β†’ coil moves near a magnet β†’ analogue electrical signal β†’ ADC β†’ digital data.

Do not say that the microphone changes sound directly into binary. The electrical signal and ADC are important stages.

Speaker: digital data becomes sound

A speaker is an output device. It uses an electrical signal to move a cone back and forth. The moving cone makes sound waves in the air.

Digitalsound data DACanalogue signal Amplifierstrengthens signal Magnet Coil Cone Soundwaves Changing current moves the coil in a magnetic field; the cone moves with the coil.
Original process diagram: digital sound data to sound waves.
  1. A digital-to-analogue converter (DAC) changes digital values into an analogue electrical signal.
  2. An amplifier strengthens the signal.
  3. The changing current moves a coil in a magnetic field.
  4. The coil moves the speaker cone. The cone vibrates and creates sound waves.

Do not swap ADC and DAC

ADC: analogue input to digital data, such as recording with a microphone.

DAC: digital data to an analogue signal, such as playing sound through a speaker.

Touchscreens: detecting a touch

A touchscreen has two roles. Its display presents images or text (output). Its sensor detects a finger or stylus position (input). The controller uses electrical measurements to calculate the touch coordinates.

Screen-display context image. The explanations below focus on how the touchscreen detects a touch.

Keep the two screen functions separate

The image above shows display layers that control light. The touch sensor is a separate input function. For this section, focus on the resistive or capacitive method used to find the touch position.

Resistive touchscreen: pressure brings layers together

A resistive touchscreen has two conducting layers with a small gap between them. When the user presses the screen, the flexible upper layer touches the lower layer. The contact changes the electrical measurements. A controller uses those measurements to calculate the X and Y coordinates.

Press Conductive layers touch Electricalmeasurement ControllerX and Y position
Original simplified diagram of resistive touch detection.

Capacitive touchscreen: detects a change

A capacitive touchscreen has a sensor grid. A finger changes the local electric field and capacitance at the touch position. The controller detects this change and calculates the coordinates. The conducting layers do not need to touch. This method can detect more than one finger at a time.

Finger changes local capacitance Sensor detectsthe change ControllerX and Y position
Original simplified diagram of capacitive touch detection.
FeatureResistiveCapacitive
What detects the touch?Pressure brings two conducting layers into contact.A finger changes the local electric field or capacitance.
How is the position found?A controller uses electrical measurements to calculate coordinates.A controller detects the change and calculates coordinates.
Do the layers touch?Yes, at the pressed position.No; the sensor detects a change without the layers touching.

Compare the mechanism, not just the names

Resistive: pressure β†’ layers touch β†’ electrical measurement β†’ coordinates.

Capacitive: finger changes capacitance β†’ controller detects change β†’ coordinates.

Virtual-reality headset: images and movement

Two views create a sense of depth

A headset presents a slightly different image to each eye. The brain combines the two views and interprets depth. Lenses focus the images for the user's eyes. The different views create a stereoscopic 3D effect.

Two slightlydifferent imagesleft eye | right eye Headset lensesfocus each view Brain combinesviews to see depth
Original simplified diagram of stereoscopic viewing.

Head tracking updates the view

Head tracking measures head movement so the virtual scene can respond when the user looks around. Sensors such as a gyroscope and accelerometer detect rotation or movement. The processor analyses this data and updates the displayed images to match the new direction.

  1. Measure: movement sensors detect the head turning.
  2. Process: the processor uses sensor data to work out the new direction.
  3. Update: the headset displays images for the new viewpoint.
Gyroscope: a sensor that detects rotation.
Accelerometer: a sensor that detects changes in movement or acceleration.

Connect input to output

Head movement β†’ sensors β†’ processor analyses movement β†’ displayed view changes.

For the 3D effect, state that the headset shows different images to each eye and the lenses focus them.

Practice and review

1. Recording a short announcement [4 marks]

Describe how a moving-coil microphone changes the announcement into digital data.

Show a possible answer

Sound waves make the diaphragm vibrate. The diaphragm moves a coil near a magnet, producing a changing analogue electrical signal. An ADC samples the signal and converts it into digital values.

2. Comparing touchscreens [4 marks]

Explain one difference between how a resistive touchscreen and a capacitive touchscreen detect a touch.

Show a possible answer

In a resistive touchscreen, pressure brings two conducting layers into contact and changes electrical measurements. In a capacitive touchscreen, a finger changes capacitance or the local electric field; the layers do not need to touch. In both types, the controller calculates the touch coordinates.

3. Listening through a speaker [4 marks]

Describe how digital sound data causes a speaker to produce sound waves.

Show a possible answer

A DAC changes digital data into an analogue electrical signal. An amplifier strengthens the signal. The changing current moves a coil in a magnetic field. The coil moves the cone, which vibrates and creates sound waves.

4. Looking around in a virtual scene [4 marks]

A user turns their head while wearing a headset. Explain how the displayed scene changes and how the headset creates a sense of depth.

Show a possible answer

Movement sensors detect the head turn. The processor analyses the sensor data and updates the images to match the new direction. The headset shows a slightly different image to each eye. The lenses focus the images and the brain combines them to perceive stereoscopic depth.

DeviceProcess to rememberKey terms
MicrophoneSound β†’ diaphragm and coil movement β†’ analogue signal β†’ ADC β†’ digital dataDiaphragm, coil, magnet, ADC
SpeakerDigital data β†’ DAC β†’ amplifier β†’ coil and cone move β†’ soundDAC, amplifier, magnetic field, cone
Resistive touchPressure β†’ layers touch β†’ measurements β†’ coordinatesConducting layers, controller, coordinates
Capacitive touchFinger changes capacitance β†’ controller finds coordinatesCapacitance, electric field, sensor grid
VR headsetPaired images create depth; sensors track movement; processor updates viewLenses, stereoscopic, gyroscope, accelerometer, head tracking