SPRADL9 February   2025 CC1310

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Sensor Controller in Building Automation
    2. 1.2 TI Devices
      1. 1.2.1 CC13x4 Wireless MCUs
      2. 1.2.2 CC26xx Wireless MCUs
  5. 2Sensor Controller
    1. 2.1 Features
    2. 2.2 Sensor Controller Power Modes
      1. 2.2.1 Active Mode
      2. 2.2.2 Low Power Mode
      3. 2.2.3 Standby Mode
      4. 2.2.4 Switching Between Power Modes
        1. 2.2.4.1 24MHz - Startup From Standby and Return to Standby Energy
        2. 2.2.4.2 2MHz - Startup From Standby and Return to Standby Energy
    3. 2.3 Power Measurement Setup
      1. 2.3.1 EnergyTrace™ Software
      2. 2.3.2 Software
      3. 2.3.3 Current Consumption Measurements
      4. 2.3.4 Hardware
  6. 3Building Automation Use-Cases and Techniques using Sensor Controller
    1. 3.1 PIR Motion Detection
      1. 3.1.1 PIR Traditional Signal-Chain
      2. 3.1.2 Capacitor-less Motion Detection Block Diagram
      3. 3.1.3 Digital Signal Processing
        1. 3.1.3.1 Hardware
        2. 3.1.3.2 Digital Signal Processing
    2. 3.2 Glass Break Detection
      1. 3.2.1 Low-Powered and Low-Cost Glass Break Block Diagram
    3. 3.3 Door and Window Sensor
    4. 3.4 Low-Power ADC
      1. 3.4.1 Code Implementation in Sensor Controller Studio
      2. 3.4.2 Measurements
    5. 3.5 Different Sensor Readings with BOOSTXL-ULPSENSE
      1. 3.5.1 Capacitive Touch
      2. 3.5.2 Analog Light Sensor
      3. 3.5.3 Potentiometer (0 to 200kΩ range)
      4. 3.5.4 Ultra-Low Power SPI Accelerometer
      5. 3.5.5 Reed Switch
  7. 4Summary
  8. 5References

Digital Signal Processing

Figure 3-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.

 PIR Signal over time Figure 3-4 PIR Signal over time

The PIR raw signal can be somewhat noisy due to environmental changes, such as temperature fluctuations or background interference. As a result, avoid using simple threshold on the raw signal because this can fluctuate up and down, leading to unreliable detections. Instead, we analyze the signal’s first derivative to measure how quickly the signal rises over time. A rapid change in the signal results in a high first derivative, which we then threshold to detect movements more reliably. Before applying this approach, we oversample the raw signal and use a moving average filter to smooth out small spikes.

 Smoothed PIR Signal Versus Raw
                    Signal Figure 3-5 Smoothed PIR Signal Versus Raw Signal

After smoothing the raw PIR signal, calculate the absolute value of the first derivative. This step allows the focus on the magnitude of changes in the signal, regardless of the direction of the variation. To detect movement, we set a software-defined threshold on this absolute first derivative. If the magnitude of the derivative exceeds the threshold, this indicates a rapid change in the signal, which corresponds to motion. This method provides a robust way to detect movements while minimizing false triggers caused by gradual signal fluctuations or environmental noise.

 First Derivative of the
                    Smoothed Signal Figure 3-6 First Derivative of the Smoothed Signal