Software Aids STM32 MCU System Development

STMicroelectronics has extended its STM32 software ecosystem with a Sigfox package that simplifies development and gives extra flexibility to connect Internet-of-Things (IoT) devices to long-range, low-power wireless networks. The new X-CUBE-SFOX package is ready to use with ST’s B-L072Z-LRWAN1 Discovery Kit, which is already LoRa enabled through I-CUBE-LRWAN embedded software. Developers can now work with either of these established Low-Power Wide Area Network (LPWAN) technologies on the same hardware, and create products that can use the two protocols individually or alternatively.

The Discovery Kit features the Murata CMWX1ZZABZ-091 module powered by an STM32L072 microcontroller, a sub-GHz radio transceiver SX1276 from Semtech, and is expandable via Arduino headers to add sensors or other IoT-device functions and capabilities. X-CUBE-SFOX contains a complete set of Sigfox libraries and application examples for the STM32L0, and can be ported to other microcontrollers in the STM32 family.

With over 700 STM32 variants, from ultra-low-power to high-performance lines, developers can leverage unrivaled flexibility to optimize the performance and features of IoT devices that take advantage of Sigfox services including basic connectivity, radio recognition, and GPS-free location. The software’s low memory footprint and efficient CPU utilization minimize demand for system resources, helping to lower bill-of-materials (BOM) costs and power consumption.

The X-CUBE-SFOX software can be downloaded free of charge from www.st.com/x-cube-sfox. The B-L072Z-LRWAN1 Discovery Kit is available now, priced $46.50.

STMicroelectronics | www.st.com

April Circuit Cellar: Sneak Preview

The April issue of Circuit Cellar magazine is coming soon. And we’ve got a healthy serving of embedded electronics articles for you. Here’s a sneak peak.

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

 

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

NAVIGATING THE INTERNET-OF-THINGS

IoT: From Gateway to Cloud
In this follow on to our March “IoT: Device to Gateway” feature, this time we look at technologies and solutions for the gateway to cloud side of IoT.  Circuit Cellar Chief Editor Jeff Child examines the tools and services available to get a cloud-connected IoT implementation up and running.

Texting and IoT Embedded Devices (Part 2)
In Part 1, Jeff Bachiochi laid the groundwork for describing a project involving texting. He puts that into action this, showing how to create messages on his Espressif System’s ESP8266EX-based device to be sent to an email account and end up with those messages going as texts to a cell phone.

Internet of Things Security (Part 2)
In this next part of his article series on IoT security, Bob Japenga takes a look at side-channel attacks. What are they? How much of a threat are they? And how can we prevent them?

Product Focus: 32-Bit Microcontrollers
As the workhorse of today’s embedded systems, 32-bit microcontrollers serve a wide variety of embedded applications—including the IoT. This Product Focus section updates readers on these trends and provides a product album of representative 32-bit MCU products.

GRAPHICS, VISION AND DISPLAYS

Graphics, Video and Displays
Thanks to advances in displays and innovations in graphics ICs, embedded systems can now routinely feature sophisticated graphical user interfaces. Circuit Cellar Chief Editor Jeff Child dives into the latest technology trends and product developments in graphics, video and displays.

Color Recognition and Segmentation in Real-time
Vision systems used to require big, multi-board systems—but not anymore. Learn how two Cornell undergraduates designed a hardware/software system that accelerates vision-based object recognition and tracking using an FPGA SoC. They made a min manufacturing line to demonstrate how their system can accurately track and categorize manufactured candies carried along a conveyor belt.

SPECIFICATIONS, QUALIFICATIONS AND MORE

Component tolerance
We perhaps take for granted sometimes that the tolerances of our electronic components fit the needs of our designs. In this article, Robert Lacoste takes a deep look into the subject of tolerances, using the simple resistor as an example. He goes through the math to help you better understand accuracy and drift along with other factors.

Understanding the Temperature Coefficient of Resistance
Temperature coefficient of resistance (TCR) is the calculation of a relative change of resistance per degree of temperature change. Even though it’s an important spec, different resistor manufacturers use different methods for defining TCR. In this article, Molly Bakewell Chamberlin examines TCR and its “best practice” interpretations using Vishay Precision Group’s vast experience in high-precision resistors.

Designing of Complex Systems
While some commercial software gets away without much qualification during development, the situation is very different when safety in involved. For aircraft, vehicles or any complex system where failure unacceptable, this means adhering to established standards throughout the development life cycle. In this article, George Novacek tackles these issues and examines some of these standards namely ARP4754.

AND MORE IN-DEPTH PROJECT ARTICLES

Build a Marginal Oscillator Proximity Switch
A damped or marginal oscillator will switch off when energy is siphoned from its resonant LC tank circuit. In his article, Dev Gualtieri presents a simple marginal oscillator that detects proximity to a small steel screw or steel plate. It lights an LED, and the LED can be part of an optically-isolated solid-state relay.

Obsolescence-Proof Your UI (Part 1)
After years of frustration dealing with graphical interface technologies that go obsolete, Steve Hendrix decided there must be a better way. Knowing that web browser technology is likely to be with us for a long while, he chose to build a web server that could perform common operations that he needed on the IEEE-488 bus. He then built it as a product available for sale to others—and it is basically obsolescence-proof.

 

 

Texting and IoT Embedded Devices (Part 1)

Fun with the ESP8266 SoC

Can texting be leveraged for use in IoT Wi-Fi devices? Jeff has been using Wi-Fi widgets for a lot of IoT projects lately. This month Jeff lays the groundwork for describing a project that will involve texting. He starts off with a look at Espressif System’s ESP8266EX SoC.

By Jeff Bachiochi

Believe it or not, texting while driving as of this writing is still legal in a few states. About 10% of all motor vehicles deaths in the US can be traced back to distracted drivers. Granted that includes any distraction—however cell phone distraction has quickly become a serious issue. While hazards exist for any technology, common sense should tell you this is a dangerous act.

When the technology is used correctly, texting can deliver essential information quickly—without requiring both (or many) parties to be active at the same time. This allows you to make better use of your time. I still use email for much of my correspondence, however it’s great to be able to send your spouse a text to add milk to the grocery list—after they’ve already left for the store! And even though I chuckle when I see two people sitting next to each other texting, it is a sad commentary on emerging lifestyles.

I’ve been using Wi-Fi widgets for a lot of IoT projects lately. The cost to enter the fray is low, and with free tools it’s easy to get started. This month’s article is a about a project that will involve text, even though that may not be apparent at first. Let’s start off slowly, laying the groundwork for those who have been thinking about building this kind of project. We’ll then quickly build from this foundation into crafting a useful gadget.

A Look at the ESP8266EX

The innovative team of chip-design specialists, software/firmware developers and marketers at Espressif System developed and manufactures the ESP8266EX system-on-chip (SoC). This 32-bit processor runs at 80 MHz and embeds 2.4 GHz Wi-Fi functionality—802.11 b/g/n, supporting WPA/WPA2—as well as the normal gamut of general-purpose I/O and peripherals. It has a 64 KB boot ROM, 64 KB instruction RAM and 96 KB data RAM. Their WROOM module integrates the ESP8266 with a serial EEPROM and an RF front end with a PCB antenna for a complete IoT interface.

Anyone who has ever used a dial-up modem is most likely familiar with the term AT command set. The Hayes command set is a specific command language originally developed in 1981 by Dennis Hayes for the Hayes 300 baud Smartmodem. Each command in the set begins with the letters AT+ followed by a command word used for high-level control of internal functions. For the modem these enabled tasks like dialing the phone or sending data. As an application for the WROOM, an AT command set seemed like a perfect match. This allows an embedded designer to use the device to achieve a goal without ever having to “get their hands dirty.”

This photo shows the ESP-01 and ESP-07 modules along with the FTDI 232 USB-to-serial converter used for programming either module.

I first learned of the ESP8266 years ago and purchased the ESP-01 on eBay. It was around $5 at the time (Photo 1). I used it along with the MEGA 2560—my favorite Arduino module because of its high number of I/Os and multiple hardware UARTs. With the ESP-01 connected to a serial port on an Arduino, an application could directly talk with the ESP-01 and get the Arduino connected to your LAN. From this point, the world is under your control thanks to the AT Wi-Fi and TCP commands.

The ESP8266 literature states the Wi-Fi stack only requires about 20% of the processing power. Meanwhile, 80% is still available for user application programming and development.
So why not eliminate the Arduino’s Atmel processor altogether and put your Arduino code right in the 8266? Espressif Systems has an SDK and while it provides a development and programming environment, the Arduino IDE is comfortable for many. And it offers the installation of third-party platform packages using the Boards Manager. That means you can add support for the ESP8266EX and use much of the code you’ve already written.

Using the ESP-01

Since the ESP-01 has only 8 pins, adding the necessary hardware is pretty simple. This low power device runs on 2.5 V to 3.6 V, so you must make appropriate level corrections if you wish to use it with 5 V devices like Arduino boards. …

Read the full article in the March 332 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.

IoT: From Device to Gateway

Modules for the Edge

Connecting to the IoT edge requires highly integrated technology, blending wireless connectivity and intelligence. Feeding those needs, a variety of IoT modules have emerged that offer pre-certified solutions that are ready to use.

By Jeff Child, Editor-in-Chief

he Internet of Things (IoT) is one of the most dynamic areas of embedded systems design today. Opportunities are huge as organizations large and small work to develop IoT implementations. IoT implementations are generally comprised of three main parts: the devices in the field, the cloud and the network (gateways) linking them together. This article focuses on the “things” side—in other words, the smart, connected edge devices of the IoT. For more on IoT gateways, see “IoT Gateway Advances Take Diverse Paths“ (Circuit Cellar 328, November 2017).

Because this sub-segment of technology is growing and changing so fast, it’s impossible to get a handle on everything that’s happening. The scope that comprises IoT edge devices includes a combination of embedded processors and microcontrollers that provide intelligence. It also includes various wireless, cellular and other connectivity solutions to connect to the network. And it includes sensors to collect data and battery technologies to keep the devices running.

Connecting the various nodes of an IoT implementation can involve a number of wired and wireless network technologies. But it’s rare that an IoT system can be completely hardwired end to end. Most IoT systems of any large scale depend on a variety of wireless technologies including Wi-Fi, Bluetooth, Zigbee and even cellular networking.

What’s most interesting among all that, are not those individual pieces themselves, but rather an emerging crop of modular IoT products that combine intelligence and connectivity, while also taking on the vital certifications needed to get IoT implementations up and running. With all that in mind, the last 12 months have seen an interesting mix of module-based products aimed directly at IoT.

Certified IoT Modules

Exemplifying those trends, in September 2017, STMicroelectronics (ST)introduced the SPBTLE-1S, a ready-to-use Bluetooth Low Energy (BLE) module that integrates all the components needed to complete the radio subsystem (Photo 1). The BLE module integrates ST’s proven BlueNRG-1 application-processor SoC and balun, high-frequency oscillators and a chip antenna.

Photo 1
The SPBTLE-1S is a BLE module that integrates all the components needed to complete the radio subsystem. It’s BQE-approved, and FCC, IC and CE-RED certified to simplify end-product approval for North America and EU markets.

Developers can use this module to bypass hardware design and RF-circuit layout challenges. The SPBTLE-1S is BQE-approved, and FCC, IC and CE-RED (Radio Equipment Directive) certified to simplify end-product approval for North America and EU markets. ST’s Bluetooth 4.2 certified BLE protocol stack is included, and the supporting Software-Development Kit (SDK) contains a wide range of Bluetooth profiles and sample application code.

The device is packaged in a space-efficient 11.5 mm x 13.5 mm outline and has a wide supply-voltage range of 1.7 V to 3.6 V. The SPBTLE-1S module is well suited for small, battery-operated objects powered by various types of sources such as a primary button cell or rechargeable Li-ion battery. High RF output power of +5 dBm and good receiver sensitivity help to maximize communication range and reliability.

The BlueNRG-1 SoC at the heart of the SPBTLE-1S implements the complete BLE physical layer (PHY), link layer and network/application-processing engine comprising a low-power ARM Cortex-M0 core with 160 KB flash, 24 KB RAM with data retention and a security co-processor. The SoC also implements smart power management, with a DC/DC converter capable of powering the SPBTLE-1S module to ensure optimum energy efficiency. Users can leverage an extensive set of interfaces, including a UART, two I²C ports, SPI port, single-wire debug and 14 GPIOs, as well as peripherals including two multifunction timers, a 10-bit ADC, watchdog timer and real-time clock and a DMA controller. There is also a PDM stream processor interface, which is ideal for developing voice-controlled applications.

IoT Module for Development

Riding the IoT wave, all the major microcontroller vendors have beefed up their module-based IoT solutions in order to make it easier for developers to design in their MCUs. One example along those lines is the LPC54018 IoT module, developed by NXP in partnership with Embedded Artists. …

Read the full article in the March 332 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.

MPU-Based SOM Meets Industrial IoT Linux Needs

Microchip Technology has unveiled a new System on Module (SOM) featuring the SAMA5D2 microprocessor (MPU). The ATSAMA5D27-SOM1 contains the recently released ATSAMA5D27C-D1G-CU System in Package (SiP). The SOM simplifies IoT design by integrating the power management, non-volatile boot memory, Ethernet PHY and high-speed DDR2 memory onto a small, single-sided printed circuit board (PCB). There is a great deal of design effort and complexity associated with creating an industrial-grade MPU-based system running a Linux operating system. Even developers with expertise in the area spend a lot of time on PCB layout to guarantee signal integrity for the high-speed interfaces to DDR memory and PHY while complying with EMC standards.

The SAMA5D2 family of products provides an extremely flexible design experience no matter the level of expertise. For example, the SOM—which integrates multiple external components and eliminates key design challenges around EMI, ESD and signal integrity—can be used to expedite development time. Customers can solder the SOM to their board and take it to production, or it can be used as a reference design along with the free schematics, design and Gerber files and complete bill of materials which are available online. Customers can also transition from the SOM to the SiP or the MPU itself, depending on their design needs. All products are backed by Microchip’s customer-driven obsolescence policy which ensures availability to customers for as long as needed.

The Arm Cortex-A5-based SAMA5D2 SiP, mounted on the SOM PCB or available separately, integrates 1 Gbit of DDR2 memory, further simplifying the design by removing the high- speed memory interface constraints from the PCB. The impedance matching is done in the package, not manually during development, so the system will function properly at normal and low- speed operation. Three DDR2 memory sizes (128 Mb, 512 Mb and 1 Gb) are available for the SAMA5D2 SiP and optimized for bare metal, RTOS and Linux implementations.

Microchip customers developing Linux-based applications have access to the largest set of device drivers, middleware and application layers for the embedded market at no charge. All of Microchip’s Linux development code for the SiP and SOM are mainlined in the Linux communities. This results in solutions where customers can connect external devices, for which drivers are mainlined, to the SOM and SIP with minimal software development.

The SAMA5D2 family features the highest levels of security in the industry, including PCI compliance, providing an excellent platform for customers to create secured designs. With integrated Arm TrustZone and capabilities for tamper detection, secure data and program storage, hardware encryption engine, secure boot and more, customers can work with Microchip’s security experts to evaluate their security needs and implement the level of protection that’s right for their design. The SAMA5D2 SOM also contains Microchip’s QSPI NOR Flash memory, a Power Management Integrated Circuit (PMIC), an Ethernet PHY and serial EEPROM memory with a Media Access Control (MAC) address to expand design options.

The SOM1-EK1 development board provides a convenient evaluation platform for both the SOM and the SiP. A free Board Support Package (BSP) includes the Linux kernel and drivers for the MPU peripherals and integrated circuits on the SOM. Schematics and Gerber files for the SOM are also available.

The ATSAMA5D2 SiP is available in four variants starting with the ATSAMA5D225C-D1M- CU in a 196-lead BGA package for $8.62 each in 10,000 units. The ATSAMA5D27-SOM1 is available now for $39.00 each in 100 units The ATSAMA5D27-SOM1-EK1 development board is available for $245.00.

Microchip Technology | www.microchip.com

Exploring the ESP32’s Peripheral Blocks

For IoT or Home Control

What makes an embedded processor suitable as an IoT or home control device? Wi-Fi support is just part of the picture. Brian has done some Wi-Fi projects using the ESP32, so here he shares his insights about the peripherals on the ESP32 and why they’re so powerful.

By Brian Millier

If you’re interested in IoT or home control devices, you’ve undoubtedly run across Espressif’s ESP8266. The embedded processor became ubiquitous in a very short time. The successor to the ESP8266 is the ESP32 and it’s much more powerful. Like the ESP8266, the ESP32 has on chip Wi-Fi. But it also includes Bluetooth Low Energy (BLE) and sports two high-power cores in place of the single one found on the ESP8266.

Having two main cores means one can run the wireless protocol stack on one core, leaving the other core free for the user application program. In fact, Espressif labels the cores “App” and “Pro”, with the latter referring to the Wi-Fi Protocol stack. This feature allows the application program to run without having to worry too much about how much execution time will be needed to handle the incoming/outgoing Wi-Fi data stream (which is hard to reliably predict, due to its asynchronous nature).

However, in addition to the dual cores, the ESP32 is also blessed with many unique peripheral blocks—most of which operate at a high level and thus require little or no MCU intervention during normal operation. This makes it much easier to write code for projects that have time-critical I/O operations. To appreciate the versatility of the ESP32’s peripheral function blocks, you have to dig into its Technical Reference Manual (TRM). At less than 600 pages, the ESP32’s TRM is somewhat leaner than most new 32-bit MCUs, so I didn’t mind studying it.

The ESP32 has been integrated into the Arduino IDE, and therefore Arduino
Wi-Fi, webserver, web client and UDP client libraries are available. I’ve done a few ESP32 Wi-Fi projects using these libraries, and found them to be straightforward. With all that in mind, in this article I am going to concentrate on three peripheral blocks that I consider to be very powerful and useful. I’ll present some code examples and custom libraries that I have written that make use of these peripherals—sometimes in ways that are different from their intended use).

The three peripheral blocks that I’ll be covering are:

  1. The Remote Control peripheral
  2. The Pulse Counter peripheral
  3. The LEDC controller peripheral

I’ll also briefly discuss the I2S and DAC/Cosine Generator blocks and provide some routines that enable you to generate some useful signals using these blocks.
The most serious work being done with the ESP32 centers on Espressif’s own IDF/C toolchain. But many people prefer to use the Arduino libraries developed for the ESP32, because they are accustomed to using it with many different MCUs—like AVR, ARM and ESP8266/32. Personally, I use the Visual Micro add-in to Visual Studio. It provides a much more professional development environment, while still using the Arduino tool-chain “under the hood.” All references to library files/folders or sample programs can be found on Circuit Cellar’s article materials webpage.

Figure 1
This is a simplified block diagram of the ESP32 Remote Controller peripheral.


Remote Controller Peripheral

This peripheral is rather unique among the MCUs that I have encountered. Its function is twofold:

  1. Transmitting IR signals such as used by IR remote controls
  2. Receiving IR signals from IR remote controls

IR remotes don’t send data in the same way that UARTs, SPI and I2C ports do. In other words, they don’t structure the data with each bit taking a specific amount of time. Instead, a “1” bit will consist of a burst of IR light for a specific time, followed by a specific period of no light. A “0” bit will define different periods of time for either the IR pulse, the space or sometimes both. To complicate matters, the IR light pulses are always amplitude modulated by some carrier frequency (in the 25-60 kHz range)..

Read the full article in the March 332 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.

March Circuit Cellar: Sneak Preview

The March issue of Circuit Cellar magazine is coming soon. And we’ve got a healthy serving of embedded electronics articles for you. Here’s a sneak peak.

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

 

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

TECHNOLOGY FOR THE INTERNET-OF-THINGS

IoT: From Device to Gateway
The Internet of Things (IoT) is one of the most dynamic areas of embedded systems design today. This feature focuses on the technologies and products from edge IoT devices up to IoT gateways. Circuit Cellar Chief Editor Jeff Child examines the wireless technologies, sensors, edge devices and IoT gateway technologies at the center of this phenomenon.

Texting and IoT Embedded Devices
Texting has become a huge part of our daily lives. But can texting be leveraged for use in IoT Wi-Fi devices? Jeff Bachiochi lays the groundwork for describing a project that will involve texting. In this part, he gets into out the details for getting started with a look at Espressif System’s ESP8266EX SoC.

Exploring the ESP32’s Peripheral Blocks
What makes an embedded processor suitable as an IoT or home control device? Wi-Fi support is just part of the picture. Brian Millier has done some Wi-Fi projects using the ESP32, so here he shares his insights about the peripherals on the ESP32 and why they’re so powerful.

MICROCONTROLLERS HERE, THERE & EVERYWHERE

Designing a Home Cleaning Robot (Part 4)
In this final part of his four-part article series about building a home cleaning robot, Nishant Mittal discusses the firmware part of the system and gets into the system’s actual operation. The robot is based on Cypress Semiconductor’s PSoC microcontroller.

Apartment Entry System Uses PIC32
Learn how a Cornell undergraduate built a system that enables an apartment resident to enter when keys are lost or to grant access to a guest when there’s no one home. The system consists of a microphone connected to a Microchip PIC32 MCU that controls a push solenoid to actuate the unlock button.

Posture Corrector Leverages Bluetooth
Learn how these Cornell students built a posture corrector that helps remind you to sit up straight. Using vibration and visual cues, this wearable device is paired with a phone app and makes use of Bluetooth and Microchip PIC32 technology.

INTERACTING WITH THE ANALOG WORLD

Product Focus: ADCs and DACs
Makers of analog ICs are constantly evolving their DAC and ADC chips pushing the barriers of resolution and speeds. This new Product Focus section updates readers on this technology and provides a product album of representative ADC and DAC products.

Stepper Motor Waveforms
Using inexpensive microcontrollers, motor drivers, stepper motors and other hardware, columnist Ed Nisley built himself a Computer Numeric Control (CNC) machines. In this article Ed examines how the CNC’s stepper motors perform, then pushes one well beyond its normal limits.

Measuring Acceleration
Sensors are a fundamental part of what make smart machines smart. And accelerometers are one of the most important of these. In this article, George Novacek examines the principles behind accelerometers and how the technology works.

SOFTWARE TOOLS AND PROTOTYPING

Trace and Code Coverage Tools
Today it’s not uncommon for embedded devices to have millions of lines of software code. Trace and code coverage tools have kept pace with these demands making it easier for embedded developers to analyze, debug and verify complex embedded software. Circuit Cellar Chief Editor Jeff Child explores the latest technology trends and product developments in trace and code coverage tools.

Manual Pick-n-Place Assembly Helper
Prototyping embedded systems is an important part of the development cycle. In this article, Colin O’Flynn presents an open-source tool that helps you assemble prototype devices by making the placement process even easier.

TRACE32 Extends embOS Awareness to the Renesas RH850

Lauterbach has announced that it has extended the kernel awareness for the embOS RTOS from SEGGER Microcontroller to the RH850 Family of microprocessors from Renesas Electronics. TRACE32, the class leading debug tools from Lauterbach, already supports embOS on ARM, PowerPC, RX, SH and NIOS-II families and this tried and tested technology has now been extended to include RH850.

The embOS awareness plugin for TRACE32 allows the developer to visualise RTOS resources and objects such as task lists, mailboxes, timers and semaphores. Developers are free to investigate interrupt routines, drivers and application code all from within the familiar environment of TRACE32. When the awareness is configured, extra features become available, for instance the setting of task aware breakpoints.

All MPUs of the RH850 Family provide dedicated counter registers which can be accessed non-intrusively by the TRACE32 debugger. These can be configured to display minimum, maximum and mean runtimes for a user marked block of code or the runtimes of various tasks in the embOS system. If the target provides off-chip trace capabilities, TRACE32 can record processor cycles and can be configured to collect data on task switches. Using this information, a detailed analysis of the program history, including task switches, can be viewed.

All features of the TRACE32 awareness for embOS do not require any additional target configuration or any hooks or patches within the RTOS itself. The philosophy of TRACE32 is for the application to behave exactly the same in the debug environment as on the final product; only this way can 100% certainty of testing be achieved.

Lauterbach | www.lauterbach.com

Money Sorting Machines (Part 3)

Bill Validation

In this final article of his money sorting machine series, Jeff wraps up his coin sorting project and examines how a bill validator can tell one bill’s denomination from another.

By Jeff Bachiochi

Most of us connect Ben Franklin with kites and lightning. He was also a printer and might be best known for Poor Richard’s Almanack—a yearly publication that he published from 1732 to 1758 under the pseudonym of Richard Saunders. It was a best-seller and thanks to his wit and wisdom, his portrait was added to the cover of The Old Farmer’s Almanac in 1851—appearing opposite the founder Robert B. Thomas. It remains there today.

As a master printer and engraver, in 1730 Franklin began printing all paper money issued by Pennsylvania, New Jersey and Delaware. Paper money was first introduced in the region in 1723, but it remained a hot political issue. That’s because it helped farmers and tradesmen, while merchants and landowners wanted it eliminated or limited in its circulation. Paper money printed from ordinary type was easy to counterfeit, but Ben’s ingenuity solved that problem by printing pictures of leaves on every piece of money. Counterfeiters could not duplicate—or even imitate—the fine lines and irregular patterns. The process by which he made the printing plates was secret, but were probably cast in type metal from molds made by pressing leaves into plaster of Paris. There began the Feds vigilant effort to thwart counterfeiters.

Today every aspect of our paper currency is controlled—from its design to its printing, as well as its monitoring and destruction. The paper (which is not paper) and ink (multiple types and formulas) are fabricated for the express use by the Department of Engraving. That department is the Treasury bureau responsible for paper money—as opposed to the U.S Mint, which is the Treasury bureau responsible for coinage. US currency consists of 25% linen and 75% cotton and contains small randomly disbursed red and blue security fibers embedded throughout the material. Depending on the denomination the material is further enhanced by embedding security threads, ribbons and watermarks. Since 1996, printing with colored and color changing inks make the new currency pop. While older black and green currency is rather drab in comparison, it is still legal tender and remains the target of most counterfeiters.

The previous two parts of this article series (December 329 and January 330) centered around coinage. Before we look at bill validation for paper money, I need to finish up with that project. I had purchased a few Coin Acceptors and showed how they are used to identify coinage, especially but not limited to US coins. The acceptance and dispensing of money is presently used in many ways today, including vending machines and ATMs. The discussion also included National Automatic Merchandising Association (NAMA), the organization that developed the international specification for the Multi-Drop Bus/ Internal Communication Protocol (MDB/CP) released in July 2010. The MDB/ICP enables communication between a master controller and any of the peripheral hardware like Coin Acceptors and bill validators. By adhering to these guidelines, any manufacturer’s equipment is interchangeable.

Turns out the Coin Acceptors I purchased don’t have the MDB interface necessary to communicate with a Vending Machine Controller (VMC). I reviewed the protocol and VMC/Peripheral Communication Specifications required by the Coin Acceptor/Changer peripheral and began work on developing an MDB interface that would bridge my Coin Acceptor with the multi-drop bus. 

Read the full article in the February 331 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.

Kit for R-Car V3M SoC Speeds Development

Renesas Electronics has announced the R-Car V3M Starter Kit to simplify and speed up the development of New Car Assessment Program (NCAP) front camera applications, surround view system, and LiDARs. The new starter kit is based on the R-Car V3M image recognition system-on-chip (SoC), delivering a combination of low power consumption and high performance for the growing NCAP front camera market. By combining the R-Car V3M starter kit with supporting software and tools, system developers can easily develop front camera applications, contributing to reduced development efforts and faster time-to-market.

Renesas also announced an enhancement to the R-Car V3M by integrating a new, highly power-efficient hardware accelerator for high-performance convolutional neural networks (CNNs), which enables features such as road detection or object classification that are increasingly used in automotive applications. The R-Car V3M’s innovative hardware accelerator enables CNNs to execute at ultra-low power consumption levels that cannot be reached when CNNs are running on CPUs or GPUs.

The new R-Car V3M Starter Kit, the R-Car V3M SoC, and supporting software and tools including Renesas’ open-source e² studio IDE integrated development environment (IDE), are part of Renesas’ open, innovative, and trusted Renesas autonomy Platform for ADAS and automated driving that delivers total end-to-end solutions scaling from cloud to sensing and vehicle control.

The new starter kit is a ready-to-use kit. In addition to the required interface and tools, the kit provides essential components for ADAS and automated driving development, including 2GB RAM, 4GB eMMC (embedded multi-media controller) onboard memory, Ethernet, display outputs, and interfaces for debugging. The integrated 440-pin expansion port gives full freedom for system manufacturers to develop application-specific expansion boards for a wide range of computing applications, from a simple advanced computer vision development environment to prototyping of multi-camera systems for applications such as surround view. This board flexibility reduces the time needed for hardware development in addition to maintaining a high degree of software portability and reusability.

The R-Car V3M Starter Kit is supported by a Linux Board Support Package (BSP), which is available through elinux.org. Further commercial operating systems will be made available from next year onwards. Codeplay will enable OpenCL and SYCL on the starter kit in Q1 2018. Further tools, sample code and application notes for computer vision and image processing will be provided throughout 2018. Renesas enables several tools on the R-Car V3M Starter Kit including Renesas e² studio toolchain and tools for debugging, which ease the development burden and enable faster time-to-market.

In addition to the R-Car V3M Starter Kit, Renesas has enabled ultra-low power consumption for CNNs, which achieve image recognition and image classification, on the R-Car V3M SoC. The R-Car V3M allows the implementation of high-performance, low power consumption CNN networks in NCAP cameras that cannot be realized with traditional high power consuming CPU or GPU architectures. Renesas complements the IMP-X5, a subsystem for computer vision processing that is composed of an image processor and the programmable CV engine, with a new, innovative CNN hardware accelerator developed in house, that allows the implementation of high-performance CNNs at ultra-low low power. With this new IP, Renesas enables system developers to choose between the IMP-X5 or the new hardware accelerator to deploy CNNs. This heterogeneous approach allows system developers to choose the most efficient architecture, depending on required programming flexibility, performance and power consumption.

The Renesas R-Car V3M is available now. The R-Car V3M Starter Kit with a Linux BSP will be available in Q1 2018 initially in limited quantities. A complete offering with an extended software solution is scheduled for Q3 2018.

Renesas Electronics | www.renesas.com

Designing a Home Cleaning Robot (Part 2)

Part 2: Mechanical Design

Continuing with this four-part article series about building a home cleaning robot, Nishant and Jesudasan discuss the mechanical aspects of the design.

By Nishant Mittal and Jesudasan Moses
Cypress Semiconductor

In part one (Circuit Cellar 329, December 2017) of this home cleaning robot article series, I discussed the introduction to the concepts of cleaning robots and the crucial design elements that are part of a skeleton design. Apart from that I discussed various selection criteria of the components. In this part, with the help of my colleague Jesudasan Moses, I’ll explore the mechanical aspects of the design. This includes selecting materials, aligning all the components on base, designing the pulleys for optimal performance, selecting motors and so on. The mechanical design for such a system can be very challenging because it’s a moving system and that adds complexity to the process. While this part is focused on mechanical issues and making the base ready, all this paves the way for when we add the “brains” into the system in part three.

DESIGN ELEMENTS

Figure 1 shows the block diagram of the mechanical design for this project. The overall structure of this design requires a base that is strong, but not too heavy. Using a metal base isn’t a good option for this type of system because it would increase the overall weight. Such an increase might mean that a higher torque motor would be required. The next elements are the motors and wheels. We chose to include motors only in the back. Using a front motor would probably be an overdesign for such a system. If you examine professionally designed home cleaning robots—like those I covered in part one—all of them had only the back motors for movement.

Figure 1
Mechanical arrangement of the home cleaning robot

On the front side of the unit, only rollers are added. This gives the system a complete 360-degree freedom of movement. The most important parts of the system are the cleaner and the roller. These are placed toward the center of the system and are controlled using an arrangement of motors and pulleys. In the front of the system, side brushes are added that again are controlled using motors. Now let’s look at the selection of each of the design elements.

Selection of the base shape: The base shape selection is very important because it defines how efficiently your home cleaning robot can clean at corners. A circular base shape is the most recommended option. A circular base enables the robot to move around corners and thereby cover each and every part of the house. That said, for a hobby project like this one, a rectangular base means no advanced tools are needed to cut and shape the base. With that in mind, we chose to use an acrylic material in a square shape for the base.

Motor selection: For our design, we opted for two movement motors on the back of the unit and another motor at the back for the roller pulley. On the front, there are two more motors to move the side brushes. We’ll save the more technical discussion about motor selection in part three. Choice of motor size depends upon the total weight that the front and back need to handle. The total weight should be equalized, otherwise the system won’t remain stable when the robot is moving fast. The placement of the two movement motors should be aligned to their center of axis. That ensures that when the robot is moving straight, it won’t divert its direction. It’s also important to buy those two motors from the same vendor to make sure they share the same mechanical properties.

Wheel Selection: It’s very important to decide on the net height of the system early on. Wheel selection is the deciding factor for the net height. .

Read the full article in the January 330 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.

Op Amp Features Ultra-High Precision

Texas Instruments (TI) has introduced an op amp that combines ultra-high precision with low supply current. The LPV821 zero-drift, nanopower op amp enables engineers to attain the highest DC precision, while consuming 60% less power than competitive zero-drift devices, according to TI. The LPV821 is designed for use in precision applications such as wireless sensing nodes, home and factory automation equipment, and portable electronics.

LS-First-Page

The LPV821 is a single-channel, nanopower, zero-drift operational amplifier for “Always ON” sensing applications in wireless and wired equipment where low input offset is required. With the combination of low initial offset, low offset drift, and 8 kHz of bandwidth from 650 nA of quiescent current, the LPV821 is the industry’s lowest power zero-drift amplifier that can be used for end equipment that monitor current consumption, temperature, gas, or strain gauges.

The LPV821 zero-drift op amp uses a proprietary auto-calibration technique to simultaneously provide low offset voltage (10 μV, maximum) and minimal drift over time and temperature. In addition to having low offset and ultra-low quiescent current, the LPV821 amplifier has pico-amp bias currents which reduce errors commonly introduced in applications monitoring sensors with high output impedance and amplifier configurations with megaohm feedback resistors.

Engineers can pair the LPV821 op amp with the TLV3691 nanopower comparator or ADS7142 nanopower analog-to-digital converter (ADC) to program a threshold that will automatically wake up a microcontroller (MCU) such as the CC1310 SimpleLink Sub-1 GHz MCU, further reducing system power consumption.

Designers can download the TINA-TI SPICE model to simulate their designs and predict circuit behavior when using the LPV821 op amp. Engineers can also jump-start gas-sensing system designs using the LPV821 op amp with the Always-On Low-Power Gas Sensing with 10+ Year Coin Cell Battery Life Reference Design and Micropower Electrochemical Gas Sensor Amplifier Reference Design.

Pre-production samples of the LPV821 op amp are now available through the TI store and authorized distributors in a 5-pin small-outline transistor (SOT-23) package. Pricing starts at $0.80 in 1,000-unit quantities.

Texas Instruments | www.ti.com

Partner Program to Focus on Security

Microchip Technology has also established a Security Design Partner Program for connecting developers with third-party partners that can enhance and expedite secure designs. Along with the program, the company has also released its ATECC608A CryptoAuthentication device, a secure element that allows developers to add hardware-based security to their designs.

Microchip 38318249941_bf38a56692_zAccording to Microchip, the foundation of secured communication is the ability to create, protect and authenticate a device’s unique and trusted identity. By keeping a device’s private keys isolated from the system in a secured area, coupled with its industry-leading cryptography practices, the ATECC608A provides a high level of security that can be used in nearly any type of design. The ATECC608A includes the Federal Information Processing Standard (FIPS)-compliant Random Number Generator (RNG) that generates unique keys that comply with the latest requirements from the National Institute of Standards and Technology (NIST), providing an easier path to a whole-system FIPS certification.

Other features include:

  • Boot validation capabilities for small systems: New commands facilitate the signature validation and digest computation of the host microcontroller firmware for systems with small MCUs, such as an ARM Cortex-M0+ based device, as well as for more robust embedded systems.
  • Trusted authentication for LoRa nodes: The AES-128 engine also makes security deployments for LoRa infrastructures possible by enabling authentication of trusted nodes within a network.
  •  Fast cryptography processing: The hardware-based integrated Elliptical Curve Cryptography (ECC) algorithms create smaller keys and establish a certificate-based root of trust more quickly and securely than other implementation approaches that rely on legacy methods.
  •  Tamper-resistant protections: Anti-tampering techniques protect keys from physical attacks and attempted intrusions after deployment. These techniques allow the system to preserve a secured and trusted identity.
  •  Trusted in-manufacturing provisioning: Companies can use Microchip’s secured manufacturing facilities to safely provision their keys and certificates, eliminating the risk of exposure during manufacturing.

In addition to providing hardware security solutions, customers have access to Microchip’s Security Design Partner Program. These industry-leading companies, including Amazon Web Services (AWS) and Google Cloud Platform, provide complementary cloud-driven security models and infrastructure. Other partners are well-versed in implementing Microchip’s security devices and libraries. Whether designers are looking to secure an Internet of Things (IoT) application or add authentication capabilities for consumables, such as cartridges or accessories, the expertise of the Security Design Partners can reduce both development cost and time to market.

For rapid prototyping of secure solutions, designers can use the new CryptoAuth Xplained Pro evaluation and development kit (ATCryptoAuth-XPRO-B) which is an add-on board, compatible with any Microchip Xplained or Xplained Pro evaluation board. The ATECC608A is available for $0.56 each in 10,000 unit quantities. The ATCryptoAuth-XPRO-B add-on development board is available for $10.00 each.

Microchip Technology | www.microchip.com

HyperBus Interface Incorporated into JEDEC xSPI Standard

Cypress Semiconductor has announced the inclusion of Cypress’ high-bandwidth HyperBus 8-bit serial memory interface into the new eXpanded SPI (xSPI) electrical interface standard from the JEDEC Solid State Technology Association. The xSPI standard defines requirements for the compatibility of high-performance x8 serial interfaces, enabling controller and chipset manufacturers to design a universal memory controller. The inclusion of the HyperBus interface in the JEDEC xSPI standard simplifies designing in HyperBus-based memories and provides more flexibility to system designers to implement instant-on functionality in automotive, industrial and IoT applications.

According to Cypress, the company was the first NOR flash memory supplier to identify the market requirement for a high-speed, 8-bit bus and introduced the HyperBus interface in 2014, ushering in a new class of high-performance NOR flash and RAM solutions that enable instant-on functionality for autonomous driving and industry 4.0 applications. Cypress’ HyperBus-based memories include high-density HyperFlash NOR Flash devices with the bandwidth required for the highest-performance embedded systems and high-speed HyperRAM self-refresh DRAM devices for systems requiring expanded scratchpad memory.

The xSPI standard defines requirements for the compatibility of high-performance x8 serial interfaces, including read and write commands, electrical characteristics, signaling protocols for command and data transfers, and a standard pin-out in a BGA footprint.
hyperbus diagram

The 12-pin Cypress HyperBus interface consists of an 8-pin address/data bus, a differential clock (2 signals), one chip select and a read data strobe for the controller, reducing the overall cost of a system. Memories based on the interface enable faster systems with quicker response times and rich user experiences. The HyperBus interface enables a wide range of high-performance applications, such as automotive instrument clusters, infotainment and navigation systems and factory automation systems.

Cypress Semiconductor | www.cypress.com

Platform Enables Automated Vehicle Application Development

NXP Semiconductors has announced the availability of the NXP Automated Drive Kit, a software enabled platform for the development and testing of automated vehicle applications. The kit enables carmakers and suppliers to develop, test and deploy autonomous algorithms and applications quickly on an open and flexible platform with an expanding ecosystem of partners.

Taking on automated drive applications requires easy access to multiple hardware and software options. NXP has opened the door to hardware and software partners to foster a flexible development platform that meets the needs of a diverse set of developers. The NXP Automated Drive Kit provides a baseline for level 3 development and will expand to additional autonomy levels as the ecosystem’s performance scales.

The first release of the Automated Drive Kit will include a front vision system based on NXP’s S32V234 processor, allowing customers to deploy their algorithms of choice. The Kit also includes front camera application software APIs and object detection algorithms provided by Neusoft; a leading IT solutions and services provider in China and a strategic advanced driver assistance system (ADAS) and AD partner to NXP. Additionally, the Kit includes sophisticated radar options and GPS positioning technology. Customers choose from various LiDAR options and can add LiDAR Object Processing (LOP) modular software from AutonomouStuff, which provides ground segmentation and object tracking.

The NXP Automated Drive Kit is now available for ordering from AutonomouStuff as a standalone package that can be deployed by the customer in their own vehicle or as an integrated package with an AutonomouStuff Automated Research Development Vehicle.

NXP Semiconductors | www.nxp.com