Range Testing Non Ideal Terrain at FarmLab

akiba 2017-09-05

When you hear specs online about wireless modules transmitting X number of kilometers, those specs are usually talking about transmitting under ideal conditions. In wireless terms, those ideal conditions would be something like transmitting from an antenna tower on top of a mountain to an antenna tower on the top of another mountain with a valley in between. In reality, most people including myself almost never have the luxury of coming anywhere close to those ideal conditions. When we decided to put up a wireless link from our farm to a nearby cafe, the same was true. There were very non-ideal conditions that we had to get around.

One of the areas of intense interest for me is agriculture technology which is also why I moved out to Hackerfarm in Japan. We have a project called FarmLab which focuses on experimental agriculture and agriculture technology. I’ll be running a wireless workshop tomorrow to teach other participants the basics of wireless and one of the tasks is to set up a wireless connection from FarmLab which is in the middle of a bunch of rice paddies to our cafe which is about a kilometer away. It’s not a difficult link, but there are a few obstacles such as a hill,  a grove of trees, and a few walls to get to a data aggregator that can put us on the internet. 

Jacinta from FarmLab positioning the transmitting antenna at the farm plot

The transmitting antenna is a 18 dBi YAGI directional antenna. I didn’t have high poles and the terrain is low-lying with a hill in between. For the transmitter, I used a Freakduino 900 MHz Long Range board with the bottom mounted batteries. I programmed it to transmit data every 300 msec so once its turned on, it will continuously transmit.

The receiving setup for the site survey consists of a smaller YAGI antenna (9 dBi) as well as receiver and computer to monitor signal strength.

I’m using the Freakduino 900 MHz Long Range boards which are my go-to boards for outdoor communications. I also recommend getting a pair of walkie talkies that can transmit a decent distance. The ones we use have 5W radios.

Since it will be a live demo in front of a bunch of people, I wanted to go out a day early to do a site survey and make sure things will go smoothly. I decided to pull out my directional YAGI antennas because the conditions were non-ideal. The part I was most nervous about was getting the signal over a hill. Otherwise, the transmitting across that distance would have been easy. I wanted to use the directional antenna because they will be able to focus more power in the direction I want to go in. There’s more of a chance I can bounce a signal somewhere around the hill to get it to the destination antenna. The downside is that big antennas are bulky so when I need to be portable or are space constrained, I tend to use the smaller antennas. Luckily, there was plenty of room at the farm site.

For the range testing, the code I used is pretty dead simple. Here is the transmitter code. I simplified it slightly to make it easier to read:

The receiver code is a bit more complicated since I wanted to extract the RSSI and source address from the incoming packet:

In terms of code, that’s pretty much all you need to do range testing. After that, just monitor the signal strength on a PC to see how much link margin you have. I like to maintain around 10 dB of margin to keep a decently robust connection.

Anyways, it turned out that there wasn’t a whole lot to worry about. The signal came in with plenty of signal strength to spare and once we got the antennas aligned, we had no problem sending sensor data. Now it’s time to put together the slides for tomorrow’s wireless workshop 🙂

Post a new comment