5 Summary
The example described in this application note shows how the built-in 12-bit differential ADC and Programmable Gain Amplifier in the ATtiny1627 and the tinyAVR® 2 Family can be used to design a low-power, cost-efficient, and small footprint PIR motion detection solution.
Compared to the original Click board configuration, this solution will offer a significant reduction in BOM cost and board space, saving two op amps, six resistors, and four capacitors in the signal chain. Other significant benefits compared to the original solutions is that the sensitivity, detection threshold, filtering, and signal gain can be adjusted in firmware and not in hardware, giving the developer the possibility to create the code in a way that it can adapt and change based on the needs of the application. Having access to the PIR signal gives the developer the possibility to implement smart algorithms in firmware to enable product differentiation.
The total power consumption of the system in the selected configuration is about 13.7 µA at ambient temperature. The Click board contributes about 11 µA to the total current consumption with the original bias configuration. Increasing the bias resistor R6 will reduce the Click board power consumption, at the expense of reduced output signal from the sensor.
The power consumption is application dependent and will vary based on the configuration of the PIR sensor, sample acquisition, and filtering parameters, which will also affect the detection range and/or sensitivity. Consider adjusting these parameters to further reduce the power consumption in times were the demands of the application are lower.
Setting | MCU Power Consumption |
---|---|
PIR_SAMPLE_RATE_PER_SECOND = 4 Hz PIR_OVERSAMPLE_RATE = 2 | 1.5 µA |
PIR_SAMPLE_RATE_PER_SECOND = 8 Hz PIR_OVERSAMPLE_RATE = 2 | 2.1 µA |
PIR_SAMPLE_RATE_PER_SECOND = 16 Hz PIR_OVERSAMPLE_RATE = 2 | 3.5 µA |
PIR_SAMPLE_RATE_PER_SECOND = 4 Hz PIR_OVERSAMPLE_RATE = 16 | 2.7 µA |
PIR_SAMPLE_RATE_PER_SECOND = 8 Hz PIR_OVERSAMPLE_RATE = 16 | 4.6 µA |
PIR_SAMPLE_RATE_PER_SECOND = 16 Hz PIR_OVERSAMPLE_RATE = 16 | 8.6 µA |
PIR_SAMPLE_RATE_PER_SECOND = 4 Hz PIR_OVERSAMPLE_RATE = 64 | 6.1 µA |
PIR_SAMPLE_RATE_PER_SECOND = 8 Hz PIR_OVERSAMPLE_RATE = 64 | 11.4 µA |
PIR_SAMPLE_RATE_PER_SECOND = 16 Hz PIR_OVERSAMPLE_RATE = 64 | 21.7 µA |