ISIA – Data Transmission (1)


  • Remote sensor collects information
    • local processor converts it to digital data
    • transmitter converts data to physical signal (electrical, radio)
    • dedicated link (wires, electromagnetic waves) carries physical signal
    • receiver converts physical signal to digital data
  • Supervisor computer displays it, logs it, forwards it over the Internet, etc.

Physical media: electrical

  • Different voltage (or current) levels represent 0 and 1
  • RS-232 (recommended standard 232, 1962)
    • 0 represented by +3 V to +15 V
    • 1 represented by 15 V to 3 V
    • distance: up to 300 m
    • speed: up to 9.6 kbits/s at 50 m
  • RS-423 similar (better noise immunity, )
    • 0 represented by +4V to +6V
    • 1 represented by 6V to 4V
    • distance: up to 1,400 m
    • speed: up to 100 kbits/s
  • both are widely used with industrial and laboratory equipment

Electromagnetic interference

  • Electromagnetic interference
    • adds a noise voltage to the signal
    • received signal has incorrect logic levels

Differential signalling

  • The transmitter sends two signals, S(+) and S(–), on a pair of wires
    • S(+) = S the original signal
    • S(–) = –S the inverse of the original signal
  • The communication link suffers noise N
    • the same noise is added to both signals
    • S(+) + N noisy original signal
    • S(–) + N noisy inverse signal
  • The receiver subtracts the received signals
    • (S(+) + N) – (S(–) + N) = S(+) – S(–) = S – –S = 2S
  • The noise disappears!
  • e.g: RS-422
    • twisted pair cable (same noise on both wires)
    • distance: up to 1,500 m
    • speed: up to 10 Mbits/s (10,000 kbits/s)

Signal degradation

  • Signal quality is reduced as it moves through a medium
  • Attenuation
    • over distance, the amplitude of the signal is reduced
    • when the amplitude is too low relative to noise, signal is no longer reliable
      – it has degraded
  • Interference
    • nearby signals become mixed together, corrupting the signal
  • Occlusion (obstruction)
    • a physical object is blocking the signal
    • line-of-sight becomes more important as frequency increases

Serial communication parameters

  • Both transmitter and receiver must agree on
    • the speed of transmission (since there is no explicit clock)
    • the format in use (number of data and stop bits, kind of parity)
  • Serial line protocols are specified as
    • speed (in bits per second)
    • number of data bits
    • kind of parity (none, even, odd)
    • number of stop bits

The parity bit

  • A parity bit is a single-bit checksum added to a data word
    • for even parity, the total number of 1s (including the parity bit) must be even
    • for odd parity, the total number of 1s (including the parity bit) must be odd
  • If a parity bit is present, it can detect a single-bit error
  • Parity is not often used
    • the most popular serial format is 8N1 (the fastest for sending byte data)

Serial communication errors

  • parity error
    • the parity bit is incorrect
  • framing error
    • incorrect stop bit(s)
  • overrun (buffer overflow)
    • the receiver has no control over how fast bytes arrive
    • a fixed-sized buffer holds them for software to read
    • if software reads bytes too slowly from the buffer, the buffer overflows

Universal asynchronous receiver/transmitter

  • Implements the serial port interface; available everywhere
    • Linux (with USB to serial): /dev/ttyACMn
    • Mac (with USB to serial): /dev/cu.usbmodem-n
    • Windows: COMn
  • Simplex connection
    • instrument → supervisor (one direction)
    • risk of buffer overrun (cannot contact transmitter)
  • Duplex connection
    • instrument ⇄ supervisor (both directions)
    • buffer overrun prevented by flow control
      • XOFF (ASCII character 19) = ‘stop sending’
      • XON (ASCII character 17) = ‘start sending’
    • sent to the other side to stop and restart its transmitter
      • works in terminals too: try Control-S/Control-Q to stop/start output

Hardware flow control

  • add another signal to switch off transmitter
    • request to send (RTS) output
      true ⇒ local UART’s receive buffer has space available
    • clear to send (CTS) input
      when set to false, local UART stops transmitting

UART organisation

  • One direction shown (instrument → supervisor)
    (start/parity/stop generation not shown for transmitter)
  • Duplicate, and then mirror left-to-right, for duplex communication

Telemetry example: spacecraft

Extremes of bandwidth — efficient data encoding is important