Lite / Building Machines That Respond / Week 22
Signals: smooth waves and stored numbers
Your heartbeat, the hum of a fridge and a sensor wire all wiggle over time. How do engineers describe a wiggle with just a few numbers?
Why should I care?
Signals are how machines hear, feel and see: every sensor produces one. This lesson starts a thread that runs through the rest of the school, from sampling here to filters, control and communication later. It all rests on three numbers you can read off any wave.
- Distinguish a continuous (analog) signal from a discrete (digital) one.
- Read amplitude, period and frequency from a repeating signal, using f = 1 ÷ T.
- Explain why digital signals resist noise better than analog ones.
Predict
UK mains electricity repeats 50 times every second. How long does one cycle take?
- 50 ms
- 20 ms
- 2 ms
- 0.5 s
Guess first, then reveal
Period = 1 ÷ frequency = 1 ÷ 50 s = 0.02 s = **20 ms**. Fifty cycles of 20 ms each fill exactly one second.
Discover
Set the sample rate to 60 Hz and the ADC to 8 bits so the dots hug the curve. Change the signal frequency from 1 Hz to 4 Hz: count the cycles in one second each time, and read the period from the slider label. Then untick 'Show the real analog signal'.
What the interactive shows (text version)
The signal lab draws one second of a smooth wave centred on 1.65 V with an amplitude of 1.2 V. You choose its frequency (the number of full cycles in that second) and the period is shown as 1 ÷ frequency. Dots show the values a computer stores. Unticking the analog curve leaves only the stored dots and the step-shaped line they make.
Understand
Continuous and discrete
An analog (continuous) signal has a value at every instant and can take any value: the voltage from a microphone, the height of a wave at sea. A digital (discrete) signal is a list of numbers: values at separate moments, each rounded to one of a fixed set of levels. Computers can only store the digital kind, so every sensor reading must be turned into numbers.
Amplitude, period, frequency
For a repeating signal: the amplitude is how far it swings from its middle (a wave from 0.45 V to 2.85 V has a middle of 1.65 V and an amplitude of 1.2 V). The period T is the time for one cycle. The frequency f is cycles per second, in hertz: f = 1 ÷ T. Resting heart rate: about 72 beats a minute = 1.2 Hz, period ≈ 0.83 s. The note A above middle C: 440 Hz, period ≈ 2.27 ms.
Why digital resists noise
Every wire picks up noise: small, random wiggles. In an analog signal the noise becomes part of the value and cannot be told apart. A digital wire only has to be read as 'high' or 'low', so a wiggle of 0.2 V on a 3.3 V logic signal changes nothing. Once a value is stored as a number it can be copied a million times without getting worse.
Explain it another way
Intuitive
Analog is a ramp; digital is a staircase. You can stand anywhere on a ramp, but only on the steps of a staircase, and a staircase is easier to describe exactly: 'step 7'.
Technical
A sinusoid is v(t) = offset + A·sin(2πft). Peak-to-peak value = 2A. Real signals are sums of many frequencies; their noise is often described by its typical size (standard deviation) in volts.
Mathematical
f = 1/T and T = 1/f. In useful units: f in Hz ↔ T in ms via T = 1000/f. Amplitude A = (max − min)/2; middle = (max + min)/2.
Applied
An ECG machine records the heart's electrical signal (about 1 mV in size) and must find its 1–2 Hz rhythm under 50 Hz mains hum and muscle noise. Engineers describe both the wanted signal and the noise by amplitude and frequency.
Worked example 1
A light sensor's voltage swings between 0.9 V and 2.1 V and repeats every 10 ms (a flickering lamp). Middle, amplitude and frequency?
Middle = (2.1 + 0.9) ÷ 2 = 1.5 V. Amplitude = (2.1 − 0.9) ÷ 2 = 0.6 V. f = 1 ÷ 0.010 s = 100 Hz: lamps on 50 Hz mains often flicker at twice the mains frequency.
Common mix-ups
Digital signals are always better.
✓ The world is analog. Digital is a way to store and copy measurements reliably, but sampling and rounding lose detail if done badly.Amplitude is the distance from the bottom to the top of the wave.
✓ That is the peak-to-peak value. Amplitude is half of it, measured from the middle.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Find three repeating signals in your life (a heartbeat, a ticking clock, a washing machine's spin, a flashing bike light). For each estimate the period by timing ten cycles and dividing by ten, then calculate the frequency in hertz. Record your method and uncertainty.
Reflect
Which signal from your list would be hardest for a machine to measure, and why?
Write your answer on paper or in your own notes. Lite never stores what you write.