Category: XBee

I’ve been writing hands-on examples for using MicroPython on XBee radios. MicroPython is an open-source programming language based on Python 3, modified to fit on small devices, and optimized for microcontrollers. By using MicroPython, an easy-to-learn scripting and programming language, you can rapidly prototype intelligent behaviors at the edges of your network. Cryptic sensor readings can be transformed into useful data, excess transmissions can be intelligently filtered out, and modern sensors and actuators can be employed directly. Here’s the examples thus far:

Here’s a fun project I created for Digi International a while back. I just wrote up for them as an Instructable so that anyone can make their own. All materials, steps, diagrams and necessary code are included in the instructions. You can get started right away.

The Digi XBee3 Cellular SMS ActivityBot is an educational robot that can be controlled with text messages from any cell phone, anywhere in the world. The ActivityBot, made by Digi’s friends at Parallax Inc. is designed for first-time robot-builders and is widely used in technology and engineering education.

SMS text messages sent to the robot can command it to drive forward, back, or the left or right. It has a built in roaming mode where it becomes self-driving, using two “whisker” sensors to detect obstacles to the right or left. The ActivityBot uses the Digi XBee3 Cellular module to report back what it’s sensing in real time. For example, any time one of the “whisker” sensors is triggered, that event is immediately reported back to the cell phone as a text. (Of course, only robots should text and drive.) You can see all of these behaviors in the video below, then build your own using these complete instructions.

Introduction

Simple programs can make a big difference! An XBee running small amounts of code can perform some pretty important tasks. Cryptic readings can be transformed into useful data, excess transmissions can be intelligently filtered out, modern sensors and actuators can be employed directly, operational logic can glue inputs and outputs together in an intelligent way.

Here are some useful MicroPython examples that should run within 12KB of RAM, useful even in a small sandboxed implementation. Required parts and a method for simulating limited RAM are noted below.

Examples


Send “Hello World”

This example shows how to send some text data via an XBee in transparent mode.

  1. SETUP: Connect the XBee (configured to factory defaults) as shown in the diagram below:XBee Pyboard Basic_bbXBee Pyboard Basic_schem
  2.  PROGRAM: Load the code sample into your pyboard’s main.py file
  3. RESULTS: Connect a second XBee, also configured to factory defaults, to your computer. Then use a terminal program like XCTU or CoolTerm to receive the text data. Each time you reset the pyboard, it sends “hello world!” one time to your computer. The results will look like this:
    XBee MicroPython Send Text screenshot

Read More »

XBee radios have rocketed into space! Early in the morning on July 7, NASA launched a NASA Black Brant IX suborbital sounding rocket from their Wallops Flight Facility. Onboard the rocket was an experiment running the very first wireless XBee network to leave our planet. Here’s a quick description recorded on launch day:

The rocket carried the SOAREX-8 Exo-Brake flight test from NASA’s Ames Research Center in California, a kind of thin-air parachute for returning cargo from the International Space Station or for future landings on Mars. The XBee sensor network was used to collect temperature data, air pressure readings, and 3-axis acceleration parameters.

The NASA team retrieved these readings via an on-board gateway created with an Arduino MegaXBee radio, and an Iridium module. The Arduino Mega microcontroller was used to manage communications between the local XBee wireless network and the long-range Iridium satellite uplink. All of these components were chosen as part of a NASA initiative to use commercial off-the-shelf parts wherever possible, and to employ rapid prototyping tools to efficiently explore new ideas.

NASA-XBee-Arduino-WSN

An on-board wireless XBee network relayed science data back to NASA throughout the space flight.

The XBee network soared to an altitude of 206 miles before ending its maiden voyage in Atlantic Ocean after completing its duties. Since all data was relayed successfully back to Earth, NASA did not plan to recover the payload.

Here are some more stories on the flight:

xbgw stock dashThe XBee ZigBee Cloud Kit that our team developed last year recently took home several nice industry
awards. We had set out to create a kit simple enough to help non-engineers quickly connect their creations to the cloud yet flexible enough for professionals to build rapid prototypes using advanced programming and cloud-based data sets. The kit is built around Digi’s XBee ZigBee Gateway. It includes code examples and powerful tools for making Internet-connected projects. It also enables remote control of devices and data through a highly customizable open-source dashboard application, pictured here.

IoTInnovations_logo_2015-small-300x164Our XBee ZigBee Cloud Kit won the IoT Innovations 2015 award from ConnectedWorld magazine. ConnectedWorld’s Peggy Smedley notes, ”Building wireless and cloud-connected solutions are made easier for developers as a result of the Digi XBee ZigBee Cloud Kit and XBee Gateway.” We are told that winning products were seen as the most creative and technologically advanced products, services, and platforms currently available for the Internet of Things. That’s pretty great.
M2M_ExcellenceThe kit was also honored with the 2014 M2M Evolution IoT Excellence Award, given by TMC & Crossfire Media. This award “honors innovative products that support the availability of information being deduced, inferred and directly gathered from sensors, systems and anything else that is supporting better business and personal decisions.” We’re certainly happy to be a part of making good decisions!

The XBee ZigBee Cloud Kit includes:

  • xbeezigbeecloudkitOne XBee Gateway – ZigBee to Ethernet/Wi-Fi
  • One XBee-PRO ZigBee 2.4GHz module
  • One development board w/breadboard
  • Cables and power supplies
  • Basic prototyping components: LED gauges, jumper wires, resistors, vibration motor, temperature sensor, audio buzzer and a potentiometer
  • Sample Web application on Heroku
    • Completely open source for easy customization
    • Configurable widgets
    • Integrated with the Device Cloud

You can learn more here about the XBee ZigBee Cloud Kit. Ready to try one out? They’re available from Digi-Key ElectronicsMouser Electronics or Digi’s online store.

Elicia White

I spent a fun hour the other day talking with Elicia White on her podcast, Embedded.fm: The Show for People Who Love Gadgets. We chatted about XBees, ZigBee, my book, sensors, data science and more. I had just come from visiting NASA, so I even got to explain a bit about how they are putting XBees in Space.

Elicia is an embedded systems consultant at Logical Elegance. She wrote the book Making Embedded Systems for O’Reilly, works at PARC and interviews like a pro. The episode is called: “Make us All Into Sherlock Holmes.”

Have a listen:

.

xbee-in-spaceNASA’s Ames Research Center is putting the first ZigBee radio network into space! XBee radios will form a prototype telemetry system on a NASA Soarex sounding rocket launching this coming January, 2015.

The NASA sounding rocket will journey into space around 200 miles above the earth, run experiments and then return ballistically into the Atlantic Ocean. The on-spacecraft ZigBee network will be used to monitor a new parachute-like exo-brake that will be deployed for testing hypersonic braking in the thin upper-atmosphere. Exo-brakes are being tested for returning samples from Earth orbit, and for slowing landers on other planets like Mars where the atmosphere is much thinner than Earth’s.

soarex-7_launch

Soarex launch

A three-node XBee ZigBee network will be used to monitor the exo-brake performance so that no wires need to be added to the device. The nodes will monitor six different acceleration parameters as well as overall temperature and air pressure. Future wireless networks may be used to monitoring the spacecraft structure itself. This network can also be made available to other experiments on the same flight to route their telemetry to an Iridium radio that transmits all the data via satellite back to Earth. This last link is essential because the sounding rocket will not be recovered intact. Like Laika the Soviet Space Dog, NASA’s XBees are taking a one way trip for the benefit of science.

Wireless networks on spacecraft are a new idea. Traditionally all onboard connections use physical cabling. This adds weight, complexity and the need for extra fuel. Because aerospace is a necessarily conservative endeavor, new technologies are typically introduced slowly. Therefore rather than just taking everything wireless all at once, ZigBee is being tested first on missions where the higher risk of new tech is acceptable. After successful trials the systems should be proven enough to go into a hardening process before being incorporated into more critical projects where risks must be kept to a minimum.

Arduino-XBee-NASA

XBee Arduino prototypesc

Modern NASA programs are mandated to avoid the expense of creating custom hardware when viable alternatives are available commercially. Experimental systems like wireless networks for spacecraft are also started on shoestring budgets, often assisted by student engineers. Therefore everything on this ZigBee project is being prototyped using off-the-shelf maker components such as Arduino boards, adapter shields from SparkFun Electronics and XBee ZB radio modules from Digi International. XBee was selected because it is easy to incorporate with Arduino, well-documented and readily commercially available.

Soarex-Payload-Area

Soarex payload bays

The system is being designed with a little help from my Building Wireless Sensor Networks book, and a lot of expertise from the NASA team. If this first test goes well, the next version will be more customized and could include the Programmable XBee or even the XBee Plus Arduino board that I’ve been prototyping over the last few months.

The project team at NASA includes Richard Alena and Thom Stone, who have written papers including ”Fault tolerance in ZigBee networks” and “ZigBee – A Smart, Viable, Wireless Architecture for Spacecraft Avionics.”

 

Here’s video from a prior launch of the Soarex rocket that will carry XBee radios where no XBee has gone before:

LilyPad XBee radioThe LilyPad XBee sew-in wearable radio created by myself and Kate Hartman just got an update to add a reset button and improve its manufacturability. This board can be paired with LilyPad wearable sensors, custom built sensors and a variety of output devices to create a complete wireless wearable system. Available from Sparkfun for just $14.95 with discounts available for larger quantities. Get yours today!

 

LilyPad XBee frontLilyPad XBee sideLilyPad XBee back

 

 

Botanicalls was recently featured in the Smithsonian Channel’s “Amazing Plants” documentary. There’s even beauty shots of the Arduino and XBee radio components!

Also here’s the segment, filmed all the way back in 2007:

Botanicalls Smithsonian Channel Amazing Plants

logrono-lie-detect-robFor the latest Digi Hackathon, I headed overseas to hold our first ever creative construction event at Digi’s office in Logroño, Spain. Using XBee WiFi Cloud Kits, the four teams hacked away for what was the most competitive session yet. In a matter of hours, each team had to quickly brainstorm, build, and present their cloud-connected projects. Their results were terrific.

Projects included:

  • The Garbage M.A.N.: Smart garbage containers monitoring for smart cities
  • Germinator Plus: An automated system for remote greenhouse seed germination monitoring.
  • Lie-Detect-o-Meter: A mobile battery-operated wristband lie detector for public questioning.
  • The Smart Plug-Y-Play: A power consumption monitor and remote control for computers and other electrical appliances.

Read more and see pictures on the Digi blog.