It goes with out saying that battery-powered units are delicate to energy draw, particularly in periods of inactivity. One such use case is in sensor nodes or transportable sensors—these units passively monitor a selected situation. When the edge is exceeded, they set off an alarm or log the occasion for additional evaluation. Since most units incorporate some type of microcontroller (MCU), choosing an MCU with clever analog peripherals can cut back the Invoice of Supplies (BOM) by performing the identical features of a discrete gadget whereas doubtlessly saving energy by disabling the analog performance when not wanted.
To exhibit these options, we constructed two demos on the PIC16F17576 microcontroller household. One demo goals to make use of as little energy as doable whereas detecting temperature adjustments, whereas the opposite makes use of the embedded op-amps to dynamically alter the achieve primarily based on the enter sign.
Energy consumption
Let’s begin on the high—energy consumption. Regardless of the way you slice it, all roads will result in the identical primary tenets:
- Maintain VDD as little as doable
- Decrease oscillator frequency
- Flip off all unused peripherals and exterior circuits, when doable, and as a lot as doable
- Keep away from floating nodes on digital I/O
Past this recommendation, it turns into much more application-specific. As an example, most op-amps and ADCs don’t have an OFF change. That is the place clever analog peripherals match into designs.
The “clever” a part of their identify is derived from the truth that they are often managed in software program. Whereas most analog peripherals wouldn’t be thought of energy hungry, when optimizing battery life, each little little bit of present issues, and usually, there’s a greater quiescent present draw that the discrete gadget would have because of course of limitations.
Nevertheless, there are particular low-power peripherals that permit for ultra-low energy operation, even when enabled on a regular basis. As an example, the Low Energy Voltage Reference (VREFLP) and Low Energy Analog Comparator (CMPLP) within the PIC16F17576 household of MCUs draw minimal energy however can set off interrupts to wake the CPU if motion is required.
For units with out these decrease energy peripherals, one other peripheral accessible in PIC MCUs is the Analog Peripheral Supervisor (APM). The APM is a specialised counter that may toggle energy ON/OFF to the analog peripherals whereas permitting the CPU to stay repeatedly in sleep.
If an occasion happens, requiring intervention from the CPU, the peripherals can generate an interrupt to wake the gadget. This avoids having to carry out the next sequence: wake the CPU, energy on the peripherals, test the outcomes, carry out an motion, shut down the peripherals, and return to deep sleep.
Low-power demo
The target of the low-power demo is to exhibit the brand new CMPLP and VREFLP as a temperature alarm. This software might be used for chilly asset monitoring to log when an occasion over the anticipated temperature happens. For the demo implementation, we designed a circuit to detect when an individual touches the thermistor(s), inflicting an increase in temperature.
Determine 1 A completed low energy demo prototype that may detects the temperature rise that happens when an individual touches the thermistor(s).
Principle of operation
This circuit consists of two PIC16F17576 MCUs; one gadget acts just like the gadget underneath take a look at (DUT) whereas the opposite handles energy measurement and show.
Energy measurement and show
To measure the minuscule quantity of present pulled by the MCU DUT, it was vital to design a circuit that would carry out high-side present sensing whereas additionally being able to sustaining the facility provide at 1.8 V, which is the bottom really useful working voltage for this gadget household. For reference, the minimal working voltage is 1.62 V, which offers a ten% margin on the facility provide earlier than the gadget is out of specified working situations.
To measure the quiescent present of the MCU and low-power analog peripherals, a precision 1:1 present mirror IC was used to produce present to the DUT (Determine 2). This IC has a settable compliance output restrict, however the tolerancing and ranging on the inner reference was not acceptable for our functions, so we overdrive the built-in circuit with an exterior 1.8-V reference (MCP1501-18E) to keep away from having to calibrate every unit individually.
Determine 2Â The high-side present circuit to measure the minuscule quantity of present pulled by the MCU DUT, and 1.8-V DUT energy provide.
This ensures the facility rail for the DUT is as shut as doable to 1.8 V. Guard rings and planes are positioned on the PCB to attenuate the leakage present of this rail as a lot as doable. The 1:1 present output goes via a way resistor, after which a differential measurement of the voltage on the resistor is carried out with a 24-bit delta-sigma ADC (MCP3564R) with an exterior 2.048-V voltage reference (MCP1501-20E). That is proven in Determine 3. The ensuing measurement is then displayed on the OLED display connected to the board.
Determine 3 The ADC implementation the place the differential measurement of the voltage on the resistor is carried out with a 24-bit delta-sigma ADC with an exterior 2.048-V voltage reference.
A (good) drawback we found late within the course of was that the present measurement on this configuration is so steady, it seems to be hard-coded on the show. Fortunately, this may be simply disproved by gently touching the DUT’s decoupling capacitors with a finger or different barely conductive object and observing the change in measured present.
DUT
The DUT gadget performs a easy however essential position in detecting temperature adjustments with as little energy consumption as doable. For this, CMPLP and VREFLP are used along with the Peripheral Pin Choose (PPS) system to output the state of the CMPLP with out waking the CPU.
In an precise software, CMPLP’s output edge (LOW HIGH) can be used to wake the CPU to carry out some motion like logging a temperature occasion or sounding an alarm.
Utilizing the high-side present measurement circuit designed, we discovered the present of the microcontroller on this state is ~2.2 to 2.4 ÎĽA, however there’s room for a tiny bit of additional energy financial savings.
VREFLP is comprised of two separate subsystems: a low-power 1-V reference and a low-power DAC. This software makes use of the marginally extra power-hungry low-power DAC as an alternative of the mounted 1-V reference as a result of the temperature change from bodily contact could be very small, and the system should recalibrate the edge on startup to account for environmental variance. In an software the place just a few levels of tolerance are acceptable, utilizing the 1-V reference would save just a few fractions of a microamp.
Notably, this demo doesn’t use the APM as a result of the APM requires an oscillator to stay energetic, consuming a bit bit extra energy (~2.8 ÎĽA) than merely leaving these ultra-low energy modules on. In a state of affairs the place a number of analog peripherals are getting used, such because the built-in op-amps, ADC, and so forth., the APM would offer important financial savings in energy.
Dynamic achieve
One other characteristic of clever analog peripherals is the flexibility to regulate on the fly. In some circumstances, a sign could have a big dynamic vary that’s tough to measure with out clipping.
Clipping a sign is normally thought of undesirable, as waveform details about the sign is misplaced. A easy instance of it is a microphone: whispering requires a excessive achieve whereas shouting requires a low achieve. With a hard and fast achieve, designers choose the worst (affordable) situations to keep away from sign clipping, however this, in flip, reduces the sign decision.
A approach round this drawback is to make use of embedded op-amps. These op-amps aren’t going to outmatch the high-end op-amps, however they’re usually similar to general-purpose ones.
And, in lots of circumstances, the built-in op-amps include built-in resistor networks that permit the op-amp(s) to regulate the circuit achieve as wanted. This requires no further elements or specialised circuitry because it’s already built-in into the die.
Dynamic achieve demo
One of many primary use circumstances for the built-in op-amps inside MCUs is to dynamically change features relying on how robust the sign is. That is usually carried out to keep away from clipping the sign when the sign power is excessive.
This software creates a easy demonstration of this use case by amplifying the output of a stress sensor and displaying it visually on an LED bar graph.
Determine 4 A dynamic achieve demo that amplifies the output of a stress sensor and shows it visually on an LED bar graph.
Principle of operation
Strain sensor
The stress sensor on this software adjustments resistance relying on the quantity of stress utilized. This resistor is used as a part of a resistor divider community to generate an output sign from 0 to 2 V. Since each the discrete op-amp and the built-in op-amp have high-input impedances, the 2 circuits can share the identical sign with out loading down the community.
Dynamic achieve circuit
The PIC16F17576 MCU has 4 op-amps, with two of them containing built-in resistor ladders. These ladders have eight steps, plus an extra choice for unity achieve (1x), for a complete of 9 choices. Alternatively, resistors or different elements could be linked to the I/O pins to assign an arbitrary achieve or operate, if desired.
On this demo, the MCU’s op-amp is switched between a achieve of 2x (LOW) and 4x (HIGH) at runtime relying on the measured sign.
In most purposes, when the sign power is low, the achieve can be HIGH. Nevertheless, it’s price noting that on this demo, the inverse is true. That is purely for visible causes; in any other case, the clipping situation would have extra lights ON and thus seem “higher” than the dynamic achieve model at a look. Because the achieve of the embedded op-amps is ready up in software program, it was simply reconfigured to match the specified conduct.
Measurement and show
The PIC16F17576 MCU additionally performs the measurement of each op-amp outputs to show on the LED bar graph. The interior Mounted Voltage Reference (FVR) is used to generate a steady 4.096 V from the +5-V (USB) provide for conversions. MCP23017 I2C I/O expanders are used to drive the LEDs of the show.Â
Placing all of it collectively
Adjusting the circuit achieve with none exterior circuitry enormously simplifies designs the place there are giant sign ranges. These peripherals, in fact, is not going to substitute high-performance op-amps, ADCs, DACs, or voltage references, however embedded analog peripherals are a great way to deal with indicators that require some conditioning however aren’t significantly delicate. This, coupled with low energy performance, makes them a great tool to cut back circuit complexity, time to market, and in the end the BOM in your design.
Robert Perkel is an software engineer for Microchip Expertise. On this position, he develops technical content material resembling App Notes, contributed articles, and movies. He’s additionally answerable for analyzing use circumstances of peripherals and the event of code examples and demonstrations. Perkel is a graduate of Virginia Tech, the place he earned a Bachelor of Science diploma in Laptop Engineering.
Associated Content material
- Growing a spectrophotometer with built-in analog peripherals
- Deploying task-specific microcontrollers simplifies complicated designs
- Growing window safety nodes with stage shifting I/O – Half 2
- Fundamentals of I3C interface communication
- Slideshow: Probably the most-popular MCUs ever
The publish Combined indicators, on an influence funds: Clever low-power analog in MCUs appeared first on EDN.