Guitar Video Game Uses PIC32

Realism Revamp

While music-playing video games are fun, their user interfaces tend to leave a lot to be desired. Learn how these two Cornell students designed and built a musical video game that’s interfaced using a custom-built wireless guitar controller. The game is run on a Microchip PIC32 MCU and has a TFT LCD display to show notes that move across the screen toward a strum region.

By Jake Podell and Jonah Wexler

While many popular video games involve playing a musical instrument, the controllers used by the player are not the greatest. These controllers are often made of cheap plastic, and poorly reflect the feeling of playing the real instrument. We have created a fun and competitive musical video game, which is interfaced with using a custom-built wireless guitar controller (Figure 1 and Figure 2). The motivation for the project was to experiment with video game interfaces that simulate the real-world objects that inspired them.

Figure 1
Front of the guitar controller. Note the strings and plectrum.

Figure 2
Back of the guitar controller

The video game is run on a Microchip PIC32 microcontroller [1]. We use a thin-film-transistor LCD display (TFT) to display notes that move across the screen toward a strum region. The user plays notes on a wireless mock guitar, which is built with carbon-impregnated elastic as strings and a conducting plectrum for the guitar pick. The game program running on the PIC32 produces guitar plucks and undertones of the song, while keeping track of the user’s score. The guitar is connected to an Arduino Uno and Bluetooth control center, which communicates wirelessly to the PIC32.

The controller was designed to simulate the natural motion of playing a guitar as closely as possible. We broke down that motion on a real guitar into two parts. First, users select the sound they want to play by holding the appropriate strings down. Second, the users play the sound by strumming the strings. To have a controller that resembled a real guitar, we wanted to abide by those two intuitive motions.

Fret & Strum Circuits

At the top of the guitar controller is the fret board. This is where the users can select the sounds they want to play. Throughout the system, the sound is represented as a nibble (4 bits), so we use 4 strings to select the sound.

Each string works as an active-low push-button. The strings are made of carbon-impregnated elastic, which feels and moves like elastic but is also conductive. Each string was wrapped in 30-gauge copper wire, to ensure solid contact with any conductive surfaces. The strings are each connected to screws that run through the fret board and connect the strings to the fret circuit (Figure 3).

Figure 3
Complete controller circuit schematic (on guitar).

The purpose of the fret circuit is to detect changes in voltage across four lines. Each line is branched off a power rail and connected across a string to an input pin on an Arduino Uno. Current runs from the power rail across each string to its respective input pin, which reads a HIGH signal. To detect a push on the string, we grounded the surface into which the string is pushed. By wrapping the fret board in a grounded conductive pad and pushing the string into the fret board, we are able to ground our signal before it can reach the input pin. When this occurs, the associated pin reads a LOW signal, which is interpreted as a press of the string by our system.

Along with the fret circuit, we needed a way to detect strums. The strum circuit is similar in its use of a copper-wrapped, carbon-impregnated elastic string. The string is connected through the fret board to an input pin on the Arduino, but is not powered. Without any external contact, the pin reads LOW. When voltage is applied to the string, the pin reads HIGH, detecting the strum. To mimic the strumming motion most accurately, we used a guitar pick to apply the voltage to the string. The pick is wrapped in a conductive material (aluminum foil), which is connected to the power rail. Contact of the pick applies voltage to the string, which on a rising edge denotes a strum.

Figure 4
Shown here is a block diagram of the controller signals.

As shown in Figure 4, the direct user interface for the player is the guitar controller. The physical interaction with the guitar is converted to an encoded signal by an Arduino mounted to the back of the guitar. The Arduino Uno polls for a signal that denotes a strum, and then reads the strum pattern across the four strings. The signal is sent over USB serial to a Bluetooth control station, which uses a Python script to broadcast the signal to an Adafruit Bluetooth LE module. The laptop that we used as a Bluetooth control station established a link between the controller and the Bluetooth receiver, and was paramount to the debugging and testing of our system. Finally, the Bluetooth module communicated over UART with the PIC, which interpreted the user’s signal in the context of the game [2].  …

Read the full article in the March 344 issue of Circuit Cellar
(Full article word count: 3271 words; Figure count: 10 Figures.)

Watch the project video here:

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 out next week!. We’ve rounded up an outstanding selection of in-depth embedded electronics articles just for you, and rustled them all into our 84-page magazine.

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

 

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

POWER MAKES IT POSSIBLE

Power Issues for Wearables
Wearable devices put extreme demands on the embedded electronics that make them work—and power is front and center among those demands. Devices spanning across the consumer, fitness and medical markets all need an advanced power source and power management technologies to perform as expected. Circuit Cellar Chief Editor Jeff Child examines how today’s microcontroller and power electronics are enabling today’s wearable products.

Power Supplies for Medical Systems
Over the past year, there’s been an increasing trend toward new products that have some sort of application or industry focus. That means supplies that include either certifications, special performance specs or tailored packaging intended for a specific application area such as medical. This Product Focus section updates readers on these technology trends and provides a product gallery of representative medical-focused power supplies.

DESIGN RESOURCES, ISSUES AND CHALLENGES

Flex PCB Design Services
While not exactly a brand-new technology, flexible printed circuit boards are a critical part of many of today’s challenging embedded system applications from wearable devices to mobile healthcare electronics. Circuit Cellar’s Editor-in-Chief, Jeff Child, explores the Flex PCB design capabilities available today and whose providing them.

Design Flow Ensures Automotive Safety
Fault analysis has been around for years, and many methods have been created to optimize evaluation of hundreds of concurrent faults in specialized simulators. However, there are many challenges in running a fault campaign. Mentor’s Doug Smith presents an improved formal verification flow that reduces the number of faults while simultaneously providing much higher quality of results.

Cooling Electronic Systems
Any good embedded system engineer knows that heat is the enemy of reliability. As new systems cram more functionality at higher speeds into ever smaller packages, it’s no wonder an increasing amount of engineering mindshare is focusing on cooling electronic systems. In this article, George Novacek reviews some of the essential math and science around cooling and looks are several cooling technologies—from cold pates to heat pipes.

MICROCONTROLLER PROJECTS WITH ALL THE DETAILS

MCU-Based Solution Links USB to Legacy PC I/O
In PCs, serial interfaces have now been just about completely replaced by USB. But many of those interfaces are still used in control and monitoring embedded systems. In this project article, Hossam Abdelbaki describes his ATSTAMP design. ATSTAMP is an MCS-51 (8051) compatible microcontroller chip that can be connected to the USB port of any PC via any USB-to-serial bridge currently available in the market.

Pet Collar Uses GPS and Wi-Fi
The PIC32 has proven effective for a myriad of applications, so why not a dog collar? Learn how Cornell graduates Vidya Ramesh and Vaidehi Garg built a GPS-enabled pet collar prototype. The article discusses the hardware peripherals used in the project, the setup, and the software. It also describes the motivation behind the project, and possibilities to expand the project in the future.

Guitar Video Game Uses PIC32
While music-playing video games are fun, their user interfaces tend leave a lot to be desired. Learn how Cornell students Jake Podell and Jonah Wexler designed and built a musical video game that’s interfaced with using a custom-built wireless guitar controller. The game is run on a Microchip PIC32 MCU and uses a TFT LCD display to show notes that move across the screen towards a strum region.

… AND MORE FROM OUR EXPERT COLUMNISTS

Non-Evasive Current Sensor
Gone are the days when you could do most of your own maintenance on your car’s engine. Today they’re sophisticated electronic systems. But there are some things you can do with the right tools. In his article, By Jeff Bachiochi talks about how using the timing light on his car engine introduced him to non-contact sensor technology. He talks about the types of probes available and how to use them to read the magnitude of alternating current (AC

Impedance Spectroscopy using the AD5933
Impedance spectroscopy is the measurement of a device’s impedance (or resistance) over a range of frequencies. Brian Millier has designed many voltammographs and conductivity meters over the years. But he recently came across the Analog Devices AD5933 chip made by which performs most all the functions needed to do impedance spectroscopy. In this article, explores the technology, circuit design and software that serve these efforts.

Side-Channel Power Analysis
Side-channel power analysis is a method of breaking security on embedded systems, and something Colin O’Flynn has covered extensively in his column. This time Colin shows how you can prove some of the fundamental assumptions that underpin side-channel power analysis. He uses the open-source ChipWhisperer project with Jupyter notebooks for easy interactive evaluation.

Who killed the Quark?

By Eric Brown

Intel is phasing out its lightweight Quark processors, with final orders wrapping up this summer, and shipments ending in 2022. The Quark suffered from growing competition from high-end MCUs and low-end Cortex-A7 chips and the lack of a clear market focus.

When we read in AnandTech recently that Intel was discontinuing its Quark CPUs, the news was so unsurprising we almost decided to skip it. But perhaps it’s worthwhile to reflect on why this highly promoted crossover processor, which aimed to find a niche between low-end Cortex-A SoCs and high-end microcontroller units (MCUs), failed to catch fire.

According to AnandTech, Intel is phasing out all its Linux-ready Quark X10x SoCs and Quark SE and D1000/D2000 MCUs. Customers can post their final orders on July 19, and shipments on those orders will continue until July 17, 2022.


 
Former Intel CEO Krzanich with Quark chip in 2013 (left) and Curie module
(click images to enlarge)
The fate of the Quark seemed to be sealed in June 2017, when Intel announced it was discontinuing its Intel Joule and Intel Edison COMs and its open-spec Galileo Gen 2 SBC. The Galileo and Galileo II boards ran Linux on a Quark X1000 while the Edison, which was originally announced as a Quark-driven module, eventually shipped with an oddball “Tangier” Atom SoC. The Quark was used only as a co-processor.

Intel then launched the MCU-like Quark D1000, Quark D2000, and Quark SE models designed to run RTOSes like Zephyr instead of Linux. Intel backed the chips with a major marketing push for its tiny Curie wearable module, which uses a Quark SE. The Curie never took off, however, and in July 2017, Intel discontinued the Curie.

In the middle of this decade we saw a number of IoT gateways that ran Yocto Project stacks on the Quark X1000, but the combination appeared on relatively few third-party embedded boards. The last Quark-based embedded computer we saw was Advantech’s UBC-222, which launched a year ago.


Galileo II

When Intel announced the death of the Curie, it also discontinued its Curie-based Arduino 101 SBC. Arduino compatibility was always one of the key draws of the Quark, and several Edison breakout boards supported Arduino shields.

Yet, the Arduino community never embraced the Curie, and as the Linux-driven Raspberry Pi increasingly dominated the low-end hacker-board world, Arduino compatibility became less of a must-have feature. It certainly didn’t mean much to the luxury smartwatch vendors Intel was trying to woo with its Curie.


Arduino 101

The x86 community did not think much of the Quark, either. Its progress was slowed initially by the fact that the Quark was originally announced only with Pentium ISA compatibility. By the time Intel added x86 compatibility it was too late.

The Quark had more serious challenges, however. The smartwatch market was slow to take off, and the low-end wearables market that the Curie targeted was powered primarily by increasing powerful Arm Cortex-M MCUs. The growing support for wireless technology on these chips carved out a big chunk of the Quark’s market.



Aaeon’s Quark-based AIOT-QA, -QG, and -QM IoT gateways from 2016
(click image to enlarge)

(click image to enlarge)
Meanwhile, Arm’s Cortex-A7 design increasingly dominated the low-end Linux IoT market. The budget IoT gateways and other power-sipping IoT gear that used Quarks or MIPS chips in 2014 and 2015 had by 2017 largely switched to Cortex-A7 SoCs like NXP’s i.MX7 i.MX6 UL or the Allwinner A20, just to name a few.

Many of the SBCs in our recent catalog of 122 hacker boards that launched in the previous six months were Cortex-A7 designs. These include the MediaTek MT7623N based Banana Pi BPI-R2, the Rockchip PX2-SE driven Firefly-PX3-SE, the Allwinner V5 V100 powered Lindenis V5, the Allwinner H2+ or H3 based NanoPi Duo and Duo2, and the Rockchip RK3229 based ReSpeaker Core v2.0.


NanoPi Duo2

The Quark X1000 also felt pressure from Intel’s own Atom family of SoCs, which these days are more often tagged with the Celeron and Pentium brands. Atom SoCs have gradually improved power efficiency while also boosting performance, especially in graphics.

This was especially true of quad-core models. In the circa-2013 Bay Trail generation, the quad-core E3845 clocked in at 10W. Fast forward to the latest Gemini Lake generation, and the quad-core Pentium Silver N5000 has a 6.5W TDP. The drop in TDP was not significant enough for many embedded hackers, who continued to migrate to Arm, but it was enough to position some Atom chips closer to the Cortex-A7.

Perhaps Intel’s largest impediment was itself. It could never quite decide what the Quark was for and was never able to capture the developer market. The Curie was especially notorious for spotty public documentation and the requirement for signing NDAs to get the full specs.

The low-end chip market is tough going and marked by low margins. Intel had the market clout to succeed, but it was earning such high profits from its popular Xeon and Core chips, the Quark was quickly neglected. To a lesser degree, its Atom line has suffered from the same dynamics.

With IoT morphing into edge computing, and with the dropping costs for Cortex-A53 SoCs, the embedded market is shifting upward. Edge gateways are increasingly asked to process video and do analytics, which need more powerful chips. Still, there’s room at the bottom for more innovation on power-efficient SoCs that can still run Linux.

This article originally appeared on LinuxGizmos.com on January 30.

Intel | www.intel.com

Laundry Machine Design Embeds Espressif ESP32 Microcontroller

Espressif Systems has announced that Schulthess Maschinen AG has recently developed a laundry machine with an integrated cashless payment system based on the Espressif Systems ESP32 MCU. Such laundry machines are usually found in buildings with special laundry rooms used by all tenants. Because of the cashless payment system, there’s no longer any need to get hold of the precise amount of coins one needs for a washing cycle.

All the required components are integrated within the “washMaster”. ESP32 is the embedded microcontroller which is responsible for the communication with the machine controller, the radio frequency identification (RFID) reader and the backend system. ESP32 reports the machine-status information, while also managing the price list and handling the machine configuration as well as payments, refunds and balance checks.

According to the company, this is another example of the many advantages that ESP32 has in embedded systems. As a combo Wi-Fi and Bluetooth chip, it is able to maintain a secure and robust connection, while also guaranteeing reliable system function, ultra-low-power consumption and a great level of integration. ESP32 adds priceless functionality and versatility to all the applications in which it is embedded.

Based on the stable performance of the ESP32 modules, Schulthess used the OTA update capability from the very first prototype, which helped throughout the development phases by working reliably all the time. So, customers can now enjoy a complete solution to cashless payment systems for laundry machines. No coins are necessary and neither are any extra personnel costs, due to a sleek automated system.

Espressif Systems | www.espressif.com

 

Firms Team Up to Provide End-to-End LoRa Security Solution

Microchip Technology, in partnership with The Things Industries, has announced the what it claims is industry’s first end-to-end security solution that adds secure, trusted and managed authentication to LoRaWAN devices at a global scale. The solution brings hardware-based security to the LoRa ecosystem, combining the MCU- and radio-agnostic ATECC608A-MAHTN-T CryptoAuthentication device with The Things Industries’ managed join servers and Microchip’s secure provisioning service.

The joint solution significantly simplifies provisioning LoRaWAN devices and addresses the inherent logistical challenges that come with managing LoRaWAN authentication keys from inception and throughout the life of a device. Traditionally, network and application server keys are unprotected in the edge node, and unmonitored, as LoRaWAN devices pass through various supply chain steps and are installed in the field.

The Common Criteria Joint Interpretation Library (JIL) “high”-rated ATECC608A comes pre-configured with secure key storage, keeping a device’s LoRaWAN secret keys isolated from the system so that sensitive keys are never exposed throughout the supply chain nor when the device is deployed. Microchip’s secure manufacturing facilities safely provision keys, eliminating the risk of exposure during manufacturing. Combined with The Things Industries’ agnostic secure join server service to the LoRaWAN network and application server providers, the solution decreases the risk of device identity corruption by establishing a trusted authentication when a device connects to a network.

Similar to how a prepaid data plan works for a mobile device, each purchase of an ATECC608A-MAHTN-T device comes with one year of managed LoRaWAN join server service through The Things Industries. Once a device identifies itself to join a LoRaWAN network, the network contacts The Things Industries join server to verify that the identity comes from a trusted device and not a fraudulent one. The temporary session keys are then sent securely to the network server and application server of choice. The Things Industries’ join server supports any LoRaWAN network, from commercially operated networks to private networks built on open-source components. After the one-year period, The Things Industries provides the option to extend the service.

Microchip and The Things Industries have also partnered to make the onboarding process of LoRaWAN devices seamless and secure. LoRaWAN device identities are claimed by The Things Industries’ join server with minimal intervention, relieving developers from needing expertise in security. Customers can not only choose any LoRaWAN network but can also migrate to any other LoRaWAN join server by rekeying the device. This means there is not a vendor lock-in and customers have full control over where and how the device keys are stored.

The ATECC608A is agnostic and can be paired with any MCU and LoRa radio. Developers can deploy secure LoRaWAN devices by combining the ATECC608A with the SAM L21 MCU, supported by the Arm Mbed OS LoRaWAN stack, or the recently-announced SAM R34 System-in-Package with Microchip’s LoRaWAN stack. For rapid prototyping, designers can use the CryptoAuthoXPRO socket board and The Things Industries provisioned parts in samples with the SAM L21 Xplained Pro (atsamd21-xpro) or SAM R34 Xplained Pro (DM320111).

The ATECC608A-MAHTN-T device for The Things Industries, including the initial year of prepaid TTN service, is available in volume production for $0.81 each in 10,000-unit quantities.

Microchip Technology | www.microchip.com

 

High-Temp Motor Control is Target for 32-Bit MCU Offerings

Renesas Electronics has announced the expansion of its RX24T and RX24U Groups of 32-bit MCUs to include new high-temperature-tolerant models for motor-control applications that require an expanded operating temperature range. The new RX24T G Version and RX24U G Version support operating temperatures ranging from −40°C to +105°C, while maintaining the high speed, high functionality and energy efficiency of the RX24T and RX24U MCUs.
As device form factors shrink, the heat challenge is growing for motor-control applications. In industrial machinery and office equipment, as well as home appliances that handle hot air and heated water, circuit boards are increasingly being mounted in high-temperature locations. In the case of home appliances such as dishwashers or induction hotplates in particular, demand for designs with larger interior capacity or heating areas is increasing, which restricts the space available for circuit boards.

The resulting shift toward circuit board design with a smaller surface area addresses the space constraints but also reduces the board’s capacity to disperse heat, causing the circuit board itself to become quite hot. To address these application needs, Renesas is adding new high-temperature-tolerant products to its MCU lineup that can operate in high-temperature spaces and on hot circuit boards. The new devices will provide greater flexibility for designers of products that operate in high-temperature environments, enabling the trend toward more compact devices to advance.

Software can be developed using the RX24T and RX24U CPU cards combined with the 24 V Motor Control Evaluation Kit which enables developers to create motor control applications in less time. The 32-bit RX24T and RX24U features a maximum operating frequency of 80 MHz. It is equipped with peripheral functions for motor control such as timers, A/D converter, and analog circuits that enable efficient control of two brushless DC motors by a single chip. Renesas has shipped 10 million units of the popular RX24T and RX24U Groups since their launch two years ago. With the addition of the G versions, all 32-bit RX MCU family products for motor-control applications now support operating temperature from −40°C to +105°C, extending the scalability of the RX Family and providing system manufacturers a rich and scalable lineup to choose from.

The RX24T G Version and RX24U G Version are available now in mass production. The RX24T covers 11 models with pin counts ranging from 64 to 100 pins and memory sizes from 128 KB to 512 KB. The RX24U covers six models with pin counts ranging from 100 to 144 pins and memory sizes from 256 KB to 512 KB.

Renesas Electronics | www.renesas.com

8-Bit MCU Marries Ultra Low Power and Rich Analog I/O

STMicroelectronics has announced STM8L050, a low power 8-bit MCU that embeds rich analog peripherals, a DMA controller and separated data EEPROM—all in an inexpensive SO-8 package with up to six user I/Os. Built around ST’s STM8 core running at up to 16 MHz, the STM8L050 is well suited for resource-constrained products like industrial sensors, toys, access cards, e-bike controllers, home-automation or lighting products, smart printer cartridges or battery chargers.

The integrated DMA (Direct Memory Access) controller speeds application performance by streamlining data transfers between peripherals and memory, or from memory to memory, ultimately saving power consumption. The 256 bytes of separated EEPROM allows applications to store important program data when the MCU is powered down, while allowing maximum utilization of flash for code storage.

Alongside two comparators, the STM8L050 has a 4-channel 12-bit analog-digital converter (ADC) and a low-power real-time clock (RTC) with programmable alarm and periodic wakeups, allowing designers to minimize external analog components. In addition, support for either an external or internal clock at up to 16 MHz further enhances flexibility to balance performance with bill-of-materials (BOM) savings.

Other features include 8 KB of on-chip flash memory, 1 KB of RAM, two 16-bit timers, one 8-bit timer, and popular connectivity and debug interfaces including SPI, I2C, UART and SWIM. The STM8L050 provides power-saving modes that cut current to as little as 350 nA, and operates over a wide voltage range from 3.6 V down to 1.8 V. The MCUs are fully specified from -40°C to 125°C, ensuring robustness and reliability in demanding applications such as industrial controls or lighting products.

The STM8L050J3 is in production now, and available in the SO-8 package, priced from $0.25 for orders of 10,000 pieces.

STMicroelectronics | www.st.com

MCUs Serve Up Solutions for Car Infotainment

Dashboard Dazzle

As automotive dashboard displays get more sophisticated, information and entertainment are merging into so-called infotainment systems. The new systems are driving a need for powerful MCU solutions that support the connectivity, computing and interfacing requirements particular to these designs.

(Caption for lead image Figure 1: The Cypress Wi-Fi and Bluetooth combo solution uses Real Simultaneous Dual Band (RSDB) technology so that Apple CarPlay (shown) and Android Auto can operate concurrently without degradation caused by switching back and forth between bands.).

By Jeff Child, Editor-in-Chief

Microcontroller (MCU) vendors have a rich legacy of providing key technologies for nearly every aspect of an automobile’s electronics—everything from the powertrain to the braking system to dashboard displays. In recent years, they’ve taken on a new set of challenges as demands rise for ever more sophisticated “infotainment” systems. Advanced touchscreen, processing, networking, voice recognition and more are parts of these subsystems tasked with providing drivers with information and entertainment suited to today’s demands—demands that must rival or exceed what’s possible in a modern smartphone or tablet. And, as driverless cars inch toward mainstream reality, that hunger for rich infotainment functionality will only increase.

In order to meet those system design needs, MCU vendors are keeping pace with highly integrated chip-level solutions and embedded software tailored specifically to address various aspects of the automotive infotainment challenge. Over the past 12 months, MCU companies have announced products aimed at everything from advanced dashboard graphics to connectivity solutions to security technologies. At the same time, many have announced milestone design wins that illustrate their engagement with this dynamic sub-segment of automotive system development.

Smartphone Support

Exemplifying these trends, in July Cypress Semiconductor announced that Pioneer integrated Cypress’ Wi-Fi and Bluetooth Combo solution into its flagship in-dash navigation AV receiver. The solution enables passengers to display and use their smartphone’s apps on the receiver’s screen via Apple CarPlay (Figure 1–lead image above) or Android Auto, which provide the ability to use smartphone voice recognition to search for information or respond to text messages. The Cypress Wi-Fi and Bluetooth combo solution uses Real Simultaneous Dual Band (RSDB) technology so that Apple CarPlay and Android Auto can operate concurrently without degradation caused by switching back and forth between bands.

The Pioneer AVH-W8400NEX receiver uses Cypress’ CYW89359 combo solution, which includes an advanced coexistence engine that enables optimal performance for dual-band 2.4- and 5-GHz 802.11ac Wi-Fi and dual-mode Bluetooth/Bluetooth Low Energy (BLE) simultaneously for advanced multimedia experiences. The CYW89359’s RSDB architecture enables two unique data streams to run at full throughput simultaneously by integrating two complete Wi-Fi subsystems into a single chip. The CYW89359 is fully automotive qualified with AECQ-100 grade-3 validation and is being designed in by numerous top-tier car OEMs and automotive suppliers as a full in-vehicle connectivity solution, supporting infotainment and telematics applications such as smartphone screen-mirroring, content streaming and Bluetooth voice connectivity in car kits.

In October, Cypress announced another infotainment-related design win with Yazaki North America implementing Cypress’ instrument cluster solution to drive the advanced graphics in Yazaki’s instrument cluster for a leading American car manufacturer. According to Cypress, Yazaki selected the solution based on its unique offering of five chips that combine to drive dual displays and provide instant-on memory performance with automotive-grade, ASIL-B safety compliance. The Cypress solution is based on a Traveo MCU, along with two high-bandwidth HyperBus memories in a multi-chip package (MCP), an analog power management IC (PMIC) for safe electrical operation, and a PSoC MCU for system management support. The Traveo devices in the Yazaki instrument cluster were the industry’s first 3D-capable Arm Cortex-R5 cluster MCUs.

Virtualization Embraced

The complexity of automotive infotainment systems has pushed system developers to embrace advanced operating system approaches such as virtualization. Feeding those needs, last June Renesas Electronics rolled out its “R-Car virtualization support package” designed to enable easier development of hypervisors for the Renesas R-Car automotive system-on-chip (SoC). The R-Car virtualization support package includes, at no charge, both the R-Car hypervisor development guide document and sample software for use as reference in such development for software vendors who develop the embedded hypervisors that are required for integrated cockpits and connected car applications.

A hypervisor is a virtualization operating system (OS) that allows multiple guest OSs— such as Linux, Android and various real-time OSs (RTOS)—to run completely independently on a single chip. Renesas announced the R-Car hypervisor in April of 2017 and the new R-Car virtualization Support Package was developed to help software vendors accelerate their development of R-Car hypervisors.

The company’s third-generation R-Car SoCs were designed assuming that they would be used with a hypervisor. The Arm CPU cores, graphics cores, video/audio IP and other functions include virtualization functions. Originally, for software vendors to make use of these functions, they would have had to understand both the R-Car hardware manuals and the R-Car virtualization functions and start by looking into how to implement a hypervisor. Now, by following development guides in the R-Car virtualization support package, not only can software vendors easily take advantage of these functions, they will be able to take full advantage of the advanced features of R-Car. Also, by providing sample software that can be used as a reference, this package supports rapid development.

Technology partnerships have been playing a key role in automotive infotainment trends. Along just those lines, in September Renesas and OpenSynergy, a supplier of automotive hypervisors, announced that the Renesas’ SoC R-Car H3 and OpenSynergy’s COQOS Hypervisor SDK were adopted on Parrot Faurecia’s automotive safe multi-display cockpit. The latest version of Android is the guest OS of the COQOS Hypervisor, which executes both the instrument cluster functionality, including safety-relevant display elements based on Linux, and the Android-based in-vehicle infotainment (IVI) on a single R-Car H3 SoC chip (Figure 2). The COQOS Hypervisor SDK shares the R-Car H3 GPU with Android and Linux allowing applications to be presented on multiple displays, realizing a powerful and flexible cockpit system.

Figure 2
With Android as the guest OS of the COQOS Hypervisor, it executes both the instrument cluster functionality, including safety-relevant display elements based on Linux, and the Android-based in-vehicle infotainment (IVI) on a single R-Car H3 SoC chip.

According to OpenSynergy’s CEO Stefaan Sonck Thiebaut, the COQOS Hypervisor SDK takes full advantage of the hardware and software virtualization extensions provided by Renesas. The OpenSynergy solution includes key features, such as shared display, which allows several virtual machines to use multiple displays flexibly and safely. The R-Car H3 GPU and video/audio IP incorporates virtualization functions, making virtualization by the hypervisor possible and allowing for multiple OSs to operate independently and safely. OpenSynergy’s COQOS Hypervisor SDK is built around a safe and efficient hypervisor that can run software from multipurpose OSs such as Linux or Android, RTOS and AUTOSAR-compliant software simultaneously on one SoC.

Large Touchscreen Support

As the content provided by automotive infotainment systems gets more sophisticated, so too must the displays and user interface technologies that interact with that content. With that in mind, MCU vendors are offering more advanced touchscreen control solutions. Dashboard screens have unique design challenges. Screens in automobiles need to meet stringent head impact and vibration tests. That means thicker cover lenses that potentially impact the touch interface performance. Meanwhile, as screens get larger, they are also more likely to interfere with other frequencies such as AM radio and car access systems. All of these factors become a major challenge in the design of modern automotive capacitive touch systems.

Along just those lines, Microchip in December announced its maXTouch family of single-chip touchscreen controllers designed to address these issues for screens up to 20 inches in size (Figure 3). The MXT2912TD-A, with nearly 3,000 touch sensing nodes, and MXT2113TD-A, supporting more than 2,000 nodes, bring consumers the touchscreen user experience they expect in vehicles. These new devices build upon Microchip’s existing maXTouch touchscreen technology that is widely adopted by manufacturers worldwide. Microchip’s latest solutions offer superior signal-to-noise capability to address the requirements of thick lenses, even supporting multiple finger touches through thick gloves and in the presence of moisture.

Figure 3
The maXTouch family of single-chip touchscreen controllers is designed for screens up to 20 inches in size, and supports up to 3,000 touch sensing nodes. The devices even support multiple finger touches through thick gloves and in the presence of moisture.

As automakers use screens to replace mechanical switches on the dash for sleeker interior designs, safe and reliable operation becomes even more critical. The MXT2912TD and MXT2113TD devices incorporate self- and sensor-diagnostic functions, which constantly monitor the integrity of the touch system. These smart diagnostic features support the Automotive Safety Integrity Level (ASIL) classification index as defined by the ISO 26262 Functional Safety Specification for Passenger Vehicles.

The new devices feature technology that enables adaptive touch utilizing self-capacitance and mutual-capacitance measurements, so all touches are recognized and false touch detections are avoided. They also feature Microchip’s proprietary new signal shaping technology that significantly lowers emissions to help large touchscreens using maXTouch controllers meet CISPR-25 Level 5 requirements for electromagnetic interference (EMI) in automobiles. The new touch controllers also meet automotive temperature grade 3 (-40°C to +85°C) and grade 2 (-40°C to +105°C) operating ranges and are AEC-Q100 qualified.

3D Gesture Control

Aside from the touchscreen display side of automotive infotainment, Microchip for its part has also put its efforts toward innovations in 3D human interface technology. With that in mind, in July the company announced a new 3D gesture recognition controller that offers the lowest system cost in the automotive industry, providing a durable single-chip solution for advanced automotive HMI designs, according to Microchip. The MGC3140 joins the company’s family of easy-to-use 3D gesture controllers as the first qualified for automotive use (Figure 4).

Figure 4
The MGC3140 3D gesture controller is Microchip’s first qualified for automotive use. It’s suited for a range for applications such as navigating infotainment systems, sun shade operation, interior lighting and more.

Suited for a range for applications that limit driver distraction and add convenience to vehicles, Microchip’s new capacitive technology-based air gesture controller is ideal for navigating infotainment systems, sun shade operation, interior lighting and other applications. The technology also supports the opening of foot-activated rear liftgates and any other features a manufacturer wishes to incorporate with a simple gesture action.

The MGC3140 is Automotive Electronics Council AEC-Q100 qualified with an operating temperature range of -40°C to +125°C, and it meets the strict EMI and electromagnetic compatibility (EMC) requirements of automotive system designs. Each 3D gesture system consists of a sensor that can be constructed from any conductive material, as well as the Microchip gesture controller tuned for each individual application.

While existing solutions such as infrared and time-of-flight technologies can be costly and operate poorly in bright or direct sunlight, the MGC3140 offers reliable sensing in full sunlight and harsh environments. Other solutions on the market also come with physical constraints and require significant infrastructure and space to be integrated in a vehicle. The MGC3140 is compatible with ergonomic interior designs and enables HMI designers to innovate with fewer physical constraints, because the sensor can be any conductive material and hidden from view.

Vehicle Networking

While applicable to areas beyond infotainment, an automobile’s ability to network with the outside world has become ever more important. As critical vehicle powertrain, body, chassis, and infotainment features increasingly become defined by software, securely delivering updates such as fixes and option packs over the air (OTA) enhances cost efficiency and customer convenience. Serving those needs, in October STMicroelectronics released its latest Chorus automotive MCU that provides a gateway/domain-controller solution capable of handling major OTA updates securely.

With three high-performance processor cores, more than 1.2 MB RAM and powerful on-chip peripherals, ST’s new flagship SPC58 H Line joins the Chorus Series of automotive MCUs and can run multiple applications concurrently to allow more flexible and cost-effective vehicle-electronics architectures (Figure 5). Two independent Ethernet ports provide high-speed connectivity between multiple Chorus chips throughout the vehicle and enable responsive in-vehicle diagnostics. Also featuring 16 CAN-FD and 24 LINFlex interfaces, Chorus can act as a gateway for multiple ECUs (electronic control units) and support smart-gateway functionality via the two Ethernet interfaces on-chip.

Figure 5
The SPC58 H Line of MCUs can run multiple applications concurrently to allow more flexible and cost-effective vehicle-electronics architectures. Two independent Ethernet ports provide high-speed connectivity between multiple Chorus chips throughout the vehicle.

To protect connected-car functionalities and allow OTA updates to be applied safely, the new Chorus chip contains a Hardware Security Module (HSM) capable of asymmetric cryptography. Being EVITA Full compliant, it implements industry-leading attack prevention, detection and containment techniques.

Working with its large on-chip 10 MB flash, the SPC58NH92x’s context-swap mechanism allows current application code to run continuously even while an update is downloaded and made ready to be applied later at a safe time. The older software can be retained, giving the option to roll-back to the previous version in an emergency. Hyperbus and eMMC/SDIO high-speed interfaces to off-chip memory are also integrated, enabling further storage expansion if needed.

Single Cable Solution

Today’s automotive infotainment systems comprise mobile services, cross-domain communication and autonomous driving applications as part of in-vehicle networking. As a result, these systems require a more flexible solution for transporting packet, stream and control content. Existing implementations are either costly and cumbersome, or too limited in bandwidth and packet data capabilities to support system updates and internetworking requirements.

To address this need, Microchip Technology in November announced an automotive infotainment networking solution that supports all data types—including audio, video control and Ethernet—over a single cable. Intelligent Network Interface Controller networking (INICnet) technology is a synchronous, scalable solution that significantly simplifies building audio and infotainment systems, offering seamless implementation in vehicles that have Ethernet-oriented system architectures (Figure 6).

Figure 6
INICnet technology is a synchronous, scalable solution that significantly simplifies building audio and infotainment systems, offering seamless implementation in vehicles that have Ethernet-oriented system architectures.

Audio is a key infotainment feature in vehicles, and INICnet technology provides full flexibility through supporting a variety of digital audio formats with multiple sources and sinks. INICnet technology also provides high-speed packet-data communications with support for file transfers, OTA software updates and system diagnostics via standard Ethernet frames. In this way, INICnet technology supports seamless integration of Internet Protocol (IP)-based system management and data communications, along with very efficient transport of stream data. INICnet technology does not require the development and licensing of additional protocols or software stacks, reducing development costs, effort and time.

INICnet technology provides a standardized solution that works with both Unshielded Twisted Pair (UTP) at 50 Mbps and coaxial cable at 150 Mbps. With low and deterministic latency, INICnet technology supports deployment of complex audio and acoustics applications. Integrated network management supports networks ranging from two to 50 nodes, as well as processor-less or slim modules where the node is remotely configured and managed. The solution’s Power over Data Line (PoDL) capability saves costs on power management for microphones and other slim modules. Nodes can be arranged in any order with the same result, and any node in the system can directly communicate with any other node in the system.

Security for Connected Cars

As cars become more network-connected, the issue of security takes on new dimensions. In October, Infineon Technologies announced a key effort in cybersecurity for the connected car by introducing a Trusted Platform Module (TPM) specifically for automotive applications—the first on the market, according to the company. The new OPTIGA TPM 2.0 protects communication between the car manufacturer and the car, which increasingly turns into a computer on wheels. A number of car manufacturers already designed in Infineon’s OPTIGA TPM.

The TPM is a hardware-based security solution that has proven its worth in IT security. By using it, car manufacturers can incorporate sensitive security keys for assigning access rights, authentication and data encryption in the car in a protected way. The TPM can also be updated so that the level of security can be kept up to date throughout the vehicle’s service life.

Cars send real-time traffic information to the cloud or receive updates from the manufacturer “over the air,” for example to update software quickly and in a cost-effective manner. The senders and recipients of that data—whether car makers or individual components in the car—require cryptographic security keys to authenticate themselves. These critical keys are particularly protected against logical and physical attacks in the OPTIGA TPM as if they were in a safe.

Early Phase Critical

Incorporating the first or initial key into the vehicle is a particularly sensitive moment for car makers. When the TPM is used, this step can be carried out in Infineon’s certified production environment. After that, the keys are protected against unauthorized access; there is no need for further special security precautions. The TPM likewise generates, stores and administers further security keys for communication within the vehicle. And it is also used to detect faulty or manipulated software and components in the vehicle and initiate troubleshooting by the manufacturer in such a case.

Figure 7
The SLI 9670 consists of an attack-resistant security chip (shown) and high-performance firmware developed in accordance with the latest security standard. The firmware enables immediate use of security features, such as encryption, decryption, signing and verification.

The SLI 9670 consists of an attack-resistant security chip and high-performance firmware developed in accordance with the latest security standard (Figure 7). The firmware enables immediate use of security features, such as encryption, decryption, signing and verification. The TPM can be integrated quickly and easily in the system thanks to the open source software stack (TSS stack) for the host processor, which is also provided by Infineon. It has an SPI interface, an extended temperature range from -40°C to 105°C and the advanced encryption algorithms RSA-2048, ECC-256 and SHA-256. The new TPM complies with the internationally acknowledged Trusted Computing Group TPM 2.0 standard, is certified for security according to Common Criteria and is qualified in accordance with the automotive standard AEC-Q100.

Side by side with driverless vehicle innovations, there’s no doubt that infotainment systems represent one of the most dynamic subsets of today’s automotive systems design. MCU vendors offer a variety of chip and software solutions addressing all the different pieces of car infotainment requirements from display interfacing to connectivity to security. Circuit Cellar will continue to follow these developments. And later this year, we’ll take a look specifically at MCU solutions aimed at enabling driverless vehicles and assisted driving technologies.

RESOURCES

Cypress Semiconductor | www.cypress.com
Infineon Technologies | www.infineon.com
Microchip | www.microchip.com
OpenSynergy | www.opensynergy.com
Renesas Electronics America | www.renesas.com
STMicroelectronics | www.st.com

Read the February 343 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.

February Circuit Cellar: Sneak Preview

The February issue of Circuit Cellar magazine is coming soon. We’ve raised up a bumper crop of in-depth embedded electronics articles just for you, and packed ’em into our 84-page magazine.

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

 

Here’s a sneak preview of February 2019 Circuit Cellar:

MCUs ARE EVERYWHERE, DOING EVERYTHING

Electronics for Automotive Infotainment
As automotive dashboard displays get more sophisticated, information and entertainment are merging into so-called infotainment systems. That’s driving a need for powerful MCU- and MPU-based solutions that support the connectivity, computing and interfacing needs particular to these system designs. In this article, Circuit Cellar’s Editor-in-Chief, Jeff Child, looks at the technology and trends feuling automotive infotainment.

Inductive Sensing with PSoC MCUs
Inductive sensing is shaping up to be the next big thing for touch technology. It’s suited for applications involving metal-over-touch situations in automotive, industrial and other similar systems. In his article, Nishant Mittal explores the science and technology of inductive sensing. He then describes a complete system design, along with firmware, for an inductive sensing solution based on Cypress Semiconductor’s PSoC microcontroller.

Build a Self-Correcting LED Clock
In North America, most radio-controlled clocks use WWVB’s transmissions to set the correct time. WWVB is a Colorado-based time signal radio station near. Learn how Cornell graduates Eldar Slobodyan and Jason Ben Nathan designed and built a prototype of a Digital WWVB Clock. The project’s main components include a Microchip PIC32 MCU, an external oscillator and a display.

WE’VE GOT THE POWER

Product Focus: ADCs and DACs
Analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) are two of the key IC components that enable digital systems to interact with the real world. 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.

Building a Generator Control System
Three phase electrical power is a critical technology for heavy machinery. Learn how US Coast Guard Academy students Kent Altobelli and Caleb Stewart built a physical generator set model capable of producing three phase electricity. The article steps through the power sensors, master controller and DC-DC conversion design choices they faced with this project.

EMBEDDED COMPUTING FOR YOUR SYSTEM DESIGN

Non-Standard Single Board Computers
Although standard-form factor embedded computers provide a lot of value, many applications demand that form take priority over function. That’s where non-standard boards shine. The majority of non-standard boards tend to be extremely compact, and well suited for size-constrained system designs. Circuit Cellar Chief Editor Jeff Child explores the latest technology trends and product developments in non-standard SBCs.

Thermal Management in machine learning
Artificial intelligence and machine learning continue to move toward center stage. But the powerful processing they require is tied to high power dissipation that results in a lot of heat to manage. In his article, Tom Gregory from 6SigmaET explores the alternatives available today with a special look at cooling Google’s Tensor Processor Unit 3.0 (TPUv3) which was designed with machine learning in mind.

… AND MORE FROM OUR EXPERT COLUMNISTS

Bluetooth Mesh (Part 1)
Wireless mesh networks are being widely deployed in a wide variety of settings. In this article, Bob Japenga begins his series on Bluetooth mesh. He starts with defining what a mesh network is, then looks at two alternatives available to you as embedded systems designers.

Implementing Time Technology
Many embedded systems need to make use of synchronized time information. In this article, Jeff Bachiochi explores the history of time measurement and how it’s led to NTP and other modern technologies for coordinating universal date and time. Using Arduino and the Espressif System’s ESP32, Jeff then goes through the steps needed to enable your embedded system to request, retrieve and display the synchronized date and time to a display.

Infrared Sensors
Infrared sensing technology has broad application ranging from motion detection in security systems to proximity switches in consumer devices. In this article, George Novacek looks at the science, technology and circuitry of infrared sensors. He also discusses the various types of infrared sensing technologies and how to use them.

The Art of Voltage Probing
Using the right tool for the right job is a basic tenant of electronics engineering. In this article, Robert Lacoste explores one of the most common tools on an engineer’s bench: oscilloscope probes, and in particular the voltage measurement probe. He looks and the different types of voltage probes as well as the techniques to use them effectively and safely.

Tool Extension Enables Neural Networking on STM32 MCUs

STMicroelectronics has extended its STM32CubeMX ecosystem by adding advanced Artificial Intelligence (AI) features.  AI uses trained artificial neural networks to classify data signals from motion and vibration sensors, environmental sensors, microphones and image sensors, more quickly and efficiently than conventional handcrafted signal processing. With STM32Cube.AI, developers can now convert pre-trained neural networks into C-code that calls functions in optimized libraries that can run on STM32 MCUs.
STM32Cube.AI comes together with ready-to-use software function packs that include example code for human activity recognition and audio scene classification. These code examples are immediately usable with the ST SensorTile reference board and the ST BLE Sensor mobile app. Additional support such as engineering services is available for developers through qualified partners inside the ST Partner Program and the dedicated AI and Machine Learning (ML) STM32 online community. ST will demonstrate applications developed using STM32Cube.AI running on STM32 MCUs this week in a private suite at CES, the Consumer Electronics Show, in Las Vegas, January 8-12.

The STM32Cube.AI extension pack can be downloaded inside ST’s STM32CubeMX MCU configuration and software code-generation ecosystem. Today, the tool supports Caffe, Keras (with TensorFlow backend), Lasagne, ConvnetJS frameworks and IDEs including those from Keil, IAR and System Workbench.

The FP-AI-SENSING1 software function pack provides examples of code to support end-to-end motion (human-activity recognition) and audio (audio-scene classification) applications based on neural networks. This function pack leverages ST’s SensorTile reference board to capture and label the sensor data before the training process. The board can then run inferences of the optimized neural network. The ST BLE Sensor mobile app acts as the SensorTile’s remote control and display.

The comprehensive toolbox consisting of the STM32Cube.AI mapping tool, application software examples running on small-form-factor, battery-powered SensorTile hardware, together with the partner program and dedicated community support offers a fast and easy path to neural-network implementation on STM32 devices.

STMicroelectronics | www.st.com

 

32-bit MCUs Optimized for Motor Control in Robotics and More

Renesas Electronics has unveiled the RX66T Group of microcontrollers (MCUs). The chips are the first members of Renesas’ flagship 32-bit RX MCU family based on the new third-generation RXv3 CPU core. The new MCUs leverage advanced CPU core technology to achieve substantially improved performance, as much as 2.5 times better than previous RX family MCUs.

Combining the powerful new RXv3 core with the strengths of the current RX62T and RX63T MCUs, the new RX66T MCUs address the real-time performance and enhanced stability required by inverter control. The new MCUs are ideal for use in industrial applications in next-generation smart factory equipment, such as industrial motors, power conditioners and robots, as well as smart home appliances, including air conditioners and washing machines.
When operating at 160 MHz, the RX66T MCUs achieve best-in-class performance of 928 CoreMark 2, enabling more precise inverter control. The MCUs can control up to four motors simultaneously, making them well-suited for conventional motor control and applications requiring multi-axis motor control, such as compact industrial robots and personal robots, which are quickly growing in popularity.

In addition, the RX66T’s extra processing capacity allows developers to add programs utilizing embedded AI (e-AI) for motor fault detection. Such programs can detect motor faults and identify fault location in real time based on the motor’s current or vibration characteristics. Providing this capability offers developers the significant value-add of productivity, safety, and quality. The RX66T MCUs also integrate a 5V power supply that delivers excellent noise tolerance.

With more and more devices ranging from robots and power conditioners to washers and dryers joining the Internet of Things, motorized devices in the field will require online firmware updates throughout their life cycles. Applying e-AI for predictive failure diagnostics requires endpoint MCUs to be securely updated with learning results generated in the cloud. The RX66T MCU Group incorporates Renesas’ Trusted Secure IP (TSIP), which has a track record of CAVP certification3 and provides secure firmware updates and encrypted communication.

Key Features of the RX66T MCU Group:

  • Supports inverter control with a maximum operating frequency of 160 MHz, 928 CoreMark, on-chip floating point-unit (FPU), and 5V power supply
  • High-speed flash memory with 120 MHz maximum read operation to reduce speed differential with the CPU and realize both high performance and a consistent execution
  • Reduces footprint and component count by generating three-phase complementary pulse width modulation (PWM) output for up to four motors using 112-pin and 144-pin package MCUs, and up to three motors using 64-pin, 80-pin and 100-pin package MCUs
  • Configurations available with 16 KB of error correction code (ECC) SRAM, and up to 128 KB of SRAM with single-cycle access and single-bit error detection (parity checking) for high reliability
  • Ability to generate high-resolution PWM signals with a minimum state change duration of 195 picoseconds (1.6 times better than existing RX products) for power conditioner or digital power supply control applications
  • Renesas’ Trusted Secure IP (TSIP) provides secure firmware updates and encrypted communication with a track record of CAVP certification

The Renesas Motor Workbench 2.0 supports 20kHz real-time debugging and adds 10 new functions and an RX66T CPU card for the 24V Motor Control Evaluation Kit are available now.

The new RX66T Group comprises 80 MCUs with pin counts ranging from 64 to 144 pins and on-chip flash memory sizes of 256 KB to 1,024 KB. Mass production starts today for the widely used 100-pin package MCU with 256 KB or 512 KB of program flash and 64 KB of SRAM. Other MCU versions will release over time. Pricing for the RX66T MCU Group starts at $3.25 per unit in 10,000-unit quantities.

Renesas Electronics | www.renesas.com

PSoC MCU Variant is Purpose-Built for IoT Edge Processing

Cypress Semiconductor is expanding its Internet of Things (IoT) solutions portfolio with a new member of its ultra-low-power PSoC 6 microcontroller (MCU) family. The new PSoC 6 MCU is purpose-built to address the growing needs for computing, connectivity and storage in IoT edge devices. The new MCUs include expanded embedded memory with 2 MB Flash and 1 MB SRAM to support compute-intensive algorithms, connectivity stacks and data logging.

At the same time, Cypress has announced two new development kits for the PSoC 6 family, enabling developers to immediately leverage the industry’s lowest power, most flexible dual-core MCU with hardware-based security—to prolong battery life, deliver efficient processing and sensing, and protect sensitive user data. PSoC 6 is empowering millions of IoT products today, providing the most secure and low-power processing available.
Developers can evaluate the new PSoC 6 MCUs with expanded embedded memory using Cypress’ new PSoC 6 Wi-Fi BT Prototyping Kit (CY8CPROTO-062-4343W) (shown). This $30 kit features peripheral modules including Cypress’ industry-leading CapSense capacitive-sensing technology, PDM-PCM microphones, and memory expansion modules, enabling quick evaluation and easy development. The kit is supported by Cypress’ ModusToolbox software suite that provides easy-to-use tools for application development in a familiar MCU integrated development environment (IDE).

To streamline development of products with Bluetooth Low Energy (BLE) 5.0 connectivity, Cypress has introduced the PSoC 6 BLE Prototyping Kit (CY8CPROTO-063-BLE). This $20 kit features a fully-certified CYBLE-416045-02 BLE module—a turnkey solution that includes a PSoC 63 MCU, onboard crystal oscillators, trace antenna and passive components.

Cypress’ PSoC 6 MCUs are production qualified today and are in-stock at authorized distributors. The new PSoC 6 MCUs with expanded embedded memory are currently sampling and are expected to be in production in the first quarter of 2019. The PSoC 6 Wi-Fi BT Prototyping Kit (CY8CPROTO-062-4343W) is available for $30 and the PSoC 6 BLE Prototyping Kit (CY8CPROTO-063-BLE) is available for $20.

Cypress Semiconductor | www.cypress.com

Secure MCU Family Targets Low Power, Small Footprint Designs

STMicroelectronics has added the new STM32G0 microcontrollers (MCUs) to the STM32 family. The new G0 series targets entry-level applications that require greater energy efficiency, functionality, security, and value, in a smaller footprint. Extremely flexible packaging and memory options enable designers to do more within less space, and save cost. A new power-distribution architecture reduces external power and ground connections to just a single pair of pins, allowing more of the package pins—a precious resource in many embedded projects—to be allocated for user connectivity.

In addition, ST is making large memory densities available in small and economical low-pin-count packages. On top of this, the new generation features power-saving innovations that trim consumption close to that of specialized ultra-low-power devices.

To provide robust security for today’s connected devices, the STM32G0 series introduces a variety of hardware-based features including memory protection to support secure boot. Some devices in the series add to these features an AES-256 hardware cryptographic accelerator with a true random number generator (TRNG) to aid encryption.

Another valuable feature that anticipates a growing need is support for the latest USB Type-C specifications that allow easy, high-speed connectivity and battery charging, including Power Delivery version 3.0.

The STM32G0 series is based on the Arm Cortex-M0+ core, which is conceived to deliver sharp performance within a tight power budget. It targets fast-evolving products in the connected world, including smartphones, smart kitchen equipment, and appliances, air conditioning, consumer or industrial motor controls, advanced user interfaces, IoT devices, rechargeable connected devices, drones, lighting systems and more.

Package options are available from 8-pin, enabling developers to easily upgrade aging 8-bit MCU designs, to 100-pin. Flash from 16 KB to 512 KB, with 512 KB available in packages as small as 32-pin, enables more sophisticated applications on small, low-cost products.

The maximum CPU frequency of 64 MHz permits high execution speeds, compared to typical entry-level MCUs. On the other hand, extremely flexible clock configuration allows users to tailor performance within the available power budget. The internal clock is remarkably stable and comparable to high-end devices, being accurate to within ±1% from 0-85°C and ±2% over the wider range from -40°C to 125°C. This not only saves the board space and pins needed to connect a dedicated external timing device, but also can trim at least 10 cents from the bill of materials.

The STM32G0 series is extremely efficient, running at less than 100µA/MHz in run mode, and provides multiple reduced-power operating modes to save energy and extend battery runtimes. Devices draw as little as 3-8µA in stop mode with the real-time clock (RTC) running, and just 500 nA in standby with RTC (all at 3.0V, 25°C).

Moreover, peripherals are upgraded to enhance performance, speed, and accuracy. The devices feature a 12-bit 2.5 MSPS ADC, with hardware oversampling for 16-bit precision. There is also a 2-channel DAC, fast comparators, and high-accuracy timers with 7.8 ns resolution.

In addition to permitting extra user-assignable I/Os, the internal (ST-patented) power-distribution scheme also helps save BoM costs by reducing the number of external power-supply decoupling components.

Enhanced internal prevention of electromagnetic susceptibility (EMS) is yet another feature that saves board space and BoM costs. Protection against fast-transient bursts above 4.5kV, in accordance with IEC 61000-4-4, relaxes the demands for surrounding filtering components and eases board layout. For product-development teams, the ability to easily ensure good electromagnetic behavior facilitates EMC certifications for faster time to market.

ST is planning several STM32G0 lines, including the STM32G071 and similar STM32G081 with hardware cryptographic enhancement. There are also Value Line STM32G070 devices for mass-market applications. Pricing starts from $0.69 for the STM32G070CBT6 Value Line MCU in a 48-pin package, with 128 KB flash, for orders of 10,000 pieces.

STMicroelectronics | www.st.com

Connecting USB to Simple MCUs

Helpful Hosting

Sometimes you want to connect a USB device such as a flash drive to a simple microcontroller. The problem is most MCUs cannot function as a USB host. In this article, Stuart steps through the technology and device choices that solve this challenge. He also puts the idea into action via a project that provides this functionality.

By Stuart Ball

Even though many microcontrollers (MCUs) may have a USB device interface that can connect to a host, rarely is a host interface available on simple MCUs. There are various reasons for this, including the complexity of implementing a USB host interface on a simple processor, the need to enumerate and recognize many device types and the memory required to do so. Functioning as a single USB device is much simpler. Implementing a host interface also puts some constraints on the MCU for throughput and clock speed choices.

I have been working on a retro CPU board design, using the Z80180 processor that can run the old CP/M-80 operating system. This is just a fun project, with no real practical use. But the project needed storage that could replace the floppy disk normally used in CP/M. I considered using SD cards, but in experimenting with them, I decided that they are just not what I wanted. What I did want was the ability to plug a USB flash drive into the circuit.

Even though my CP/M project is not that useful, there are other applications where the ability to plug a USB flash drive into an MCU-based circuit is desirable. Examples include:

• Capturing logging or debug data
• Flashing new code into the MCU
(if the MCU has self-programming flash)
• Downloading crypto keys or other
one-time data to the MCU
• Downloading configuration information
to enable or disable features
• Downloading language translation
information
• Retaining critical data
• Serving as a “key” to restrict access to
maintenance mode functions only
to authorized personnel
• Downloading GPS coordinates or map
information
• Updating stored part numbers, serial
numbers or any stored value that can
change.

There are ways to implement USB host capability on an MCU, especially if it has a USB interface that supports OTG (on-the-go) USB capability. But no matter how you do it, you have to write or obtain drivers and integrate the functionality into your software. You will also be constrained as to which MCUs you can use, based on availability of USB host capability. But for a simple design, you may not want to be forced to use a part just because it has USB host capability.

VDrive3

FTDI makes a USB host module called the VDrive3 that provides a limited USB host interface and can connect to an MCU (or even a PC) using an asynchronous serial port. The module also has an SPI interface, although I did not use that in my design. A link to the datasheet is provided on the Circuit Cellar article materials webpage.

The VDrive3 (Figure 1) uses the FTDI Vinculum IC, which provides a USB host interface on one side and a serial or SPI interface to your MCU on the other. Since all of the hardware and software to implement the USB host interface is inside the VDrive3 module, you don’t need to develop USB stacks or drivers, or deal with licensing issues. The VDrive3 comes in a plastic housing so it is easy to mount in a rectangular cutout.

Figure 1
VDrive3 module. The module comes with the attached cable, which I modified to use a different connector on my board.

The VDrive3 has a file-based interface for USB flash drives, which means that you don’t need to manage the memory yourself. You open files, write to them, read them, close them and create directories. The VDrive3 shields the host from the memory management functionality, allowing all this to be done with simple commands over the serial interface. The VDrive3 manages the file system so you don’t have to.

In my application, I was emulating a floppy disk. I defined the “virtual floppy” to have 256 tracks of 32 sectors each. To implement that on the VDrive3, I created 256 directories named TRAK000 through TRAK0FF. In each directory, I created 32 files named SEC00 through SEC1F. So, when the CP/M operating system wants to read or write a specific sector, the AVR MCU navigates to the directory that represents the selected track and opens the sector file corresponding to the specified sector.

This is a simple mechanism that is really applicable only to the way I’m using the flash drive, but the general principles apply to any VDrive3 application. You can create a directory, and then create files within the directory that correspond to whatever information you need to store. Or you can skip the directories and store everything at the top directory level.

One advantage of using the VDrive3 is interoperability with a PC. If I used SD drives, I would either have a proprietary format that couldn’t be read in a PC, or else I’d have to manage a PC-compatible file system in my MCU. But the VDrive3 recognizes the standard FAT12, FAT16, and FAT32 file systems, so a flash drive written on a VDrive3 can be inserted into a PC and read. This could be very useful if you are collecting debug or log data from your MCU application. In my case, I could make a copy of a CP/M “floppy” on a PC.

Commands

The VDrive3 recognizes various commands, including SEK (seek to file offset), OPW (open file for writing) and WRF (write to file). The commands used in my application are listed in Table 1. VDrive3 commands can be sent in ASCII as in the command list in Table 1, or you can configure it to use a short command set that requires fewer bytes to transmit. Data can be either ASCII or binary. The VDrive3 defaults to the extended command set and binary data transfer, and I leave the module in that mode for my application.

Table 1
The VDrive3 recognizes various commands. Shown here are the commands used in my application. VDrive3 commands can be sent in ASCII as in this command list, or you can configure it to use a short command set that requires fewer bytes to transmit.

Generally, each command is sent as a string of two or three characters. If data such as a filename are needed, the command is followed by a space, the appropriate text and a carriage return character (0x0D). If no data are needed, such as for the FWV (FW version) command, the command can be immediately followed by the carriage return. Setting the baud rate requires a divisor value, so the SBD command (set baud rate) is followed by a 3-byte divisor value and then a carriage return. …

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

Tiny MCU-Based Development Platform Hosts Dual USB Ports

Segger Microcontroller has introduced emPower-USB-Host, a compact low-cost development board. With two USB host ports, many applications using USB peripherals can be realized with little effort. Precompiled applications for barcode and smartcard readers, as well as POS displays, LTE sticks and USB to LAN adapters are available for download, including complete projects for Embedded Studio with source code of these applications. The applications are using Segger’s emUSB-Host software API, which makes accessing the different types of USB devices easy.
emPower-USB-Host uses the emLoad bootloader, pre-loaded into the flash of the MCU, to easily change applications in seconds using a USB flash drive. Development of custom applications is also supported. The board has a debug connector, providing full access to the NXP LPC54605J512 MCU with its Cortex-M4 core. Schematics and PCB layout of the board are available under a Creative Commons license. This way, the hardware can be used as a blueprint for custom devices using two USB host ports.

Segger Microcontroller | www.segger.com