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
For Beginners: Sensor Hardware Selection
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
Time: 20 min | Difficulty: Advanced | Unit: 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.
Application-Specific Hardware Selection
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
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\]
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.
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: ESP32 + PNI RM3100 magnetic sensor + LoRaWAN RFM95 + 5-year battery. Typical cost: about $90 per space. Range: 10 km. Life: 5-10 years.
Soil moisture, farm with 50 locations: ESP32 + four capacitive soil sensors + LoRaWAN + solar. Typical cost: about $60 per node. Range: 5 km. Life: 5+ years with solar.
Home energy usage: ESP32 + three SCT-013 current transformer clamps + Wi-Fi. Typical cost: about $45 total. Range: 50 m on Wi-Fi. Life: mains powered.
Heart rate wearable: nRF52840 + MAX30102 + 250 mAh battery + BLE. Typical cost: about $35. Range: 10 m on BLE. Life: 7-14 days per charge.
Machine vibration, 20 factory machines: STM32 + ADXL345 + Modbus RS485 + 24 V DC power. Typical cost: about $55 per machine. Range: 1 km wired. Life: industrial-grade.
Neighbourhood air quality, 10 locations: ESP32 + PMS5003 + MH-Z19 + BME680 + solar. Typical cost: about $150 per node. Range: Wi-Fi or LoRaWAN. Life: 5+ years.
Not sure? Use the Sensor Selection Wizard below to get personalized recommendations!
Worked Example: Smart Parking Sensor Cost Analysis — Cloud vs. Embedded
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.11Option 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
LoRaWAN infrastructure is highly cost-effective: 1 gateway serves 500+ sensors over 5 km²
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.
Figure 6.1: IoT Application Domains: Healthcare, Agriculture, Industrial, and Smart Home
Alternative View: Sensor Requirements by Application Criticality
This layered view categorizes sensors by criticality level - from safety-critical to convenience - helping you understand different reliability and accuracy requirements.
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.
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.
Figure 6.8: Sensor Deployment Lifecycle: From Requirements to Scale and Optimization
6.4 Hands-On Labs
For Kids: Meet the Sensor Squad!
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
Knowledge Check: Hardware Selection
Knowledge Check: Power Budget
Matching Quiz: Hardware Components and Their Roles
Ordering Quiz: IoT Hardware Design Process
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
1. Using Breadboard Modules in Production Deployments
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.
2. Ignoring Antenna Placement in Custom PCB Designs
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.
3. Not Accounting for Sensor Module Current During Battery Sizing
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.
4. Assuming USB Power Is Stable During IoT Development
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.
Label the Diagram
6.5 What’s Next
If you want to…
Read this
Learn which sensors and modules to use for specific application domains