SLAAE30 July   2021 MSP430FR2355

 

  1.   Abstract
  2.   Trademarks
  3. 1PIR Design Description
    1. 1.1 PIR Sensor
    2. 1.2 PIR Signal Chain
      1. 1.2.1 Traditional Motion Detection Signal Chain Design
      2. 1.2.2 Capacitor-Free Signal Chain Design
  4. 2Software
    1. 2.1 Software Architecture
    2. 2.2 Software Flow Chart
    3. 2.3 Power Profile
    4. 2.4 Data Processing
      1. 2.4.1 Digital Signal Conditioning
      2. 2.4.2 Low-Pass Filter for Temperature Drift
      3. 2.4.3 Spikes and Noise
      4. 2.4.4 Motion Detection Function
  5. 3Hardware and Schematic
    1. 3.1 MSP430FR2355
    2. 3.2 Schematic
  6. 4Results
    1. 4.1 Distance: 15 ft (4.5 m)
    2. 4.2 Distance: 22.5 ft (6.9 m)
    3. 4.3 Distance: 36.5 ft (11.1 m)
  7. 5Summary
  8. 6References

Low-Pass Filter for Temperature Drift

Figure 2-4 shows what the PIR signal looks like over time as the ambient temperature and the PIR sensor body temperature are fluctuating. There is no motion detect events here, just the signal drifting. A digital low-pass, moving average filter is applied in software to the collected data samples. Based on this moving average filter, the DACs are adjusted to compensate for this baseline trend over time and this removes most of the DC component of the signal. This allows you to achieve a higher dynamic range from the MSP430's 12-bit ADC since the signal chain is actively being compensated for the ambient temperature, it keeps the signal centered within the ADC measurement range. The software can use both the ADC's reading and the current DAC compensation values to determine the absolute digital output code.

GUID-C15FB7E9-93A1-4B15-B52D-3C619A9D8FCE-low.png Figure 2-4 PIR Sensor Signal Drift Over Time