LoRa Radio – test #1 : one mile

LoRa Radio

I’d like to transmit data from a buoy floating in the water to a base station on shore. Power consumption and broadcast range are primary considerations. The amount of data being transmitted is expected to be minimal.

Screen Shot 2017-11-28 at 12.11.50 AM

I purchased two of the Adafruit RFM95W LoRa Radios to see if this might be a suitable solution. They were fairly inexpensive so I figured it was worth a test. The modules transmit on a license-free frequency and the Adafruit website says signals can travel 2 km – 20 km (1.4 – 12.4 miles) depending on the type of antenna used.

During the Thanksgiving holiday I had the opportunity to test the range of two LoRa radios in a neighborhood in Eugene, Oregon.  I wired up an Arduino Uno and Pro Trinket following the Adafruit provides tutorial, see their tutorial for all the details.

The Pro Trinket was setup as the Transmitter, this was located at the house. The Uno was setup as the Receiver and plugged into my laptop so I could watch the serial monitor as I walked around the neighbor hood. I was happily surprised, the radios transmitted one mile through in the suburban area with lots of trees and buildings in the way. While this isn’t ground breaking news, it was nice to conduct a real-world test and verify the websites claim. Below is the google maps screen shot from my phone that was used to verify the distance of approximately one mile.

IMG_9751

Unfortunately I had to end the walk-about when it began to rain. But I plan to conduct more range tests to see how far these little radios and -2dB quad band antennas can broadcast. One interesting observation: I was not getting all of the data being sent from the transmitter at the house. The simple “hello world” example sketch included a counter to track the number of messages being sent out by the transmitter. At the end, it appears that every fifth message was being received. I’ll need to learn more about mitigating this issue in the future, but for now this is a good enough “first test”.

Screen Shot 2017-11-27 at 10.01.23 PM

Terrain will play in big factor  in determining maximum range, so I’d also like to run another test over a large body of water to see how the signal attenuates. This would be more similar to the conditions experience when the buoy is deployed. Maybe I can use a kayak and deploy a really simple buoy in the harbor and see if I can receive a message from my office building in Sausalito, CA.

More exploration onto the world or radios is needed!

 

 

Advertisements

New Circuit Board Design – r2

Version – 2

I’ve been learning how to use Eagle CAD to layout circuit boards and export gerber files. We have an Othermill CNC machine at work so I am beginning to prototype double sided boards for the buoy. This is the second version of my initial design – or what I am calling r2. *More info on my first design below…*

IMG_5384

This copper board is essentially a larger “mother board” with headers for each of the smaller breakout boards to plug into. I used headers rather than soldering the breakout boards directly to the copper so that I can reuse the modules or replace them if needed. I expect I’ll go through several revisions and improvements as I learn more.

The following breakout boards are included on the copper board:

  • Microcontroller (MCU) >>> Adafruit Pro Trinket 3V 12MHz
  • Radio >>> Xbee Series 1 — sending data to second Xbee + FTDI cable + laptop
  • Inertial measurement unit (IMU) > Adafruit BNO055 sensor; accelerometer, gyroscope, magnetometer
  • GPS >>> GPS module for time and position information
  • Data logging > SD card read/write + micro SD card

So far so good, my r2 board is working and all of the individual modules are wired up correctly. But there are still improvements that need to be made. For example, the board cannot function on battery power yet. I included a connection for adding a small lipo battery + charger, but it is not hooked up correctly – I need to update the traces so that the BAT pin on the microcontroller goes to all Vin pins on the breakout boards instead of the BUS pin. *Ooops*

Version – 1

Below are images of my first double sided circuit board. I finished this one evening in October and soldered all the headers onto the copper board using some liquid flux and a small soldering iron with a sharp tip. You can see that some of the 1/64″ holes did not get drill through all the way.

Unfortunately, I made the mistake of connecting the microcontroller BUS pin to all my breakout boards via their 3V3 pins. The BUS pin provides 5V and up to 500 mA of current when the microcontroller is powered by the micro USB. When I attempted to upload the firmware via the USB cable, I accidentally burnt the Xbee radio and had to order two new modules. Luckily I only had the Xbee + MCU plugged into the copper board at that time so the delicate Xbee was the only fatality.

Lesson learned. Send all power into the modules via their 5V or Vin pins; Adafruit typically includes a 3v3 compatible voltage regulator so their boards are 5V/3V safe (if you wire up the correct pin).

IMG_9651IMG_9652

More updates will include:

  • adding a Real Time Clock
  • adding an RGB LED
  • adding a temperature probe
  • redesign the board to be a circle shape
  • add a LoRa radio or other transmitter
  • fix the lipo battery problem
  • add a solar charger circuit

Version – 3

I’ve already started to incorporate updates to the design. Below is an example of the board with an added ground plane and the addition of an RGB LED and room for a digital temp sensor. Once I get the board to a more polished stage, I plan to share the source files and include a schematic drawing. But that has not been completed yet.

Screen Shot 2017-11-27 at 11.13.30 PMScreen Shot 2017-11-27 at 11.13.46 PM

Project Development – Stages

Stalled, but not forgotten!

Need to break this down into bite-size pieces.

I’ve decided to reevaluate the project scope and break it down into three distinct stages. Hopefully this will help to give me focus so I can make some progress. I’d like to get something in the water by the start of the new year!

Below are some scribbles from my note book:

IMG_4433

Right now I’m still at Stage 1.

But I will focus on this new list of tasks and try to prevent myself from meandering too far from this list. Stage 1 is meant to be super simple/quick so that I can “fail early, and fail often”.  Hope this helps…

Buoy design – 95mm diameter

I recently built a smaller buoy design while I continue to work on the IMU code. The previous buoy was approximately 150mm in diameter and had room for lights, GPS, a large li-po battery and a considerably bigger microcontroller. This latest version is based on the electronics from a previous post and only needs to house a trinketpro, Xbee, and BNO005 IMU from Adafruit.

Old vs new design.

IMG_7070

Project files for CAD and STL here.

Continue reading

Visualizing vibration data from accelerometer

update: link to source code for IMU to Matlab connection

The next steps for the wave buoy project involves collecting accelerometer and gyroscope data from the onboard IMU and filtering/processing the data with a laptop to determine orientation and position. The math needed to perform these computations is too much for an arduino alone, so for now I plan to transmit the IMU data to my laptop with an Xbee and let the laptop do all the heavy lifting. Later on, the laptop will be replaced by a Raspberry Pi or other Linux based computer board, but for now it easier for me to develop everything in Matlab and then convert the code to C/C++ or something else in the future. Just personal preference.

Screen Shot 2016-02-07 at 11.27.05 PM

Schematic of arduino + Xbee + acceleroemter

Continue reading