Silicon Labs
|
Silicon Labs Community Silicon Labs Community
  • Products
    1. 8-bit MCU
    2. 32-bit MCU
    3. Bluetooth
    4. Proprietary
    5. Wi-Fi
    6. Zigbee & Thread
    7. Z-Wave
    8. Interface
    9. Isolation
    10. Power
    11. Sensors
    12. Timing
  • Development Tools
    1. Simplicity Studio
    2. Third Party Tools
  • Expert's Corner
    1. Announcements
    2. Blog
    3. General Interest
    4. Projects
How to Buy
English
  • English
  • 简体中文
  • 日本語
//
Community // Blog

Reduce Cost and Board Footprint in Your Next 8-bit Embedded Design

10/284/2016 | 04:34 PM
Lance Looper
Employee

Level 5


This article originally appeared as a How-To article in EDN Magazine. 

 

General 8-bit MCU

Reducing bill of materials (BOM) cost and footprint area are among the top design considerations for microcontroller (MCU)-based embedded designs. One way to achieve these design goals in 8-bit MCU designs with switching converters is to drive these switching converters with a high-frequency clock output rather than with a traditional pulse-width modulation (PWM) output at lower frequencies. This technique enables a reduction in the switching converter inductor size, resulting in reduced BOM cost and board space requirements.

 

Background

Switching converters are commonly used to efficiently step-up or step-down voltages within embedded systems. These converters use an inductor to store and then transfer energy to the load in the system. The inductor is periodically switched on to transfer energy from the supply into the magnetic field of the inductor. When the supply is switched off, the inductor transfers its energy into the load. These converters are generally switched on and off by a PWM signal, and the signal characteristics can influence the output characteristics of the converter.

 

Let’s consider, for example, a boost converter, which is a switching converter that generates an output voltage that is greater than the input voltage.

 

Continuous mode

Generally, boost converters are operated in "continuous" mode. This means that the inductor in the converter is not fully discharged (i.e., current in the inductor does not reach zero) between switching cycles.

The formula for determining the output voltage of a continuous mode boost converter is rather simple:

 

Continuous Mode Formula.png

 

Where Vo equals the output voltage, Vi equals the input voltage, and D equals the duty cycle percentage. In this case, the output voltage can be varied by simply changing the duty cycle of the PWM of the switching element. However, this mode comes with one caveat: the inductor must be large enough to store the energy required by the system during its charge and discharge cycles. This means the slower the switching frequency, the longer the inductor has to charge and discharge, and thus the larger the inductor must be. Larger inductors are, of course, more expensive, so generally switching converter designs favor higher switching frequencies over lower switching frequencies.

 

There is an upper limit to the benefits of a higher switching frequency, however. As switching frequencies increase, losses also increase within the switching element of the circuit (usually a MOSFET), and inside the inductor, so there is an upper limit on switching frequency once these losses become prohibitively large.

 

Some 8-bit MCUs, such as Silicon Labs’ C8051 and EFM8 devices, have the ability to generate PWM outputs with varying duty cycles using the programmable counter array (PCA) module, which means they are well-equipped to drive boost converters in continuous mode. However, the maximum PWM frequency is often as low as 95.7 kHz (the fastest internal oscillator is usually 24.5 MHz, which is then divided by 256 for 8-bit PWM), which is rather slow by switching converter standards. This means that, generally, 8-bit MCUs operating switching converters in continuous mode will require relatively large, and thus expensive, inductors.

 

Online calculators are available to help developers determine the required components in a continuous mode boost converter, such as DIY DC/DC boost calculator. For example, let’s use the following design requirements:  

Vin = 3 V

Vout = 12 V

Iout = 20 mA

Switching Frequency = 95.7 kHz

 

We will need to run our switching converter at 75 percent duty cycle with a 147 µH inductor.

 

Discontinuous mode

An alternative to continuous mode is "discontinuous" mode in which the inductor current is allowed to reach zero during the discharge period of the switching cycle. This approach has the side effect of complicating the formula for the output voltage:

Output voltage.png

 

Where L is the inductor value, Io is the output current, and T is the switching period (the inverse of the switching frequency). As you can see, the formula is more complicated, and it still contains the duty cycle percentage as a dependency, but it has introduced additional dependencies that we can use to generate the desired output, even with a fixed duty cycle. For example, with everything else fixed, if we decrease both T and the inductor size L proportionally, the output characteristics will remain the same. This means that we can use an arbitrary duty cycle, and then increase the switching frequency as needed to reduce the inductor size and cost.

 

The PCA, once again, has a feature that can be useful in this mode: frequency output generation. In this mode, a 50 percent duty cycle frequency output can be generated, up to SYSCLK divided by 2, or 12.25 MHz in the normal case. Due to the previously mentioned switching losses, switching converters are not usually operated at frequencies as high as this, typically operating in the range of 100 kHz to 4 MHz. At a more reasonable switching frequency of 3.062 MHz (a 24.5 MHz SYSCLK divided by eight), we can repeat our previous example, this time using discontinuous mode with a fixed 50 percent duty cycle:

 

Vin = 3 V

Vout = 12 V

Iout = 20 mA

Switching Frequency = 3.062 MHz

Duty Cycle = 50%

 

With this, the required inductor size is reduced to 2.04µH! That's approximately 1/72nd the size of the continuous mode with PWM example, for the same output characteristics.

 

Comparing inductors at ~2.2 µH vs ~150 µH, that are otherwise comparable:

 

SRN4026-151M : 150 µH, 220 mA: $0.18 @1000 : 4×4mm

MLZ2012A2R2M : 2.2 µH, 210 mA: $0.058 @1000 : 2×1.25mm

 

As you can see, this smaller inductor results in a BOM cost reduction of 12.2 cents, or a 68 percent reduction. The footprint is also reduced by 11.5mm2, or 72 percent.

 

 

Example circuit and firmware

As a proof of concept, we have developed a circuit and associated firmware. In the previous example, the characteristics of the circuit are static. As long as Vin is 3V, and the load continues to draw 20 mA at 12V, the MCU merely needs to output a 3.062 MHz square wave to the switching circuit to maintain a stable output. If the load draws less than 20 mA at 12V, the output voltage will continue to increase until equilibrium is reached. Without any sort of feedback mechanism, we cannot be sure of the output voltage if the load varies.

 

In the following circuit, a voltage divider has been provided to allow the MCU to measure the output voltage, and thus create a feedback loop, enabling us to change the behavior of the output at runtime. Regulating the output voltage can be accomplished by disabling the frequency output when the output voltage is too high, and re-enabling it when the output voltage is too low. Additionally, a dummy load, represented by R4 and the LED, has been attached to the output.

 

Output.jpg

Example Circuit Design

 

The firmware was written for an EFM8BB1 MCU, though this could be ported to any 8-bit MCU with a PCA module and an analog to digital controller (ADC) with the Window Compare feature. The PCA is configured to output Channel 0 to pin P0.1, with a frequency output of 3.062 MHz. The ADC is configured to sample on pin P0.3 at 300 kHz, using Timer 3 overflows to trigger conversions. The ADC is configured to only trigger an interrupt if an ADC sample falls outside of the expected voltage range, using the Window Compare feature. With everything configured, the entire feedback loop is contained within the ADC ISR:

 

SI_INTERRUPT (ADC0WC_ISR, ADC0WC_IRQn)

{

                uint16_t sample;

 

                // Clear Window Compare interrupt flag

                ADC0CN0_ADWINT = 0;

 

                // Store the ADC sample

                sample = ADC0;

 

                if (sample > MAX_COUNTS)

                {

                                // Disable PWM

                                P0MDOUT &= ~P0MDOUT_B1__BMASK;

 

                                // Set LT Value, Clear GT Value

                                ADC0LT = MIN_COUNTS;

                                ADC0GT = 0xFFFF;

                }

                else if (sample < MIN_COUNTS)

                {

                                // Enable PWM

                                P0MDOUT |= P0MDOUT_B1__PUSH_PULL;

 

                                // Set GT Value, Clear LT Value

                                ADC0LT = 0;

                                ADC0GT = MAX_COUNTS;

                }

}

 

If the ADC takes a measurement that is greater than the ADC0GT value or less than the ADC0LT value, this interrupt will fire. If the measurement is within this range, nothing will happen. Once in the ISR, if the measurement was greater than the expected maximum value, the frequency output is disabled. If it is less than the expected value, the frequency output is re-enabled. The output is effectively disabled by turning the port to open-drain mode, so that the pin is pulled low by the resistor R1, turning off the MOSFET Q1.

 

The MAX_COUNTS is defined to be the ADC code that represents 9.5V. MIN_COUNTS represents 8.5V. This should effectively limit the output voltage to 8.5-9.5V.

 

The following oscilloscope image shows the output of the circuit with this code.

 

oscilloscope.jpg

 

Channel 1 is the output voltage. Channel 2 is the frequency output that is applied to the circuit's BOOST pin. As you can see, this firmware activates the frequency output when the voltage is below 8.5V and disables the frequency output when the voltage is above 9.5V.

 

In practice, the usage of the ADC in Window Compare mode requires very little CPU overhead. In our measurements with this circuit, the CPU is active for approximately 12 µs inside the ISR, twice every 8.9 ms. The total CPU overhead is then approximately 0.14 percent. Decreasing the output capacitance will have the effect of requiring more frequent updates, as the output voltage will take less time to charge to the maximum limit, and less time to discharge to the minimum limit.

 

Below is the circuit with the BOOST pin connected to the MCU:

 

Circuit with Boost Pin.jpg

 

And here is with the BOOST pin disconnected:

 

Pin Disconnected.jpg

 

The output voltage in this case drops back down to Vin, which is less than required to light the LED.

 

Switching converters are commonly used in embedded applications to efficiently convert one voltage to another. These switching converters are often controlled by a PWM signal with a varying duty cycle to control the converter’s output characteristics. However, for most MCUs, the ability to generate a PWM signal with a varying duty cycle is limited to relatively low frequencies, which necessitates the use of larger inductors. As an alternative, a high-frequency, fixed-duty-cycle clock output can be used to decrease inductor size, reducing BOM costs and board space requirements.

 

About the author  

Brian Lampkin is a microcontroller (MCU) applications engineer at Silicon Labs. He joined the company in 2013 and supports Silicon Labs’ 8-bit and 32-bit MCU products. Brian received a BSEE from Mississippi State University in 2013.

  • Blog Posts

Tags

  • Wireless
  • High Performance Jitter Attenuators
  • EFR32FG22 Series 2 SoCs
  • EFR32MG21 Series 2 SoCs
  • Security
  • Bluegiga Legacy Modules
  • Zigbee SDK
  • ZigBee and Thread
  • EFR32BG13 Series 1 Modules
  • Internet Infrastructure
  • Sensors
  • Wireless Xpress BGX13
  • Blue Gecko Bluetooth Low Energy SoCs
  • Z-Wave
  • Micrium OS
  • Blog Posts
  • Low Jitter Clock Generators
  • Bluetooth Classic
  • Makers
  • Flex SDK
  • Tips and Tricks
  • timing
  • Smart Cities
  • Smart Homes
  • IoT Heroes
  • Reviews
  • RAIL
  • Simplicity Studio
  • Tiny Gecko
  • EFR32MG22 Series 2 SoCs
  • Mighty Gecko SoCs
  • Timing
  • Temperature Sensors
  • Blue Gecko Bluetooth Low Energy Modules
  • Ultra Low Jitter Clock Generators
  • General Purpose Clock Generators
  • EFR32BG22 Series 2 SoCs
  • Industry 4.0
  • Giant Gecko
  • 32-bit MCUs
  • Bluetooth Low Energy
  • 32-bit MCU SDK
  • Gecko
  • Microcontrollers
  • Jitter Attenuators
  • EFR32BG21 Series 2 SoCs
  • News and Events
  • Wi-Fi
  • Bluetooth SDK
  • Community Spotlight
  • Clock Generators
  • Biometric Sensors
  • General Purpose Jitter Attenuators
  • Giant Gecko S1
  • WF200
  • Flex Gecko
  • Internet of Things
  • 8-bit MCUs
  • Oscillators
  • Wireless Jitter Attenuators
  • Isolation
  • Powered Devices
  • Power

Top Authors

  • Avatar image Siliconlabs
  • Avatar image Jackie Padgett
  • Avatar image Nari Shin
  • Avatar image lynchtron
  • Avatar image deirdrewalsh
  • Avatar image Lance Looper
  • Avatar image lethawicker

Archives

  • 2016 April
  • 2016 May
  • 2016 June
  • 2016 July
  • 2016 August
  • 2016 September
  • 2016 October
  • 2016 November
  • 2016 December
  • 2017 January
  • 2017 February
  • 2017 March
  • 2017 April
  • 2017 May
  • 2017 June
  • 2017 July
  • 2017 August
  • 2017 September
  • 2017 October
  • 2017 November
  • 2017 December
  • 2018 January
  • 2018 February
  • 2018 March
  • 2018 April
  • 2018 May
  • 2018 June
  • 2018 July
  • 2018 August
  • 2018 September
  • 2018 October
  • 2018 November
  • 2018 December
  • 2019 January
  • 2019 February
  • 2019 March
  • 2019 April
  • 2019 May
  • 2019 June
  • 2019 July
  • 2019 August
  • 2019 September
  • 2019 October
  • 2019 November
  • 2019 December
  • 2020 January
  • 2020 February
  • 2020 March
  • 2020 April
  • 2020 May
  • 2020 June
  • 2020 July
  • 2020 August
  • 2020 September
  • 2020 October
  • 2020 November
  • 2020 December
  • 2021 January
  • 2021 February
  • 2021 March
  • 2021 April
Silicon Labs
Stay Connected With Us
Plug into the latest on Silicon Labs products, including product releases and resources, documentation updates, PCN notifications, upcoming events, and more.
  • About Us
  • Careers
  • Community
  • Contact Us
  • Corporate Responsibility
  • Privacy and Terms
  • Press Room
  • Investor Relations
  • Site Feedback
  • Cookies
Copyright © Silicon Laboratories. All rights reserved.
粤ICP备15107361号
Also of Interest:
  • Bring Your IoT Designs to Life with Smart,...
  • Using Wi-Fi for Low Power IoT Applications
  • A Guide to IoT Protocols at Works With...