Table of Contents

Electronics Reference: Sensors & Breakout Modules

SENSOR INTEGRATION MANDATE: Electronic sensors convert physical phenomena (temperature, acceleration, pressure, light, magnetic fields, distance) into measurable electrical signals. Always verify operating voltage (`3.3 V` vs. `5.0 V`), interface type (Analog, Digital GPIO, I2C, SPI, UART), warm-up/settling times, and environmental calibration requirements before integrating a module into a circuit or embedded system.

1. Sensor Signal Output Types

Before wiring any sensor to a microcontroller (`Arduino`, `ESP32`, `STM32`, `Raspberry Pi`), identify how it outputs measurement data:

Output Type Signal Characteristics Microcontroller Pin Required Design Considerations
Analog Voltage Continuous DC voltage proportional to the measured physical quantity (e.g., `0 V – 3.3 V`) ADC Pin (Analog-to-Digital Converter) Susceptible to wire noise and ground bounce; keep wires short and filter with a small RC low-pass network
Ratiometric Analog Output voltage scales proportionally with the sensor's supply voltage ($V_{CC}$) ADC Pin (referenced to the same $V_{CC}$) Power the sensor from the exact same `VREF` / `3.3 V` rail as the MCU's ADC so supply fluctuations cancel out
Digital Logic / Threshold Binary `HIGH` (`1`) or `LOW` (`0`) state triggered when a preset threshold is crossed Standard Digital GPIO (or External Interrupt) Often uses an onboard comparator (`LM393`) and potentiometer; check whether output is active-HIGH or open-drain
PWM / Pulse-Width Square wave where duty cycle or pulse duration encodes the measurement (e.g., `HC-SR04` Echo) Digital GPIO with hardware timer / `pulseIn()` Ensure pulse voltage matches MCU logic level (`5.0 V` echo pins require a resistor divider on `3.3 V` MCUs)
Serial Digital Bus Calibrated digital registers transmitted over I2C, SPI, or UART Hardware `SDA/SCL`, `MOSI/MISO/SCLK`, or `TX/RX` Highest noise immunity and precision; verify whether breakout board includes onboard level shifters and pull-ups

2. Common Sensor Families & Breakout Modules

2.1 Motion, Inertial & Orientation Sensors (IMUs)

2.2 Environmental & Atmospheric Sensors

2.3 Distance, Proximity & Optical Sensors

2.4 Current, Voltage & Gas Sensors

3. Breakout Module Hardware Pitfalls

Commercial hobbyist and industrial breakout boards (e.g., Adafruit, SparkFun, Waveshare, generic GY-series) often include onboard support circuitry that affects circuit integration:

  1. Onboard `3.3 V` LDO Regulators: Many breakout modules feature a tiny `3.3 V` regulator (`662K` / `XC6206`) on the `VIN` pin so they can be powered from `5.0 V`. If you supply `3.3 V` into `VIN`, the LDO drops ~`0.1 V – 0.3 V`, leaving the sensor undervolted at `3.0 V`. Check whether the board provides a dedicated `3V3` bypass pin.
  2. Duplicate I2C Pull-Up Resistors: Most I2C breakout boards include onboard `4.7 kΩ` or `10 kΩ` pull-up resistors to `3.3 V`. Connecting 4 or more breakout modules to the same I2C bus places all pull-ups in parallel, lowering total resistance below `1 kΩ` and preventing weak sensors from pulling `SDA`/`SCL` `LOW`. Desolder pull-up jumpers on extra boards when chaining multiple modules.
  3. Counterfeit / Cloned Sensor Chips: Low-cost generic modules (especially `BMP280` vs. `BME280` or `MPU6050`) frequently substitute remarked dies with different I2C `WHO_AM_I` device IDs or missing humidity sensors. Verify the `WHO_AM_I` register value during firmware initialization.

4. Signal Conditioning, Filtering & Calibration

4.1 Hardware & Software Noise Filtering

4.2 Sensor Calibration Procedures

  1. Two-Point Linear Calibration (Gain + Offset): Measure sensor output at two known physical reference points (e.g., `0°C` ice bath and `100°C` boiling water, or two known weights on a load cell) to compute exact slope ($m$) and offset ($b$) in $y = mx + b$.
  2. Gyroscope Zero-Rate Bias: Keep the sensor completely motionless for 2–3 seconds at boot while averaging 200–500 raw samples; subtract these mean offsets from all subsequent readings.
  3. Magnetometer Hard/Soft-Iron Calibration: Rotate the assembled device through all 3D orientations (figure-8 motion) away from metal objects to map the min/max ellipsoid sphere and center offsets (`X_offset`, `Y_offset`, `Z_offset`).

5. Sensor Integration & Bench Debugging Checklist

  1. [ ] Verify Supply & Logic Levels: Confirm whether sensor `VCC` and `SDA/SCL/TX/RX` pins are `3.3 V` or `5.0 V` tolerant before applying power.
  2. [ ] Check Pinout Order: Double-check silkscreen labels (`VCC`, `GND`, `SCL`, `SDA` vs. `GND`, `VCC`, `SCL`, `SDA`—pin order varies across manufacturers and reversing power destroys MEMS sensors instantly).
  3. [ ] Run Bus / Register ID Check: Verify I2C `ACK` address (`0x68`, `0x76`, etc.) and read the sensor's `WHO_AM_I` / `CHIP_ID` register before attempting to read data registers.
  4. [ ] Confirm Physical Axis Alignment: Tilt or move the sensor along known X, Y, and Z directions and verify the sign (`+` vs. `-`) of each axis matches your coordinate frame (NED vs. ENU).
  5. [ ] Isolate Mechanical Vibration & Heat: Mount IMUs and barometers away from hot voltage regulators, cooling fans, and vibrating motors (use open-cell foam over barometer ports to prevent wind/light pressure spikes).

Electronics Reference: 1. Diodes & Transistors | 2. Integrated Circuits (ICs) | 3. Communication Buses (UART, SPI & I2C) | 4. Voltage Regulators & Power Supply Design | 5. Operational Amplifiers (Op-Amps) | 6. Sensors & Breakout Modules