MCUs with Analog Features Save Board Space, BOM Costs

Article By : Stian Sogstad

The built-in analog features allow small-footprint MCUs to reduce BOM costs and boost energy efficiency in battery-operated portable devices.

The development of applications like security systems and wireless medical monitoring devices depends on several factors to ensure a successful design. However, design complexity and power efficiency may be among the most important issues when it comes to these battery-powered connected applications. That’s because the longer that battery life is required for an end application, the lower the average power consumption must be. To better meet power requirements for these applications while enabling reliable and long-life designs, designers should first consider small and power efficient microcontrollers (MCUs) with sophisticated built-in features and functionalities. Such MCUs can handle the majority of tasks required by the application, reducing the need for external passive components in a sensor node design while lowering power consumption significantly. For example, when designing battery-powered sensor nodes for an application like a home security system, a passive infrared (PIR) motion detector is often placed inside and outside the residence. A PIR sensor detects changes in the amount of infrared radiation “seen” by the sensor 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 change from ambient temperature to body temperature and back again. It converts the resulting change in the incoming infrared radiation into a change 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 (Figure 1). Figure 1 PIR sensor operates according to the above motion detection principle. Source: Microchip The output signal levels from a PIR sensor are typically very low and less than 1 mV. To detect the movement and avoid false detections, the analog signal needs to be amplified before being sampled by the analog-to-digital converter (ADC). In typical PIR solutions, this is achieved by using several operational amplifier (op amp) stages with high gain, which in turn, increases the design’s complexity, component count, power efficiency, costs and more. This article shows how a small, power-efficient MCU can help address these issues. PIR sensor node design Basing a PIR sensor node design on a small footprint MCU with the suited feature set—like a 12-bit differential ADC with programmable gain amplifier (PGA) —reduces the need for external components, board space and bill-of-material (BOM) cost. Consider the PIR Click sensor from MickroE. It’s a PCB with all the passive components needed to make a working PIR sensor node. The Click board is based on an op amp solution—including ADCs, resistors and capacitors—and has been developed as an out-of-the-box solution for easy prototyping and evaluation. A typical setup for easy prototyping can be to use the PIR Click board in combination with the Microchip Curiosity Nano Base for Click boards™ and a Curiosity Nano Evaluation Kit. Here, a PIR sensor node solution can benefit from using an MCU like Microchip Technology’s ATtiny1627 that features a 12-bit differential ADC and PGA. The number of external components can be significantly reduced by eliminating the need for an external op amp to amplify the signal. It also eliminates the need for an external ADC as well as several other passive components such as resistors and capacitors. So, by using such an MCU, the PCB layout of the PIR Click can be trimmed significantly. Figure 2 illustrates how components can be removed (X) and how new connections can be made (blue lines). It’s important to note that, in this example, the PIR Click is used as the base for modifications because it was more convenient than designing a new PCB and acquiring the required components. This modified solution is not competing with the purpose of the Click boards. Figure 2. Example modifications to the PIR Click and schematics that show components removed from the BOM. Source: Microchip With these modifications, taking advantage of the built-in 12-bit differential ADC and the PGA, Figure 3 also illustrates how few external components are required when the right MCU is selected. Figure 3. Modified PIR Click and schematics that highlight the reduced BOM. Source: Microchip With less external components, the hardware and PCB design will be cleaner and more compact. In addition, the software and firmware can be more compact and efficient as more tasks are handled within the MCU. Timing and synchronization will also be smoother to manage. When much of the complexity of the sensor node design is moved from hardware into the MCU and CPU, and is managed in firmware, it becomes more flexible to change and add functionality during the development process without spending time redesigning the board layout. That, in turn, saves designers time and cost. It also becomes more convenient to optimize code for other tasks like power consumption. Simply changing parameter settings will allow designers to make changes to the application code to add functionality, optimize code for reduced power consumption, and optimize sensitivity related to environmental conditions like variations in ambient temperature as sensors can struggle to detect a human being when the ambient temperature exceeds 30°C. Another example: MCUs enable adding machine learning for the purpose of recognizing movement patterns and teaching the system to learn to separate what is just noise or an actual person moving versus an animal. For motion detection applications using PIR sensors, MCUs like the ATtiny1627 move the complexity from hardware to firmware and software, as so much of the required functionality is built into the MCU. With that, the complexity is reduced, while flexibility is gained. The power efficiency factor Power consumption of wireless sensor nodes is key. That’s because the longer the battery life, the longer the life of the sensor node and therefore the lifetime of the entire sensor network system. It’s true for all wireless sensor systems. If tens, hundreds or thousands of sensors are installed for different types of monitoring, the node will be considered dead or dysfunctional if it turns off. For larger sensor systems, changing a battery or the node itself means extra cost for the end user, as well as the system being down or not fully functional while the node is off, and thereby unwanted incidents can occur without providing notification. Therefore, the longer the battery can last, the better. Due to the MCU’s sleep modes and fast wakeup time, sensor node design can use the least amount of power. The node can sleep, wake up quickly when a motion is detected due to a change in temperature within the sensor range, process the signal and then return to sleep, making each battery-powered node live longer without having to change a battery. Refer to Figure 4 to see how the CPU operates when taking advantage of the sleep modes and fast wakeup time. Figure 4 Firmware timing diagram shows MCU operating in multiple power modes. Source: Microchip The power consumption is application dependent and will vary based on the configuration of the PIR sensor, sample acquisition time 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 when the demands of the application are lower. By offering sophisticated built-in features and functionalities that improve current consumption and power efficiency, small footprint MCUs can increase the lifetime of battery-powered and connected applications, while reducing design complexity, total system costs, and time to market. This article was originally published on EEWeb. Stian Sogstad is senior engineer for AVR product marketing at Microchip’s MCU8 division.

Leave a comment