Pitfalls of Filtering Pulsed Signals

Waveform Woes

Filtering pulsed signals can be a tricky prospect. Using a recent customer problem as an example, Robert highlights various alternative approaches and describes the key concepts involved. Simulation results are provided to help readers understand what’s going on.

By Robert Lacoste

Welcome back to the Darker Side. A couple of months ago, one of our customers was having trouble with its project and called us for help. As is often the case, the problem was more a misunderstanding of the underlying concepts than any kind of hardware or software issues. We helped him, but because the same issue could jeopardize your own projects I thought it would be a nice topic for this column.

The Project

What is it about? Of course, I won’t be able share the details of our customer’s project, but I will describe a close example. Let’s imagine you need to build an ultrasonic ranging system. Just as bats do, you want to transmit short bursts of ultrasound, then listen for echoes. As you probably know, the time between transmission and reception divided by twice the speed of sound will give you the distance of the obstacle.

Moreover, the shift in frequency between transmitted and received bursts will give you the relative speed of this obstacle, thanks to the so-called Doppler shift. Ok, but how will you design such a ranging device? First, you’ll need to generate and transmit bursts of sine waves—also called tone bursts—with the proper ultrasonic frequency, say 40 kHz. That’s easy to do even with a pair of trusty NE555 chips or NAND gates, or maybe with a microcontroller if you prefer dealing code rather than a soldering iron. These bursts will need to be as short as possible—maybe 1 ms or so—because this will improve the distance resolution.

The transmit side is easy, but the receiver will be a little more complex. In real life, the received signal will have a very low amplitude and probably plenty of added noise. This is especially true if you consider that the Doppler shift could be significant, meaning with fast-moving objects. In that case you will not know the exact frequency of the burst you should detect.

Figure 1
Shown here is a basic ultrasonic meter. A narrow band-pass filter, tuned to the received frequency, allows you to reduce perturbations and noise. But does this work?

One possible architecture to avoid this problem, while minimizing noise, could be the one illustrated on Figure 1. First, do a spectrum analysis of the received signal. Because this signal contains noise plus the received ultrasonic echo, its frequency spectrum will show a peak at the frequency of the received ultrasonic carrier. Therefore, you can measure this actual reception frequency. Assume it is 40.5 kHz due to Doppler shift. You can use this information to tune a very selective band-pass filter, which will isolate the received ultrasonic burst from any other noise. Why not a 40.5 kHz +/-100 Hz filter? You will then recover a clean version of the received pulse and measure the time difference between transmission and reception with a detector and a time counter. Brilliant idea, isn’t it? If you agree, then please read on. This was the concept used by our customer, and unfortunately it doesn’t work! At least not as described. In this article I will explain why, using some easy to understand simulations and as little math as possible. So, don’t’ be afraid. Come with me to the Darker Side of pulsed signals.

Digital Version

Before going into the explanation, I need to present you an alternative version of this intended receiver. Because you are a reader of Circuit Cellar, you know that developing such a design would be far easier using digital signal processing than trying to build analog spectrum analyzers and precisely tuned filters. The digital equivalent of this receiver is illustrated on Figure 2. Just compare it with the former, you will find the same concepts.

Figure 2
Here’s a digital version of the same concept shown in Figure 1. All the yellow functions can be executed on a digital processor (fast microcontroller, digital signal processor, FPGA or anything else).

Here the received signal is preamplified and directly digitized with a properly selected analog-to-digital converter (ADC). Its frequency spectrum can then be calculated with a Fourier Transform, using the well-known Fast Fourier Transform (FFT) algorithm, for example. The frequency peak can then be searched into this spectrum. Then a narrow band-pass filter can be created and tuned to this frequency and the filtered signal can be calculated. …

Read the full article in the August 337 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Tuesday’s Newsletter: Analog & Power

Coming to your inbox tomorrow: Circuit Cellar’s Analog & Power newsletter. Tomorrow’s newsletter content zeros in on the latest developments in analog and power technologies including ADCs, DACs, DC-DC converters, AD-DC converters, power supplies, op amps, batteries and more.

Bonus: We’ve added Drawings for Free Stuff to our weekly newsletters. Make sure you’ve subscribed to the newsletter so you can participate.

Already a Circuit Cellar Newsletter subscriber? Great!
You’ll get your Analog & Power newsletter issue tomorrow.

Not a Circuit Cellar Newsletter subscriber?
Don’t be left out! Sign up now:

Our weekly Circuit Cellar Newsletter will switch its theme each week, so look for these in upcoming weeks:

Microcontroller Watch. (9/11) This newsletter keeps you up-to-date on latest microcontroller news. In this section, we examine the microcontrollers along with their associated tools and support products.

IoT Technology Focus. (9/18) Covers what’s happening with Internet-of-Things (IoT) technology–-from devices to gateway networks to cloud architectures. This newsletter tackles news and trends about the products and technologies needed to build IoT implementations and devices.

Embedded Boards.(9/25) The focus here is on both standard and non-standard embedded computer boards that ease prototyping efforts and let you smoothly scale up to production volumes.

IAR Systems Updates Dev Tools for Renesas RX MCUs

IAR Systems has released version 4.10 of the development toolchain IAR Embedded Workbench for Renesas RX. The new version includes several capabilities which enable developers to further ensure code quality and make debugging more efficient for embedded applications based on Renesas RX microcontrollers.
IAR Embedded Workbench for Renesas RX includes the IAR C/C++ Compiler that offers Renesas RX ABI compliance. With version 4.10, the toolchain includes compliance with the latest C language standard ISO/IEC 9899:2011 as well as the latest C++ standard ISO/IEC 14882:2014. The compiler now also supports stack protection.

To make debugging more efficient in IAR Embedded Workbench for Renesas RX, the new version adds support for the advanced on-chip debugging E2 emulator from Renesas. And for developers using IAR Embedded Workbench for Renesas RX with the static analysis tool C-STAT, they can now benefit from 20 new checks, some of which are enabled by default to further ensure code quality.

IAR Embedded Workbench for Renesas RX is available at several different editions to suit different needs, including a functional safety edition certified by TÜV SÜD according to IEC 61508, EN 50128, ISO 26262 and IEC 62304. More information about the tools and trial versions can be found at www.iar.com/iar-embedded-workbench/tools-for-rx/.

IAR Systems | www.iar.com

MCUs Bring Enhanced Security to IoT Systems

Microchip has announced its SAM L10 and SAM L11 MCU families addressing the growing need for security in IoT applications. The new MCU families are based on the Arm Cortex-M23 core, with the SAM L11 featuring Arm TrustZone for Armv8-M, a programmable environment that provides hardware isolation between certified libraries, IP and application code. Security features on the MCUs include tamper resistance, secure boot and secure key storage. These, combined with TrustZone technology, protect applications from both remote and physical attacks.

In addition to TrustZone technology, the SAM L11 security features include an on-board cryptographic module supporting Advanced Encryption Standard (AES), Galois Counter Mode (GCM) and Secure Hash Algorithm (SHA). The secure boot and secure key storage with tamper detection capabilities establish a hardware root of trust. It also offers secure bootloader for secure firmware upgrades.

Microchip has partnered with Trustonic, a member of Microchip’s Security Design Partner Program, to offer a comprehensive security solution framework that simplifies implementation of security and enables customers to introduce end products faster. Microchip has also partnered with Secure Thingz and Data I/O Corporation to offer secure provisioning services for SAM L11 customers that have a proven security framework.

Both MCU families offer Microchip’s latest-generation Peripheral Touch Controller (PTC) for capacitive touch capabilities. Designers can easily add touch interfaces that provide an impressively smooth and efficient user experience in the presence of moisture and noise while maintaining low power consumption. The touch interface makes the devices ideal for a myriad of automotive, appliance, medical and consumer Human Machine Interface (HMI) applications.

The SAM L10 and SAM L11 Xplained Pro Evaluation Kits are available to kick-start development. All SAM L10/L11 MCUs are supported by the Atmel Studio 7 Integrated Development Environment (IDE), IAR Embedded Workbench, Arm Keil MDK as well as Atmel START, a free online tool to configure peripherals and software that accelerates development. START also supports TrustZone technology to configure and deploy secure applications. A power debugger and data analyzer tool are available to monitor and analyze power consumption in real time and fine tune the consumption numbers on the fly to meet application needs. Microchip’s QTouch Modular Library, 2D Touch Surface Library and QTouch Configurator are also available to simplify touch development.

Devices in the SAM L10 series are available starting at $1.09 (10,000s). Devices in the SAM L11 series are available starting at $1.22 (10,000s).

Microchip Technology | www.microchip.com

Bonus Newsletter Tomorrow: PCB Design

Coming to your inbox tomorrow: July has a 5th Tuesday . That’s means there’s an extra Newsletter this month! The bonus topic is PCB Design. The process of PCB design is always facing new complexities. Rules-based autorouting, chips with higher lead counts and higher speed interconnections are just a few of the challenges forcing PCB design software to keep pace. This newsletter updates you on the latest happenings in this area.

Also, we’ve added Drawings for Free Stuff to our weekly newsletters. Make sure you’ve subscribed to the newsletter so you can participate.

Already a Circuit Cellar Newsletter subscriber? Great!
You’ll get your PCB Design newsletter issue tomorrow.

Not a Circuit Cellar Newsletter subscriber?
Don’t be left out! Sign up now:

Our weekly Circuit Cellar Newsletter switches its theme each week, so look for these in upcoming weeks:

Analog & Power. (8/7) This newsletter content zeros in on the latest developments in analog and power technologies including DC-DC converters, AD-DC converters, power supplies, op amps, batteries and more.

Microcontroller Watch. (8/14) This newsletter keeps you up-to-date on latest microcontroller news. In this section, we examine the microcontrollers along with their associated tools and support products.

IoT Technology Focus. 8/21) Covers what’s happening with Internet-of-Things (IoT) technology–-from devices to gateway networks to cloud architectures. This newsletter tackles news and trends about the products and technologies needed to build IoT implementations and devices.

Embedded Boards. (8/28) This newsletter content focuses on both standard and non-standard embedded computer boards that ease prototyping efforts and let you smoothly scale up to production volumes.

Signature Analyzer Uses NXP MCU

Scope-Free Tester

Doing a signature analysis of a signal used to require an oscilloscope to display your results. In this article, Brian details how to build a free-standing tester using mostly just the internal peripherals of an NXP Arm microcontroller. He describes how the tester operates and how he implemented it.

By Brian Millier

When I was a teenager starting out in electronics, I longed to have as much test equipment as possible. At that stage in life, I couldn’t afford much beyond a multimeter. I remember seeing plans for a component tester in an electronics magazine. There weren’t many hobby electronics magazines back in the ‘60s, so it was probably Popular Electronics. This tester would provide a “signature” of most passive/active components by placing a small AC voltage across the component and measuring the resulting current. My memory of the circuit is hazy after all these years, but it was trivial: a 6.3 V filament transformer, a current sensing resistor and a few other passive components. However, the catch was that it required an oscilloscope to display the resulting voltage vs. current plot—in other words, the component’s signature. By the time I bought an oscilloscope about 10 years later, I had completely forgotten about this testing concept.

Today, test instruments are available that include a dedicated graphics display, instead of relying on an oscilloscope for display purposes. Having worked with Arm microcontrollers over the last few years,
I realized that I could implement such a free-standing tester using, in large part, just the internal MCU peripherals.

In this article I’ll describe how the tester operates, and how I implemented it using a Teensy 3.5 development module (containing an NXP MK64FX512VMD12 MCU) and featuring a FT800-based intelligent 4.3″ TFT touch-screen display.

Basic Theory of Operation

To obtain a signature of a given component, you need to place a variable voltage across it and measure the resulting current through it, at each voltage level. In many cases, the component’s normal operating mode will include both positive and negative voltages across it, so the tester must provide an AC voltage source. For most testing purposes you would use a sine wave voltage source because most AC calculations are done using sine waves. The value of this AC voltage source must be adjustable. I decided on six ranges between 0.5 V peak-peak and 20 V peak-peak. For measuring the voltage across the component, I used an instrumentation amplifier with three hardware gain ranges—plus three additional ranges based upon scaling in software.

To monitor current, it’s easiest to measure the voltage across a small value resistor placed in the ground return path, and then convert that to current using Ohm’s Law. Here too you need a range of current measurements. I chose to provide three hardware ranges—plus four additional ranges based on software scaling—between 1 mA and 100 mA.

You can’t just place an AC voltage of any given value across a component, and hope that the component will be able to handle that current without damage. You must place a resistor in series with the component to limit the current flow. That resistor may need to vary in value over several decades, depending on the component being tested. In my tester, I provide a switchable resistor bank with values covering a 1,000:1 range in decade steps.

Figure 1 is a block diagram of the basic tester circuitry. The user interface, touch-screen display and SD card data storage are not shown here. The MK64FX512VMD12 MCU’s 12-bit DAC A provides a sine wave signal that varies between 0 and 1.2 V over the full AC cycle. The programmable attenuator is an SPI pot device with 12-bit resolution. C1 is a decoupling capacitor, which shifts the (attenuated) unipolar DAC A output signal into a bipolar AC signal. This AC signal is amplified by a factor of 21 by an LM675 power amplifier IC. DAC B, along with some passive components, provide a software-adjustable offset voltage adjustment. The LM675 amplifier is needed to provide enough drive current to handle the higher current ranges—up to 100 mA.

FIGURE 1
This is a block diagram of the AC signal generation and Voltage/Current monitoring circuit.

Both the voltage and current are monitored using Texas Instruments (TI)instrumentation amplifier ICs. These contain input protection circuitry good to ±40 V. The various gains needed for both amplifiers are set by 1% resistors, which are switched by miniature reed relays. The instrumentation amplifier output voltages, representing voltage and current through the component under test, are fed to the two 16-bit ADCs present in the NXP MK64FX512VMD12 Arm MCU. The sine wave signal generated by the MCU can be set for frequencies of 20, 50 ,60, 100, 200 or 400 Hz.

Signature Analysis

The basic premise of signature analysis is that you obtain a signature of a component that is of questionable condition, and then compare it with a known-good component of the same value. Alternately, you can do the same comparison on a specific circuit node on two identical circuit boards/assemblies.. …

Read the full article in the August 337 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

Next Newsletter: Embedded Boards

Coming to your inbox tomorrow: Circuit Cellar’s Embedded Boards newsletter. Tomorrow’s newsletter content focuses on both standard and non-standard embedded computer boards that ease prototyping efforts and let you smoothly scale up to production volumes.

Bonus: We’ve added Drawings for Free Stuff to our weekly newsletters. Make sure you’ve subscribed to the newsletter so you can participate.

Already a Circuit Cellar Newsletter subscriber? Great!
You’ll get your
Embedded Boards newsletter issue tomorrow.

Not a Circuit Cellar Newsletter subscriber?
Don’t be left out! Sign up now:

Our weekly Circuit Cellar Newsletter will switch its theme each week, so look for these in upcoming weeks:

July has a 5th Tuesday, so we’re bringing you a bonus newsletter:
PCB Design (7/31) PCB design tools and methods continue to evolve as they race to keep pace with faster, highly integrated electronics. Automated, rules-based chip placement is getting more sophisticated and tools are addressing the broader picture of the PCB design process. This newsletter looks at the latest technology trends and product developments in PCB design tools.

Analog & Power. (8/7) This newsletter content zeros in on the latest developments in analog and power technologies including DC-DC converters, AD-DC converters, power supplies, op amps, batteries and more.

Microcontroller Watch (8/14) This newsletter keeps you up-to-date on latest microcontroller news. In this section, we examine the microcontrollers along with their associated tools and support products.

IoT Technology Focus. (8/21) Covers what’s happening with Internet-of-Things (IoT) technology–-from devices to gateway networks to cloud architectures. This newsletter tackles news and trends about the products and technologies needed to build IoT implementations and devices.

Verifying Code Readout Protection Claims

Think Like an Attacker

How do you verify the security of microcontrollers? MCU manufacturers often make big claims, but sometimes it is in your best interest to verify them yourself. In this article, Colin discusses a few threats against code readout and looks at verifying some of those claimed levels.

By Colin O’Flynn

You’ve got your latest and greatest IoT toaster designed, and you’re looking to move forward with production. But one thing concerns you: How do you know this stellar code isn’t going to be cloned as soon as you release it to the market?

You turn to the firmware protection features of your chosen microcontroller, but how good is it? This article can’t hope to answer that question in general, rather it will instead give you a short example of how to help answer that question for any specific microcontroller.

In particular, it will teach you to “think like an attacker” when reading through datasheets. Look for small loopholes that could have big consequences, and you will have a much better time navigating the landscape of potential attacks.

Know What’s Out There

One of the most important things is to keep an eye out for new and interesting attacks against these devices. In my January 2018 article (Circuit Cellar 330) I described how there is a published attack against some of the NXP LPC devices, which makes it very easy to unlock them. You can see the presentation entitled “Breaking Code Read Protection on the NXP LPC-family Microcontrollers” by Chris Gerlinsky which describes this attack. Another recent one is an attack against STMicroelectronics’ STM32F0 devices entitled “Shedding Too Much Light on a Microcontroller’s Firmware Protection” by Johannes Obermaier and Stefan Tatschner. That one is a little more limited, but still has some interesting information regarding potential security attacks.

I’m hoping to distill some of these attacks down into common problems, which will help you close a few loopholes before someone rips off your IoT toaster design. At least now if it fails in the marketplace you have no one to blame but yourself.
To give you something concrete to read (and for me to reference), I’ve chosen to use the ST STM32F303 series because it’s a device I’ve been using myself lately. I’m not going to be revealing any unknown vulnerabilities—so if you’re reading this from your office at  STMicroelectronics, no need to sweat. It also has some pretty common configuration options, so makes for a nice reference you can apply to a range of other devices.

ST Read Protection (RDP)

The first step when you are looking at a new device should be to very carefully inspect the security or debug lock protection portion of the datasheet. They will typically go into a fair amount of detail around how the protection mechanism works.
The STM32F3 Reference Manual (RM0316) has this split into two sections. Section 5, entitled “Option byte description” provides information about how the flags are stored in flash. Section 4.3 entitled “Memory Protection” details how this is actually used to protect the code in your device.

Table 1
This excerpt from the datasheet shows how the flash memory read protection levels are defined for the STM32F3 device.

The two important pieces of information for us are replicated in Table 1 and
Table 2. They are the flash memory protection levels, and the associated access allowed at each level. The RDP byte is a special “option byte”, which is the value of a specific location in flash memory. Note the scheme they have chosen uses two bytes, where one is always programmed to be the complement of the other byte. This is presumably used for error checking, and if a byte is not matched with a complement, an error flag is set.

Table 2
Code protection levels 1 and 2 have differing protection abilities. This excerpt from the datasheet shows where flash memory can be read/written/executed from.

Right away you should notice that this scheme does not fall victim to the same problem as the LPC attack I talked about before. In particular the LPC attack exploited the fact a fault or glitch could corrupt the flag value, which caused the CPU to disable the protection.

With the STM32F303, these invalid levels will all map to Protection Level 1. This protection level does not allow external flash access, which “should” be a good sign. The highest protection level also claims to be impossible to remove, but if we could corrupt the value of the option bytes in memory we could downgrade from Protection Level 2 to Protection Level 1. In fact, this “downgrade” is exactly what was presented by Obermaier & Tatschner. The downgrade used a chip decapsulation and light to flip the bits, which is relatively invasive. Other fault attacks (such as voltage or EM) might work but would require investigation before assuming that. Such temporary fault attacks would require the value is read and latched.

But as a good designer, you should assume such faults could be made possible. In this case it would be possible to “downgrade” the device from Protection Level 2 to Protection Level 1. So, what happens if an attacker performed this downgrade? That takes us into the second part of this article. …

Read the full article in the July 336 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.

August Circuit Cellar: Sneak Preview

The August issue of Circuit Cellar magazine is coming soon. Be on the lookout for a whole shipload of top-notch embedded electronics articles for you to enjoy.

Not a Circuit Cellar subscriber?  Don’t be left out! Sign up today:

 

Here’s a sneak preview of August 2018 Circuit Cellar:

FPGAs REDEFINE THE DEFINITION OF “SYSTEM”

FPGA System Design
Long gone now are the days when FPGAs were thought of as simple programmable circuitry for interfacing and glue logic. Today, FPGAs are powerful system chips with on-chip processors, signal processing functionality and rich offerings or high-speed connectivity. Here, Circuit Cellar’s Editor-in-Chief, Jeff Child, looks at the latest technology and trends in FPGA system design.

Managing FPGA Design Complexity
Modern FPGAs can contain millions of logic gates and thousands of embedded DSP processors allowing FPGA hardware designers to create extremely sophisticated and complex application-specific hardware functions. In this article, Pentek’s Bob Sgandurra explores how today’s FPGA technology has revamped the roles of both hardware and software engineers as well as how dealing with on-chip IP adds new layers of complexity.

HIGH-INTEGRATION AT THE CHIP-
AND BOARD-LEVEL

Product Focus: Small and Tiny Embedded Boards
An amazing amount of computing functionality can be squeezed on to a small form factor board these days. These company—and even tiny—board-level products meet the needs of applications where extremely low SWaP (size, weight and power) beats all other demands. This Product Focus section updates readers on this technology trend and provides a product album of representative small and tiny embedded boards.

Microcontrollers and Processors
Today’s crop of microcontrollers and embedded processors provide a rich continuum of features, functions and capabilities. It’s hard to tell anymore where the dividing line is, especially when a lot of them use the same CPU cores. Circuit Cellar’s Editor-in-Chief, Jeff Child, delves into the technology and product trends of MCUs and embedded processors.

CAN’T STOP THE SIGNAL

Murphy’s Laws in the DSP World (Part 2)
Many unexpected issues come into play when you move from the real world of analog signals and enter the world of digital signal processing (DSP). Part 2 of this article series by Michael Smith, Mai Tanaka and Ehsan Shahrabi Farahani charges forward introducing “Murphy’s Laws of DSP” #7, #8 and #9 and looks at the spectral analysis of DSP signals.

Signature Analyzer Uses NXP MCU
Doing a signature analysis of a signal used to require an oscilloscope to display your results. In this article, Brian Millier shows how you can build a free-standing tester that uses mostly just the internal peripherals of an NXP ARM microcontroller. He described how the tester operates and how he implemented it using a Teensy 3.5 development module and an intelligent 4.3-inch TFT touch-screen display.

Pitfalls of Filtering Pulsed Signals
Filtering pulsed signals can be a tricky prospect. Using a recent customer implementation as an example, Robert Lacoste highlights various alternative approaches and describes the key concepts involved. Simulation results are provided to help readers understand what’s going on.

PROJECT-BASED STORIES WITH ALL THE DETAILS

Electronic Speed Control (Part 2)
In Part 1, Jeff Bachiochi discussed the mechanical differences between DC brushed and brushless DC (BLDC) motors. This time he dives into basics of an Electronic Speed Controller’s operations and its circuitry. And all this is illustrated via his ESC-based project that uses a Microchip PIC MCU.

Build an Audio Response Light Display
Light shows have been a part of entertainment situations seemingly forever, but the technology has evolved over time. These light shows have their origin in the primitive “light organs” of the 1960s in which each spectral band had its own color that pulsed in intensity with audio amplitudes within its range of frequencies. In this article, Devlin Gualtieri discusses his circuit design that implements a light organ using today’s IC and LED technologies.

AND MORE FROM OUR EXPERT COLUMNISTS

Internet of Things Security (Part 4)
In this next part of his article series on IoT security, Bob Japenga looks at how checklists and the common criteria framework can help us create more secure IoT devices. He covers how to create a list of security assets and to establish threat checklists that identify all the threats to your security assets.

Thermoelectric Cooling (Part 2)
In Part 1 George Novacek described how he built a test chamber using some electronics combined with components salvaged from his thermoelectric water cooler. To confirm his test results, he purchased another thermoelectric cooler and repeated the tests. In Part 2 he covers the results of these tests along with some theoretical performance calculations.

Bluetooth SIG Appoints New Associate Member Directors

The Bluetooth Special Interest Group (SIG) announced that Peter Liu from Bose and Ron Wong from Cypress Semiconductor will be joining the board of directors of the Bluetooth SIG as Associate Member Directors. The Bluetooth SIG Board of Directors is responsible for the governance of the organization and plays a vital role in driving the expansion of Bluetooth technology to address the needs of a growing number of consumer and commercial markets. Both will serve a two-year term starting in July 2018.

Peter Liu (left) is an Architect of Wearable Systems at Bose, leading programs and creating technology platforms for hearables. Previously, he led the Advanced Electronic Systems group in Bose Consumer Headphones to deliver enabling technologies and architectures for the wireless and noise-cancelling headphones enjoyed today by audio enthusiasts worldwide. Peter delights in bringing new experiences to life by drawing upon his expertise and network cultivated over a career spanning semiconductors and end-products in infrastructure, cellular and consumer electronics industries.

Ron Wong (right) is Director, Product Marketing in the Microcontroller & Connectivity Division of Cypress Semiconductor and manages connectivity software solutions that help companies bring innovative, low-power connected products to market. He is responsible for defining and driving Cypress’ Internet of Things (IoT) product portfolio, including Bluetooth software and Wireless Connectivity for Embedded Devices (WICED) development kits. A veteran of wireless technology, Ron has more than 25 years of experience in wireless communications including 18 years in Bluetooth technology.

With these new appointments, the Bluetooth SIG board now consists of individuals from the following member companies; Apple, Bose, Cypress Semiconductor, Ericsson, Google, Intel, Lenovo, Microsoft, Nokia, Signify and Toshiba.

Bluetooth SIG | www.bluetooth.com

Cypress Semiconductor | www.cypress,com

Tuesday’s Newsletter: IoT Tech Focus

Coming to your inbox tomorrow: Circuit Cellar’s IoT Technology Focus newsletter. Tomorrow’s newsletter covers what’s happening with Internet-of-Things (IoT) technology–-from devices to gateway networks to cloud architectures. This newsletter tackles news and trends about the products and technologies needed to build IoT implementations and devices.

Bonus: We’ve added Drawings for Free Stuff to our weekly newsletters. Make sure you’ve subscribed to the newsletter so you can participate.

Already a Circuit Cellar Newsletter subscriber? Great!
You’ll get your IoT Technology Focus newsletter issue tomorrow.

Not a Circuit Cellar Newsletter subscriber?
Don’t be left out! Sign up now:

Our weekly Circuit Cellar Newsletter will switch its theme each week, so look for these in upcoming weeks:

Embedded Boards.(7/24) The focus here is on both standard and non-standard embedded computer boards that ease prototyping efforts and let you smoothly scale up to production volumes.

July has a 5th Tuesday, so we’re bringing you a bonus newsletter:
PCB Design (7/31) PCB design tools and methods continue to evolve as they race to keep pace with faster, highly integrated electronics. Automated, rules-based chip placement is getting more sophisticated and tools are addressing the broader picture of the PCB design process. This newsletter looks at the latest technology trends and product developments in PCB design tools.

Analog & Power. (8/7) This newsletter content zeros in on the latest developments in analog and power technologies including DC-DC converters, AD-DC converters, power supplies, op amps, batteries and more.

Microcontroller Watch (8/14) This newsletter keeps you up-to-date on latest microcontroller news. In this section, we examine the microcontrollers along with their associated tools and support products.

MCU/MPUs Target Next-Gen Electric and Autonomous Vehicles

NXP Semiconductors  has announced a new family of high-performance safe microprocessors to control vehicle dynamics in next-generation electric and autonomous vehicles. The new NXP S32S microprocessors will manage the systems that accelerate, brake and steer vehicles safely, whether under the direct control of a driver or an autonomous vehicle’s control.

NXP is addressing the needs of carmakers developing future autonomous and hybrid electric vehicles with newly available 800 MHz MCU/MPUs. The first of the new S32 product lines, the S32S microprocessor offers the highest performance ASIL D capability available today, according to NXP.
The NXP S32S processors use an array of the new Arm Cortex-R52 cores, which integrate the highest level of safety features of any Arm processor. The array offers four fully independent ASIL D capable processing paths to support parallel safe computing. In addition, the S32S architecture supports a new “fail availability” capability allowing the device to continue to operate after detecting and isolating a failure—a critical capability for future autonomous applications.

NXP has partnered with OpenSynergy to develop a fully featured, real-time hypervisor supporting the NXP S32S products. OpenSynergy’s COQOS Micro SDK is one of the first hypervisor platforms that takes advantage of the Arm Cortex-R52’s special hardware features. It enables the integration of multiple real-time operating systems onto microcontrollers requiring high levels of safety (up to ISO26262 ASIL D). Multiple vendor independent OS/stacks can also run on a single microcontroller. COQOS Micro SDK provides secure, safe and fast context switching ahead of today’s software-only solutions in traditional microcontrollers.

NXP Seimconductors | www.nxp.com

Tool Helps Embed Type-C Port Manager on STM32 MCUs

Helping engineers leverage the latest USB Power Delivery capabilities and versatile USB Type-C connections in new or legacy product designs, STMicroelectronics has introduced new software for implementing a Type-C Port Manager (TCPM) on any general-purpose STM32 microcontroller.

Compliant with the USB Type-C Port Controller Interface (TCPCi) specification, and designed to manage a separate single- or multi-port Type-C Port Controller (TCPC) chip, ST’s X-CUBE-USB-PD stack implements the protocol layer and policy engine of the USB Power Delivery Specification (USB-PD 3.0 v1.1). The stack demands minimal STM32 resources, having a low memory footprint and using only a single I2C bus address and one alert pin per port. In addition, standard register maps ensure easy interoperability with any connected TCPC device.
X-CUBE-USB-PD supports all USB-PD 3.0 options, including Programmable Power Supply (PPS) for connecting fast chargers, Fast Role Swap (FRS) for seamless user experiences during cable insertion or removal, and authentication-message exchange to allow data or power transfer only with genuine devices or chargers.

By supporting Provider, Consumer, and Dual-Role (DRP) modes, the stack enables product designers to leverage the benefits of USB Type-C in a wide variety of equipment types, such as power hubs or power banks, docking stations, game controllers, PC peripherals, multi-function accessories, and small appliances such as cordless vacuum cleaners, portable speakers, lighting products, proprietary chargers, and many other applications.

ST has tested the stack with ON Semiconductor’s FUSB307B, a USB-PD 3.0 v1.1-certified TCPC chip, creating a fully certified and ready-to-use solution that centralizes the TCPM for multiple USB-PD ports. The FUSB307B provides a 1 Mbps I2C microcontroller interface and handles functionality such as plug-insertion/orientation detection and dead-battery power-up. Time-critical Power-Delivery functions that offload the microcontroller effectively enable any STM32 including entry-level devices to manage multi-port, multi-role USB-PD interfaces. X-CUBE-USB-PD currently contains libraries tested on STM32 Arm Cortex-M0 and Cortex-M4 microcontrollers, giving developers a choice of over 420 different part numbers. Libraries for other STM32 series will be introduced by the end of 2018.

An ON Semiconductor FUSB307B evaluation board, ON-FUSB3-STM32, is also available to help streamline development. The board, which features a STM32F072 microcontroller and a USB-C connector, demonstrates control of a single port. The X-CUBE-USB-PD stack, part of the STM32Cube software-development ecosystem, can be downloaded now, free of charge, from www.st.com/x-cube-usb-pd

STMicroelectronics | www.st.com

Tuesday’s Newsletter: Microcontroller Watch

Coming to your inbox tomorrow: Circuit Cellar’s Microcontroller Watch newsletter. Tomorrow’s newsletter keeps you up-to-date on latest microcontroller news. In this section, we examine the microcontrollers along with their associated tools and support products.

Bonus: We’ve added Drawings for Free Stuff to our weekly newsletters. Make sure you’ve subscribed to the newsletter so you can participate.

Already a Circuit Cellar Newsletter subscriber? Great!
You’ll get your Microcontroller Watch newsletter issue tomorrow.

Not a Circuit Cellar Newsletter subscriber?
Don’t be left out! Sign up now:

Our weekly Circuit Cellar Newsletter will switch its theme each week, so look for these in upcoming weeks:

IoT Technology Focus. (7/17) Covers what’s happening with Internet-of-Things (IoT) technology–-from devices to gateway networks to cloud architectures. This newsletter tackles news and trends about the products and technologies needed to build IoT implementations and devices.

Embedded Boards.(7/24) The focus here is on both standard and non-standard embedded computer boards that ease prototyping efforts and let you smoothly scale up to production volumes.

July has a 5th Tuesday, so we’re bringing you a bonus newsletter:
PCB Design (7/31) PCB design tools and methods continue to evolve as they race to keep pace with faster, highly integrated electronics. Automated, rules-based chip placement is getting more sophisticated and tools are addressing the broader picture of the PCB design process. This newsletter looks at the latest technology trends and product developments in PCB design tools.

Analog & Power. (8/7) This newsletter content zeros in on the latest developments in analog and power technologies including DC-DC converters, AD-DC converters, power supplies, op amps, batteries and more.

Op Amp Design Techniques

Analog Adventures

Op amps can play useful roles in circuit designs linking the real analog world to microcontrollers. Stuart shares techniques for using op amps and related devices like comparators to optimize your designs and improve precision.

By Stuart Ball

Connecting the real world to your microcontroller circuit is what makes it useful for something more than blinking an LED. This is a broad topic. And several years ago, I wrote a book specifically about this: Analog Interfacing to Embedded Microprocessor Systems . What I want to do here is describe a few techniques that may save you some time and grief when connecting things to your own designs.

Op amp Voltage References

An op amp (Figure 1) is an amplifier that has an inverting input, a noninverting input and an output. The voltage difference between the noninverting input and inverting input is amplified by a high internal gain and presented to the output. Resistors or other components are connected between the output and (usually) the inverting input to produce a feedback circuit that controls the gain of the completed circuit.

Figure 1
Standard inverting amplifier with reference offset voltage. The reference is needed to level-shift the -2.5 V to 2.5 V input up to the 0 V to 5 V input needed by a microcontroller.

Generally, the rule of thumb is that, as long as the op amp is properly connected—not saturated, no floating inputs—the inverting and noninverting inputs will be at the same voltage. This is because the negative feedback loop will cause the op amp to drive the inverting input to a voltage that matches the noninverting input. If the op amp can’t drive the output so that the inputs are equal, the output will saturate in either the positive or negative direction.

The circuit in Figure 1 is a commonly used inverting amplifier circuit, and it is what you might use to convert a signal that swings from -2.5 V to 2.5 V to the 0 to 5 V input of a microcontroller’s analog-to-digital (ADC) converter. If your microcontroller had an ADC that could only handle inputs of 0 to 3.3 V or 0 to 2.5 V, the same principles would apply, but the component values would be different. The op amp pinout shown is typical of one half of an 8-pin, dual op amp.

The input signal might be the output of a device with a -2.5 V to 2.5 V range. Or it might just be a capacitor-coupled AC signal such as an audio waveform. Whatever the source, the -2.5 V to 2.5 V range is outside the range of your ADC input, so you have to shift the level so that it is within the range of the ADC.

The circuit shown is a typical inverting amplifier, which means that the output is 180 degrees out of phase with the input. When the input is at its maximum voltage, the output is at its minimum, and vice-versa. The gain of the amplifier is defined as RF/RI, which is a gain of 1 for this circuit since both resistors have the same value. For other applications you might need gain greater or less than one.

If you work through the math as shown in Figure 1, you can see that the output equation is (2REF – Input) or 2× the reference voltage (1.25 V) minus the input voltage (-2.5 V to
2.5 V). So, when the input is 2.5 V, the output is (1.25 × 2) – 2.5, or 0 V. When the input is -2.5 V, the output is (1.25 × 2) – (-2.5), or  5 V. So, the input is inverted and translated up 2.5 V to match the ADC input requirements at the op amp output.

Double Trouble

Now the potential problem: While the input voltage is multiplied by 1 (and level-shifted), the reference voltage is multiplied by 2. So, any noise or ripple on the reference voltage will show up doubled on the output. A 10 mV ripple signal will be 20 mV at the ADC input and will be combined with the input signal you are trying to measure.
A 50 mV DC error in the reference will translate to a 100 mV constant offset at the output.

Figure 2
A voltage divider provides a simple voltage reference but is subject to variation from ripple on the supply voltage, and the normal variation in the supply voltage. The supply voltage can vary with temperature, part tolerance and other factors.

Suppose that the reference voltage is generated as shown in Figure 2, with a pair of resistors to divide the 5 V supply down to 1.25 V. Using 1% resistors provides a reference voltage that is within about 01.7% of the intended value—provided the 5 V supply is exactly 5 V. However, this 5 V value can vary with temperature, with the input voltage and with the tolerance of the reference voltage inside the regulator circuit. The values of the resistors can also drift with temperature, although this effect is negligible in many applications.

In addition to the variation in the 5 V supply DC voltage, any AC signal on the
5 V supply will be transmitted to the op amp reference and will be multiplied by two at the op amp output. . …

Read the full article in the July 336 issue of Circuit Cellar

Don’t miss out on upcoming issues of Circuit Cellar. Subscribe today!

Note: We’ve made the October 2017 issue of Circuit Cellar available as a free sample issue. In it, you’ll find a rich variety of the kinds of articles and information that exemplify a typical issue of the current magazine.