This is intended to be a continuation of an existing closed topic: Long Range IoT Network Since, it’s closed, I thought I’d start another topic to continue the collaboration here.
The intent of this thread:
In the last 2-3 years, I’ve been continuing to explore the LoRa space in order to overcome several challenges in developing a Particle Powered product for a specific use case. I’ll share more details of that product/use case in another thread in the coming days/weeks to supplement this one. It’s a pretty “Sweet” Project. Overall, I’m excited with what is possible by pairing a Particle Boron with LoRa. I wanted to start this thread by sharing a few of my high level thoughts, observations, opportunities as it pertains to Lora and how Particle + LoRa helps solve several challenges.
@chipmc and I have similar needs given our use cases being rural IoT. We’ve had some great collaboration already that lead to some nice improvements in the approach. The intent of starting this thread is to help others with similar challenges applying Particle + Lora and to spark additional collaboration from the broader community.
1: Request to accept open pull request on RF9X-RK library
First, I wanted to say a big Thank You to @rickkas7 for his initial migration of the RadioHead library to the Particle Platform and including a tutorial How to make LoRa RF95 work on XENON - #5 by rickkas7. It’s been my initial building block thus far. As I continue working with LoRa, I recently forked your RF9X-RK repo on Github and made some updates to it. I then made a Pull request back to your repo. Was hoping you could accept/approve my pull request in order to merge the changes into the master branch and then update the public Particle RF9X-RK library. This way others can easily use the updated library. The main changes made on the pull request include:
- Added RHRouter and RHMesh classes - Required for a Particle Device to participate in a LoRa Mesh network.
- Updated the library in order to sync up with the master branch of the original RadioHead library V1.121. (I.e. migrate from RadioHead V1.89 → V1.121) RadioHead: RadioHead Packet Radio library for embedded microprocessors
2: So Why Particle + LoRa?
There are many challenges with developing an IoT product/device. Particle.IO is fantastic at addressing so many of those challenges. A growing segment of IoT is in rural/remote areas especially in agriculture and similar rural/remote/spread out industries. Challenges/needs of these industries make Particle + LoRa an interesting combination. Two challenges that Particle + LoRa help address are:
1: Overcome the lack of reliable cellular connectivity:
- In general, rural areas encounter more challenges with cellular connectivity. Given that IoT devices will always sense or actuate a physical thing, the IoT device is generally attached/apart of that thing. Therefore depending on the specific location of that thing within the property, if that exact location doesn’t have reliable cellular service, then typically Particle can’t be used for that application. In this scenario, the only real course of action is to try and identify some high gain antenna and cross your fingers it improves or simply turn down that customer.
- In this scenario, a Particle + LoRa device can be located at an optimal location on the property with acceptable cellular connectivity. This is likely at a higher elevation or maybe avoid some obstruction/terrain between it and the closest cellular tower. Then a LoRa Node can be located at the specific location the sensing/actuator is required where cellular service didn’t exist. The LoRa node communicates to the Particle + LoRa device over LoRa and then the Particle + LoRa device interfaces with the Particle Cloud. This allows IoT devices to be located in areas with limited/poor cellular connectivity while still leveraging the benefits of Particle.
2: Multiple IoT devices in relative proximity (100s to 1000s of feet apart over acres of land):
- Many applications require many sensors spread out over many acres. Many of these use cases are too far for Bluetooth or WiFi. Being distributed, typically, these applications do not have mains power at every sensing location. If there is only 1 sensor, the obvious choice is a Particle cellular device, grab a battery, grab a solar panel and you begin sensing. However, what if you have 5, 10, even say 40 over many acres (a typical smart agriculture/rural IoT use case). As the density of sensors increase over the acreage, the practicality of each one being cellular connected stand alone decreases due to hardware costs, operational costs and power requirements of a cellular device.
- A Particle + Lora approach can be used to provide a single Particle cellular connected device on the property. This can be located in an optimal area that has power or has the optimal cellular reception. All other LoRa nodes can be low power, lower hardware cost, with minimal ongoing operational costs in comparison.
What does this look like:
In this example, we need sensors at the end of every line shown below. This allows users to quickly pinpoint leaks and problem areas in the system without aimlessly walking around the entire property. The number of sensors needed over a a 40 acre or so distributed area like this makes it not practical to have the end of every line be a Particle device. By combining Particle + LoRa we can strategically locate a single Particle Device somewhere within the property (best signal strength, power source, etc.) and use LoRa to talk to all others while leveraging Particle as a backhaul for LoRa devices to the cloud.
- Point to Point Range: LoRa point to point can reach anywhere from 1,000 ft to well over 1 mile with default radio settings in “practical/real world applications” all depending on terrain. In most wooded scenarios, I’m at 1200’ - 2400’ between nodes. Line of sight near ground level has been about 3/4 - 1 mile. Line of sight at high elevation I’ve tested ~3 miles. This is all with the default radio settings.
LoRa Mesh: As you’d expect, can vastly extend the range. This is great for going up/around obstructions that would generally impede the RF with point to point. For example… this is about 3 miles end to end. Upper right blue dot is a Particle + LoRa and each Red dot is a LoRa Node.
- Low Power: LoRa node can be very low power, a LoRa device can wake up, take readings, send its data to the Particle + Lora device, receive a response and fall back asleep in 1-2 seconds. I’m not a low power design PCB expert, but I’d estimate about 10-14 months on a single 18650 battery publishing data every 5 minutes with the current design. With less frequent publishes and/or better power management PCB design I’m sure this could easily be years.
- LoRaWAN vs LoRa - To be clear this is LoRa point to point and not LoRaWAN. From my perspective, LoRaWAN in rural settings just isn’t widely adopted yet especially here in the US. In this scenario, I’d have to spin up a dedicated LoRaWAN gateway at every site. I haven’t done extensive research on this option but on the surface, it seems would require higher hardware cost for the gateway, much higher operational costs for the cellular connectivity of a LoRaWAN gateway and higher power requirements of a LoRaWAN gateway (most require mains power, yes could do solar but requires much larger battery and solar panel compared to power requirements of a Particle device). A LoRaWAN gateway is also a dedicated purpose. Whereas a Particle + LoRa device can be multi-purpose and both service the LoRa traffic while also being a sensor itself reducing hardware costs. Finally… since LoRaWAN does not support Mesh, it limits the possible range and won’t always reach up/over obstructions/terrain common in rural areas.
- OTA is not available with Point to Point Lora devices or if it is… I’m certainly not smart enough to figure that one out.
- Developing robust firmware for the Nodes and Particle that handles LoRa Mesh, join requests, sleeping/waking while keeping devices in sync, packaging data from many sensors in a single Particle.Publsih() to reduce data operations. There are some but at times limited examples/libraries compared to the great Particle Ecosystem. It’s been fun to figure it out but time consuming.
Well that’s probably good enough for the first post… as I said earlier. I’d encourage anyone to ask questions, provide feedback, ideas, guidance, alternatives, etc.