Category: Networking

We have liftoff. My first Balloon Environmental Sensing test successfully “slipped the surly bonds of earth, and danced the skies on laughter-silvered wings” sending data back the whole time. First flight was at the Digital Naturalism Conference in Gamboa, Panama, featuring 10+ sensor values streaming from the balloon to an online data collection system and dashboard.

It was a big success!

This party-balloon platform is designed for inexpensive aerial environmental sensing. Balloon lofting is perfect for scientific research, educational programs, hacker workshops, technology art, as well as low-cost indoor or industrial monitoring. Is the humidity overhead the same as on the ground? Does wind speed change? Is it dusty up there? How much UV light penetrates the jungle canopy at different levels? These are all questions that can be answered with this platform.

Since advanced LTE wasn’t available in Panama and SigFox coverage was absent, I decided to use the Digital Naturalism Lab’s LoRaWAN gateway—long-range radio networking that uses very little battery power. The data collection firmware code was written in MicroPython running on a LoPy4 wireless microcontroller module from Pycom. This first set of tests used all the Pysense evaluation board sensors including light, temperature, altitude, humidity, pitch, roll and acceleration in three axis. This data was taken in real time at 30-second intervals and transmitted using LoRaWAN across Things Network servers to be displayed on a Cayenne dashboard. The Pybytes cloud platform appears promising too, I’m looking forward to exploring that more in later phases of the project.

Gamboa has one very small grocery store. It does not sell helium or any other noble gas. Luckily the generous David Bowen allowed our sensor package to hitch a ride on his drone during my first week, so up we went for initial testing. As is so often the case, even this partial test resulted in lots of changes. In this case I realized we needed a frame counter, better battery connections and voltage monitoring before flying again. A second shakedown flight on Bowen’s drone proved the value of these additions, and gave us an excellent sampling of the data to come. We also did a bunch of range testing work, which is covered in a separate blog post.

A taxi trip into Panama City brought us to Mundo de los Globos (World of Balloons) where helium tanks are available, along with 1-meter balloons in plenty of colors. With a full tank of the squeaky gas, we returned to Gamboa and I started inflating our ride to the sky.

The next morning it was time for the sensor package to take its first balloon ride, and up we went. Andy Quitmeyer got some amazing footage from his drone and Trevor Silverstein shot high-end video from the ground (coming soon). I could not have asked for a better documentation team. The balloon reached 60 meters (about 200 feet) above ground level, which was the limit of the reel line I was using for a tether.

We got great data back from this flight, and soon made a second one—this time in a large field away from balloon-eating trees. It was easy to get LoRaWAN signal from altitude since LoRa works best in line-of-sight conditions. We plan to do more with the Things Network to support the biology and ecology research in Gamboa that are spearheaded by the local Smithsonian Tropical Research Institute.

Here’s a screenshot of the data dashboard from the flight.

And a few graphs:

Another afternoon was set aside for a proper party-balloon experiment. Using a smaller battery I was able to loft the sensor package using 6 small balloons and the small amount of remaining helium. This worked too, though 7 balloons would have provided more lift and handled the wind better. Next time, more balloons!

Data from these flights can be downloaded, and the MicroPython code for the LoPy4 or FiPy can be found on my GitHub.

For the next version of the Balloon Environmental Testing platform, my plan is to explore other sensors and wireless links. I’m especially interested in UV light, air quality, wind speed and loudness. In Gamboa we talked about trying some sound recording too. As the balloon itself is silent, it’s the perfect place to record. For wireless links I’m itching to explore some new cellular low-bandwidth, low-cost protocols, LTE Cat-M and NB-IoT, because they don’t require any dedicated base stations and should work great at the altitudes needed for balloon flights. Additional plans include extended day-long flights, free flight with GPS, and maybe look at hydrogen gas but not near any kids!

The initial prototype goal was to see if the full system will work, and it does! Gamboa was a great success for this project, giving me the time, venue and documentation assistance to bring this idea to life. If you get a chance to attend the next Dinacon, I strongly recommend it. And if you’re interested in balloon sensing for any experiment, class or project, let me know!

Last month we did range testing on a new LoRaWAN radio network installation in Gamboa, Panama. The network, which covers the entire center of town is part of the Digital Naturalism Lab’s commitment to supporting wildlife and environmental research. Gamboa, where the Smithsonian Tropical Research Institute’s laboratory is located, is surrounded by the Soberanía National Park, a large, intact tropical forest that’s jam-packed with rainforest wildlife and flora. Doctoral students and researchers laboriously visit multiple sites daily to collect data that could easily be transmitted in real time wirelessly at low cost over a public science data network. That’s our goal.

LoRaWAN is a long-range, low-bandwidth protocol that operates in the 915 MHz frequency range. We are using a MultiTech Conduit gateway that is configured to pass data through The Things Network, a community-supported global network for LoRaWAN data. To test this base station’s range I created a GPS-enabled signal strength measurement tool using a Pycom LoPy4 wireless microcontroller and Pytrack GNSS development board. The code, written in MicroPython, takes a GPS reading and transmits it to the base station, where the signal strength is measured and passed along with the location through TTN’s server. The resulting data was easily transformed into a map that shows the signal strength recorded at each location.

We compared two different setups:

  1. A smaller indoor antenna that came with the MultiTech Conduit gateway, located inside the house near a window on an upper floor. This was tested by walking at street level around Gamboa with the Pycom setup.
  2. A 2-meter-long roof antenna, held in the hot sun on the roof of the house. This antenna sourced from Alibaba is an outdoor antenna nominally for 900 MHz frequencies. We used a short 30 cm cable to connect it to the Conduit router, also located on the roof. The setup was also tested from street level, this time from the back of a pickup truck driving slowly around Gamboa.
Trucking around Gamboa with range testing in the back.

We got a surprise! The indoor setup with the small antenna worked significantly better than the large roof antenna. This is most likely due to degraded performance of the roof antenna itself, rather than its prime location or the short cabling. We are pretty convinced that the Alibaba antenna simply wasn’t up to snuff. For the moment, I’m recommending that we continue with the stock antenna in the current location until we can get an outdoor setup that can be proven superior.

Results

Here’s our testing results. The number next to each is the received signal strength indicator (RSSI) in dBm. If you click on a test location you can also see the signal-to-noise ratio (SNR) listed below the RSSI number.

Interactive map: Indoor antenna test:

Interactive map: Outdoor antenna test:

These tests were a lot of fun to do and the results saved Dinalab from installing an antenna that would have reduced system performance, so they were a big success. The Pycom equipment was easy to set up and configure as usual. My MicroPython code and our raw data file results can be downloaded here.

The Problem with Time & Timezones

Maybe you’ve struggled with coding for time zones, local calendars or historical time changes. Or perhaps you’ve wondered why a software developer went pale when you asked them to add local time calculations to an app and wondered why?

In this classic review, Tom Scott explains how a seemingly simple measurement calculation becomes a “twisty-turny thing” that takes software developers down a path to madness.

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:

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:

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