E220 LoRa Module Library for Proteus Simulation: two Arduino UNO V4.0 boards, a LoRa sensor node and a gateway

E220 LoRa Module Library for Proteus Simulation

40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the new E220 LoRa Module Library for Proteus Simulation. The E220-900T22D is one of the most popular LoRa modules for long-range serial links: an LLCC68 radio at 850 - 930 MHz with 22 dBm of power, two mode pins, a busy pin and a UART. Out of the box it is a wireless serial cable - whatever one module receives on its UART comes out of the other - and a handful of registers turn it into an addressed network. With this library you can run a full Proteus simulation of these modules: the four modes, the AUX pin, the configuration protocol and the radio link between two boards.

E220 LoRa Module Library for Proteus simulation demo: an Arduino node sends readings to an Arduino gateway that shows the RSSI, blinks an LED and answers
Figure: The E220 simulation running: the node sends, the gateway blinks and answers.
Updates

E220 LoRa Module Library for Proteus

Latest version: V1.0 (November 2026, this tutorial)

Helping Tools

Two modules on one sheet hear each other through the simulation's shared air. The demo is a sensor node and a gateway 800 m apart: the gateway first reads its own registers and turns on the RSSI byte, then prints every reading with its signal strength and answers.

NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the LoRa board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the E220 LoRa Module Library for Proteus Simulation:

E220 LoRa Module Library for Proteus Simulation: two Arduino UNO V4.0 boards, a LoRa sensor node and a gateway
Figure: The E220 LoRa Module Library for Proteus Simulation.

What Is the E220 LoRa Module?

The E220-900T22D is a complete LoRa transceiver on a 21 x 36 mm board: the LLCC68 radio, a small processor running the module's firmware, an SMA connector for the antenna and a 7-pin header. Unlike AT-command modules it has no command language for sending: in the normal mode every byte you write goes on the air, and every packet it receives comes out of TXD. Its behaviour is set by a few registers, written in a separate configuration mode.

The E220 at a glance
E220-900T22D LoRa module
RadioLLCC68 LoRa, 850.125 + channel MHz, up to 22 dBm
InterfaceUART (9600 8N1 from the factory), M0, M1, AUX
Modesnormal, WOR transmit, WOR receive, configuration
Settingsaddress, channel, UART and air data rate, power, RSSI byte, fixed transmission
Supply3.3 - 5.5 V
Usestelemetry, remote switches, meters, links between two boards

M0, M1 and AUX

Two input pins choose the mode. With M0 and M1 low the module is in the normal mode: it sends and receives. M0 high alone is the WOR transmit mode, which adds a long wake-up preamble so that sleeping receivers notice the packet; M1 high alone is the WOR receive mode; both high is the configuration mode, where the UART always runs at 9600 8N1. The AUX output tells the board when the module is busy: low during the self-check after power-on, after a mode change, while it sends a packet and just before it outputs one. The rule is simple - change modes and send only when AUX is high, then wait 2 ms more.

The Registers

In the configuration mode three commands do everything. C1 <start> <length> reads registers, C0 <start> <length> <bytes> writes and keeps them, C2 writes them until the next power-off; the module answers C1 <start> <length> <bytes>, or FF FF FF for a bad command. Register 00h - 01h is the address, 02h holds the UART rate and the air data rate, 03h the sub-packet size and the power, 04h the channel and 05h the RSSI byte, fixed transmission and the WOR cycle. The factory values - address 0000h, 9600 8N1, 2.4k air rate, 22 dBm, channel 23 (873.125 MHz), transparent - work out of the box.

Transparent or Fixed

In transparent transmission, modules with the same address and channel simply hear each other. In fixed transmission the first three bytes of each message are the target's address and channel, so one module can talk to many; the address FFFFh reaches every module on the channel. With bit 7 of register 05h set, every received packet ends with one more byte: the RSSI, in dBm as -(256 - value).

Features of the E220 LoRa Module Library for Proteus Simulation

  • A real-looking module: the 21 x 36 mm blue module at its real size, the shield can, the SMA connector and antenna, the 7-pin header, TX and RX LEDs.
  • The four modes: M0 / M1 read every millisecond; normal, WOR transmit, WOR receive and configuration.
  • AUX: low during the self-check, a mode change, a transmission and the output of a packet.
  • The configuration protocol: C0, C1 and C2 with the registers 00h - 07h and the product information; FF FF FF for a bad command.
  • A real radio link: transparent and fixed transmission, the RSSI byte, the key, RSSI from the distance (the DISTANCE property), the sensitivity, collisions.
  • A pop-up: the UART and air log and ten tiles - the mode and AUX, address and channel, REG0, REG1, REG3, frequency and distance, packets, the last RSSI and time on air, losses and the last configuration - graphs, an event log and a check page.
  • A complete package: about 2.0 MB with the library, our Arduino UNO V4.0 and the two-board demo, without the source code of the model.

The E220 in Proteus

The device is E220LORATEP in TEPE220.LIB, under Modules > LoRa, with the prefix U and the model TEPE220.DLL. Search E220 or LoRa in Pick Devices. Seven pins at the bottom: M0, M1, RXD, TXD, AUX, VCC and GND. The property DISTANCE places the module on a line in metres; the link distance between two modules is the difference.

E220 LoRa UART module from the E220 Library for Proteus Simulation
Figure: The E220 LoRa module.

Download E220 LoRa Module Library for Proteus Simulation

Click the button below to download E220-LoRa-Module-Library-for-Proteus-v1.0.zip (about 2.0 MB, without the source code of the models):

E220 LoRa Module Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, troubleshooting and the limits of the simulation.
  • Proteus Library Files: TEPE220.LIB, TEPLED5MM.LIB, TEPRESISTOR.LIB and ArduinoV4TEP.LIB.
  • Proteus Model Files: TEPE220.DLL, TEPLED5MM.DLL, TEPRESISTOR.DLL and TEPARDUINO.DLL.
  • Arduino Code: the node and gateway sketches (no LoRa library).
  • Proteus Simulation: the demo project, its two HEX files and copies of the DLLs.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install E220 LoRa Module Library for Proteus Simulation

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the files from Proteus Library Files into the LIBRARY folder of Proteus.
  3. Copy the files from Proteus Model Files into the MODELS folder.
  4. Delete TEPE220.IDX from the LIBRARY folder if it is there.
  5. Start Proteus, press P and search for E220.

Proteus Simulation of an E220 Node and Gateway

The demo uses an A3 sheet with two of our Arduino UNO Library for Proteus V4.0 boards. On the left, ARD1 is the sensor node with U1: M0 and M1 are tied to GND, so it stays in the normal mode with the factory settings. On the right, ARD2 is the gateway with U2: its M0 and M1 come from D6 and D7, so the sketch can switch to the configuration mode, and an LED sits on D5. On both boards TXD goes to D8, RXD to D9 (AltSoftSerial) and AUX to D4. U1 has DISTANCE 0 and U2 DISTANCE 800. Each Arduino has its own built-in monitor, the same window as our TEP Serial Monitor Advance for Proteus. Open E220-Node-Gateway-ArduinoUnoV4.pdsprj.

E220 simulation in Proteus: two Arduino UNO V4.0 boards with two LoRa modules on an A3 sheet
Figure: The whole simulation on an A3 sheet.

The Sketches

Both sketches wait for AUX before they do anything with the module:

void waitAux() {                                            // AUX high = the module is idle
  const unsigned long t0 = millis();
  while (!digitalRead(PIN_AUX) && millis() - t0 < 1000) {}
  delay(2);
}

The node needs nothing else: in the transparent mode a message is just bytes on the UART, here ended by a newline:

    lora.print(msg); lora.print('\n');

The gateway switches modes with its two pins, waiting for AUX after each change:

void setMode(bool m0, bool m1) { digitalWrite(PIN_M0, m0); digitalWrite(PIN_M1, m1); delay(1); waitAux(); }

In the configuration mode it reads the first six registers with three bytes:

  const byte rd[3] = {0xC1, 0x00, 0x06};

and writes register 05h back with bit 7 set, so that every packet brings its RSSI along:

  const byte wr[4] = {0xC0, 0x05, 0x01, (byte)(r[8] | 0x80)}; // REG3 with the RSSI byte on

Back in the normal mode, the byte after each message's newline is the RSSI, printed in dBm:

      Serial.print(F("Node: ")); Serial.print(line); Serial.print(F("  RSSI ")); Serial.print(-(256 - c)); Serial.println(F(" dBm"));

E220 Simulation Results

Open the project and press Run. The demo runs 9.2 simulated seconds and took about two minutes on our PC with the pop-ups open and the pictures being taken. Click either module for its pop-up. Every number below comes from one simulation run, the demo exactly as it ships.

The Configuration

Both modules begin with their self-check: AUX stays low for 50 ms after power-on, then goes high. The gateway's sketch raises M0 and M1, waits for AUX and sends C1 00 06. The answer comes straight back: C1 00 06 00 00 62 00 17 03 - address 0000h, REG0 62h (9600 8N1, 2.4k air data rate), REG1 00h (200-byte sub-packets, 22 dBm), channel 23, which is 873.125 MHz, and REG3 03h (transparent, no RSSI byte). Then C0 05 01 83 sets bit 7 of register 05h, and the module confirms with C1 05 01 83. The sketch lowers M0 and M1 and waits for AUX once more: the gateway is listening in the normal mode.

E220 Proteus simulation pop-up: the gateway reads its registers with C1 00 06 and turns the RSSI byte on
Figure: The gateway's configuration.

The First Message

At 3.0 s the node waits for AUX, then writes "T=23.7,H=59.5" and a newline - 14 bytes. The module notices the pause after the last byte, pulls AUX low and sends the packet: 93 ms on the air at the 2.4k air data rate, with the TX LED lit. The node's own sketch knows nothing about packets; it just wrote a line to a serial port.

E220 Proteus simulation pop-up: the node sends its first message, 93 ms on the air
Figure: The first message.
E220 Proteus simulation: the gateway LED blinks as a LoRa packet arrives
Figure: The gateway on the sheet.
The E220 LoRa node and gateway simulation running in the Proteus workspace
Figure: The simulation in the workspace.

The Gateway

The gateway's module receives the packet 800 m away and puts it out on TXD followed by one more byte - the RSSI byte that the sketch switched on. The sketch reads up to the newline, takes the next byte as the RSSI and prints "Node: T=23.7,H=59.5 RSSI -74 dBm". It lights the LED on D5 for 300 ms and answers "ACK 1" through its own module - 6 bytes, 67 ms on the air. The same happens at 6.0 and 9.0 s, with the RSSI between -73 and -75 dBm.

E220 Proteus simulation pop-up: the gateway with the RSSI byte on and its answers on the air
Figure: The gateway.

The Answers

The answers arrive at the node about a quarter of a second after each message: "Gateway: ACK 1", then "Gateway: ACK 2". The node's module has no RSSI byte switched on, so the line arrives exactly as the gateway wrote it. At 9.2 s the node has sent 3 messages and received 2 answers - the third is on its way - while the gateway has received 3 and sent 2. Nothing was too weak and nothing collided.

E220 Proteus simulation pop-up: the node later in the run with the gateway's answers
Figure: Later in the run.

The Graphs, the Event Log and the Check Page

The Graphs page shows when the module transmits, when a packet arrives, AUX and the mode. The Event log keeps every mode change, every configuration command, every message with its time on air and every packet with its RSSI. The Check page sums up the run: VCC 5.00 V, the UART at 9600 bps with no framing error, no configuration refused, the radio at 873.125 MHz on channel 23 with the 2.4k air data rate and 22 dBm in the transparent mode, 3 messages sent (93 ms each) and 2 answers received at -74 dBm, and nothing lost on the air. Every line is green.

E220 Proteus simulation graphs: transmitting, the packets received, AUX and the mode
Figure: The Graphs page.
E220 Proteus simulation Event log: the messages and the answers
Figure: The Event log.
E220 Proteus simulation Check page after the demo run
Figure: The Check page.

The node's monitor shows its side: every message it sends and every answer from the gateway.

Arduino UNO V4.0 serial monitor in the E220 Proteus simulation: the node's messages and the answers
Figure: The node's monitor.

An E220, an AT Module or a LoRa Chip?

Our RYLR998 LoRa Module Library for Proteus is the AT-command way: one text command per message, with addresses and signal reports built into the answers. Our SX1278 LoRa Library for Proteus is the bare radio chip on SPI, for full control of every LoRa setting. The E220 is the simplest of all for a point-to-point link - plug two in and you have a wireless serial cable - and its registers add addressing and RSSI when you need them.

Try It Yourself

  • Change the gateway's channel with C0 04 01 18: it no longer hears the node on channel 23.
  • Set the node's DISTANCE to 20000: the packets become too weak, and the Event log says so.
  • Turn on fixed transmission (REG3 bit 6) on the node and start each message with 00 00 17.
  • Send a C3 command in the configuration mode and watch the module answer FF FF FF.
  • Remove the waitAux() call before a message and send two messages quickly.

Ideas to Extend the Demo

  • Three nodes with different addresses and fixed transmission to one gateway.
  • A remote relay: the gateway sends ON / OFF and the node switches it.
  • A sleeping sensor: the node in the WOR receive mode, woken by the gateway in the WOR transmit mode.

Your Own Sketches

The demo sketch is in the zip file, and you can change it in the Arduino IDE. New to Arduino? Start with our Arduino Tutorial for Beginners. Export the compiled binary, and set the UNO's PROGRAM property to the new file. Our guide on How to get the HEX file from Arduino shows you where the file ends up.

Things to Know Before Using a Real E220

  • Logic levels: the UART is 3.3 V logic - divide the 5 V from an UNO's TX before RXD.
  • AUX first: change modes and send only with AUX high, then wait 2 ms.
  • Flash wear: C0 keeps the registers in flash; use C2 for settings that change often.
  • The antenna: never transmit without one; check the band and power allowed where you live.
  • Matching settings: the same channel and air data rate (and address, in the transparent mode) on both ends.

Troubleshooting

  • No answer in the configuration mode: M0 and M1 are not both high, the UART is not at 9600, or AUX was still low.
  • FF FF FF: a wrong configuration command - only C0, C1 and C2, and only registers 00h - 07h can be written.
  • Nothing arrives: a different channel or air data rate, a different address in the transparent mode, or the distance is too great.
  • Messages are cut or merged: the board sent while AUX was low.
  • The part is not simulated: TEPE220.DLL is missing from MODELS and from the project folder.

Limitations of the Simulation

  • The four modes, AUX, the configuration protocol and registers, transparent and fixed transmission, WOR, the RSSI byte and the key follow the maker's manual; the module is our own drawing.
  • Our own choices: the shared air (only E220s on the same sheet hear each other), the time on air (20 ms plus the payload and 8 bytes at the air data rate), the sensitivity steps, the path loss, the product information bytes and the LEDs.
  • Not modelled: listen-before-talk, the ambient noise reading, relaying and other LoRa devices.
  • Arduino is a name of Arduino; this library is not made or endorsed by Arduino, Labcenter or EBYTE.
  • Tested in Proteus 8.5 in November 2026 (the demo as shipped). Proteus 7 is not supported.

So, that was all about the E220 LoRa Module Library for Proteus Simulation. I hope it helps you get your modes, your AUX timing and your registers right before the first modules arrive - so that your link works in the simulation before it works across the field. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!


Comments

0

Join the conversation