SDI-12 data logging on Beagle Bone Black

In my previous post, I wrote about my initial success reading SDI-12 sensors using my SDI-12 USB adapter and a Beagle Bone Black (BBB), via a simple linux command “screen”. Upon further testing, I had trouble running my open-source python data logging script on BBB, because a number of python modules including pyserial and urllib3 are missing and I couldn’t install them the way I used to do on a Raspberry Pi. So after searching online for the past few days, I finally found how to solve the problem and here is a screen shot of the data logging script happily logging data on BBB:

BBB_logger_screenshot

The SDI-12 sensor I was using was the GPS sensor from my newest SDI-12 + GPS USB adapter. It has an on-board GPS module (separate purchase from Adafruit and its vendors). I was logging coordinates.

Here are the steps to prepare your BBB to run the data logging script:

  1. Install pip for python3: sudo apt-get install python3-pip
  2. Upgrade pip: sudo pip3 install –upgrade pip
  3. Install pyserial module: sudo pip3 install pyserial
  4. Install dropbox module: sudo pip3 install dropbox

The reason that I installed dropbox is because that I can use it to send data files from remote logger to my desktop, and installing it upgrades urllib3, which I use to generate URI-safe address for sending data to sparkfun’s phant server. If you are not doing telemetry or you prefer logging into your BBB to get your data files, you don’t have to install dropbox or upgrade urllib3. Now all I have to do is to update my documentation and welcome BBB to the club!

Adding Beagle bone to the mix

I was recently contacted by someone who was interested in using the SDI-12 USB adapter on a Beagle Bone Black single board computer. I’ve never used a Beagle Boards but I know that they are ARM-based computers running linux thus should operate similarly to the Raspberry pi boards that I’ve been playing since 2012. So I took the dive and got a Beagle Bone Black from MCM electronics and gave it a try. Right out of the box the board boots into a version of Linux. I was able to test its connectivity with the SDI-12 USB adapter successfully using the “screen” command. Later I ran a simple Python script under Python 2.7 and got very nice results:

There are a few differences that I noticed while exploring BBB:

  1. There is a “serial” module included in Python that is not available on other platforms, such as windows, linux, Mac OS, or Raspberry pi. It functions like the pyserial module used on all these systems.
  2. The board boots much faster than raspberry pi 3B, maybe in 15 seconds. RPI 3B takes about 30 seconds. This is a good thing.
  3. There are a lot fewer instructions on basic operations for Beagle boards than Raspberry pi, which was the primary reason I got my raspberry pi B instead of Beagle board back in 2012.

When I have more time, I will test my open-source python data logger on BBB to make sure it works just as it does on all other systems. For now, one more box is checked: “compatible with Beagle Bone Black”.