ESP32 and LoRa

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
LoRaTracker
Posts: 30
Joined: Sat Feb 25, 2017 8:24 am

Re: ESP32 and LoRa

Post by LoRaTracker » Sun Jan 14, 2018 4:06 pm

In a direct comparison, using the exact same antennas, height of antennas, data rate, and location\path, then you can easily demonstrate an approximate 20dBm link gain between a FSK device (I have tested an RFM22B) and a LoRa device. So if you do it right it LoRa will go around 10 times further than other radios.

That some people do not seem to get as much range as they want, does not imply that LoRa is faulty as so much depends on the antennas used, their height and the location. Location in particular has a major impact on achievable distance.

So when someone states that they only get say 500M with LoRa, I would not know whether that is good or bad really, unless they are able to do a direct comparison with FSK type devices.

Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: ESP32 and LoRa

Post by Capstan » Sun Jan 14, 2018 9:16 pm

Some good news here. The default transmit power level in the sx127x driver I am using is 2, but it can be varied from 2-17. Apparently I was using the wrong end of that scale, 2 is the minimum. Adjusting the level to 17 I was immediately seeing an RSSI improvement of more than 20db in the same room.

With stubby (probably untuned) coil antennas on both units I'm now getting about 900 feet of range with moderate obstacles (4-5 intervening houses). With a 1/4 wave dipole on the stationary unit in my house and coil antenna on the remote unit I was seeing good reception out to 1400 feet (I measured using Google Earth). Might have gone farther, but the road takes a dip downhill and causes a rise to mask the LoS of the endpoints, I don't expect LoRa to be able to penetrate the earth.

I think I will do a little more experimenting with spreading factors and data rates to try to identify some sweet spots in the tunings, but this is a lot more like what I was expecting.

LoRaTracker
Posts: 30
Joined: Sat Feb 25, 2017 8:24 am

Re: ESP32 and LoRa

Post by LoRaTracker » Mon Jan 15, 2018 8:49 am

Capstan wrote:
Sun Jan 14, 2018 9:16 pm
I think I will do a little more experimenting with spreading factors and data rates to try to identify some sweet spots in the tunings, but this is a lot more like what I was expecting.
There is no sweet spot in the settings, if you want more range you either use more power or slow the packets down.

If this is a real project you are designing, then you need to identify how much data you need to send, and how often.

Then you need to know what the duty cycle limit is which varies by area. There are not many places in the world where you can transmit continuously.

The amount of time you can transmit, then determines how long you have to transmit the data you need to send, which in turn gives you the LoRa parameters you can use.

User avatar
Wei Lin
Posts: 21
Joined: Sat Jan 21, 2017 1:07 pm

Re: ESP32 and LoRa

Post by Wei Lin » Mon Jan 15, 2018 2:48 pm

LoRaTracker wrote:
Fri Jan 12, 2018 6:30 pm
... I dont see the LoRa device being setup correctly for high spreading factors...
I modified the driver, it should do the work.

https://github.com/Wei1234c/SX127x_driv ... 6/issues/1

Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: ESP32 and LoRa

Post by Capstan » Wed Jan 17, 2018 6:53 am

LoRaTracker wrote:
Mon Jan 15, 2018 8:49 am
There is no sweet spot in the settings, if you want more range you either use more power or slow the packets down.

If this is a real project you are designing, then you need to identify how much data you need to send, and how often.

Then you need to know what the duty cycle limit is which varies by area. There are not many places in the world where you can transmit continuously.

The amount of time you can transmit, then determines how long you have to transmit the data you need to send, which in turn gives you the LoRa parameters you can use.
I'm just doing some experimenting to see what might be possible. I'm in the USA, from what I can tell the only wide-area LoRa networks in existence here are related to The Things Network. There are not any gateways or LoRaWan local to me as far as I can tell. https://www.thethingsnetwork.org/country/usa/

The devices I am using appear to transmit with about 20 milliwatts on unlicensed frequencies, similar to WiFi, and don't even get out to the perimeter of my neighborhood. I think I can do all the transmitting I want here. I'm going to measure data rates and range at different spreading factors to see what the trade-offs are. A mesh network might be interesting.

LoRaTracker
Posts: 30
Joined: Sat Feb 25, 2017 8:24 am

Re: ESP32 and LoRa

Post by LoRaTracker » Wed Jan 17, 2018 7:58 am

Capstan wrote:
Wed Jan 17, 2018 6:53 am
I'm in the USA
Then pay heed to some of the significant restrictions for 433Mhz use;

https://www.edn.com/electronics-blogs/e ... -of-Things

Switching to the ISM band for the US, 915Mhz, would allow you to use more power, transmit more often etc ........

LoRaTracker
Posts: 30
Joined: Sat Feb 25, 2017 8:24 am

Re: ESP32 and LoRa

Post by LoRaTracker » Wed Jan 17, 2018 4:43 pm

The Heltec ESP32 WiFi LoRa I have here has circa 3.5dBm worse receiver performance than a more EMI quite ATMega 328P @ 8Mhz powered receiver.

Tested at 434.4Mhz, bandwidth 125000, spreading factor 8, code rate 4:5.

Details of how the test was done here;

http://www.loratracker.uk/?p=643

Capstan
Posts: 117
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

Re: ESP32 and LoRa

Post by Capstan » Wed Jan 17, 2018 5:18 pm

LoRaTracker wrote:
Wed Jan 17, 2018 7:58 am

Then pay heed to some of the significant restrictions for 433Mhz use;

https://www.edn.com/electronics-blogs/e ... -of-Things

Switching to the ISM band for the US, 915Mhz, would allow you to use more power, transmit more often etc ........
Good article, thanks. I bought 433Mhz devices because they were cheap to experiment with, but now I am seeing identical 915Mhz units for only slightly more. I see these mainly as an inexpensive range-extender for IoT in situations where WiFi doesn't reach. You could get a local sensor/actuator network that spans hundreds of feet instead of just a few tens of feet.

User avatar
philwilkinson40
Posts: 63
Joined: Tue Nov 14, 2017 3:11 am
Location: Perth, Australia

Re: ESP32 and LoRa

Post by philwilkinson40 » Mon Jan 22, 2018 6:50 am

I wonder if I can drag this thread back to the original question.

Has anyone actually connected using LoRaWAN (to The Things Network most probably) using Micropython-programmed:
-RAK811?
-Heltec board?
-hand-made RFM95W connected to a ESP32?

What libraries did you use? any problems along the way?

LoRaTracker
Posts: 30
Joined: Sat Feb 25, 2017 8:24 am

Re: ESP32 and LoRa

Post by LoRaTracker » Mon Jan 22, 2018 8:09 pm

philwilkinson40 wrote:
Mon Jan 22, 2018 6:50 am
I wonder if I can drag this thread back to the original question.
Seems to me that the discussions have been to do with the questions raised in the first post ?

Post Reply