ESP32 and LoRa

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
Capstan
Posts: 111
Joined: Sun Jan 29, 2017 4:03 pm
Location: Texas, USA

ESP32 and LoRa

Post by Capstan » Thu Dec 28, 2017 6:22 am

Anyone on the forum have experience with LoRa? I've been curious about it, and I got a couple of these TTGO boards;
https://www.aliexpress.com/item/2pcs-se ... 23252.html

They have a ESP32 Pico, an integrated ssd1306 display, and a SX1278 LoRa transceiver. Cheap! I was able to get them pinging messages back and forth to each other yesterday and showing RSSI. Also can print text to the display. My initial experiments with range-testing isn't impressing me, but it is so darn cold here I didn't get to try much outdoors today. There are a number of various other standalone LoRa modules available as well, some with SPI interfaces and some with TTY. Which ones are good?

User avatar
on4aa
Posts: 70
Joined: Sat Nov 11, 2017 8:41 pm
Location: Europe
Contact:

Re: ESP32 and LoRa

Post by on4aa » Thu Dec 28, 2017 7:15 pm

Capstan wrote:
Thu Dec 28, 2017 6:22 am
There are a number of various other standalone LoRa modules available as well, some with SPI interfaces and some with TTY. Which ones are good?
The ones selected and tested by C. Pham are probably a good pick.
Serge

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

Re: ESP32 and LoRa

Post by Capstan » Thu Dec 28, 2017 11:51 pm

That's an excellent reference, thanks! They don't really seem to make recommendations about the effectiveness various LoRa modules however, maybe there is not a huge amount of difference. I have seen disparaging remarks about 'cheap Chinese devices' on sites where they are selling more expensive modules, don't know how valid.

The antenna connections may have something to do with it. Some modules have a nice screw-on coaxial connector to an antenna, others are just a wire running to an exposed helical.

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

Re: ESP32 and LoRa

Post by LoRaTracker » Tue Jan 09, 2018 2:54 pm

Capstan wrote:
Thu Dec 28, 2017 11:51 pm
That's an excellent reference, thanks! They don't really seem to make recommendations about the effectiveness various LoRa modules however, maybe there is not a huge amount of difference. I have seen disparaging remarks about 'cheap Chinese devices' on sites where they are selling more expensive modules, don't know how valid.

The antenna connections may have something to do with it. Some modules have a nice screw-on coaxial connector to an antenna, others are just a wire running to an exposed helical.
LoRa modules use the Semtech SX127x devices, so there is not going to be much difference between any of them.

Most LoRa modules use the Semtech devices native SPI connection although there are some that add a processor front end to provide a Serial connection such as the Microchip RN2483 which includes a LoRaWAN engine.

For point-to-point use any of the SPI modules will be fine and with good line of sight LoRa devices are capable of hundreds of kilometers even at ISM band limited powers of 10mW.

Helical antennas are poor a simple loose wire of the approximate correct length would be better. Modules with SMA sockets give you options.

One issue to watch with more powerful and faster processors like the ESP32 is that the produce EMI that can reduce performance when the LoRa antenna is local to the processor. See here for some tests I did;

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

User avatar
on4aa
Posts: 70
Joined: Sat Nov 11, 2017 8:41 pm
Location: Europe
Contact:

Re: ESP32 and LoRa

Post by on4aa » Wed Jan 10, 2018 2:30 am

@LoRaTracker
You made my day by pointing out the Microchip RN2483 with serial interface and firmware-based LoRaWAN protocol. Taking that route saves valuable RAM heap stack.

Eventually, I was lead to the very similar RAK811 module which is sold on Aliexpress with its populated breakout board for a very accessible price.

An added benefit is that the RAK811 consumes less power than the RN2483.
The RAK811-N will probably consume even less power, put documentation and FCC & CE certifications are lacking.

I hope more MicroPython aficionados will pick up the RAK811 and experiment with this.

A few corrections:
1) Most LoRaWan nodes emit chirps of 14 to 20dBm, which corresponds to 25 to 100mW.
2) The hundreds of kilometers of range was set as a terrestrial world record by Andreas Spiess.
The TTN gateway was located on a tower on the Swiss mountain Weissenstein. Andreas drove with his node 201km North to the French mountain castle Hohenbourg in the Vosges. However, in urban areas, count only with ranges of a couple of kilometers at most.
Serge

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

Re: ESP32 and LoRa

Post by LoRaTracker » Wed Jan 10, 2018 7:15 am

@on4aa

Back in January 2015, I managed two way comms at 240km ground to foil party balloon.

434Mhz, BW62500, SF8, 10mW.

And that was with a PICAXE !

loboris
Posts: 317
Joined: Fri Oct 02, 2015 6:19 pm

Re: ESP32 and LoRa

Post by loboris » Wed Jan 10, 2018 8:33 am

There are also very good serial LoRa modules
E45-TTL-100 (868 MHz 20 dBm)
E45-TTL-1W (868 MHz 30 dBm)
E45 series wireless transceiver modules, operating at 862~893MHz (Default: 868MHz), are based on originally imported RFIC SX1276 from SEMTECH, with transparent transmission available, TTL level, compatible with the 3.3V.
Modules with transmitting power at 30dBm have PA and LNA to maintain the stability of communication and extend the distance of communication. Modules with transmitting power at 20dBm apply industrial crystal oscillator to ensure the stability and consistency
There are also 915 MHz and 433 MHz versions.
Works great, very simple to connect, easy to buy (eBay) and quite low price (~ 11 US$ :D )

User avatar
on4aa
Posts: 70
Joined: Sat Nov 11, 2017 8:41 pm
Location: Europe
Contact:

Re: ESP32 and LoRa

Post by on4aa » Wed Jan 10, 2018 10:41 am

@loboris
I have seen those. However, from what I can read, these serial modules only implement point-to-point LoRa; not the full LoRaWAN protocol to connect to for example TheThingsNetwork. This makes a huge difference.

Personally, I am looking for LoRaWAN solutions that would easily work with standard ESP32 MicroPython; i.e. not the Pycom LoPy.

@LoRaTracker
There you said it: from a party balloon! You should not give us city dwellers false hopes ;)
Serge

User avatar
on4aa
Posts: 70
Joined: Sat Nov 11, 2017 8:41 pm
Location: Europe
Contact:

Re: ESP32 and LoRa

Post by on4aa » Wed Jan 10, 2018 11:17 am

Here is a nice project employing the Microchip RN2483 on the Micro:Bit using MicroPython.
Serge

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

Re: ESP32 and LoRa

Post by Capstan » Fri Jan 12, 2018 6:10 am

With a couple of the TTGO boards (Semtech SX127x transceivers) that have the stubby helical antennas I am not seeing any great distances yet, but it is interesting to start to separate out some real-world performance. Latency is pretty poor, a ping and response of 100 bytes or so between two modules in the same room takes about 1.8 seconds.

With a basic repeating ping (one unit transmits periodically and listens, the other listens and then transmits a response) and minimal antennas (1" helical coils that might stretch out to 1/4 wavelength) I get only a couple of blocks in my neighborhood at waist height. The signal will penetrate through 2-3 houses but not 10 with these 455Mhz devices.

I made a couple of 1/4 wavelength dipoles out of some hookup wire and got parts to fabricate the appropriate cable connections to them. Today I performed the same range experiment with just the sender having the dipole (should be a much better antenna) at head height. Somewhat better distance but nothing spectacular, and same latency. I'll try both dipoles shortly, but I am thinking that while line-of-sight distances might be as reported, the typical suburban range won't be but a few hundred meters at best. And that would be with at least one antenna up high in the attic.

I'm also interested in overall data rate. The transmit packet buffer appears to be 255 bytes. I'm working up code that I hope will allow me to check the xmit/receive rate for sequential sends of a few Kbytes at various distances.

Post Reply