courses > Cellular IoT Foundations > Device architecture basics

3.2

Sensors and data collection

TL;DR

Key takeaways

1

Sensors bridge the physical and digital worlds.

They detect a physical quantity and convert it into an electrical signal that the MCU turns into a digital value for processing and transmission.

2

Digital sensors are increasingly preferred.

Sensors with integrated signal conditioning output data directly over I2C, SPI, or UART, simplifying circuit design and improving accuracy.

3

Data follows a five-stage pipeline.

Physical phenomenon, transduction, analog-to-digital conversion, processing, and payload formatting move a reading from the real world to a transmission-ready packet.

4

ADC resolution sets measurement granularity.

More bits mean finer division of the voltage range. 12-bit ADC yields 4,096 discrete levels.

5

Sampling strategy is a balancing act.

How often you read sensors trades off accuracy, power, and cellular cost; event-driven, adaptive, and edge-processing approaches keep that balance efficient.

The entire purpose of most IoT devices is to measure something in the physical world and report it digitally. But how does a temperature become a number, or vibration become a data packet? This page explains how sensors convert physical phenomena into digital data, how that data flows through the collection pipeline, and how to think about sensor selection and sampling for cellular IoT.

What you'll learn

What a sensor is and how it converts a physical quantity into data

A sensor detects a physical quantity (temperature, pressure, light, acceleration, humidity, gas concentration, proximity, or location) and converts it into an electrical signal. The microcontroller then reads that signal and turns it into a digital value that can be processed, stored, and transmitted. Some sensors output analog signals (a continuous voltage that varies with the measured quantity), while others output digital signals directly over protocols like I2C, SPI, or UART. Modern IoT increasingly favors digital sensors with integrated signal conditioning because they simplify circuit design and improve accuracy.

Common sensor types in cellular IoT

The categories you will meet most often are:

  • Temperature and humidity sensors: Cold chain monitoring, HVAC, and environmental monitoring.
  • Accelerometers and gyroscopes (IMUs): Detect motion, orientation, vibration, and impact; used in asset trackers, structural health monitoring, and wearables. An IMU is an inertial measurement unit.
  • GPS/GNSS receivers: Provide geographic position for asset tracking and fleet management. These are technically receivers, but they act as location sensors in the system. GNSS stands for Global Navigation Satellite System.
  • Pressure sensors: Measure barometric pressure (for altitude) or fluid/gas pressure in industrial applications.
  • Light and proximity sensors: Detect ambient light or nearby objects; used in smart buildings and occupancy detection.
  • Gas and air quality sensors: Measure CO2, VOCs (volatile organic compounds), particulate matter, or specific gases for environmental monitoring and industrial safety.
  • Current and voltage sensors: Monitor power consumption or battery state in energy management.

How the data collection pipeline works, stage by stage

Data does not appear in the cloud by magic. It follows a structured pipeline:

  1. Physical phenomenon: Something happens in the real world: temperature changes, an object moves, air pressure shifts.
  2. Transduction: The sensor converts the physical quantity into an electrical signal, typically a voltage change.
  3. Analog-to-digital conversion (ADC): If the sensor is analog, the MCU's built-in ADC converts the continuous voltage into a discrete digital value. Resolution (in bits, commonly 10, 12, or 16) sets how finely the signal is divided; a 12-bit ADC divides the range into 4,096 levels. Many digital sensors include their own ADC and hand the MCU a digital value over I2C or SPI.
  4. Processing: The MCU applies calibration offsets, filters noise, averages readings, converts raw values to engineering units (e.g. an ADC count to degrees Celsius), and checks thresholds for alerts.
  5. Payload formatting: The processed data is packaged for transmission. Common formats include JSON (human-readable but verbose), CBOR (compact binary, ideal for constrained devices), Protocol Buffers (efficient with schema support), and raw binary (smallest, but both sides must agree on the format).

How to choose a sampling strategy

How often you read your sensors is one of the most important design decisions, and it directly affects:

  • Data accuracy: Sample too infrequently and you miss events; too frequently and you transmit redundant data.
  • Power consumption: Every reading costs energy across the sensor, the ADC, and any processing.
  • Bandwidth and cost: Cellular data has a cost per byte, so sending raw high-frequency data is often impractical.

Smart approaches include event-driven sampling (read only when a threshold is crossed or motion is detected), adaptive sampling (increase frequency when values change rapidly, decrease when stable), and edge processing (analyze on the MCU and transmit only summaries or anomalies).

quiz

Lesson 3.2 Self-assessment

1. What does a sensor do in an IoT device?

2. In the data collection pipeline, what does analog-to-digital conversion (ADC) do?

3. Why is sampling frequency an important design decision?

faq

Frequently asked questions

next lesson

Power systems and battery basics

Compare power sources like batteries and energy harvesting. Analyze power budgets and how modes like PSM and eDRX extend device battery life.

Start lesson