To better meet the power requirements of these applications, while also ensuring reliable and durable designs, designers should first consider using small, power-efficient microcontrollers with intelligent and sophisticated functions. These microcontrollers can handle most of the application's tasks and require fewer external passive components in a sensor node design. They are also characterized by low power consumption and incorporate features that increase flexibility and simplicity.
For example, when designing battery-powered sensor nodes for a home security system, a passive infrared (PIR) motion detector is often used both inside and outside the home. A PIR sensor detects changes in the amount of infrared radiation "seen" by the sensing elements, which varies depending on the temperature and surface characteristics of the object in front of the sensor. When a person passes between the sensor and the background, the sensor detects the difference between the ambient temperature and the body temperature, and vice versa. It then converts this difference in the input infrared radiation into a variation in the output voltage (VPIR(t)). Other objects with the same temperature as the background, but with different surface characteristics, will also cause the sensor to detect a different emission pattern, as can be seen in Figure 1.
Figure 1. Motion detection principle of a PIR sensor.
The output signal levels of a PIR sensor are typically very low, below 1 mV. To detect motion and avoid false detections, the analog signal must be amplified before being sampled by the analog-to-digital converter (ADC). In PIR-based solutions, this is usually done in several stages using high-gain operational amplifiers, which in turn increases design complexity, the number of components, energy efficiency, and costs, among other factors. Read on to learn how a small, power-efficient microcontroller can help mitigate these effects.
Design Complexity:
A microcontroller-based PIR sensor node that offers a range of functions, such as a 12-bit differential ADC with a programmable gain amplifier (PGA), requires fewer external components, occupies less board space, and reduces the bill of materials cost. Consider the Microchip Click PIR Sensor. It is a printed circuit board containing all the passive components required for a PIR sensor node to operate. The Click board is based on an operational amplifier solution that includes several ADCs, resistors, and capacitors. It has been designed to be very user-friendly to simplify prototyping and evaluation. A typical setup for prototyping might consist of a Click PIR board along with the Microchip Curiosity Nano Base for Click boards™ and a Curiosity Nano evaluation kit. A solution using a PIR sensor node can leverage a microcontroller such as Microchip Technology's ATtiny1627, which incorporates a 12-bit differential ADC and a PGA. The number of external components can be significantly reduced by eliminating the need for an operational amplifier to amplify the signal. This, along with an external ADC, also allows for the elimination of other passive components, such as resistors and capacitors.
Therefore, using this type of microcontroller significantly simplifies the printed circuit board design for the PIR click. Figure 2 shows the components that can be removed (X) and how the new connections can be made (blue lines).
Note: In this example, the PIR click is used as the basis for the modifications because it was more practical than designing a new printed circuit board and acquiring the necessary components. This modified solution does not compete with the purpose of the Click boards.
Figure 2. Example of modifications to the PIR click and diagram.
With these modifications, taking advantage of the built-in 12-bit differential ADC and PGA, Figure 3 also shows the few external components required when selecting the appropriate microcontroller.
Figure 3. Modified PIR click and schematic.
With fewer external components, the hardware and printed circuit board design will be cleaner and more compact, as the hardware requires fewer external components. Furthermore, the software and firmware can be more compact and efficient since the microcontroller handles more tasks. Timing and synchronization will also be easier to manage.
When much of the complexity involved in sensor node design is shifted from the hardware to the microcontroller and CPU (central processing unit) and managed via firmware, it becomes more flexible to change and add functionality during the development process. All of this is achieved without spending time redesigning the board, resulting in significant time and cost savings for designers. It also becomes easier to optimize code for factors such as power consumption. By simply changing parameter settings, designers can modify application code, add functionality, or optimize code to reduce power consumption or sensitivity related to environmental conditions, such as variations in ambient temperature. Sensors can struggle to detect a person when the ambient temperature exceeds 30°C. Another example of added functionality could be incorporating machine learning to recognize movement patterns and teach the system to distinguish between noise and a real person moving toward an animal, etc.
In motion detection applications using PIR sensors, microcontrollers like the ATtiny1627 shift the complexity from the hardware to the firmware and software, since much of the necessary functionality is integrated into the microcontroller itself. This reduces complexity and increases flexibility.
Energy Efficiency:
The power consumption of wireless sensor nodes is crucial. The longer the battery life, the longer the lifespan of the sensor node, and therefore the entire sensor network of the system. This applies to all wireless sensor systems. If tens, hundreds, or thousands of sensors have been installed for different types of monitoring, a node will be considered out of service or dysfunctional if it is powered down. For larger sensor systems, replacing a battery or the node itself adds a cost to the end user and means the system will be out of service or not fully functional while the node is powered off, which can lead to unexpected incidents without warning. Therefore, the longer the battery life, the better.
Thanks to the microcontroller's sleep modes and fast wake-up time, each sensor node can consume minimal power. The node can remain in standby mode and quickly activate when motion is detected due to a temperature change within the sensor's range. It then processes the signal and returns to standby mode, thus increasing the runtime of each battery-powered node without requiring battery changes. See Figure 4 to see how the CPU operates when utilizing the standby modes and the fast activation time. Power consumption depends on the application and will vary with the PIR sensor configuration, sample acquisition time, and filtering parameters, which in turn affect the detection distance and/or sensitivity. These parameters can be adjusted to further reduce power consumption when application demands are lower.
Figure 4. Firmware timeline.
Powerful microcontrollers like the ATtiny1627 are able to integrate smart and sophisticated functions that improve current consumption and energy efficiency, take up less space and extend the lifespan of battery-powered and connected applications, as well as reduce design complexity, total system costs and time to market.
Author: Stian Sogstad, MCU8, Microchip Technology
