Thursday, August 7, 2014

Wireless Communication For Microcontrollers & August 7 MCU Group Meeting

Traditionally, microcontrollers (MCUs) didn't need wireless communications because they did all their interactions in a limited space. If they interacted with something a few inches or a few feet away, wires connected the interacting devices. However, in 2014 some MCU applications require wireless communication, and this post takes an initial look at the wonderful world of wireless for MCUs.
Breadboard setup for #9 video wireless communication

This post's overview of MCU wireless looks at Jeremy Blum's #9 Arduino video tutorial, the wireless exercise Ed Smith developed as his alternative to using the BOM components (bill of materials) and code in Jeremy's #9 video exercise, and a few recent developments and web resources for MCU wireless communication. In addition to presenting an updated look at MCU wireless, researching and writing this post is a step toward locating or developing a training exercise for Arduino wireless communication that is more up to date than Jeremy's #9 video, which was published in Febrary 2011.

Two of the primary driving forces behind MCU wireless communications are the internet and the increasing power of mobile or miniature computing devices. As the increasingly ubiquitous smartphone and the rise of the Internet of Things (IoT) create a sharp increase in the production volume and tech innovation in MCU wireless components, the number of wireless technology solutions continues to rise and the cost to do wireless communications continues to drop. If you search online for MCU wireless projects, tutorials or components, check the dates on your search results. Information from five or even two years ago may be totally outdated.

First up -- points of discussion about Jeremy's #9 video at tonight's Humboldt Microcontrollers Group meeting.

Most of the participants in tonight's meeting had watched all or part of the #9 video. But no one had done the exact wireless exercise that Jeremy demonstrated and explained. The primary reason no one duplicated his exercise was that the components in Jeremy's exercise cost too much to buy for learning about wireless. If you already had a couple spare Arduino Unos and the XBee components sitting around idle, then Jeremy's exercise would be reasonable, but it didn't make sense to anyone at the meeting to buy all the components just to do the #9 video exercise. The main value of the #9 video seemed to be that it focused everyone's attention on MCU wireless communication, and even if we didn't follow Jeremy's exercise exactly, a couple people in the group did develop somewhat analogous wireless systems. And there was a lot of good discussion about the various wireless options and components, probably more than if everyone had used Jeremy's components.

Nordic RF module
Second topic -- Ed Smith's MCU wireless communications components, circuitry and code.

Ed put together a low-cost wireless exercise using a couple Nordic RF transceivers he had available. The parts used in Ed's setup include Texas Instruments Tiva-C launchpad 296-35760-ND, Texas Instruments MSP430G2553 Launchpad 296-27570-ND, Nordic 2.4 GHz RF transceiver NRF24L01+, Pin header 952-2247-ND, Pin socket header S7031-ND, perfboard, jumper wires, solderless breadboard, TFT LCD 2.2" 240x320 and an accelerometer. The breadboarded circuit for the MSP430 and accelerometer is shown in the picture below on the right. Ed's hardware sent 3-axis information from the accelerometer from the MSP430 to the Tiva-C board and displayed it on the small LCD screen. The code was written using Energia, which is designed
MSP430 with Nordic RF 
"bring the Wiring and Arduino framework to the Texas Instruments MSP430 based LaunchPad". Ed will be writing up a separate blog post about his setup and the Nordic transceivers, including code and pictures, so look for that to show up on this blog soon.

An alternative to the wireless components Jeremy used in the #9 video and the components Ed used is the JeeNode. Nick got two JeeNodes for about $22 each with 915 MHz radios and worked with MCU wireless using those boards. According to Digital Smarties, the UK fulfillment transaction processors for the boards, the JeeNode is,
"a compact wireless board with an Atmel 8-bit RISC microprocessor. JeeNodes are compatible with the Arduino platform and can be programmed under Windows, Mac OS X, or Linux using sketches created with the Arduino IDE. Each JeeNode has 4
identical “ports” for attaching analog and digital I/O logic, I2C devices, and more. The JeeLib library makes it easy to interface to these ports. The JeeNode Kit contains all the parts needed to build a JeeNode v6 – including an ATmega328p processor and an RFM12B radio module."
Modern Device does much of the manufacturing for JeeLabs and is the US distributor for JeeNodes. The JeeLabs website describes the board this way:
"The JeeNode is a wireless micro-controller board designed for a variety of Physical Computing tasks. From measuring and reporting temperature, humidity, and other environmental data to tracking and controlling energy consumption around the house. It was inspired by the Arduino Duemilanove and Uno boards, and by the “Real Bare Bones Board” (RBBB) from Modern Device."
The JeeNode component bill of materials (BOM) for learning MCU wireless would only be slightly more expensive than the Nordic RF components. Ed said for various prototypes or applications, the JeeNode would be more capable than the Nordic systems, and would be well worth the few extra dollars.

Third subject -- Worthwhile web resources for newbies to understand MCU wireless.

I haven't done an exhaustive search for web resources on MCU wireless, so please send me links to sites you feel are good on this topic, especially if you think they're better for a particular aspect of wireless compared to the sites I've listed. If you're new to wireless communications, you might want to read through the Wikipedia entry for Wireless Networks. If you are already have a good background on wireless networks, consider looking through the SparkFun Wireless Buying Guide. The SparkFun guide is where I read about Nordic RF modules yesterday for the first time ever. Then I found out what Ed used for his wireless exercise, and it turned out to be Nordic transceivers (or Nordic clones). The wireless section of your favorite MCU vendor's website is another good place to learn about wireless, especially as it applies to the MCUs you use and understand. Atmel, Texas Instruments and Microchip main pages for wireless are listed below.
If you go through the above resources and want to know more, search for your topics of interest and you'll find lots of relevant websites to sift through for more specific info that's relevant to you.

Fourth issue -- Developing an inexpensive MCU wireless educational exercise for the Humboldt Microcontrollers Group.

We decided tonight that Ed's setup is about as inexpensive as you're going to be able to do a two-MCU, two-transceiver wireless exercise. Another wireless learning exercise we will probably research is one with a single MCU and a Wi-Fi system to directly connect the MCU to the Internet. Figuring that one out will wait for another day.

Along with our discussions about MCU wireless, tonight's Humboldt Microcontrollers Group meeting covered a multitude of topics, including but not limited to freezing hard drives to recover data from them, buying vacuum tubes, flying quadcopters that have a mind of their own, the unpredictable adventures of buying electronic components from Chinese eBay sellers, good power supplies and power supplies to stay far away from, how to load Arch Linux on a Chromebook, repairing welders, upgrades to automated doors on chicken coops, the Humboldt Laser Harp, and what the topic of the next MCU group meeting should be. If you have suggestions for MCU meeting topics, please contact me at arcatabob (at) gmail [dott] com or contact Nick A.

If you are interested or experienced in MCU wireless, it would be great to connect with you -- email me at arcatabob (at) gmail {dott} com. Hope to see you at the next Humboldt Microcontrollers Group meeting on Thursday, August 21.


No comments:

Post a Comment