XIEGU G90 Collection

18 octombrie 2024

LoRa APRS with Meshtastic DevBoard

After I played a little with my Meshtastic Development Board I previously made (and write about) I decided it will be nice to give it a try into LoRa APRS.

This raise some issues about how different modules are connected to the GPIO's of the ESP32 in my configuration.

I was directed by some early adopters in Romania to the CA2RXU web flasher where I found that the Tracker FW can be loaded into a pretty good selection of boards.


But, what board from those would be compatible with my one? Hmmm.... this would require some research!

First, I had to go to CA2RXU's excellent repository and find some clues about pin mapping; how the LoRa transceiver is connected to the ESP32 on various boards in order to choose the proper version of the already compiled FW from the web flasher tool...

Yes, I could compiled it myself but, apart from being a brave ham, I like to cut corners because I'm a lazy one!

Using the already compiled FW will be a good "investment" because I can keep up with the future versions without going to the compiling process everytime a newer version is released.

Flashing the LoRa APRS I-Gate was easy and I already had one working on my bench but the tracker is a different animal because it needs the GPS input to really be usefull as a "tracker"!

So, I land onto the GitHub page of the project and searched for anything that could hint to my problem. Soon I found boards_pinout.h where various ready-made boards are described.

LoRa module is tied to the ESP32 using this diagram:

MISO > D19

MOSI > D27

NSS/CS > D18

SCK > D5

RST > D23

DIO0 > D26

so I searched for this particular definition.

I found two of them that could suit my needs.

First was the TTGO T-Beam family that catched my eye. Almost all of them have the LoRa transcever connected as I needed.

The main problem with the newer versions of the BOARD (!!!) have the battery management circuit APX192 and this is used for informations about the battery voltage.

 


Well, my board is reading the voltage with ESP32's ADC so, using the firmware could cause some problems. Or not. I don't want (yet) to explore the full code to see how APX192 is integrated into the workflow therefore I choose an early version, of T-Beam FW, the 0.7.

 
I connected the GPS Tx to GPIO 12 as defined into the code but, to my surprise, a message on the small LCD told me that there is no GPS data incoming.
Scratched my head a few hours... Everything was right on the HW side but no GPS valid frames and a suggestion to reset it. Well, that was not an option because I was sure my GPS junk was OK because I previously tested on Meshtastic and it performed like expected!

Left the things like that at around 2AM and next morning I was eager to see the schematic of the TTGO TBeam 0.7... Where the heck that GPS Tx was tied to ESP32?
The schematic is hard to find but a picture of the board told the whole story!
The GPS Tx was connected to GPIO 34!!!

Well well, you little TBeam prick, gotcha! I connected the GPS Tx to GPIO 34 and, voila! that message dissapeared and soon a fix was achieved!

Looking into the code I saw that another board had the same pinout definitions on LoRa TRX with some minor variations.

OK, so, what else do I need to look for? 
The Battery ADC..
 
Most of them are at GPIO 35 which is the same as my dev board so, "cheked".
 
Button? 
Well, I might be a nice feature but I think I can use the tracker without it after I tested the programming interface (web based) -most of them are on GPIO's that are not available on my board...

So? I think we are good with GPS and LoRa Trx working properly!

The next step was to play a little bit with the firmware for other boards and found one that fits well:
TTGO_T_LORA32 V2.1
 
 
 
The blue LED connected to GPIO 15 is there to show me when the tracker is transmitting because I intend to use it without the OLED display; that was just to see how the things works..
 
The battery voltage is not correct, it should indicate 4.2V but this is due to the voltage divider that have different resistors than the TBeam original board for which the FW was written. Yeah, Yeah, I know, I can change the ratio by replacing one resistor... I will think about it, I promise!
 

 
73!
 


08 octombrie 2024

Heltec V3 versus LilyGo LoRa T V2 comparision table

These are two LoRa development boards and both are good for Meshtastic networks.

 

LilyGo:

Heltec T3 V2:

 

Key Takeaways

  • Heltec V3 is a better choice if you need better power efficiency and are working on battery-powered IoT applications because the SX1262 LoRa chip consumes less power than the SX1276.
  • LilyGO LoRa32 V2.1 is a good option for projects that don’t need extreme power efficiency but want to use a well-supported and reliable LoRa chip like the SX1276.
  • Both boards offer similar OLED display capabilities using I2C, but the GPIO pin assignments differ, so check compatibility when switching between them.

 

A very quick reference chart for two LoRa modules, the Heltec V2 and LilyGo T V2 (T is with the OLED already mounted).

Feature Heltec V3 LilyGO LoRa32 V2.1
Microcontroller ESP32 (dual-core, 240 MHz) ESP32 (dual-core, 240 MHz)
Flash Memory 8MB 4MB
OLED Display Yes (0.96 inch, 128x64 pixels, I2C) Yes (0.96 inch, 128x64 pixels, I2C)
OLED SDA (I2C) GPIO 4 GPIO 21
OLED SCL (I2C) GPIO 15 GPIO 22
LoRa Chip SX1262 SX1276
LoRa Frequency Bands 868MHz / 915MHz 868MHz / 915MHz
LoRa SPI MISO GPIO 19 GPIO 19
LoRa SPI MOSI GPIO 27 GPIO 27
LoRa SPI SCK GPIO 5 GPIO 5
LoRa SPI CS GPIO 18 GPIO 18
LoRa RESET GPIO 14 GPIO 23
LoRa DIO0 GPIO 26 GPIO 26
LoRa DIO1 GPIO 35 GPIO 33
Power Management Better low-power modes with SX1262 Good, but SX1276 consumes more power
Antenna U.FL connector for external antenna Spring-type antenna (can be replaced)