The Boards
I recently picked up a few development boards, all with ESP32 microcontrollers and LoRa capabilities. The boards are:
- TTGO LORA32 (version 1)
- TTGO LORA32 (version 2)
- TTGO T-Beam
I plan to do some expermentation with LoRa with these boards.
The Firmware
I found several example Arduino sketches on the web for testing LoRa TX and RX, but I wanted something more advanced, so I wrote my own. Although it uses Arduino libraries, it uses the PlatformIO environment because it allows for better build configurations. There is one set of source code that can be built for any of the supported boards, and the firmware can work as both a sender or receiver (the mode is configurable at run-time via the buttons on the board).
The source code can be found HERE
See the README in this repo for instructions for how the firmware works.
My Neighborhood
I've heard that LoRa offers really long distance communication, but for line-of-sight. I live in a small town in Massachusetts with lots of trees and hills. I want to see how LoRa will perform in my neighborhood with these less-than-ideal conditions.
The Tests
Experiment #1: Antenna Wire vs No Antenna Wire
The first version of the TTGO LORA32 has a short wire that connects the antenna to the board, but the second version does not. I want to see if this wire causes any noticeable difference in performance. I'll use a TTGO LORA32 V1 for the transmitter and travel around the neighborhood with both a LORA32 V1 and V2 board.
Here's the transmitter, which is hanging from the ceiling of our front porch.
At The Corner (0.15 miles)
My first stop is at the next street corner, which is 0.15 miles away. There are quite a few trees and a house in the direct path. I was picking up the signal with both boards, but I can already see that the board that doesn't have the wire has an advantage.
At The Mailbox (0.23 miles)
Experiment #2: Short vs Long Antenna
So now that we've determined that the antenna wire is bad, I'm going to do the rest of my testing with the board with no wire. The next thing I want to see is if a different antenna performs better than the really short one that came with the board. Here are the two antennas:
[ insert pic of two antennas here ]
At The Corner (0.15 miles)
Here we are back at the first stop again. It looks like I got 100% reception of all messages with both antennas. But looking at the RSSI and SNR numbers, I can see that the long antenna has an advantage.
At The Mailbox (0.23 miles)
The advantage of the longer antenna becomes clearer now.
Short Antenna | Long Antenna |
Lesson #2: You can buy a better antenna that the one that comes with the board.
Experiment #3: TTGO T-Beams, Both With Long Antennas
OK, so let's replace the transmitter with a board with no antenna wire, and with a longer antenna. I'm going to use a pair of TTGO T-Beam boards for testing from now on, since they also have a battery holder on the back. Here's the transmitter, sitting in roughly the same place on the porch.
At The Corner (0.15 miles)
Looks like it's doing OK so far.
At The Mailbox (0.23 miles)
Ah, the difference becomes clearer now. Having two long antennas with no wires is better than just one.
End Of The Street (0.35 miles)
Let's take it a bit further away. Here we are at the end of the street, which is 0.35 miles away. Now we have a hill and many houses and trees to deal with. I'm still receiving messages, but you can see the signal is getting weaker.
At The Tracks (0.50 miles)
Now I've left the neighborhood and stopped at the railroad tracks, which is 0.50 miles away. (No, I didn't actually go ON the tracks.) More trees to deal with. You can see a few of the configurations don't work anymore.
The Big Field (0.80 miles)
I went even further and stopped on the other side of an open field, which is 0.80 miles away. Although it's further away, there's this big open field, a few trees, and an open swampy area between here and the house. You can see that the reception has improved with fewer obstacles.
Lesson #3: Obstacles are bad. Line-of-sight is really important.
Coming up soon: I'm going to try to do some line-of-sight testing over longer distances.
No comments:
Post a Comment