About Circuit Cellar Staff

Circuit Cellar's editorial team comprises professional engineers, technical editors, and digital media specialists. You can reach the Editorial Department at editorial@circuitcellar.com, @circuitcellar, and facebook.com/circuitcellar

New I/O-Rich Embedded Computing Solutions

Diamond Systems recently unveiled the Eagle family rugged ARM SBCs and carrier boards.  Intended to work with the Toradex Apalis family of ARM computer-on-modules (CoMs), the Eagle family comprises two models—the full-size, full-featured Eagle and the smaller low-cost Eaglet.DiamondEagle

You can purchase a fully-configured off-the-shelf solution comprsing a select ARM module and heatsink. Anoher option is to the baseboard and ARM module separately for greater configuration flexibility and lower unit cost. Development kits are available that include the fully configured SBC, preconfigured Linux OS on a microSD card, and a full cable kit.

The Eagle/Eaglet family units feature long product lifetimes, configuration flexibility, and a wide range of I/O. The Eagle/Eaglet family with the Toradex Apalis family of ARM modules provides a scalable platform for embedded computing applications with interchangeable processors similar to the CoM Express concept. All CoMs in the Apalis Family are pin-compatible to ensure seamless platform upgrades. With Eagle, you can extend a product’s lifecycle by upgrading to a new Apalis module and installing Eaglet compact ARM Baseboard new driver software.

The Eagle SBC with installed ARM module and heatsink starts at $650. The Eaglet SBC in a similar configuration starts at $420. The Eagle baseboard single unit pricing is $450. The Eaglet baseboard single unit prices is $220. Shipments are expected to begin in December 2016.

Source: Diamond Systems

New Isolated Buck Transformers

Wurth Electronics Midcom recently launched a new series of isolated buck transformers for Maxim Integrated’s MAX17681 converter.  Built on self-shielding packages, the pick-and-placeable transformers have a small form factor and losses. The high-efficiency MAX17681 converter eliminates the need for optocoupler feedback circuits, it can deliver up to 3 W of output power.Wurth MID-IMAXIB

You can use the transformers in wide variety of applications, such as isolated fieldbus interfaces, PLC input/output modules, smart meters, medical equipment, and floating power supply generation. Free samples are available at www.we-online.com/midcom.

Source: Wurth Electronics

IAR Workbench Supports Next-Generation AVR MCUs

IAR Systems recently announced that its Embedded Workbench now supports a new generation of Microchip Technology 8-bit AVR microcontrollers. You can use Workbench with AVR microcontrollers to develop a wide range of low-power systems.

IAR Embedded Workbench’s features, benefits, and specs:

  • The compiler and debugger toolchain IAR Embedded Workbench incorporates the IAR C/C++ Compiler, which can create compact code for Microchip’s 8-bit AVR MCUs
  • IDE tools (editor, project manager, and library tools)
  • Build tools (compiler, assembler, and linker)
  • C-SPY debugger (simulator driver, hardware debugging, power debgging, and RTOS plugins
  • IAR Embedded Workbench offers full-scale support for AVR 32-bit MCUs as well as Microchip’s ARM®-based and 8051-based MCUs families.

Source: IAR Systems

Siemens to Acquire Mentor Graphics for $4.5 Billion

Siemens announced it will acquire Oregon, US-based Mentor Graphics for $4.5 billion in an effort to expand its reach into the automation and industrial software market.

“Combining Mentor’s technology leadership and deep customer relationships with Siemens’ global scale and resources will better enable us to serve the growing needs of our customers, and unlock additional significant opportunities for our employees,” said Walden C. Rhines, chairman and CEO of Mentor, in a release posted on November 14, 2016.

Source: Siemens

Electrical Engineering Crossword (Issue 317)

317 grid (key)


  1. ELEVENTH—Undenary
  2. POSITION—What does a linear sensor read?
  3. CALCULATOR—Herzstark’s Curta
  4. PETA—1015
  5. SHUNTREGULATOR—Stabilizes voltage fluctuations [two words]
  6. COPPER—Conductive trace material
  7. LUMEN—A lux is one of these per square meter
  9. ANNULUS—Little ring


  1. VARISTOR—Often used to suppress AC line spikes
  2. CHANGE—Delta
  3. RECKONER—Leibniz’s digital mechanical calculator
  4. DUT—To what does a scope probe connect test equipment?
  5. KERNEL—Nucleus
  6. DUCKING—A system for controlling one audio signal’s level with another
  7. SEVENTH—Septenary
  8. RMS—Crest factor is the ratio of peak value to which value?
  9. LOCKOUT—Prevent operation
  10. ROOT—Top directory
  11. TEMPORARY—Temporary Foo file
  12. REQUEST—System call

The Flow Coder

Products come and go. New products are developed all the time. So, what’s the key to success? John Dobson has successfully run Halifax, UK-based Matrix TSL 23 years. During that time, the company has gone through some changes. He recently gave Circuit Cellar a tour Matrix’s headquarters, shared a bit about the company’s history, and talked about product diversification.

Matrix started 23 years ago as a Matrix Multimedia, a CD-ROM publisher. “The Internet came along and destroyed that business, and we had to diversify, and so we diversified into electronics and into education in particular,” Dobson said.

Matrix’s flagship product is Flowcode software. “It basically uses flowcharts to allow people without a huge amount of coding experience to develop complex electronics systems,” Dobson explained. “Sometimes programming in C or other languages is a little complicated and time consuming. So Flowcode has a lot of components to it with libraries and things and lots of features that allow people to design complex electronic systems quickly.”

Today, while still focused on the education market, the latest version of Flowcode has about 3,000 industrial users. Dobson said many of the industrial users are test engineers whose specialty isn’t necessary coding.

Note: Circuit Cellar is currently running a Flowcode 7 promotion with Matrix TSL. Learn More

New USB 3.0 UVC Class Bridge ICs

FTDI Chip recently introduced a new series of USB 3.0 UVC class bridge ICs. The FT602 devices support streaming of video from HD camera equipment. Imaging systems that once could only deliver low-resolution material can now have improved video quality while still running at 60-fps frame rates.FTDIPR74 FTDI

The FT602 devices’ characteristics, benefits, and specs:

  • Improved performance while viewing captured imaging data via standard UVC-enabled hardware and common media player platforms
  • Plug-and-play implementationl; custom drivers aren’t required
  • Complements FTDI’s FT600 and FT601 capable of providing both USB 3.0 SuperSpeed (5 Gbps) and USB 2.0 High Speed (480 Mbps) interfacing
  • Key applications: surveillance/security, machine vision, home/building automation, metrology, and real-time microscopy

Source: FTDI Chip

Dialog Semiconductor & Energous Announce Wireless Charging Partnership

Dialog Semicondcutor recently announced it will be the exclusive supplier of Energous Corp.’s WattUp RF-based wireless charging ICs. As part of the partnership, Dialog will make a $10 million investment in Energous and work to help drive broader adoption of wireless charging in products such as smartphones, IoT devices, wearables, and more.

The partnership combines Energous’s uncoupled wireless charging technology and Dialog’s power-saving technologies. WattUp technology uses Dialog’s SmartBond Bluetooth low energy solution as the out-of-band communications channel between the wireless transmitter and receiver. Dialog’s power management technology then distributes power from the WattUp receiver IC to the rest of the device. Dialog’s AC/DC Rapid Charge power conversion technology delivers power to the wireless transmitter.

Sources: Dialog Semiconductor and Energous

New Sensor Technologies for Next-Gen Temperature Measurement

Melexis recently announced two new sensing technologies for next-generaration temperature measurement. The MLX90640 sensor array is an alternative to high-end thermal cameras. The MLX90342 is a quad thermocouple interface that addresses automotive sensing to 1300ºC.

The MLX90640 IR sensor arrays benefits, characteristics, and specs:

  • 32 × 24 pixels
  • –40° to 85°C operational temperature range; measures object temperatures from 240°C and 300°C
  • ±1°C target object temperature accuracy
  • Noise equivalent temperature difference (NETD) of 0.1K RMS at a 1-Hz refresh rate
  • Doesn’t require frequent recalibration
  • Field-of-view (FoV) options: 55° × 35° version and 110° × 75° wide-angle version
  • Compact, four-pin TO39 package incorporating the requisite optics
  • I2C-compatible digital interface
  • Target applications: fire prevention systems, HVAC equipment, smart buildings, and IP/surveillance systemsMLX90342 Melexis

The MLX90342 high-performance quadruple thermocouple interface benefits, characteristics, and specs:

  • Supports a –40° to 1300°C thermocouple temperature range
  • Operating temperature specification of –40° to 155°C
  • On-board cold junction compensation and linearization
  • Factory calibration; guaranteed intrinsic accuracy of ±5°C at 1100°C.
  • 26-pin 6 mm × 4 mm QFN package
  • 50-Hz Rapid refresh rate
  • Temperature data can be transmitted via a SENT Revision 3 digital interface
  • Target applications: turbo charger temperature control, exhaust gas recirculation, and diesel/gas particle filtering systems

Source: Melexis

Circuit Cellar Kindle Edition

CC Amazon KindleKindle fans, check this out! Circuit Cellar is now available on Kindle through Amazon’s Newsstand. Purchase the current issue, or save 54% with a Kindle subscription.

It’s never been easier to keep up with the latest embedded technologies, and now you can take your Circuit Cellar magazine with you on the go. With the new Kindle Edition, you can make notes, highlight key passages, and bookmark pages wherever you happen to be!

Act now! The subscription comes with a risk-free 30-day free trial period. Learn More

Circuit Cellar is a monthly magazine (print and digital) covering the topics of embedded hardware, embedded software, electrical engineering, and computer applications. Twelve times per year, Circuit Cellar reaches a diverse international readership of professionals, academics, and electronics specialists who work with embedded, MCU-related technologies on a regular basis. The editorial department’s goal is to assist each reader in becoming a well-rounded, multidisciplinary practitioner who can confidently bring innovative, cutting-edge engineering ideas to bear on any number of relevant tasks, problems, and technologies.

Arduino Program Timing

Ed Nisely explains how output pulses can reveal the progress of invisible firmware routines. After presenting a straightforward way to instrument your code, he covers the detailed timing produced by Arduino statements and functions.

While writing the Arduino program for the RGB LED lights mentioned in my May column (Circuit Cellar 310), I wondered how much time the floating-point trigonometric calculations required. Rather than wrap a software measurement around the code, I added a pair of instructions to flip an output bit, then watched the results on an oscilloscope. It’s a classic technique that helps you debug software when there’s no other way to see what’s going on inside your code or when elaborate tracing routines will disturb the firmware’s normal operation.

In this column, I’ll show a simple way to instrument your code, then take a look at the detailed timing produced by Arduino statements and functions. You’ll need an oscilloscope or logic analyzer for this technique, but even the least-expensive instruments will suffice.


Listing 1 shows the simplest Arduino program that produces a visible output. Those two lines toggle Pin 13, the LED found on nearly all Arduino boards, to form the 5.1 µs pulses in Photo 1, with each pulse marking one iteration of the loop() that executes continuously after finishing the configuration in the setup() section. Although the oscilloscope cursor readout provides three fractional digits, the true resolution is considerably worse, because each horizontal pixel covers 0.040 µs.

LISTING 1: The simplest possible Arduino program produces a single pulse on an output bit during each loop() iteration. Although the ATmega328 microcontroller can flip a bit with a single assembly language instruction, each of these high-level functions executes dozens of assembly instructions before and after the bit changes.

LISTING 1: The simplest possible Arduino program produces a single pulse on an output bit during each loop() iteration. Although the ATmega328 microcontroller can flip a bit with a single assembly language instruction, each of these high-level functions executes dozens of assembly instructions before and after the bit changes.

The Atmel ATmega328 microcontroller can toggle an output bit with a single instruction, which makes the digitalWrite() function in the Arduino runtime infrastructure seem overly elaborate: fifteen lines of code with a path length of 12 lines. Among other tasks, the code must select and verify the hardware port, produce a bitmask selecting the pin, handle the special case of a PWM pin, and disable interrupts while manipulating the port.

PHOTO 1 Each of the digitalWrite() functions producing this pulse requires 5.1 µs, roughly 50 instructions, on the 16 MHz ATmega328 microcontroller. The Arduino loop() adds 0.40 µs to the low portion of the waveform.

PHOTO 1: Each of the digitalWrite() functions producing this pulse requires 5.1 µs, roughly 50 instructions, on the 16 MHz ATmega328 microcontroller. The Arduino loop() adds 0.40 µs to the low portion of the waveform.

Homework: Find and examine the digitalWrite() function in the Arduino source code, then explain why all that additional logic isn’t optional.

The single AVR machine-level instruction that produces the waveform in Photo 1 is located near the end of the digitalWrite() function, with most of the execution time occurring before the output changes. The high part of the pulse therefore includes the short tail end of the first digitalWrite() and the longer beginning of the second, but the output pulse width shows the execution time through the complete function.

The 16 MHz crystal oscillator on the Arduino UNO clone board I used for these measurements produces a 62.5 ns instruction cycle, so each 5 µs pulse contains about 80 cycles. Most AVR arithmetic instructions require one or two cycles, branches require two or three, and subroutine CALL/RETURN pairs soak up eight, so assuming 1.6 cycles/instruction for short subroutines seems reasonable and allows you to figure the results in your head: 10 instructions per microsecond. That means the compiler translates the dozen high-level lines of code in the digitalWrite() function into 50 machine-level instructions.

Homework: Examine the compiler’s machine-level output to determine the actual number of instructions.

The low part of the pulse occurs as execution continues through the Arduino infrastructure as the loop() returns control to the first digitalWrite() line, adding 400 ns behind the scenes. That’s only six machine cycles, perhaps three or four machine instructions, and not much overhead at all.


Triggering your oscilloscope on the signal produced by Listing 1 should produce a steady display, but you’ll see “ghost” traces that seem to show missing pulses. Setting the trigger to produce single sweeps will eventually produce a display similar to Photo 2, with an obviously missing pulse.

PHOTO 2: A “missing pulse” occurs when a timer interrupt executes additional instructions that don’t appear in the user program. The interrupt can also occur when the pulse is high, causing an unexpectedly long pulse.

PHOTO 2: A “missing pulse” occurs when a timer interrupt executes additional instructions that don’t appear in the user program. The interrupt can also occur when the pulse is high, causing an unexpectedly long pulse.

Because the program’s logic (if you can call it that) lacks branches that could omit a pulse, the problem must lie elsewhere. Carefully examining the pulse timings shows that there’s not quite enough time for another pulse in that gap, which means the extended time came from a delay, rather than an omission.

The Arduino infrastructure includes a millis() function that reports the elapsed time in milliseconds since the microcontroller emerged from its most recent reset. A timer interrupt occurs every millisecond, with the interrupt handler updating a counter that the millis() function returns to the caller in a four byte unsigned long integer.

Because the loop() in Listing 1 iterates every 10.4 µs, the timer interrupt will occur once in every 96 pulses, stretching either the high or low part of the pulse. The advantage of an oscilloscope should be obvious: a problem that occurs 1% of the time might not appear amid all the “correct” values shown by a simple software measurement.

The if() statement in Listing 2 determines whether the return value from millis() has changed and, if so, produces a pulse on Pin 11. The lower trace in Photo 3 shows that pulse, with the oscilloscope triggering a single sweep on that pin and the trigger point at the middle of the screen. The upper trace comes from Pin 13, as before, and shows the same “missing” pulse due to the timer interrupt handler.

LISTING 2: The millis() function returns the number of milliseconds since the microcontroller emerged from the most recent reset. The comparison will be false 98.7% of the time, but that test adds 2 µs to the average loop() time.

LISTING 2: The millis() function returns the number of milliseconds since the microcontroller emerged from the most recent reset. The comparison will be false 98.7% of the time, but that test adds 2 µs to the average loop() time.

The cursors bracketing the 7.4 µs pulse in the upper trace show that the if() statement adds 2.3 µs to the execution time of the code in Listing 1, even when the value of millis() doesn’t change. The CPU uses those 35 clock cycles and two dozen instructions to call the millis() function, test its return value, then branch around the code inside the conditional block. You can see the effect of every instruction at this time scale!

PHOTO 3: The pulse in the lower trace shows that the “missing pulse” occurs when the return value of the millis() function changes. Testing the millis() value increases the loop() duration, as shown comparing the pulses in the top trace to those in Photo 2.

PHOTO 3: The pulse in the lower trace shows that the “missing pulse” occurs when the return value of the millis() function changes. Testing the millis() value increases the loop() duration, as shown comparing the pulses in the top trace to those in Photo 2.

The long pulse in the middle of the upper trace shows what happens just after the timer interrupt occurs: detecting the change, generating the sync pulse in the lower trace, and updating the Millis_Previous variable requires 22 µs, roughly 15 µs and 150 instructions more than the previous code.

A logic analyzer can trigger a capture based on the Boolean combination of many inputs, a situation that depends on having access to all those signals. A microcontroller buries those signals inside the CPU, where combining them into a trigger requires software, rather than hardware. A similar situation occurs with gate array logic, where a dab of additional logic inside an FPGA can generate suitable triggers, if you have a spare output pin, and may be the only way to isolate elusive glitches due to combinations that occur so rarely as to be invisible.

Homework: Move the statement that updates Millis_Previous between the two digitalWrite() functions, then measure the change in pulse width to determine the time required to update that variable.

As the number of statements inside the loop() increases, the likelihood that the timer interrupt will occur during the program also increases. This won’t make any difference to most programs, but when you’re watching a pulse on the oscilloscope, you don’t want a timer interrupt disturbing your measurements. The code in the next few examples will disable all interrupts just before raising the timing pulse and enable them after lowering it, forcing the timer interrupt to occur outside the critical section.

Download the entire article. This article appeared in Circuit Cellar 316 November 2016.

Ed Nisley is an electrical engineer and author in Poughkeepsie, NY. He has been writing for Circuit Cellar since Circuit Cellar 1, 1988. His regular column, “Above the Ground Plane,” appears every other month in Circuit Cellar magazine.

Sensor-to-Cloud Kit for Developing IoT Applications

Interested in developing cloud-connected wireless sensing products? Silicon Labs recently introduced its Thunderboard Sense Kit for developing cloud-connected devices with multiple sensing and connectivity options. The “inspiration kit” provides you with all the hardware and software needed to develop battery-powered wireless sensor nodes for the IoT.

The Thunderboard Sense Kit’s features and benefits:

  • Silicon Labs EFR32 Mighty Gecko multiprotocol wireless SoC with a 2.4-GHz chip antenna
  • ARM Cortex-M4 processor-based
  • Supports Bluetooth low energy, ZigBee, Thread, and proprietary protocols
  • Silicon Labs EFM8 Sleepy Bee microcontroller enabling fine-grained power control
  • Silicon Labs Si7021 relative humidity and temperature sensor
  • Silicon Labs Si1133 UV index and ambient light sensor
  • Bosch Sensortec BMP280 barometric pressure sensor
  • Cambridge CCS811 indoor air quality gas sensor
  • InvenSense ICM-20648 six-axis inertial sensor
  • Knowles SPV1840 MEMS microphone
  • Four high-brightness RGB LEDs
  • On-board SEGGER J-Link debugger for easy programming and debugging
  • USB Micro-B connector with virtual COM port and debug access
  • Mini Simplicity connector to access energy profiling and wireless network debugging
  • 20 breakout pins to connect to external breadboard hardware
  • CR2032 coin cell battery connector and external battery connector
  • Silicon Labs’s Simplicity Studio tools support the Thunderboard Sense

The Thunderboard Sense kit (SLTB001A) costs $36. All hardware schematics, open-source design files, mobile apps, and cloud software are included for free.

Source: Silicon Labs

Ultra-Small hSensor Platform for Wearable Apps

Maxim Integrated Products’s ultra-small hSensor Platform enables you to quickly develop wearable fitness and wellness-related prototypes. With it, you have all the necessary hardware on one PCB along with readily-accessible hardware functionality with the ARM mbed hardware development kit (HDK).Maxim health sensor

The hSensor Platform (MAXREFDES100# reference design) comprises an hSensor board that comes complete firmware with drivers, a debugger board, and a graphical user interface (GUI). The platform enables you to load algorithms for different applications.

The hSensor Platform includes the following: a MAX30003 ultra-low power, single-channel integrated biopotential AFE; a MAX30101 high-sensitivity pulse oximeter and heart-rate sensor; a MAX30205 clinical-grade temperature sensor; a MAX32620 ultra-low power ARM Cortex-M4F microcontroller optimized for wearables; a MAX14720 power management integrated circuit (PMIC); inertial sensors (three-axis accelerometer, six-axis accelerometer/gyroscope); a barometric pressure sensor; flash memory; and a Bluetooth Low Energy (BLE) radio.

The MAXREFDES100# costs $150. Hardware and firmware files are free.

Source: Maxim Integrated Products

New Ready-to-Use Wireless PCB Antennas

Pulse Electronics recently introduced three design-ready, standard, wireless printed circuit board antennas. Intended for tablets, laptops, and mobile devices, the SH0319D/E/W antenna family provides wireless signal reception ranging from dual bands to multibands covering GPS, Glonass, WLAN/dual-band WIFI, and GSM900/1800. Pulse Elect antenna

The SH0319D and SH0319E are flexible dual-band, coaxial feed antennas with a single feed point that cover 2.4- and 5-GHz frequencies. The antenna size is 8 mm × 15 mm × 1.08 mm (W x L x H) with a total size of 38 mm × 15 mm × 1.08 mm. The SW0159W is a coaxial feed multiband GPS/WLAN and GSM900/1800 antenna that covers frequency ranges of 1.5/2.4 GHz, 5 GHz, and 900/1,800 MHz. It has dual feed points. The antenna size is 70 mm × 10 mm × 1 mm with a total size of 70 mm × 15 mm × 1 mm.


Source: Pulse Electronics

Human Vision Image-Sensing System Provides 10× Faster Recognition

Mouser Electronics is now offering Omron Electronic Components’s fully integrated B5T HVC-P2 face detection sensor modules. The Human Vision Component (HVC) plug-in modules are based on Omron’s OKAO Vision Image Sensing Technology, which is used to quickly and accurately detect human bodies and faces.Omron Image Sensors

Well suite for a variety of IoT applications, the face detection sensor modules comprise a camera and a separate main board that are connected via a flexible flat cable, which enables you to install it on the edge of a flat display unit. The boards feature UART and USB interfaces to control the module and send the data output (as no image output, 160 × 120 pixels, or 320 × 240 pixels) to an external system.

Available in both wide-angle (90-degree lens) and long-distance lenses (50-degree lens), the B5T HVC-P2 modules can detect a human body up to four times per second. The long-distance module can detect and presume attributes (e.g., gender and age, sight line, and facial expression) from a maximum distance of 3 m. The wide-angle module can cover an area 100 cm × 75 cm from a distance of 50 cm.

Source: Mouser Electronics