6  Sensor Hardware Selection

6.1 Learning Objectives

  • Select sensors and microcontrollers matched to application domains (smart cities, agriculture, healthcare, industrial)
  • Calculate battery life using average current consumption with active/sleep duty cycles
  • Design Bills of Materials (BOMs) with complete cost breakdowns including sensors, MCU, connectivity, power, and enclosures
  • Choose wireless connectivity protocols (Zigbee, Wi-Fi, LoRaWAN, NB-IoT) based on range, data rate, and power budget
  • Apply cost optimization strategies across prototyping, small production, and mass production scales
In 60 Seconds

Choosing the right sensors and hardware for an IoT deployment requires matching components to your specific domain, environment, power budget, and cost constraints. This guide provides practical recommendations across smart cities, agriculture, home automation, healthcare, and industrial domains – complete with Bill of Materials (BOMs), microcontroller selection matrices, connectivity options, and power budget calculations. A smart parking node costs approximately $93, a soil moisture station $59, and a basic 8-sensor home system just $30.

Key Concepts
  • Sensor Module vs. Bare Sensor: Sensor modules integrate the sensing element, signal conditioning, ADC, and communication interface on a small PCB; bare sensors require external conditioning circuits; modules cost more but dramatically reduce design time and risk
  • Breakout Board: A PCB adapting a small SMD sensor package to breadboard-compatible through-hole pins with required passive components (decoupling caps, pull-up resistors) already populated; ideal for prototyping
  • Development Board Ecosystem: Microcontroller development boards (ESP32 DevKit, Arduino Uno, Raspberry Pi Pico) provide USB programming, regulated power, and header pins; pre-built sensor shield expansions further reduce integration effort
  • Shield / HAT: A daughter board that stacks on a development board (Arduino shield, Raspberry Pi HAT) providing ready-made sensor, display, or actuator functionality through a standardized mechanical and electrical interface
  • Sensor Fusion Hardware: Multi-sensor ICs combining accelerometer, gyroscope, and magnetometer (9-axis IMU) or environmental parameters (BME688: temperature, humidity, pressure, gas) on a single chip, reducing BOM count and PCB area
  • Datalogger Hardware: Systems combining sensors with local storage (SD card, flash) and a real-time clock for standalone deployment; essential when continuous connectivity is not available or when local data backup is required
  • Sensor Node Design: A complete IoT sensing unit: sensor(s) + microcontroller + wireless module + power management + enclosure; designed for deployment in the target environment with appropriate IP rating, battery life, and connectivity
  • Hot-Swap and Field-Replaceable Design: Hardware designed to allow sensor replacement without specialized tools or soldering; important for field maintenance of deployed sensor networks, especially in hard-to-access locations

Choosing hardware for an IoT project is like assembling a toolkit for a specific job. You need to match your sensors, microcontroller, wireless module, and power source to your application. A sensor for monitoring soil moisture on a farm has very different requirements (long battery life, weatherproof, long-range wireless) than one for a smart home (always powered, short-range Wi-Fi). This guide helps you match components to your specific use case.

6.2 Hardware Selection Guide by Application Domain

⏱️ ~20 min | ⭐⭐⭐ Advanced | 📋 P06.C03.U16

Selecting the right sensors and hardware for your specific IoT application domain requires understanding the unique requirements, constraints, and priorities of each use case. This guide provides practical recommendations for sensor selection across different application domains.

6.2.1 Smart Cities Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Smart Parking Magnetic field sensor (PNI RM3100) ESP32 LoRaWAN/NB-IoT Battery (5-10 yr) $80-120
Traffic Monitoring Magnetic field + Camera Raspberry Pi 4 Wi-Fi/4G Mains $150-300
Smart Lighting LDR/BH1750 + PIR motion ESP32 Wi-Fi/Zigbee Mains $25-40
Waste Management HC-SR04 ultrasonic ESP32 LoRaWAN Solar + battery $60-90
Air Quality MQ-135, MH-Z19 (CO2), PMS5003 ESP32 Wi-Fi/4G Solar + battery $80-150
Noise Monitoring MEMS microphone (SPH0645) ESP32 Wi-Fi/4G Solar + battery $50-80

Key Considerations:

  • Coverage: Smart parking needs 1 sensor per space; air quality 1 per km² in urban areas
  • Battery Life: Parking sensors need 5-10 years; waste management 3-5 years
  • Connectivity: LoRaWAN for wide area (10 km range); Wi-Fi for dense urban
  • Cost: City-wide deployments require cost under $100/node for viability

Example BOM: Smart Parking Sensor Node

  • Magnetic sensor PNI RM3100: $25
  • ESP32 (low-power variant): $5
  • LoRaWAN module (RFM95W): $8
  • Lithium battery 3.6V 19Ah: $30
  • Enclosure IP67: $15
  • Installation hardware: $10
  • Total: ~$93 per parking space

6.2.2 Smart Agriculture Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Soil Moisture Capacitive sensor (STEMMA) ESP32 LoRaWAN Solar + battery $40-60
Weather Station BME280, anemometer, rain gauge ESP32 Wi-Fi/4G Solar + battery $100-200
Irrigation Control Soil moisture + flow sensor ESP32 Wi-Fi Solar + battery $80-120
Greenhouse Monitoring DHT22, CO2 (MH-Z19), light ESP32 Wi-Fi Mains $60-100
Livestock Tracking GPS + accelerometer ESP32 LoRaWAN/GSM Battery (6 mo) $50-80

Key Considerations:

  • Outdoor Rating: IP65+ enclosures required for field deployment
  • Power: Solar panels (5-10W) with 10-20 Ah batteries for year-round operation
  • Wireless Range: Farms need 1-5 km range (LoRaWAN ideal)
  • Durability: Sensors exposed to UV, rain, temperature extremes (-20 to 50°C)

Example BOM: Soil Moisture Monitoring Station

  • 4× Capacitive soil moisture sensors: $20
  • ESP32 Dev Board: $5
  • LoRaWAN RFM95: $8
  • Solar panel 6V 3.5W: $12
  • 18650 Li-ion battery 3000mAh: $6
  • Waterproof box IP65: $8
  • Total: ~$59 per monitoring station

6.2.3 Smart Home Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Security System PIR + door/window sensors ESP32 Wi-Fi Battery (2-3 yr) $30-50
Energy Monitoring CT clamps (SCT-013) ESP32 Wi-Fi Mains $40-60
HVAC Automation DHT22 + occupancy (PIR) ESP32 Wi-Fi/Zigbee Mains $25-40
Water Leak Detection Water detection sensor ESP8266 Wi-Fi Battery (1-2 yr) $15-25
Indoor Air Quality BME680 + MH-Z19 (CO2) ESP32 Wi-Fi Mains/USB $50-80

Key Considerations:

  • Wi-Fi Coverage: Ensure 2.4 GHz Wi-Fi reaches all sensors (range extenders may be needed)
  • Battery vs. Mains: Battery sensors for doors/windows; mains for energy monitors
  • Integration: Choose ESP32/Zigbee for Home Assistant, MQTT compatibility
  • User-Friendly: Simple setup, OTA updates, mobile app control

Example BOM: Complete Smart Home Sensor Kit

  • 1× ESP32 hub: $5
  • 3× PIR motion sensors: $6
  • 2× Door/window sensors: $4
  • 1× DHT22 temp/humidity: $5
  • 1× MQ-2 gas sensor: $3
  • 1× Water leak sensor: $2
  • Enclosures, wiring: $5
  • Total: ~$30 for basic 8-sensor home system

6.2.4 Smart Health Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Heart Rate Monitor MAX30102 (pulse oximeter) nRF52840 BLE Battery (7-14 days) $30-50
Fall Detection MPU6050 (accelerometer/gyro) ESP32 Wi-Fi/BLE Battery (6-12 mo) $25-40
Body Temperature MLX90614 (IR non-contact) ESP32 Wi-Fi/BLE Battery/USB $35-55
Medication Adherence Load cell + RFID ESP32 Wi-Fi Mains/USB $40-60
Sleep Monitoring Pressure mat + MPU6050 ESP32 Wi-Fi Mains $50-80

Key Considerations:

  • Medical Grade vs. Wellness: FDA approval needed for medical claims (costly); wellness ok for consumer
  • Privacy: HIPAA compliance if storing health data (encryption, secure transmission)
  • Battery Life: Wearables need 7+ days; bedside monitors can use mains power
  • Accuracy: Heart rate ±2 bpm; temperature ±0.2°C for medical use

Example BOM: Wearable Heart Rate + Activity Monitor

  • MAX30102 pulse oximeter: $8
  • MPU6050 accelerometer/gyro: $4
  • nRF52840 BLE module: $12
  • 3.7V 250mAh LiPo battery: $5
  • TP4056 charging module: $2
  • Custom 3D printed case: $3
  • Total: ~$34 for wearable device

6.2.5 Smart Industrial Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Vibration Monitoring ADXL345 (3-axis accelerometer) STM32F103 Modbus/Ethernet Mains/24V DC $80-150
Temperature Monitoring Multiple DS18B20 (1-Wire) ESP32 Wi-Fi/Ethernet Mains $50-80
Current Monitoring SCT-013 CT clamps ESP32 Wi-Fi/Modbus Mains $60-100
Machine Vision Camera (ESP32-CAM) ESP32 Wi-Fi Mains $40-80
Gas Detection MQ-4 (methane), MQ-7 (CO) ESP32 Wi-Fi/4G Mains $50-90

Key Considerations:

  • Industrial Protocols: Support Modbus RTU/TCP, OPC UA, MQTT for integration
  • Harsh Environments: IP65-67 rated enclosures, -40 to +85°C operating range
  • Reliability: Industrial-grade components, redundancy, UPS backup
  • Real-time: Sub-second response for safety-critical applications

Example BOM: Predictive Maintenance Vibration Monitor

  • ADXL345 accelerometer: $8
  • STM32F103 microcontroller: $3
  • RS485 to TTL module: $5
  • 24V to 5V DC-DC converter: $6
  • Industrial DIN rail enclosure: $25
  • Mounting bracket: $8
  • Total: ~$55 per machine monitor

6.2.6 Smart Environment Hardware Recommendations

Application Primary Sensors Microcontroller Connectivity Power Estimated Cost/Node
Air Quality PMS5003, MH-Z19, BME680 ESP32 Wi-Fi/LoRaWAN Solar + battery $100-180
Water Quality pH, DO, turbidity probes ESP32 4G/LoRaWAN Solar + battery $300-600
Seismic Monitoring ADXL355 (high-g accelerometer) Raspberry Pi 4G Mains/battery $150-300
Forest Fire Detection MQ-2, DHT22, smoke detector ESP32 LoRaWAN Solar + battery $60-100
Noise Pollution SPH0645 MEMS mic ESP32 Wi-Fi/4G Solar + battery $50-90

Key Considerations:

  • Remote Locations: Solar power mandatory; 4G/satellite for connectivity
  • Calibration: Water quality sensors need monthly calibration
  • Weather Resistance: IP67+ rating, conformal coating on PCBs
  • Data Frequency: Seismic 100+ Hz; air quality 0.1 Hz

Example BOM: Environmental Air Quality Station

  • PMS5003 PM2.5/PM10: $25
  • MH-Z19C CO2 sensor: $20
  • BME680 (temp/hum/VOC): $15
  • ESP32: $5
  • LoRaWAN RFM95: $8
  • Solar panel 10W + controller: $25
  • 12V 7Ah sealed lead-acid battery: $18
  • Weatherproof enclosure: $30
  • Total: ~$146 per monitoring station

6.2.7 Microcontroller Selection by Domain

Domain Recommended MCU Why? Alternative
Smart Cities ESP32 + LoRaWAN Long range, Wi-Fi fallback, low power nRF52840 (BLE mesh)
Agriculture ESP32 Wi-Fi + BLE, 18 ADC channels for sensors STM32 (industrial)
Home Automation ESP8266/ESP32 Low cost, Wi-Fi, huge community Zigbee modules
Healthcare nRF52840 Ultra-low power BLE, wearable-friendly ESP32 (if Wi-Fi needed)
Industrial STM32F103/F4 Real-time, industrial protocols, rugged ESP32 (with RS485)
Environment ESP32 Multi-sensor, Wi-Fi/LoRaWAN options Raspberry Pi (edge AI)

6.2.8 Connectivity Selection Matrix

Range Needed Data Rate Power Budget Recommended Protocol Hardware Module
< 100m Low-Med Very Low Zigbee CC2530, XBee
< 100m Med-High Low Wi-Fi 2.4GHz ESP32, ESP8266
< 100m Very High Medium Wi-Fi 5GHz Raspberry Pi 4
1-10 km Very Low Ultra Low LoRaWAN RFM95W, SX1276
1-10 km Low Low NB-IoT SIM7020, BC95
Unlimited Med-High Medium-High 4G LTE SIM7600, EC25


6.2.9 Power Budget Planning

Battery Life Estimation Formula:

Battery Life (hours) = Battery Capacity (mAh) / Average Current (mA)

Example: 2500 mAh battery, ESP32 sensor node
- Active (1 sec): 80 mA
- Sleep (59 sec): 10 µA = 0.01 mA
- Average = (80×1 + 0.01×59) / 60 = 1.34 mA
- Life = 2500 / 1.34 = 1865 hours = 78 days

With solar (10W panel):
- Daily generation: 10W × 4 hours (effective sunlight) = 40 Wh
- Daily consumption: 1.34 mA × 3.7V × 24h = 0.12 Wh
- Result: Solar provides 333× needed power → indefinite operation

Power Budgeting Tips:

  1. Deep Sleep is Critical: ESP32 active (80 mA) vs. deep sleep (10 µA) = 8000× difference
  2. Sensor Selection: Digital sensors (I2C) use less power than analog sensors requiring continuous ADC
  3. Transmission Cost: Wi-Fi transmission (170 mA) vs. LoRaWAN (40 mA) = 4× difference
  4. Solar Sizing: Minimum 5W panel for ESP32 with daily transmission in temperate climates

Calculate the minimum solar panel size for year-round operation in Seattle (worst-case winter: 1.5 hours effective sunlight). The ESP32 node draws average 1.34mA at 3.7V.

Daily energy requirement: \[E_{daily} = I_{avg} \times V \times 24h = 1.34mA \times 3.7V \times 24h = 0.119Wh\]

Solar generation needed (with 70% charging efficiency): \[E_{solar} = \frac{0.119Wh}{0.70} = 0.17Wh\]

Winter panel output: \(P_{panel} \times 1.5h = 0.17Wh\), so \(P_{panel} = 0.113W\). With safety margin (2×): 0.23W minimum.

However, 3-day battery autonomy for cloudy periods requires storing \(3 \times 0.119Wh = 0.357Wh = 96mAh\) at 3.7V. Standard 18650 Li-ion (2500mAh) provides 9.25Wh – enough for 78 days of autonomy. A 2W panel ensures reliable winter charging even with week-long cloudy periods.


6.2.10 Cost Optimization Strategies

Budget-Conscious Choices:

  • Prototyping: Buy from Adafruit/SparkFun for reliability and documentation ($30-50 kit)
  • Small Production (10-50): Amazon for balance of cost/speed/support ($15-25 kit)
  • Mass Production (100+): AliExpress bulk orders for 50-70% cost reduction ($8-12 kit)

Cost Comparison Example (10-node temperature monitoring) | Source | Per-Node Cost | Total Cost | Shipping | Lead Time | Quality | |——–|————–|———–|———-|———–|———| | Adafruit | $35 | $350 | $15 | 3-5 days | Excellent | | Amazon | $22 | $220 | Free | 2-3 days | Good | | AliExpress | $12 | $120 | $20 | 3-4 weeks | Variable |

Hidden Costs to Budget:

  • Enclosures: $5-30 per node depending on IP rating
  • Installation Labor: $20-100 per node for mounting, wiring
  • Gateway/Hub: $50-200 (1 per site for LoRaWAN)
  • Annual Maintenance: 10-15% of hardware cost
  • Cloud/Data: $5-50/month depending on data volume
Quick Application-to-Hardware Guide

“I need to monitor…”

Parking spaces (city-wide) → Hardware: ESP32 + PNI RM3100 magnetic + LoRaWAN RFM95 + 5-year battery → Cost: ~$90/space | Range: 10 km | Life: 5-10 years

Soil moisture (farm, 50 locations) → Hardware: ESP32 + 4× capacitive sensors + LoRaWAN + solar → Cost: ~$60/node | Range: 5 km | Life: 5+ years (solar)

Home energy usageHardware: ESP32 + 3× SCT-013 CT clamps + Wi-Fi → Cost: ~$45 total | Range: 50m (Wi-Fi) | Life: Mains powered

Heart rate (wearable) → Hardware: nRF52840 + MAX30102 + 250mAh battery + BLE → Cost: ~$35 | Range: 10m (BLE) | Life: 7-14 days/charge

Machine vibration (factory, 20 machines) → Hardware: STM32 + ADXL345 + Modbus RS485 + 24V DC → Cost: ~$55/machine | Range: 1 km (wired) | Life: Industrial-grade

Air quality (neighborhood, 10 locations) → Hardware: ESP32 + PMS5003 + MH-Z19 + BME680 + solar → Cost: ~$150/node | Range: Wi-Fi/LoRaWAN | Life: 5+ years

Not sure? Use the Sensor Selection Wizard below to get personalized recommendations!

Scenario: A city wants to deploy smart parking sensors across 500 parking spaces. Compare total cost of ownership (TCO) over 5 years for two architectures: camera-based with cloud AI vs. embedded magnetic sensor.

6.2.11 Option A: Camera + Cloud AI

Hardware per Space:

  • IP camera (1080p): $80
  • Edge gateway (1 per 10 spaces): $200 / 10 = $20
  • Hardware Total: $100 per space

Connectivity & Cloud:

  • 4G/LTE cellular data plan: $10/month per camera
  • Cloud storage (video): $5/month per camera
  • AI processing (object detection): $8/month per camera
  • Monthly Cloud Cost: $23 per space

5-Year TCO per Space:

Hardware: $100
Installation: $50
Cloud (60 months): $23 × 60 = $1,380
Total: $1,530 per space

City-wide (500 spaces): 500 × $1,530 = $765,000

6.2.12 Option B: Embedded Magnetic Sensor

Hardware per Space:

  • Magnetic sensor (PNI RM3100): $25
  • ESP32 + LoRaWAN module: $13
  • Battery (10-year CR123): $5
  • Enclosure (IP67): $15
  • Hardware Total: $58 per space

Infrastructure:

  • LoRaWAN gateway (1 per 5 km²): $200
  • Gateway internet (shared): $30/month for entire city
  • Cloud storage (minimal JSON data): $0.50/month for entire city
  • Monthly Cloud Cost: $30.50 total (≈$0.06 per space)

5-Year TCO per Space:

Hardware: $58
Installation: $25
Gateway (amortized): $200 / 500 = $0.40
Cloud (60 months): $0.06 × 60 = $3.60
Total: $87 per space

City-wide (500 spaces): 500 × $87 = $43,500

6.2.13 Cost Comparison:

Category Camera + Cloud AI Magnetic + LoRaWAN Savings
Hardware $50,000 $29,000 $21,000
Installation $25,000 $12,500 $12,500
Connectivity (5 years) $690,000 $1,830 $688,170
Total (5 years) $765,000 $43,500 $721,500 (94%)
Annual Operating Cost $138,000/year $366/year $137,634/year

6.2.14 Trade-Off Analysis:

Aspect Camera + Cloud Magnetic Sensor Winner
Initial Cost $150/space $83/space Magnetic (45% cheaper)
5-Year TCO $1,530/space $87/space Magnetic (94% cheaper)
Power Mains required Battery (10 years) Magnetic (no infrastructure)
Data Privacy Video raises concerns No PII Magnetic (privacy-friendly)
Accuracy 95% (lighting dependent) 99% (detects metal) Magnetic (more reliable)
Installation $50 (wiring, mains) $25 (surface mount) Magnetic (simpler)
Maintenance Camera cleaning, repairs Battery swap (year 10) Magnetic (minimal)
Latency 2-5 sec (cloud roundtrip) <1 sec (local detection) Magnetic (real-time)
Additional Features Security surveillance None Camera (dual-use)

6.2.15 When to Choose Camera + Cloud:

  • Parking lot also needs security surveillance (dual-use justifies cost)
  • High-value locations where $1,530 per space is acceptable
  • Existing 4G connectivity and mains power available
  • City wants video analytics beyond parking (traffic flow, incident detection)

6.2.16 When to Choose Magnetic Sensor:

  • Pure parking detection with no security requirements
  • No mains power at parking spaces (battery-powered)
  • Large deployments (>100 spaces) where TCO dominates decision
  • Privacy-sensitive locations (residential streets, hospital visitor parking)
  • Tight budget with 5-year planning horizon

6.2.17 Key Insights:

  1. Connectivity dominates TCO for cloud-based solutions: $23/month × 60 months = $1,380 vs. $100 hardware cost
  2. Battery-powered edge processing eliminates ongoing costs: Pay upfront, minimal operating expenses
  3. LoRaWAN infrastructure is highly cost-effective: 1 gateway serves 500+ sensors over 5 km²
  4. Embedded detection costs $0.06/month vs. cloud AI $8/month: 133× cheaper

Design Principle: For high-volume deployments with simple binary detection (occupied/empty), embedded sensors with low-power wireless crush cloud-based solutions on TCO. Reserve cameras + cloud AI for applications requiring complex visual analysis or dual-use cases.

6.3 Diagrams

6.3.1 Sensor Application Domain Hierarchy

IoT application domain hierarchy showing Healthcare, Agriculture, Industrial, Smart Home, Smart Cities, and Environment domains with characteristic sensors, MCUs, and connectivity for each
Figure 6.1: IoT Application Domains: Healthcare, Agriculture, Industrial, and Smart Home

This layered view categorizes sensors by criticality level - from safety-critical to convenience - helping you understand different reliability and accuracy requirements.

Sensor criticality layers diagram showing three tiers: safety-critical requiring certified sensors with redundancy, performance tier for industrial monitoring with high reliability, and informational tier for smart home with consumer-grade sensors
Figure 6.2: Criticality-based sensor selection: Safety-critical applications (medical, gas detection) demand certified sensors with redundancy. Operational applications (industrial monitoring) need high reliability. Informational applications (smart home) can use lower-cost consumer sensors. Match sensor grade to application criticality.
Key sensors by IoT application domain showing eight domains (Smart Cities, Healthcare, Agriculture, Industrial, Smart Home, Environment, Security, Retail) with their primary sensors, secondary sensors, and connectivity types
Figure 6.3: Sensor-to-domain mapping: Each IoT domain has characteristic sensors. Smart cities use ultrasonic (parking), cameras (traffic), and PM2.5 (air quality). Healthcare relies on PPG (heart rate), accelerometer (falls), and SpO2 (oxygen). Agriculture needs soil moisture, climate sensors, and GPS. Industrial IoT uses vibration, current, and flow sensors. Know your domain to select appropriate sensors.

6.3.2 Sensor Selection Decision Tree

Sensor selection decision tree branching from application need into indoor and outdoor deployment paths, with sub-branches for power source and range requirements, leading to specific connectivity and MCU recommendations
Figure 6.4: Sensor Selection Decision Tree: Indoor vs Outdoor Deployment Paths

6.3.3 Data Flow Architecture

End-to-end IoT data flow showing six stages: sensor layer (DHT22, BMP280, PIR), gateway/edge (ESP32, RPi), network layer (Wi-Fi, LoRaWAN, cellular), cloud platform (time-series DB, analytics, ML), and application layer (dashboards, alerts, automation)
Figure 6.5: End-to-End IoT Data Flow: Sensors to Cloud to Application

6.3.4 Sensor Usage Statistics

Bar chart showing IoT sensor market distribution by type: temperature at 28%, pressure at 22%, motion at 18%, humidity at 12%, gas at 8%, image at 5%, light at 4%, and other at 3%
Figure 6.6: IoT Sensor Market Distribution: Temperature Leads at 28%

6.3.5 Sensor Type Comparison by Application

Table-format comparison diagram showing five application domains (Smart Cities, Agriculture, Healthcare, Industrial, Smart Home) with columns for primary sensors, recommended MCU, connectivity protocol, power source, and estimated cost per node. Smart Cities row shows magnetic field sensors with ESP32 and LoRaWAN. Agriculture uses capacitive soil sensors with solar power. Healthcare features MAX30102 heart rate sensors with BLE. Industrial uses ADXL345 vibration sensors with Modbus. Smart Home employs PIR motion sensors with Wi-Fi connectivity.
Figure 6.7: Sensor Types by Application Domain: Smart Cities, Agriculture, Healthcare, Industrial

6.3.6 Sensor Deployment Lifecycle

Eight-phase sensor deployment lifecycle from requirements analysis through sensor selection, prototype, integration, deploy, operate, maintain, and scale, with continuous improvement feedback loop and typical timeline estimates
Figure 6.8: Sensor Deployment Lifecycle: From Requirements to Scale and Optimization

6.4 Hands-On Labs

Choosing the right sensor is like choosing the right tool for a job!

6.4.1 The Sensor Squad Adventure: The Shopping Trip

The Sensor Squad had a mission: build a weather station for the school garden! But first, they needed to go shopping for the right parts.

Sammy the Sensor looked at the list. “We need a temperature sensor, a humidity sensor, and a rain gauge. But there are SO many choices!”

Max the Microcontroller said, “Let me help! First question: will this be INSIDE or OUTSIDE?”

“Outside!” everyone said. Max nodded. “Then we need waterproof sensors – ones rated IP65 or higher. That means they can handle rain and dust.”

Bella the Battery asked the important question: “How will we power it? There are no electrical outlets in the garden!”

Lila the LED had an idea. “Solar power! A small solar panel can charge a battery during the day, and we use just a tiny bit of power to take measurements.”

Max made the final decision. “We will use an ESP32 brain – it has Wi-Fi to send data to the classroom computer, and it is only $5! With a $12 solar panel, $5 temperature sensor, and $8 waterproof box, our total is about $30!”

Sammy was amazed. “That is less than a video game! And we get to watch the weather every day!”

6.4.2 Key Words for Kids

Word What It Means
BOM Bill of Materials – a shopping list for building something
IP Rating How waterproof and dustproof something is (IP65 = very protected)
Solar Power Using sunlight to make electricity
Budget How much money you have to spend
Microcontroller The tiny brain that reads sensors and sends data

Key Takeaway

Hardware selection for IoT deployments requires balancing multiple constraints: sensor accuracy vs. cost, power consumption vs. battery life, wireless range vs. data rate, and environmental protection vs. price. Always calculate total cost of ownership (hardware + installation + maintenance + connectivity + data storage) rather than just component cost, and pilot with a small deployment before scaling to avoid expensive mistakes.

Common Pitfalls

Prototype breakout boards with loose header pins are not suitable for deployed IoT nodes — vibration loosens connections, moisture causes corrosion, and pin headers are not rated for the connector cycles expected in maintained hardware. Design custom PCBs or use ruggedized modules with locking connectors for any deployment that needs to last more than a few weeks.

Wireless connectivity performance degrades dramatically when the antenna trace is routed near ground planes, metal enclosures, or battery packs. On custom PCBs, follow the module manufacturer’s keep-out guidelines for antenna areas. In enclosures, position the module with the antenna facing away from metal surfaces.

Sensor module datasheets often specify operating current for the sensor IC alone, not for the complete module including its voltage regulator, onboard LED, and supporting circuits. Measure the actual current of the complete module assembly in-circuit at the expected supply voltage before calculating battery life.

USB host port current varies between 500 mA and 2.1 A depending on the port and negotiation. During Wi-Fi transmission spikes, ESP32 modules draw 500+ mA, which can exceed some USB port limits and cause brownout resets. Use a dedicated USB power adapter rated for at least 2 A during development, and design field hardware to use regulated DC supplies.

6.5 What’s Next

If you want to… Read this
Learn which sensors and modules to use for specific application domains Sensor Apps: Selection Wizard
Understand sensor application system architecture Sensor Application Architecture
Practice building sensor applications in hands-on labs Sensor Application Labs
Explore using mobile phones as a sensor hardware platform Mobile Phone as a Sensor