Building analog interfaces for low power design - Embedded.com

Building analog interfaces for low power design

Editor's note: Because modern high speed, low power MCUs are now so power efficient, analog circuits have become the major consumer of power in the system power budget. Here are some techniques for bringing the analog power budget into sync with the rest of the design.

Tremendous progress has been made in designing low power microcontrollers which consume only nanowatts. However, there is still a significant challenge in designing low power systems which interface with analog circuits and sensors. The challenge is made tougher by the increased accuracy and speed of the analog interfaces.

The low power landscape has changed dramatically in a very short period of time. The push for wireless and networked products has resulted in semiconductor manufacturers putting a lot of development resource into low power devices. In the microcontroller industry this has resulted in MCUs that achieve impressive low power numbers but also provide very high performance. Illustrative of that are a few of the key specifications for the Renesas RX111 microcontroller:

  • 32 bit, 32 MHz with zero wait state flash
  • 1.8V to 3.6V operation
  • Operating currents (typical)
    • 32 MHz, 3.3V – 10 mA with SPI and timers running
    • Standby with Real Time Clock (RTC) – 690 nA
    • Standby without RTC – 350 nA
    • Wake-up time <5 uS
    • Low voltage detect (LVD) only an additional 100 nA

These high speed, low power devices are so power efficient that analog circuit power
consumption that was once acceptable is now a major source of the system power budget. Figure 1 shows a typical MCU and sensor interface. In the simple circuit there are four distinct areas to consider which can affect the overall power budget.

  • MCU – The MCU is always a primary factor in overall power consumption. Historically, this also was probably the largest portion of the power budget. The MCU may still be the largest power consumption circuit but with modern low-power MCUs the analog circuits can easily have a larger impact on the design.
  • Analog reference circuit – The reference voltage circuit for the ADC can be a significant power drain. As seen in the figure the circuit is always energized and since it is a form of shunt regulator it must have a minimum current flowing through the reference device to maintain the regulated voltage.
  • Sensor bias – The thermistor circuit is part of a voltage divider scheme. This circuit will also be a continuous current drain if implemented as shown.
  • Low Pass or Filtering circuits – In many cases sensors will need noise filtering, especially for 60 Hz pickup, and may need gain. The active low pass filter circuit shown provides very good filtering and can provide some gain but the amplifier will require supply current. There are many very low power OpAmps available but they do add cost to the design.

Figure 1: Typical MCU and sensor interface

Sensor bias considerations
The diagram in Figure 1 showed the need for a reference diode circuit for the ADC. The reference circuit is not always required if the analog sensing is all ratiometric. Figure 2 shows a few different ADC connections and identifies whether they are ratiometric or not. A and B are ratiometric since the AD input voltage is a fractional portion of Vref.

The sensing input does not need to be a resistive element, it is just important that the voltage across it is a fraction of Vref and changes based on the sensed value. It also does not matter if Vref is connected to Vcc of the MCU or a separate Vref. Figures C and D are non-ratiometric since the AD input voltage does not necessarily change based upon a change in Vref.

Figure 2: Some ADC connections in which A and B are ratiometric and C and D are non-ratiometric

Ratiometric sensing typically reduces cost since the reference is not required, eliminating the reference circuit also will usually reduce the power required. In many MCUs there are two power inputs to the ADC block, AVcc and Vrefh. When ratiometric sensing is used both can be supplied from the MCU power rail.

Typically, AVcc supplies the ADC control and conversion circuits and Vref supplies the R2R conversion ladder circuit. The power these circuits require is the same whether the conversion is ratiometric or not, however, when the sensing is ratiometric there is no additional current required for the reference diode or IC which can range from tens to hundreds of microamps.

In a ratiometric sensing circuit the sensing divider will draw a bias current. This current can be significant for a low power application. If R1 and the thermistor in Figure 3 were both 15K and the system voltage was 3V there would be a continuous 100 uA drain just due to the sensor bias current.

Figure 3: In a ratiometric sensing circuit the sensing divider will draw a bias current.

A thermistor with a higher value could be selected and R1 could be increased but this can cause some issues with accurate sampling. This is due to the sample-and-hold (SH) circuit which is implemented in almost all current successive approximation converters in MCUs. The SH capacitor is connected to the input to be sampled for a very short period of time, especially in high speed ADC converters.

During the time the hold capacitor is connected it must charge to the voltage on the analog input, this charging will occur through R1. As R1 is increased to reduce sensor bias current the available current to charge the SH circuit decreases. So there is a constant trade-off between increasing the value of R1 and ADC accuracy. A small capacitor can be added on the analog input which will provide a low impedance source of charge for the SH circuit. This capacitor will help with the SH charge time issue but is a filter so it can introduce error if the ADC input is changing rapidly.

One good way to minimize the power consumed in the sensor circuit is to switch off the bias voltage to the divider when it is not in use. In the picture shown above the voltage to the sensing
divider is controlled by a General Purpose Input/Output (GPIO) pin. This is a very cost effective
solution if the MCU has enough GPIO but it can introduce some error since the voltage output of the GPIO is probably not exactly equal to Vrefh. Remember that ratiometric sensing relies on a
divider connected between Vrefh and Vrefl. Since the current is very low in the sensing circuit
and the MCU port outputs are MOSFETs the difference may be acceptable, especially if the
required precision is not too high.

Another concern with switching the bias to the sensor circuit on and off is there will be a delay to charge any capacitance in the circuit (Figure 4). In this case, C3 is providing the low impedance path to offset the SH circuit sampling window requirement but it must be charged before the conversion can begin. If C3 is 1 nanofarad and R1 is 15k Ohm the delay could be more than 80 microseconds.


Figure 4

Figure 5 shows using a P-channel MOSFET (PMOS) controlled by a GPIO to provide a better bias circuit switch. Using a discrete MOSFET allows the designer to select the device so the switch resistance (RDSon) does not impact the accuracy of the circuit. Another advantage of the MOSFET circuit is the voltage divider is now powered from the Vrefh power rail instead of the internal power rail of the MCU which can be noisy if other pins on the device are switching.

Figure 5: P-channel MOSFET (PMOS) controlled by a GPIO

When the GPIO is configured as an input port Q1 is biased off by R2. When the GPIO is set as an output and driven low Q1 will turn on, supplying bias voltage to the divider.

The MOSFET could be changed to an N-Channel device and connected on the low side of the divider. There is no significant advantage to one configuration over the other unless the sensed voltage is always closer to Vcc or Ground; if that is the case then having C3 biased to that charge state will reduce stabilization time since this configuration still relies on waiting for C3 to charge.Reference voltage considerations
If the sensed parameter isnot ratiometric then a reference circuit is required. In this discussionwe will not consider internal reference sources since thecharacteristics of those devices vary quite a bit depending on thespecific MCU device and ADC block. In many circuits a simple shuntregulator diode is used as the reference voltage.

A commonmistake when configuring the reference diode is not considering thecurrent that is drawn by the Vref input. This current can be relativelyhigh, especially during the conversion process. If the series impedanceof the reference source is too large the voltage drop across theimpedance will force the reference diode to drop out of regulation andthe ADC accuracy will be affected.

A typical current requirementfor a Vref input is 0.2 uA when the block is enabled but no conversionis taking place. During the conversion the reference input currentincreases to 0.1 mA or more. If multiple input channels are beingconverted it is likely that a simple 0.1 uF bypass capacitor will not beable to supply that current without the voltage on the input drooping.

Toensure the accuracy is not dependent on the bypass capacitor the valueof the series impedance should be selected to allow the diode tomaintain regulation even with conversion current flowing.

Forexample, if selected reference diode voltage is 2.5V with a 20 uAminimum regulation current, Iref is 0.1 mA and Avcc is 3.3V; then theseries impedance should be no larger than (3.3V-2.5V)/120 uA or 6.7kOhms. This also results in a 120 uA current draw even when the MCU isin a standby condition. Considering MCU standby currents are often lessthan 1 microamp this current is often not acceptable.

A MOSFETcircuit can be used to switch the reference circuit when not in use thesame way it was used for the sensor bias circuit. This connection isshown in Figure 6 .

Figure 6: Using a MOSFET circuit to switch the reference circuit

Switching the reference circuit does require verifying the allowable Vref connnections for the MCU. Often the low side of the circuit is switched so Vref  “idles” at Avcc,in this case it is important to ensure the MOSFET has a very low onresistance so it does not affect the reference accuracy. Also some Vrefinputs have relatively high switching spikes so checking the dynamicdrop across the MOSFET is important.

Since most reference diodesare lower power the current available to charge the capacitance in the circuit is typically low. This can result in fairly long delays,especially if the ADC block has requirements for a conversion startdelay after applying Vref. Switching the reference circuit, whether onthe high side or low side, allows reducing the value of Rref. Thisresults in a lower average power dissipation on the diode since it isnot continuously conducting. The lower resistance also helps reduce theripple voltage and stabilization time of the Vref input when switched.

Anotheroption when a reference voltage is required is to connect the referencediode to an analog input instead of Vref as shown in Figure 7 .

Figure 7: When a reference voltage is required, connect the reference diode to an analog input

Theactual value of Vrefh can be calculated from the converted value of theAN0 input above since the voltage on the AN0 input is known. Since the analog input is not a power input to the ADC block the value of Rref can be increased.

Inthe previous example, the reference circuit had a continuous current of120 uA to supply both the diode current and Vref input, in this circuitthat value can be reduced to 20 uA or the minimum regulation current ofthe diode. This is extremely useful especially if it is not desirableto switch the reference voltage circuit on and off. This circuit couldalso be switched from a GPIO or a sensor rail and since it is very lowcurrent it makes that design easier.

When using thisconfiguration the actual voltage value of any sensed input can easily becalculated by dividing the ADC counts of that channel by the ADC countsof the reference channel then multiplying by the rated voltage of the reference diode

Many internal voltage references are connected this way, one advantage to this connection over supplyingthe reference diode input into the Vref pin is this allows convertingvoltages that are greater than the reference diode voltage but less thanAvcc. For example, a very common reference diode voltage is 2.5V butthe system voltage is 3.3V. Using this connection allows monitoringvoltages up to 3.3V while still getting the accuracy of a referencediode

On many MCUs, like the RX, the R2R ladder can be internallyconnected to Vcc. Often the Vref input then becomes another analoginput so this connection does not even consume another analog input channel.

Sensor filtering
Sensorsand other analog input parameters are often connected to the MCU bycables or long trace distances due to the requirements of the parameterbeing sensed. If a thermistor is being used to measure ambienttemperature then it is often not practical to have it on the PC boardclose to the MCU.

These long connections make sensor inputsparticularly sensitive to noise pickup, especially 60 Hz “hum”.Filtering is often required to provide an acceptable signal to noiseratio for the sensed input. Though simple RC passive filters can be usedthey can be difficult to design and often do not provide enoughrejection.

Especially for lower frequency noise it may be hardto get more than a factor of 10 rejection using a simple RC. For 12 bitADCs in 3.3V circuits every 1 mV of ripple adds more than 1 LSB oferror. A single pole filter is often not adequate and multiple polepassive filters can be difficult to design and are often very sensitiveto component tolerances

Active filters can easily provide muchhigher rejection. 40 dB of rejection, which a factor of 100:1, isusually easy to achieve. The active filter also acts to buffer thesensor, unlike the passive filter which will tend to load it down.

Ifthe sensor requires an AC bias rather than DC the active filter caneasily be configured to provide bandpass response. The disadvantages toactive filters are the cost of the amplifier component and the powerconsumption. Low cost OpAmps are readily available but typically havefairly high supply current requirements. Low power amplifiers tend tohave a higher cost.

With high performance, low power MCUs like the RX100 series digital filtering becomes a very viable option. Digital filters provide excellent rejection characteristics and the characteristics are easilymodifies since it is software based. For example, a low pass filter foran analog input sample at 120 Hz can achieve 80 dB (10,000 :1)rejection to 60 Hz using only a 10 tap FIR filter. The FIR filter isunconditionally stable and even on power up the filter will converge to asteady state input in 10 samples.

IIR filters can providemore optimized responses and were typically hard to utilize with lowpower MCUs since they usually require a 32 bit calculation to minimizeaccumulated errors. However, with low power 32 bit processors, like theRX111, now available this option becomes more realistic for filteringthe sensor inputs

Figure 8 is an example that shows thepower required to implement the low pass filter previously described.The numbers shown are for an RX111 MCU running at 4 MHz with a 32 kHzReal Time Clock (RTC) circuit. The MCU is typically in SoftwareStandby mode, where only the RTC is running. During this state the MCUcurrent is only 690 nA. The MCU wakes up 128 times a second and samplesan ADC input, the ADC is then shut off.

In this example thefilter is only calculated every 6 ADC samples, since it is a FIR filterthat does not rely on “historical” data the filter can be calculated atany rate. The filter calculation takes only 16 uS without any specialoptimizations.

Optimizing the filter which is done in the DSP library for the RX, could bring that calculation time down to 10 uS or less. The average current required to perform this filter is only 2.3uA. When deciding whether to utilize a software filter or activehardware filter this type analysis allows a quick metric for thedecision. The trade-off is the cost of the OpAmp to achieve similar power and filter performance



Figure 8: Implementation of a low pass filter for an RX111 MCU running at 4 MHz with a 32 kHz Real Time Clock (RTC) circuit

Summary
TheMCUs readily available today are significantly faster, and low powerthan those available just five years ago. As these devices find theirway into more systems currents in analog circuits that were smallcompared to the MCU current are now becoming significant power drains.The implementation of three areas of an analog sensor interface cansignificantly improve the system power profile. This paper has describedcircuit configurations and alternative to three interface areas:

  • Analog reference circuit.
  • Sensor bias
  • Low Pass or Filtering circuits

Utilizingthe circuit configuration and alternatives described can result insystem power profiles that were not achievable just a short time ago

Mitch Ferguson is an Applications Engineering Manager at Renesas Technology America,where he specializes in supporting design teams interfacing to analogcircuits. He has over 15 years of system-level design experienceutilizing MCUs and over 10 years of experience as an applicationsengineer. As a hardware engineer and engineering manager, he has beeninvolved in design in power distribution controls, automotive and firealarm systems with focus on analog interface and EMI/EMS issues. Mitchhas a bachelor of science in electrical engineering from Cleveland StateUniversity.

Editor's note: This paper was presentedoriginally by Mitch Ferguson as part of a class (ESC-233) he taught atthe Embedded Systems Conference, 2012 Design West.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.