LILYGO E22 Prototype



I have been experimenting with a Heltec V3 with Meshtastic. I live in an area that has a lot of trees and some fields. Therefore, the farthest I have been able to receive communicate with my home station is a few miles. I have my base station mounted to a 20 foot pole, but it is no match for the surrounding trees. The available hobby LORA devices use a an SX1262 or similar device. These devices have a max output power of 20dbm. The FCC part 15 specification states that digital devices on the 915 ISM band can have an output of 30dbm with an antenna with a gain up to 6dbi. Going with a higher gain antenna requires you to lower the transmitter power level to keep the EIRP at 36dbm or below.

There is some debate on if this applies to LORA devices and I am not expert on the subject, but it seems to be agreed upon that limiting the EIRP to 30dbm should be legal. So to get 30dbm or higher with a standard antenna (3dbi to 6dbi), you will need more than the 20dbm available from these devices.

One option would be to add an amplifier to the output, and though that may be simple, it would need to have the ability to be bypassed while receiving. Though these devices do exist for the 915 ISM band, I have not come across an inexpensive one. So the options would be to build my own or use a different transciever. I came across the E22-900M30S device by the company EBYTE that uses a SX1262 or compatible device and includes a 30dbm power amplifier built in. This is the max output power and can be controlled through the Meshtastic power setting. A 22dbm setting in Meshtastic would give you 30dbm output, and a lower value would give you a lower output. I have not determined the relationship between these settings and the output yet. If you purchase one of these E22 modules, make sure you double check the part number because there are variants with very similar part numbers that will not work. You want to make sure you have one with SPI that you can interface directly with the SX1262 compatable device.

Link to E22-900M30S device page

Below is my breadboard test setup. I used a LILYGO T3 v1.6.1 because I had some and thought I could just remove the LORA module and solder straight to the pads. I was thinking this would allow me to get it working without having to modify the Meshtastic firmware. It turns out the E22 module needs a receive enable and transmit enable signal that was not used on the LORA module that came on the LILYGO, so the firmware was not configured to output that signal. I thought about ways to get around this, but ultimately decided to just modify the firmware. Lucikly, there are profiles built into the Meshtastic code that allowed me to configure these pins without getting into the actual code. Since I had to define some pins anyways, I just decided to redefine all the pins so I could use the breadboard connections around the edge of the LILYGO. This could be done with any ESP32 device by just redefining the pins to match your device. I did remove the LORA device before I realized this, but I'd imageine it is not necessary.

If you would like to do this mod, you will need to install VS Code and install the PlatformIO toolchain. There are great instructions on the Meshtastic github site under the firmware section. Once you have this installed, you will need to make a custom variant for your board. This is also explained in the firmware section of the github page. I made a copy of the tlora_v2 folder in firmware/variants folder and modified it to redefine the pins as well as add the receive enable and transmit enable outputs. There are two files in this folder you need to modify. Below is the code.

Download files



After this I had to close and reopen VS code for it to register the new variant files. The method for choosing your variant is also described in the firmware section of the github page. The new variant should show up. In my case it is tlora-v2-E22. After this I simply built and uploaded the firmware to my device. After a few tries and some troubleshooting it worked!

The wiring diagram is below. I chose pins that would make it easy to lay out a PCB to connect these two devices. I did find that you need to supply 5V to the E22 module for it to output full power. I am powering the LILYGO and the E22 module directly from a power supply. When I powered it through the LILYGO USB port, I was only getting around 4VDC on the 5V pin. I also added a button since the LILYGO does not have one. This is defined in the variants file. Laying the PCB out will be my next project. I hope you found this useful or at least interesting! I will update this page as I proceed through this project.


Continue to Power Testing.

Back to the Meshtastic test page.