September Circuit Cellar: Sneak Preview

The September issue of Circuit Cellar magazine is coming soon. Clear your decks for a new stack of in-depth embedded electronics articles prepared for you to enjoy.

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


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


Motion Control for Robotics
Motion control technology for robotic systems continues to advance, as chip- and board-level solutions evolve to meet new demands. These involve a blending of precise analog technologies to control position, torque and speed with signal processing to enable accurate, real-time motor control. Here, Circuit Cellar’s Editor-in-Chief, Jeff Child, looks the latest technology and product advances in motion control for robotics.

Electronic Speed Control (Part 3)
Radio-controlled drones are one among many applications that depend on the use of an Electronic Speed Controller (ESC) as part of its motor control design. After observing the operation of a number of ESC modules, in this part Jeff Bachiochi focuses in more closely on the interaction of the ESC with the BLDC motor.


Product Focus: IoT Gateways
IoT gateways are a smart choice to facilitate bidirectional communication between IoT field devices and the cloud. Gateways also provide local processing and storage capabilities for offline services as well as near real-time management and control of edge devices. This Product Focus section updates readers on these technology trends and provides a product gallery of representative IoT gateways.

Wireless Weather Station
Integrating wireless technologies into embedded systems has become much easier these days. In this project article, Raul Alvarez Torrico describes his home-made wireless weather station that monitors ambient temperature, relative humidity, wind speed and wind direction, using Arduino and a pair of cheap Amplitude Shift Keying (ASK) radio modules.


Frequency Modulated DDS
Prompted by a reader’s query, Ed became aware that you can no longer get crystal oscillator modules tuned to specific frequencies. With that in mind, Ed set out to build a “Channel Element” replacement around a Teensy 3.6 board and a DDS module. In this article, Ed Nisley explains how the Teensy’s 32-bit datapath and 180 MHz CPU clock affect the DDS frequency calculations. He then explores some detailed timings.

Power Supplies / Batteries
Sometimes power decisions are left as an afterthought in system designs. But your choice of power supply or battery strategy can have a major impact on your system’s capabilities. Circuit Cellar’s Editor-in-Chief, Jeff Child, dives into the latest technology trends and product developments in power supplies and batteries.

Murphy’s Laws in the DSP World (Part 3)
Unpredictable issues crop up when you move from the real world of analog signals and enter the world of digital signal processing (DSP). In Part 3 of this article series, Mike Smith and Mai Tanaka focuses on strategies for how to—or how to try to—avoid Murphy’s Laws when doing DSP.


Virtual Emulation for Drones
Drone system designers are integrating high-definition video and other features into their SoCs. Verifying the video capture circuitry, data collection components and UHD-4K streaming video capabilities found in drones is not trivial. In his article, Mentor’s Richard Pugh explains why drone verification is a natural fit for hardware emulation because emulation is very efficient at handling large amounts of streamed data.

LIDAR 3D Imaging on a Budget
Demand is on the rise for 3D image data for use in a variety of applications, from autonomous cars to military base security. That has spurred research into high precision LIDAR systems capable of creating extremely clear 3D images to meet this demand. Learn how Cornell student Chris Graef leveraged inexpensive LIDAR sensors to build a 3D imaging system all within a budget of around $200.


Velocity and Speed Sensors
Automatic systems require real-life physical attributes to be measured and converted to electrical quantities ready for electronic processing. Velocity is one such attribute. In this article, George Novacek steps through the math, science and technology behind measuring velocity and the sensors used for such measurements.

Recreating the LPC Code Protection Bypass
Microcontroller fuse bits are used to protect code from being read out. How well do they work in practice? Some of them have been recently broken. In this article Colin O’Flynn takes you through the details of such an attack to help you understand the realistic threat model.

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.

FPGA Solutions Evolve to Meet AI Needs

Brainy System ICs

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, DSP functionality and high-speed connectivity.

By Jeff Child, Editor-in-Chief

Today’s FPGAs have now evolved to the point that calling them “systems-on-chips” is redundant. It’s now simply a given that the high-end lines of the major FPGA vendors have general-purpose CPU cores on them. Moreover, the flavors of signal processing functionality on today’s FPGA chips are ideally suited to the kind of system-oriented DSP functions used in high-end computing. And even better, they’ve enabled AI (Artificial Intelligence) and Machine Learning kinds of functionalities to be implemented into much smaller, embedded systems.

In fact, over the past 12 months, most of the leading FPGA vendors have been rolling out solutions specifically aimed at using FPGA technology to enable AI and machine learning in embedded systems. The two main FPGA market leaders Xilinx and Intel’s Programmable Solutions Group (formerly Altera) have certainly embraced this trend, as have many of their smaller competitors like Lattice Semiconductor and QuickLogic. Meanwhile, specialists in so-called e-FPGA technology like Archonix and Flex Logix have their own compelling twist on FPGA system computing.

Project Brainwave

Exemplifying the trend toward FPGAs facilitating AI processing, Intel’s high-performance line of FPGAs is its Stratix 10 family. According to Intel, the Stratix 10 FPGAs are capable of 10 TFLOPS, or 10 trillion floating point operations per second (Figure 1). In May Microsoft announced its Microsoft debuted its Azure Machine Learning Hardware Accelerated Models powered by Project Brainwave integrated with the Microsoft Azure Machine Learning SDK. Azure’s architecture is developed with Intel FPGAs and Intel Xeon processors.

Figure 1
Stratix 10 FPGAs are capable of 10 TFLOPS or 10 trillion floating point operations per second.

Intel says its FPGA-powered AI is able to achieve extremely high throughput that can run ResNet-50, an industry-standard deep neural network requiring almost 8 billion calculations without batching. This is possible using FPGAs because the programmable hardware—including logic, DSP and embedded memory—enable any desired logic function to be easily programmed and optimized for area, performance or power. And because this fabric is implemented in hardware, it can be customized and can perform parallel processing. This makes it possible to achieve orders of magnitudes of performance improvements over traditional software or GPU design methodologies.

In one application example, Intel cites an effort where Canada’s National Research Council (NRC) is helping to build the next-generation Square Kilometer Array (SKA) radio telescope to be deployed in remote regions of South Africa and Australia, where viewing conditions are most ideal for astronomical research. The SKA radio telescope will be the world’s largest radio telescope that is 10,000 times faster with image resolution 50 times greater than the best radio telescopes we have today. This increased resolution and speed results in an enormous amount of image data that is generated by these telescopes, processing the equivalent of a year’s data on the Internet every few months.

NRC’s design embeds Intel Stratix 10 SX FPGAs at the Central Processing Facility located at the SKA telescope site in South Africa to perform real-time processing and analysis of collected data at the edge. High-speed analog transceivers allow signal data to be ingested in real time into the core FPGA fabric. After that, the programmable logic can be parallelized to execute any custom algorithm optimized for power efficiency, performance or both, making FPGAs the ideal choice for processing massive amounts of real-time data at the edge.

ACAP for Next Gen

For its part, Xilinx’s high-performance product line is its Virtex UltraScale+ device family (Figure 2). According to the company, these provide the highest performance and integration capabilities in a FinFET node, including the highest signal processing bandwidth at 21.2 TeraMACs of DSP compute performance. They deliver on-chip memory density with up to 500 Mb of total on-chip integrated memory, plus up to 8 GB of HBM Gen2 integrated in-package for 460 GB/s of memory bandwidth. Virtex UltraScale+ devices provide capabilities with integrated IP for PCI Express, Interlaken, 100G Ethernet with FEC and Cache Coherent Interconnect for Accelerators (CCIX).

Figure 2
Virtex UltraScale+ FPGAs provide a signal processing bandwidth at 21.2 TeraMACs. They deliver on-chip memory density with up to 500 Mb of total on-chip integrated memory, plus up to 8 GB of HBM Gen2 integrated in-package for 460 GB/s of memory bandwidth.

Looking to the next phase of system performance, Xilinx in March announced its strategy toward a new FPGA product category it calls its adaptive compute acceleration platform (ACAP). Touted as going beyond the capabilities of an FPGA, an ACAP is a highly integrated multi-core heterogeneous compute platform that can be changed at the hardware level to adapt to the needs of a wide range of applications and workloads. An ACAP’s adaptability, which can be done dynamically during operation, delivers levels of performance and performance per-watt that is unmatched by CPUs or GPUs, says Xilinx… …

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.

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:


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.


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.


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.


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.


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.

In-Circuit Programming/Debugging Tool Supports PIC MCUs

Microchip Technology has introduced the MPLAB PICkit 4 In-Circuit Debugger. This low-cost PICkit 4 in-circuit programming and debugging development tool is meant to replace the popular PICkit 3 programmer by offering five times faster programming, a wider voltage range (1.2 V to 5 V), improved USB connectivity and more debugging interface options. In addition to supporting Microchip’s PIC microcontrollers (MCUs) and dsPIC Digital Signal Controllers (DSCs), the tool also supports debugging and programming for the CEC1702 family of hardware cryptography-enabled devices.

This low-cost programming and debugging solution is well suited for those designing in the 8-bit space, but it is also perfectly suited for 16- and 32-bit development due, in part, to its 300 MHz, high-performance ATSAME70Q21B microcontroller on board. The benefits of faster programming time are less waiting and better productivity during development. This is especially important when designing with 32-bit microcontrollers with larger memory capacities.

The PICkit 4 development tool enables debugging and programing using the graphical user interface of MPLAB X Integrated Development Environment (IDE). The tool connects to the design engineer’s computer using a Hi-Speed USB 2.0 interface and can be connected to the target via an 8-pin single inline header that supports advanced interfaces such as 4-wire JTAG and serial wire debug with streaming data gateway. It is also backward compatible for demo boards, headers and target systems using 2-wire JTAG and In-Circuit Serial Programming (ICSP) compatibility.

The new interfaces make this low-cost tool compatible with Microchip’s CEC1702 hardware cryptography-enabled devices. This low-power, but powerful, 32-bit MCU offers easy-to-use encryption, authentication and private and public key capabilities. CEC1702 users can now benefit from using Microchip’s development tools and support rather than being required to invest in third-party tools for programming and debugging. The MPLAB PICkit 4 (PG164140) development tool is available today for $47.95.

Microchip Technology |

Microcontrollers Target Smart Water Meters

Texas Instruments has unveiled a new family of MSP430 microcontrollers with an integrated ultrasonic sensing analog front end that enables smart water meters to deliver higher accuracy and lower power consumption. In addition, TI introduced two new reference designs that make it easier to design modules for adding automated meter reading (AMR) capabilities to existing mechanical water meters. The new MCUs and reference designs support the growing demand for more accurate water meters and remote meter reading to enable efficient water resource management, accurate measurement and timely billing.

New ultrasonic MCUs and new reference designs make both electronic and mechanical water meters smarter (PRNewsfoto/Texas Instruments Incorporated)

New ultrasonic MCUs and new reference designs make both electronic and mechanical water meters smarter.

As part of the ultra-low-power MSP430 MCU portfolio for sensing and measurement, the new MSP430FR6047 MCU family lets developers add more intelligence to flow meters by taking advantage of a complete waveform capture feature and analog-to-digital converter (ADC)-based signal processing. This technique enables more accurate measurement than competitive devices, with precision of 25 ps or better, even at flow rates less than 1 liter per hour. In addition, the integrated MSP430FR6047 devices reduce water meter system component count by 50 percent and power consumption by 25 percent, enabling a meter to operate without having to charge the battery for 10 or more years. The new MCUs also integrate a low-energy accelerator module for advanced signal processing, 256 KB of ferroelectric random access memory (FRAM), a LCD driver and a metering test interface.

The MSP430 Ultrasonic Sensing Design Center offers a comprehensive development ecosystem that allows developers to get to market in months. The design center provides tools for quick development and flexibility for customization, including software libraries, a GUI, evaluation modules with metrology and DSP libraries.

TI’s new Low-Power Water Flow Measurement with Inductive Sensing Reference Design is a compact solution for the electronic measurement of mechanical flow meters with low power consumption for longer battery life. Enabled by the single-chip SimpleLink dual-band CC1350 wireless MCU, this reference design also gives designers the ability to add dual-band wireless communications for AMR networks. Designers can take advantage of the reference design’s small footprint to easily retrofit existing mechanical flow meters, enabling water utilities to add AMR capability while avoiding expensive replacement of deployed meters. The CC1350 wireless MCU consumes only 4 µA while measuring water flow rates, enabling longer product life.

A second new reference design is an ultra-low power solution based on the SimpleLink Sub-1 GHz CC1310 wireless MCU. The Low-Power Wireless M-Bus Communications Module Reference Design uses TI’s wireless M-Bus software stack and supports all wireless M-Bus operating modes in the 868-MHz band. This reference design provides best-in-class power consumption and flexibility to support wireless M-Bus deployments across multiple regions.

Texas Instruments |

Tensilica HiFi 3z DSP IP Core Provides Enhanced Voice and Audio Processing

Cadence Design Systems has announced the Cadence Tensilica HiFi 3z DSP IP core for system-on-chip (SoC) designs targeted for the latest mobile and home entertainment applications, including smartphones, augmented reality (AR)/3D goggles, digital TVs and set-top boxes (STBs). The new HiFi 3z architecture offers more than 1.3X better voice and audio processing performance than its predecessor, the HiFi 3 DSP, which leads the industry in the number of audio DSP cores shipped.


Higher voice sample rates require more complex voice pre-processing. Enhanced Voice Services (EVS), the latest mobile voice codec supporting voice over LTE (VoLTE), supports up to a 48kHz sample rate, compared to 16kHz for the previous AMR-WB codec. The new HiFi 3z DSP delivers more than 1.3X better performance for EVS than the HiFi 3 DSP core. Home entertainment is driving a similar workload increase as audio codecs like Dolby AC-4 and MPEG-H transition from channel-based to object-based. In addition, audio post-processing functions such as Waves Nx 3D/AR audio and the immersive audio of Dolby Atmos-enabled TVs are driving higher complexity signal processing. The HiFi 3z DSP provides more than 1.4X better performance on Dolby Atmos-enabled TVs than the HiFi 3 DSP.

The HiFi 3z DSP offers a number of architecture and instruction set architecture (ISA) improvements over the earlier HiFi 3 DSP, including:

– Dual load/store

– Advanced FLIX bundling (multiple-base ISA operations per cycle)

– Double the MACs for 16×16 (octal MAC)

– Enhanced ISA for accelerating FFTs, FIRs and IIRs

– New instruction extensions to improve codec (especially EVS) performance for mobile

– 4-way, 8-bit load for improved voice trigger performance

– 8-way, 8-bit load for reduced neural network memory usage

Tensilica HiFi DSPs are the most widely licensed audio/voice/speech processors, with support for over 200 proven software packages and more than 95 software partners in the Tensilica Xtensions partner program. More than 75 top-tier semiconductor companies and system OEMs have selected Tensilica HiFi DSPs for their audio, voice and speech products.

Cadence |

What Is Correlation?

Interested in learning about correlation and how to implement it in a digital signal processing system? In Circuit Cellar 299, Robert Lacoste addresses the subject without going overboard with complicated mathematics. He explains how a simple correlation calculation can drastically improve a system’s performance.

Imagine a situation in which you have a noisy signal that includes replications of a given pattern. Each replication is more or less accurate, has a varying amplitude, and could be situated anywhere in the signal (see Figure 1). The pattern is known, even if it could have any shape. Also imagine that your boss or client asked you to find an algorithm that will locate each occurrence of the pattern in the signal and give an estimation of its amplitude. Not obvious, right? Well, it’s actually quite easy. This is a classic situation for which you can apply a simple mathematical operation: correlation.

Figure 1: This figure shows a given pattern (top) replicated two times in a noisy signal at different amplitudes (middle). The goal of the game is to identify the two replications (bottom).

Figure 1: This figure shows a given pattern (top) replicated two times in a noisy signal at different amplitudes (middle). The goal of the game is to identify the two replications (bottom).

Before I define correlation and explain how to implement it in a DSP system, let’s cover a few typical applications first. A radar system includes a transmitter and a receiver. The former sends out some pulses. The receiver must recognize the echoed pulses, which each corresponding to an obstacle. That’s exactly what a correlation is made for! Even if a radar is one of the best examples, there are thousands of other possible applications. Want to improve the performance of a sensor with information about the shape of the signal being detected? Use correlation. Need to identify a given vibration on an accelerometer-based system? Correlation is answer once again. The list is endless.


The good news about correlation is that the calculations are quite simple to explain and even simpler to implement in a software-based project or in an FPGA. Since I’m talking about digital systems, you can safely assume that the signal is digitized (by an analog-to-digital converter) and defined by N successive samples. Similarly, the pattern to be found is a set of M successive samples, which are also some numeric values. Let’s assume that the pattern is shorter than the input signal so that M < N. How should you proceed?

The correlation calculation works as follows. Start by positioning the pattern above the first M points of the signal. For each sample of the pattern, multiply the corresponding pattern and signal values and then sum all the results. You’ve got the first point of the correlation. Then shift the pattern by one sample on the right and do the same calculation again to find the second point of the correlation. Continue up to the end of the signal and you’ve got the correlation of the pattern and signal, which has N – M + 1 points in that case. Refer to Listing 1 if you prefer pseudocode to a description (assuming the index are numbered from 0 to N – 1).

Listing 1: This pseudo-code implements the correlation algorithmtion

Listing 1: This pseudo-code implements the correlation algorithm.

Very simple, right? The process is illustrated on Figure 2. How does this calculation answer to our problem? Very simply: The calculated correlation is higher when the signal and pattern matches.

Figure 2: A correlation works by progressively shifting the pattern (middle relatively to the signal (top). At each position, the two curves are multiplied term-by-term and summed, giving one point on the resulting correlation (bottom).

Figure 2: A correlation works by progressively shifting the pattern (middle relatively to the signal (top). At each position, the two curves are multiplied term-by-term and summed, giving one point on the resulting correlation (bottom).

So you have just to locate peaks on the calculated correlation. The position of the peaks shows where the pattern are located in the signal, and their amplitudes are directly proportional to the amplitude of the replica.—Robert Lacoste (Circuit Cellar 299, 2015)

This article appears in Circuit Cellar 299 (June 2015).

Quad Channel DPWM Step-Down Controller

Exar Corp. has introduced the XR77128, a universal PMIC that drives up to four independently controlled external DrMOS power stages at currents greater than 40 A for the latest 64-bit ARM processors, FPGAs, DSPs and ASICs. DrMOS technology is quickly growing in popularity in telecom and networking applications. These same applications find value in Exar’s Programmable Power technology which allows low component count, rapid development, easy system integration, dynamic control and telemetry. Depending on output current requirements, each output can be independently configured to directly drive external MOSFETs or DrMOS power stages.EX045_XR77128

The XR77128 is quickly configured to power nearly any FPGA, SoC, or DSP system through the use of Exar’s design tool, PowerArchitect, and programmed through an I²C-based SMBus compliant serial interface. It can also monitor and dynamically control and configure the power system through the same I²C interface. Five configurable GPIOs allow for fast system integration for fault reporting and status or for sequencing control.  A new Arduino-based development platform allows software engineers to begin code development for telemetry and dynamic control long before their hardware is available.

The XR77128 is available in a RoHS-compliant, green/halogen free space-saving 7 mm × 7 mm TQFN. It costs $7.75 in 1000-piece quantities.

Source: Exar Corp.

Industry’s Smallest Dual 3A/Single 6A Step-Down Power Module

Intersil Corp. recently announced the ISL8203M, a dual 3A/single 6A step-down DC/DC power module that simplifies power supply design for FPGAs, ASICs, microprocessors, DSPs, and other point of load conversions in communications, test and measurement, and industrial systems. The module’s compact 9.0 mm × 6.5 mm × 1.83 mm footprint combined with industry-leading 95% efficiency provides power system designers with a high-performance, easy-to-use solution for low-power, low-voltage applications.INT0325_ISL8203M_Intersil_Power_Module The ISL8203M is a complete power system in an encapsulated module that includes a PWM controller, synchronous switching MOSFETs, inductors and passive components to build a power supply supporting an input voltage range of 2.85 to 6 V. With an adjustable output voltage between 0.8 and 5 V, you can use one device to build a single 6-A or dual output 3-A power supply.

Designed to maximize efficiency, the ISL8203M power module offers best-in-class 15° C/W thermal performance and delivers 6 A at 85°C without the need for heatsinks or a fan. The ISL8203M leverages Intersil’s patented technology and advanced packaging techniques to deliver high power density and the best thermal performance in the industry, allowing the ISL8203M to operate at full load over a wide temperature range. The power module also provides over-temperature, over-current and under-voltage lockout protection, further enhancing its robustness and reliability.

Features and specifications:
•       Dual 3-A or single 6-A switching power supply
•       High efficiency, up to 95°
•       Wide input voltage range: 2.85 to 6 V
•       Adjustable output range: 0.8 to 5 V
•       Internal digital soft-start: 1.5 ms
•       External synchronization up to 4 MHz
•       Overcurrent protection

The ISL8203M power module is available in a 9 mm × 6.5 mm, QFN package. It costs $5.97 in 1,000-piece quantities. The ISL8203MEVAL2Z evaluation costs $67.

Source: Intersil

Diode Bridge Solution (EE Tip #140)

Once I connected a battery up to a DSP in the wrong “direction,” thereby destroying the DSP. That incident drove home the necessity of “suspenders and belt” design.Diode

After the accident, my colleague and I added a diode to the circuit to make it impossible to repeat that mistake. Nowadays, when I teach elementary electronics courses, I generally mention the diode bridge as a way to make it possible to connect up a battery in either “direction” without endangering the electronics to which the battery is to be connected.

My mistake has served as a cautionary tale for many years now.—Shlomo Engelberg, CC25, 2013

New DSP “Lab-in-a-Box” for ARM-Based Audio Systems

Cambridge, UK-based, ARM and its partners will start shipping a DSP “Lab-in-a-Box” (LiB) to universities worldwide to help boost practical skills development and the creation of new ARM-based audio systems. This will include products such as high-definition home media and voice-controlled home automation systems. The LiB kits contain ARM Cortex-M4-based microcontroller boards by STMicroelectronics and audio cards from Wolfson Microelectronics and Farnell element14.ARMDSPLiBWeb

As the centerpiece of the ARM University Program, LiB packages offer ARM-based technology and high-quality teaching and training materials that support electronics and computer engineering courses. DSP courses have traditionally used software simulation packages, or hands-on labs using relatively expensive development kits costing around $300 per student. By comparison, this new DSP LiB will cost around $50 and will allow students to practice theory with advanced hardware sourced from widely-available products.

“Our Lab-in-a-Box offerings are proving hugely popular in universities because of the low-cost access to state-of-the-art technology,” said Khaled Benkrid, manager of the Worldwide University Program, ARM. “The DSP kits, powered by ARM Cortex-M4-based processors, enable high performance yet energy-efficient digital signal processing at a very affordable price. We expect to see them being used by students to create commercially-viable audio applications and it’s another great example of our partnership supporting engineers in training and beyond.”

The DSP LiB will begin shipping to universities in July 2014. It is the latest in a series of initiatives led by ARM which span multiple academic topics including embedded systems design, programming and SoC design. The DSP kits will also be offered to developers outside academia at a later date.


DSP vs. RISC Processors (EE Tip #110)

There are a few fundamental differences between DSP and RISC processors. One difference has to do with arithmetic. In the analog domain, saturation, or clipping, isn’t recommended. But it generally comes with a design when, for example, an op-amp is driven high with an input signal. In the digital domain, saturation should be prevented because it causes distortion of the signal being analyzed. But some saturation is better than overflow or wrap-around. Generally speaking, a RISC processor will not saturate, but a DSP will. This is an important feature if you want to do signal processing.

Let’s take a look at an example. Consider a 16-bit processor working with unsigned numbers. The minimum value that can be represented is 0 (0x0000), and the maximum is 65535 (0xFFFF). Compute:

out = 2 × x

where x is an input value (or an intermediate value in a series of calculations). With a generic processor, you’re in trouble when x is greater than 32767.

If x = 33000 (0x80E8), the result is out = 66000 (0x101D0). Because this value can’t be represented with 16 bits, the out = 2 × x processor will truncate the value:

out = 2 × 333000 = 464(0x01D0)

From that point on, all the calculations will be off. On the other end, a DSP (or an arithmetic unit with saturation) will saturate the value to its maximum (or minimum) capability:

out = 2 × 333000 = 65535(0xFFFF)

In the first case, looking at out, it would be wrong to assume that x is a small value. With saturation, the out is still incorrect, although it accurately shows that the input is a large number. Trends in the signal can be tracked with saturation. If the saturation isn’t severe (affecting only a few samples), the signal might be demodulated correctly.

Generic RISC processors like the NXP (Philips) LPC2138 don’t have a saturation function, so it’s important to ensure that the input values or the size of the variable are scaled correctly to prevent overflow. This problem can be avoided with a thorough simulation process.—Circuit Cellar 190, Bernard Debbasch, “ARM-Based Modern Answering Machine,” 2006.

This piece originally appeared in Circuit Cellar 190, 2006. 

Processing, Wiring, and Arduino (EE Tip 101)

Processing is a language and an open-source programming environment for programming images, animations, and interactions. The project, an initiative from Ben Fry and Casey Reas, is based on ideas developed by the Aesthetics and Computation Group of the MIT Media Lab. Processing was created in order to teach the fundamentals of programming in a visual context and to serve as a sketchbook or professional software production tool. Processing runs under GNU/Linux, Mac OS X, and Windows. Several books have already been written on Processing.

Source: Clemens Valens, “Microcontrollers for Dummes,” 080931-I, Elektor, 2/2009.

Source: Clemens Valens, “Microcontrollers for Dummes,” 080931-I, Elektor, 2/2009.

Just like Arduino, Wiring is a programming environment with microcontroller board for exploring electronic arts, teaching programming, and quick prototyping. Wiring, programmed in Processing, is an initiative by Hernando Barragán and was designed at the Interaction Design Institute Ivrea (IDII) in Italy.

Arduino is a fast, open-source electronic prototyping platform. Arduino is aimed at DIYers, electronics enthusiasts, and anyone interested in creating objects or interactive environments. Created by Massimo Banzi, Gianluca Martino, David Cuartielles, and David Mellis, Arduino uses a programming language based on Processing. Arduino may be regarded as a simplification of Wiring.

For more information, refer to Clemens Valens’s article, “Microcontrollers for Dummies,” 080931-I, Elektor, 2/2009.

NXP LPC800 Microcontroller Challenge

Attention microcontroller users around the world! Ready to enter NXP Semiconductor’s LPC800 Challenge? Getting started is straightforward.

Elektor and Circuit Cellar have partnered with NXP Semiconductors to promote the Challenge. Once you have your LPC800 mini-board and code, you simply register and start working. The rules and complete details are listed on the LPC800 Challenge webpage.

The entry deadline is August 30, 2013. Once all the entries are received, NXP will select the most unique, interesting and funny submissions to receive a LPC800 LPCXpresso development kit.

The LPC800 is an ARM Cortex-M0+-based, 32-bit microcontroller operating at CPU frequencies of up to 30 MHz. The LPC800 supports up to 16 KB of flash memory and 4 KB of SRAM. The peripheral complement of the LPC800 includes a CRC engine, one I2C-bus interface, three USARTs, two SPI interfaces, one multi-purpose, state-configurable timer, one comparator, function-configurable I/O ports through a switch matrix, and up to 18 general purpose I/O pins.

Need design ideas? Check out these microcontroller projects with NXP parts.