LoRa, LoRaWan, Edge Devices, Opinions

I typically go in burst of interests, at the moment it is LoRa and LoRaWan while I wait for my LoRa Vision Shield for the PortentaH7 to arrive.

I simplify tech for the few high school students who are interested. I typically start out knowing very little, but do quite well when I can bounce ideas off people who know what they are talking about.

Seems to be a few LoRa related entries in this forum (as of Feb 2021):

  1. portenta-vision-shield-lorawan-out
  2. video-sheep-activity-tracker-demo
  3. adding-machine-learning-to-your-lorawan-device
  4. st-b-l475e-iot01a-two-variants
  5. bird-classification-in-remote-areas-with-lacuna-space-and-the-things-network

So my background after a Chemistry degree and about 15 years teaching physics, is a solid 6 year high school robotics program using the Particle.io Photon Github at particle.io-photon-high-school-robotics which I am in the process of moving to Arduino boards, but the little OTA (over the air update) Wifi out of the box Photon that I started using in 2015 is still fairly impressive.

I then spent 2 wasted years studying https://openthread.io/ a BLE mesh IoT opensource equivalent of google nest home devices. While doing that I spent about 5 years learning Google’s Tensorflow’s Javascript platform Tensorflowjs and feel very confident about my Vanilla Javascript version of it here.

Recently I have been Interested in converting Machine Learning models made using TensorflowJS web pages to TensorflowLite for use on Microcontrollers. I am really impressed with the Arduino Portenta H7 dual core 160 pin $100 USD board.

My thinking here is that the PortentaH7 combines the power of an ESP32 with the simplicity of Arduino, perfect for trying complex Machine Learning on an Edge Device before finding a cheaper way to get things working.

The Portenta really gets simple and impressive when you combine it with the push to connect shields:

The Ethernet Vision Shield is impressive (Ethernet, SD Card, 2x microphones, monochrome ~320x320 camera)

.

but the new Lora Vision shield has really go me thinking.

Here are my thoughts about Edge devices, LoRa and Machine Learning, feel free to reply with your own ideas:

  1. As long as you have home electrical power with WiFi some really powerful machine learning can be done with tablets and cell phones possibly connected through BLE to local devices.

Even my own Vanilla JavaScript ML programs are fairly easy to run on an old (cheap) cell phone chrome browser and are fairly impressive. facemesh, handpose, posenet

Handpose:

Being javascript these programs are easy to integrate into browser based Machine Learning programs such as my: Social Distancing App, Robot Car App. Connecting to BLE activated devices is a bit more challenging but not impossible using javascript.

  1. So what about Machine Learning Embedded Devices? My interest area at the moment is not the huge potential of tracking devices. Tracking assets that stay in (433 and 868 MHz) Europe, (~923 MHz) Asia or the (915 MHz) US are fairly easy to track using LoRaWan TTN (The Things Network coverage map) or Helium (The Peoples Network coverage map, Helium gateway’s mine the HNT cryptocurrency that helps pay for data transfers). Probably other LoRaWan networks coming such as the big mobile companies if they see a chance for a profit.

My interest is for how LoRA and perhaps LoRaWan might help farm/ranch/business owners who have large properties such as the Gang Ranch in BC which is 87 miles long and 40 miles wide.

I have no desire or ability to make a LoRa network protocol from scratch, however a little hacking of LoRaWan might be fun to try. My interest would be to try to get a little extra distance out of an existing LoRaWan network by hacking in a 2 way node using LoRA. Will be interesting if the Arduino LoRa library allows for any creative programming. A 2 way node would probably use more power, potentially available using a solar panel, but the ability to slightly extend a LoRaWan network might just really assist the adaptation of low power Edge Devices in Canada.

If my plan totally fails, an easy but more expensive solution would be to use a solar powered cellular LoRaWan Gateway. Nice to have a backup.

As far as the Machine Learning Embedded devices, I guess that depends on the business situation, I think Edge Impulse has made making TinyML about as easy as possible, so that part is covered well.

Anyone else in the Edge Impulse community interested and perhaps a bit knowledgeable about LoRA?

.

1 Like

:raised_hand: Meeee!!! :star_struck: LoRa X TinyML = Great Stuff!

1 Like

Great article Mr. Embassador @Rocksetta LoRa and LoRaWAN is a pretty nice thing, specially taking into account what lacuna space is doing regarding connecting satellites and LoRaWAN, that means you can track things EVERYWHERE and no need for gateways in hard to access places or even impossible places like big rivers!

@arijit_das_student _student I’m using LoRa (sometimes LoRaWAN) in my project. I specially like LoRa combined with RTOS systems to implement LoRaMesh schemes.

2 Likes

Hi Carlos:

So I have signed up with the LacunaSpace project, be great if they could send some test equipment. You mentioned LoRaMesh, do you have any links? I googled it and found some information but not much code to test.

Typically mesh networks are very complex, I have been thinking about a simple point to point that does some channel switching to send a message to the next point. Would need low power end nodes and a few always powered up transfer points. (Really depends on what programming control Arduino allows).

I don’t want to abandon LoRaWan, as it is fully functioning and growing in popularity. As you mention the Lacuna space project could dramatically change things.

Hi Jeremy, yes they take work and time. I’ve been developing mine for two years. I will post some none critical things about it on my site when finish some other things. You don’t have to have an always turned-on device, you can make devices synchronize their sending / receiving windows. Having a Real time clock and a GPS are use full for propagating messages. I do have a central core which is always listening and broadcasting, it is a kind of gateway meant to control things and connect to the outer world. However, not every device has to in the coverage area, some messages can be forwarded a few times before they reach it. Just starting by a point to point and some forwarding mechanism will get you on the right way.

Cheers,
Carlos.

That is really interesting and makes so much sense. I have a few GPS modules, not sure what you mean by a real time clock, but a few googles later: AliExpress, RobotShop, Amazon.com. So that is cool and very do-able.

image

Question Carlos, what is your awake window? (I assume the clocks are not accurate enough to get down to millisecond awakes, do you have it awake for say 60 seconds or so?) Also how many wakeups do you do in a given week or day? I would be fine with once a day, that would probably be a good time to check the RSSI strength and battery levels.

Thanks Carlos, that has given me lots to think about. I fully understand how to do this with a few nodes, but does your system scale well?

I have been using the BlueFruit Sense and the LoRa feather to build a Siren detector. I used Edge Impulse to build the model and then exported it as an Arduino library. It was really easy to then use the LoRa library to send out a message everytime it detected a siren. There are a lot of boards in the feather form factor, so it is easy to build a custom stack. I also added an MicroSD card for storing recordings.

I am getting this all written up, but the Feather ecosystem is worth checking out if you want to work with LoRa


Thanks for the feedback @Robotastic, can’t wait to read your tutorial!

Anyone know if a board with WiFi, crypto and LoRa like the PortentaH7 with the Lora Vision Shield could be programmed as a Gateway? Guess I should ask Arduino since I think they have their own gateway.

Quick google

Mouser selling it link works for me here.

This one is RPI 3+ powered so code will be very different. Back to the original question, could a board be a gateway or are the speeds just too slow?

Proper gateways can listen on 8 or 16 channels, a transceiver on an end-device has only a single channel. So the only thing you can implement is a single-channel gateway, which is highly frowned upon by the community, as they have detrimental effect on the rest of the network. See https://www.thethingsnetwork.org/forum/t/the-future-of-single-channel-gateways/6590

1 Like

Thanks @janjongboom still fairly new to LoRA and also haven’t received any of my LoRa capable boards yet, so no personal knowledge.

I have an RPI3+ so could probably build my own multichannel Gateway, but will have to wait for better tutorials and after I have tested my own point-to-point ideas.

Yeah I’ve turned a Rpi3 into a gateway with https://shop.imst.de/wireless-modules/lora-products/8/ic880a-spi-lorawan-concentrator-868-mhz?c=12&gclid=Cj0KCQiA7NKBBhDBARIsAHbXCB4J6kWGU_dv00wTPrIalWyS420OXdZ_Y_Qk_knbVtZMYOuH1OTmas0aAsarEALw_wcB but these days I’d just get a The Things Indoor gateway.

1 Like

3 LoRaVisionShields just arrived.

@arijit_das_student and @BigCatBrother I just tried Sandeepmistry/Arduino-LoRa both loraReceiver and loraSender compile but did not get past

if (!LoRa.begin(915E6)) { }  

Arduino is looking into it today. Any other suggestions to try for Arduino programming?

I am a bit confused by the MKRWAN examples. (DumbModemLoraSender, FWUpdaterBridge, FirstConfiguration, LoraSendAndReceive, MKRWANFWUpdate_standalone
) I think all of these are expecting the things Network. Any other suggestions for point-to-point LoRa?

@arijit_das_student you mentioned using LoRa combined with RTOS systems to implement LoRaMesh schemes. I know nothing about RTOS, any links about what you have working.

I will also try OpenMV but fairly sure it will need TheThingsNetwork which I am 40 km in either direction away from the nearest gateway.

My Single channel gateway is in the mail.

I ordered a single channel Gateway, but my school happened to order 2 multichannel gateways that just showed up :grin:

P.S. I am still interested in point-to-point LoRA using the LoRaVisionShields but at least now I can get started testing normal LoRaWan.

So to do point-to-point LoRa:

  1. On the receiving end, set a frequency (not the frequency plan, but the actual frequency, I guess there’s something for that in Sandeep’s library), set a data rate, and open a receive window.
  2. On the sending end, set the same frequency, set the same data rate, send a message.

Can someone explain what is happening with the Things network v2 and the things stack v3. It looks like the free things network is being taken over by a pay to use things stack. Anyone got information here?

The Things Stack (v3) is still open source. It’s just the new iteration of the network stack of The Things Network (commercial version is available, but I think it’s the same product). They’re now moving over the public TTN console over to v3 (public TTN is still at v2).

I will have to take break from the Arduino PortentaH7 LoRa Vision Shield. I can’t seem to get any of it working. I even went for a 100 km drive around known Gateways with three shields flashing connection attempts every 3 seconds. Seems others in North America are having similar issues with MKRWAN 1300, which the Portenta is based off.

I may try either MBED or RTOS methods and may also try making my own V3 online stack, but probably best to shelve it until someone else proves it works using the US915 or US915_HYBRID bands.

My site for this is at https://github.com/hpssjellis/my-examples-for-the-arduino-portentaH7/tree/master/research/LoRaWan

Because Arduino is sticking with LoRaWan without LoRa I can’t even take 2 shields and test their connectivity.

This was a lot of work, time, and money for not getting any results. :weary:

I am very interested!
I plan to use TinyML with LoRa in agriculture. Especially the direct connection between two or more nodes (node to node via LoRaMAC / LoRaMesh)

Direct connection seems to be a function in most LoRaWan chips. The Arduino LoRa Vision shield did not connect those pins, so presently only LoRaWan can be done on the vision board. Also it works in Europe but I am having issues in North America, also The ThingsNetwork is in the middle of a big switch from V2 to V3, with possibly a cost for use.

If anyone has tried LoRaWan on the Helium HNT network I would be interested in trying to connect the Vision Shields. Helium seems to be a big deal in North America