Skip to content

Master Selection Table and Pitfalls

Master Selection Table and Pitfalls

This section closes Sections 1–14 into two artefacts that go straight into a proposal: a master selection table covering every signal family, and a pitfall list (industry-wide failure modes plus the specific causes developed in the earlier sections). By the end you will be able to:

  • Describe any module with one fixed table structure so proposal, BOM and wiring sheet share the same fields
  • Judge at a glance whether pin and peripheral resources are sufficient, by signal family
  • Walk the pitfall list during design review instead of reverse-engineering it after failure
  • Turn selection conclusions into acceptance fields a customer can sign against
  • Read Sections 1–14 (this section adds no new theory, only consolidation)
  • Have a live project to fill the tables against

The columns never change per device. This is also the shape of the first technical deliverable in our ODM projects:

Module Function Signal family Peripheral Pins Supply Level shift Required externals Sampling cadence Failure signature Alternates
Button / joystick SW Human input Digital input GPIO plus software timing 1 3.3 V No Internal pull-up Debounce 20–50 ms Floating chatter / no action Tact switch, limit switch
Joystick X/Y Direction input Analogue ADC1 2 3.3 V No Divider (on board) 5–20 ms Centre drift → dead zone Dual pots, hall joystick
NTC Temperature Analogue ADC1 1 3.3 V No 10 kΩ divider plus 100 nF 0.5–2 s Open circuit → rail value DS18B20, SHT3x
DS18B20 Calibrated temperature 1-Wire GPIO 1 3.3 / 5 V Needed when powered at 5 V 4.7 kΩ pull-up 750 ms at 12-bit Sentinel −127 Compatible 1-Wire probes
DHT11 / DHT22 Temp and humidity Custom single-wire GPIO 1 3.3 / 5 V Depends on module 4.7–10 kΩ pull-up ≥1 s / ≥2 s Checksum failures, retries SHT3x (I2C)
BH1750 Illuminance I2C I2C 2 3.3 V No On-board pull-ups ~1 s Returns −1 TSL2561, VEML7700
MQ-2 Gas and smoke Analogue plus digital ADC1 plus GPIO 2–3 5 V Both AO and DO Divider plus warm-up 2–10 s False alarm during warm-up MQ-135, electrochemical
HC-SR04 Distance Digital (Trig/Echo) GPIO ×2 2 5 V Echo mandatory Local storage cap ≥60 ms Timeout = no echo VL53L0X, mmWave
Flame sensor Open-flame hint Analogue plus digital ADC1 plus GPIO 2–3 3.3 / 5 V Depends on output Shading structure ~1 ms windows Sunlight false alarms Smoke / heat detectors (different duty)
IR receiver head Remote-control link Digital (38 kHz demodulated) GPIO plus interrupt 1 3.3 V No Pull-up; emitter needs a driver Frame length Unmodulated TX is invisible Other centre frequencies
PIR Motion detection Digital GPIO 1 4.5–6 V Measure the output Baffles, draught avoidance Hold-time class Stationary person drops out mmWave presence
mmWave radar Presence / distance Digital or UART GPIO or UART 1–3 3.3 / 5 V Depends on output Non-metal window, orientation Frame rate Reads through partitions 5.8 / 24 / 60 GHz tiers
8×8 thermal array Temperature mapping I2C I2C 2 3.3 V No Pull-ups plus init delay Sub-second frames Single-pixel outliers 16×12, 32×24
Servo Angle output PWM LEDC 1 5 V independent Common ground Own supply plus storage 50 Hz Stall heat and buzz Stepper with lead screw, solenoid lock
DC motor plus H-bridge Speed and direction PWM plus digital LEDC plus GPIO 2–3 5–12 V Check VIH on logic side Bus capacitance, flyback Ramped start Inrush drags the rail Brushless, add encoder
Stepper plus driver Precision displacement STEP plus DIR LEDC plus GPIO 2–3 12–24 V Confirm logic levels Heatsinking, current setting Acceleration profile Lost steps Closed-loop stepper, servo
Relay / solenoid valve Switching Digital GPIO plus driver 1–2 5 / 12 / mains side Opto-isolation Flyback diode Actuation time Contact derating Solid-state relay

Resource budget: count pins before choosing parts

Section titled “Resource budget: count pins before choosing parts”

The thing that blows up a design at proposal stage is rarely accuracy — it is running out of resources. Three tallies first:

Resource How to count Typical conflict
ADC1 channels Number of analogue parts More parts than channels → switch to I2C digital parts or add a mux
I2C addresses Address of every I2C device Duplicated address → change part, remap address, or split the bus
PWM / LEDC channels Servo plus motor plus dimming Channel counts vary widely by chip; audio may contend for the same clock source
Interrupt pins PIR, radar, wake buttons Only RTC-domain pins wake from deep sleep
UART ports Radar, GPS, debug console Clashes with the logging port; plan port allocation
Power domains 5 V / 12 V / 3.3 V / battery Always-on peripherals (MQ, radar) eat the runtime budget

Fifteen pitfalls, ordered by how often they occur

Section titled “Fifteen pitfalls, ordered by how often they occur”

Every item below is either an industry-wide failure mode or a cause already argued in the earlier sections of this chapter. If a line needs to cite one of our own projects, the evidence goes into the test backlog first — attribution without measurement is not acceptable in published material.

  1. 5 V output straight into an ESP32: mis-read or damage. Every cross-domain connection starts from VIH/VIL and the absolute maximum rating
  2. Treating an ADC reading as a voltage: analogRead() is not a meter — measured supply and attenuation setting belong in the conversion
  3. ADC2 with Wi-Fi: no usable readings on the original ESP32. Sample on ADC1
  4. delay() used for debounce or conversion waits: wrecks keep-alive, buttons and sleep logic. Use millis()
  5. Assuming the default I2C address: scan the bus first; boards ship with remapped addresses
  6. 1-Wire without a pull-up: DS18B20 returns −127, DHT checksums never pass
  7. Using GPIO34–39 as general IO: that group is input-only with no internal pulls
  8. Actuators and controller on one thin supply run: one of the leading causes of random reboots; scope the rail droop and it is settled
  9. Open-drain MOS translators on timing protocols: softened edges cause WS2812 colour chaos and 1-Wire frame loss
  10. Calibrating on a breakout board and shipping it: enclosure aperture, optics, orientation and airflow all change results — calibrate the assembly
  11. Single-threshold control without hysteresis: dusk flicker and thermostat oscillation; add deadband plus time confirmation
  12. Writing “0” or reusing the last frame when nothing was measured: how dashboards learn to lie — require valid / quality
  13. Publishing uncalibrated accuracy: fitted MQ ppm, DIY SpO₂, absolute temperature from thermal arrays are not promiseable
  14. Substituting parts across safety duties: flame sensors and thermal arrays do not replace smoke or heat detectors; PIR does not replace presence
  15. Leaving the fail-default state undefined: an actuator twitching at boot, a valve parked in the dangerous position after power loss — answered at design time or not at all

Acceptance fields: turning the table into something a customer signs

Section titled “Acceptance fields: turning the table into something a customer signs”

A table that can enter a contract must carry:

  1. Conclusion columns: level-shift decision, power domain, failure signature and default state, sampling cadence and alarm-suppression rule
  2. Evidence columns: datasheet page or link, calibration method and date, measured deviation band (not nominal values)
  3. Responsibility columns: which figures are “typical, subject to measurement” and which are committed (committed items must have measurements behind them)
  4. Version columns: parameter-set version (emissivity, divider ratio, thresholds, calibration coefficients all count as parameters), so data stays explainable

Item 4 is the one most often skipped and the only way to explain history later: data collected under different parameters is not comparable. A step in a curve without a parameter version is indistinguishable from a real phenomenon.

  1. Split requirements into “what to measure” and “what to actuate”, mapping each to a signal family
  2. Complete the resource budget; if it does not fit, change the architecture before discussing parts
  3. Complete the master table row by row — level shift and failure signature are where blanks remain
  4. List what must be measured, put it into the project’s test backlog (one bench item per line, assigned, ticked off), then bring deviation bands back into the table
  5. Publish accuracy and commitment statements: committed items get measured bands, everything else is labelled “typical, subject to measurement”
  6. Archive parameter versions and calibration records as the anchor for later data interpretation
  1. “Can one sensor do it all?” → Only if sampling and decision logic genuinely merge; do not blur two duties to save a part (a thermal array does not replace a smoke detector)
  2. “What accuracy can you get?” → Answer format is fixed: under which conditions, calibrated how, measured deviation band of what size. Never a bare number
  3. “Why is my reading jumping?” → Check in order: supply transients → actuator crosstalk → front-end impedance and filtering → software conversion (Sections 14 / 13 / 3)
  4. “Can we commit to this spec?” → Only items calibrated and measured go into the contract; the rest belong under “design target”, not “acceptance criterion”

Key points of this section:

  1. One fixed-column master table is the shared source for proposal, BOM and wiring sheet — column names never change per device
  2. Budget resources before selecting parts: ADC channels, I2C addresses, PWM channels, interrupt pins, power domains
  3. The fifteen pitfalls cluster in four places: cross-domain connections, time handling (delay and blocking), calibration context (must be the assembly), and state semantics (invalid values, default states)
  4. Delivery tables need conclusion, evidence, responsibility and version columns; skip one and it comes back at acceptance or in service
  5. The format of an accuracy statement is itself risk control: conditions plus calibration plus deviation band, never a bare number

Building a commercial IoT product?

We provide ESP32 ODM design-to-manufacturing services. From prototype to production — the team behind this tutorial can build it with you.

💡 Mention tutorial.imagrove.com in your Alibaba chat with us — get 10% off your custom project quote.

Talk to us →

First published attutorial.imagrove.com/sensor-module-selection/15-master-selection-table-and-pitfalls/Please credit Imagrove and link back to this page when quoting or republishing.

Questions or issues with this tutorial?

Sign in with GitHub to leave a comment. If a step fails for you, tell us — we verify it and update the tutorial.