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.

IoT Platform Gets Thread Certification

Express Logic has announced that its Industrial Grade X-Ware IoT Platform is an official Thread Certified Product, and the only such solution from an independent RTOS provider. Created by the Thread Group, Thread is a reliable, low-power, secure, and scalable mesh networking solution that provides a foundation on which any application layer can run.

The X-Ware IoT Platform, powered by Express Logic’s high-performance ThreadX RTOS and NetX Duo dual IPv4/IPv6 TCP/IP stack, provides industrial-grade implementations of IPv6 over Low Power Wireless Personal Area Networks (6LoWPAN), Constrained Application Protocol (CoAP), and Datagram Transport Layer Security (DTLS).

According to Express Logic, Thread certification provides more than just protocol compliance. Rather than measuring against single reference implementations, Thread testing validates each device’s specification conformance against a blended network comprised of four reference stacks to ensure device interoperability and reduce risk and time to market. Compliance to the Thread certification protocols and standards is administered and regulated by UL a global, independent, safety and certification company with more than a century of expertise in implementing certification solutions and standards.

The X-Ware IoT Platform contains no open source, is high performance, and boasts an extremely small footprint. The X-Ware IoT Platform automatically scales to use only what is needed by the application, making it well suited for the smallest low-power IoT devices. In addition to the performance and size advantages of the X-Ware IoT Platform, ThreadX and NetX Duo have attained the highest level of safety certifications. They include IEC 61508 SIL 4, IEC 62304 Class C, ISO 26262 ASIL D, EN 50128 SW-SIL 4, UL 60730-1 Annex H, CSA E60730-1 Annex H, IEC 60730-1 Annex H, 60335-1 Annex R and IEC 60335-1 Annex R, 1998.

Thread certification will also allow developers to confidently leverage the entire X-Ware IoT Platform solution, including the safety-certified FileX, GUIX, and USBX solutions and technologies, knowing it will seamlessly connect to other Thread-certified devices.

Express Logic | www.rtos.com

Thread Group | www.threadgroup.org