Site icon Renzo Mischianti

Ebyte LoRa E220 LLCC68 device for Arduino, esp32 or esp8266: specs and basic use – 1

Spread the love

LoRa or Long Range wireless data telemetry is a technology pioneered by Semtech that operates at a lower frequency than NRF24L01 (433 MHz, 868 MHz, or 916 MHz against 2.4 GHz for the NRF24L01) but at thrice the distance (from 5000m to 11000m).

Here a selection of Ebyte LoRa E220 E220-400T22D 433MHz 5Km - E220-400T30D 433MHz 10Km - E220-900T22D 868MHz 915MHz 5Km - E220-900T30D 868MHz 915MHz 10Km

LLCC68

LoRa Smart Home (LLCC68) is a sub-GHz LoRa® RF Transceiver for medium-range indoor and indoor to outdoor wireless applications. SPI interface. Pin-to-pin compatible with SX1262. SX1261, SX1262, SX1268, and LLCC68 are designed for long battery life with just 4.2 mA of active receive current consumption. The SX1261 can transmit up to +15 dBm, and the SX1262, SX1268, and LLCC68 can transmit up to +22 dBm with highly efficient integrated power amplifiers.

These devices support LoRa modulation for LPWAN use cases and (G)FSK modulation for legacy use cases. The devices are highly configurable to meet different application requirements for consumer use. The device provides LoRa modulation compatible with Semtech transceivers used by the LoRaWAN® specification released by the LoRa Alliance®. The radio is suitable for systems targeting compliance with radio regulations, including but not limited to ETSI EN 300 220, FCC CFR 47 Part 15, China regulatory requirements, and the Japanese ARIB T-108. Continuous frequency coverage from 150MHz to 960MHz allows the support of all major sub-GHz ISM bands worldwide.

Features

Comparison

LLCC68SX1278-SX1276
Distance> 11Km8Km
Rate (LoRa)1.76Kbps – 62.5Kbps 0.3Kbps – 19.2Kbps
Sleep power consumption2µA 5µA

Description

Like the little brother e32, the module features the FEC Forward Error Correction algorithm, ensuring its high coding efficiency & good correction performance. In the case of sudden interference, it can automatically correct the interfered data packets, so correspondingly improve the reliability and transmission range. But without FEC, those date packets can only be dropped. And with the rigorous encryption & decryption, data interception becomes pointless.

Support LBT function monitors the channel environment noise before sending, which significantly improves the communication success rate of the module in harsh environments.

It has onboard LoRa spread spectrum technology that helps the communication stability with this long-range anti-interference technology.

And finally, have an essential feature, the RSSI, you can check the signal strength on all messages sent.

Operating and transmission type

These devices have some interesting functions:

Transmission

Transparent transmission

This can be considered like a “Demo mode”. By default, you can send messages to all devices of the same configured address and channel.

Fixed transmission

You can specify an address and a channel to send the message in this transmission type.
You can send a message to a:

Normal mode

Simply send the message.

WOR transmitter mode and WOR receiver

As you can intend, if a device is in WOR transmitter mode, you can “wake” one or more devices in a WOR receiver mode with preamble communication.

Program/sleep mode

With this configuration, you can change the configuration of your device.

Specifications

Here are the specifications for the module:

Main ParametersValueRemarks
Min.TypicalMax
Operating voltage(V)35.05.5≥5.0 V ensures output power
Communication level(V)3.3For 5V TTL, it may be at risk of burning down
Operating temperature(℃)-40 85Industrial design
Operating frequency(MHz)410.125433.125493.125 Support ISM band
TX Current(mA)110Instant power consumption
RX current(mA) 16
Sleep current(μA)2Software is shut down
Max Tx power(dBm) 21.5 22.0 22.5
Receiving sensitivity(dBm)-146 -147 -148Air data rate is 0.3 kbps
Air data rate(bps) 2.4k2.4k 62.5kControlled via user’s programming

Main parameter DescriptionRemarks
Distance for reference 5kmTest condition:clear and open area, antenna gain: 5dBi,antenna height:2.5m,air data rate: 2.4kbps
TX length 200 ByteCan be configured via command as 32/64/128/200 bytes per packet totransmit
Buffer400 Byte
ModulationLoRaNew generation LoRa modulation technology
Communication interface UARTTTL level
PackageDIP
Connector1*7*2.54mm
Size 21*36 mm
Antenna SMA50 ohm impedance

You must pay attention to communication level that differs from the power supply, the second can receive voltage like 3.3v (esp8266 and esp32) and 5v (Arduino), but the first want a 3.3v, so to connect to an Arduino, you must use a Voltage divider (Voltage divider: calculator and application) to prevent damage to the device.

Pinout

Pin No.Pin itemPin directionPin application
1M0Input(weak pull-up)Work with M1 & decide the four operating modes. Floating is not allowed. It can be ground.
2M1Input(weak pull-up)Work with M0 & decide the four operating modes. Floating is not allowed; it can be ground.
3RXDInputTTL UART inputs connect to external (MCU, PC) TXD output pin. It can be configured as open-drain or pull-up input.
4TXDOutputTTL UART outputs connect to external RXD (MCU, PC) input pin. Can be configured as open-drain or push-pull output

5

AUX

Output
To indicate the module’s working status & wake up the external MCU. During the procedure of self-check initialization, the pin outputs a low level. It can be configured as open-drain output or push-pull output (floating is allowed).
6VCCPower supply 3V~5.5V DC
7GNDGround

As you can see, you can set various modes via M0 and M1 pins.

ModeM1M0Explanation
Normal00UART and wireless channels are open, and transparent transmission is on
WOR Transmitter01WOR Transmitter
WOR Receiver10WOR Receiver (Supports wake up over air)
Deep sleep mode11The module goes to sleep (automatically wake up when configuring parameters)

Normal mode connection

For the following simple test, we are going to use Normal mode.

Connecting Wemos D1 mini (esp8266) for a basic usage

esp8266 has the advantage of having the same voltage of communication interface, so the connection schema is simpler than Arduino.

It’s essential to add a pull-up resistor (4,7Kohm) to get good stability.

E220WeMos
M0GND (Set normal mode)
M1GND (Set normal mode)
RXPIN D2 (PullUP 4,7KΩ)
TXPIN D3 (PullUP 4,7KΩ)
AUXNot connected
VCC3.3v-5v
GNDGND

Or better use the shield.

You can get more info on the relative article (this shield is suitable for E32, E22, and E220).

Ebyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) microcontroller and new WeMos D1 mini shield

Connecting esp32 for a basic usage

As WeMos, esp32 logic works at 3.3v, but It has 3 HardwareSerial so we will use Serial2.

E220esp32
M0GND (Set normal mode)
M1GND (Set normal mode)
RXTX2 (PullUP 4,7KΩ)
TXRX2 (PullUP 4,7KΩ)
AUXNot connected
VCC3.3v-5v
GNDGND

Or also, for this, you can use the relative shield.

You can get more info on the relative article (this shield is suitable for E32, E22, and E220).

Ebyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) and new ESP32 shield

Connecting Arduino for a basic usage

Arduino’s working voltage is 5v, so we need to add a voltage divider on the RX pin of the LoRa module to prevent damage; you can get more information here. Voltage divider: calculator and application.

You can use a 2Kohm resistor to GND and 1Kohm from the signal, then put it together on RX.

E220Arduino
M0GND (Set normal mode)
M1GND (Set normal mode)
RXPIN D2 (PullUP 4,7KΩ & Voltage divider)
TXPIN D3 (PullUP 4,7KΩ)
AUXNot connected
VCC3.3v-5v
GNDGND

Or the relative shield.

You can get more info on the relative article (this shield is suitable for E32, E22, and E220).

Ebyte LoRa E32 device for Arduino, esp32 or esp8266: WOR (wake on radio) microcontroller and new Arduino shield

Arduino MKR WiFi 1010

M0GND (Set normal mode)
M1GND (Set normal mode)
TXPIN 14 Tx (PullUP 4,7KΩ)
RXPIN 13 Rx (PullUP 4,7KΩ)
AUXNot connected
VCC5V
GNDGND

Simple communication sketch

If you put to 0 M1 and M0 pin you enter in “Normal” mode, you can receive and transmit all the data from device A to B; this modality is defined as “Transparent transmission”.

You can use two microcontrollers of your choice.

At the start, send a message, and if you write on a serial from one device, the text is transferred to the other device. You can use 2 Arduinos or 2 Wemos or one and one as you prefer.

Arduino sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220        ----- Arduino UNO
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- PIN 2 (PullUP)
 * RX         ----- PIN 3 (PullUP & Voltage divider)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3); // Arduino RX --> e220 TX - Arduino TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() {
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

Wemos D1 mini sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220         ----- Wemos D1 mini
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- PIN D2 (PullUP)
 * RX         ----- PIN D3 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"
#include <SoftwareSerial.h>

SoftwareSerial mySerial(D2, D3); // WeMos RX --> e220 TX - WeMos TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop() {
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

esp32 sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220        ----- esp32
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- RX2 (PullUP)
 * RX         ----- TX2 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  Serial2.begin(9600);
  Serial2.println("Hello, world?");
}

void loop() {
  if (Serial2.available()) {
    Serial.write(Serial2.read());
  }
  if (Serial.available()) {
    Serial2.write(Serial.read());
  }
}

Arduino MKR WiFi 1010 sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220		  ----- Arduino MKR
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- RX2 (PullUP)
 * RX         ----- TX2 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  Serial2.begin(9600);
  Serial2.println("Hello, world?");
}

void loop() {
  if (Serial1.available()) {
    Serial.write(Serial1.read());
  }
  if (Serial.available()) {
    Serial1.write(Serial.read());
  }
}

But this primary usage is quite unuseful, so in the next chapter, we will use my library and go in deep into device features.

Library

Here is the last example with my library:

sketchArduino

/*
 * LoRa E220
 * Write on serial to transfer a message to other device
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220        ----- Arduino UNO
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- PIN 2 (PullUP)
 * RX         ----- PIN 3 (PullUP & Voltage divider)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"
#include "LoRa_E220.h"

LoRa_E220 e22ttl(2, 3); // Arduino RX --> e220 TX - Arduino TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  // Startup all pins and UART
  e220ttl.begin();

  // Send message
  ResponseStatus rs = e220ttl.sendMessage("Hello, world?");
  // Check If there is some problem of successfully send
  Serial.println(rs.getResponseDescription());
}

void loop() {
	// If something available
  if (e220ttl.available()>1) {
	  // read the String message
	ResponseContainer rc = e220ttl.receiveMessage();
	// Is something goes wrong print error
	if (rc.status.code!=1){
		rc.status.getResponseDescription();
	}else{
		// Print the data received
		Serial.println(rc.data);
	}
  }
  if (Serial.available()) {
	  String input = Serial.readString();
	  e220ttl.sendMessage(input);
  }
}

Wemos D1 (esp8266) sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220        ----- Wemos D1 mini
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- PIN D2 (PullUP)
 * RX         ----- PIN D3 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"
#include "LoRa_E220.h"

LoRa_E220 e220ttl(D2, D3); // WeMos RX --> e220 TX - WeMos TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  // Startup all pins and UART
  e220ttl.begin();

  // Send message
  ResponseStatus rs = e220ttl.sendMessage("Hello, world?");
  // Check If there is some problem of successfully send
  Serial.println(rs.getResponseDescription());
}

void loop() {
	// If something available
  if (e220ttl.available()>1) {
	  // read the String message
	ResponseContainer rc = e220ttl.receiveMessage();
	// Is something goes wrong print error
	if (rc.status.code!=1){
		rc.status.getResponseDescription();
	}else{
		// Print the data received
		Serial.println(rc.data);
	}
  }
  if (Serial.available()) {
	  String input = Serial.readString();
	  e220ttl.sendMessage(input);
  }
}

esp32 sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E22        ----- esp32
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- RX2 (PullUP)
 * RX         ----- TX2 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"
#include "LoRa_E220.h"

LoRa_E220 e220ttl(&Serial2); // WeMos RX --> e220 TX - WeMos TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  // Startup all pins and UART
  e220ttl.begin();

  // Send message
  ResponseStatus rs = e220ttl.sendMessage("Hello, world?");
  // Check If there is some problem of successfully send
  Serial.println(rs.getResponseDescription());
}

void loop() {
	// If something available
  if (e220ttl.available()>1) {
	  // read the String message
	ResponseContainer rc = e220ttl.receiveMessage();
	// Is something goes wrong print error
	if (rc.status.code!=1){
		rc.status.getResponseDescription();
	}else{
		// Print the data received
		Serial.println(rc.data);
	}
  }
  if (Serial.available()) {
	  String input = Serial.readString();
	  e220ttl.sendMessage(input);
  }
}

Arduino MKR WiFi 1010 sketch

/*
 * LoRa E220
 * Start device or reset to send a message
 * by Renzo Mischianti <https://mischianti.org>
 * https://mischianti.org/category/my-libraries/lora-e220-llcc68-devices/
 *
 * E220		  ----- Arduino MKR
 * M0         ----- GND
 * M1         ----- GND
 * TX         ----- RX2 (PullUP)
 * RX         ----- TX2 (PullUP)
 * AUX        ----- Not connected
 * VCC        ----- 3.3v/5v
 * GND        ----- GND
 *
 */
#include "Arduino.h"
#include "LoRa_E220.h"

LoRa_E220 e220ttl(&Serial1); // Arduino RX --> e220 TX - Arduino TX --> e220 RX

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println("Hi, I'm going to send message!");

  // Startup all pins and UART
  e220ttl.begin();

  // Send message
  ResponseStatus rs = e220ttl.sendMessage("Hello, world?");
  // Check If there is some problem of successfully send
  Serial.println(rs.getResponseDescription());
}

void loop() {
	// If something available
  if (e220ttl.available()>1) {
	  // read the String message
	ResponseContainer rc = e220ttl.receiveMessage();
	// Is something goes wrong print error
	if (rc.status.code!=1){
		rc.status.getResponseDescription();
	}else{
		// Print the data received
		Serial.println(rc.data);
	}
  }
  if (Serial.available()) {
	  String input = Serial.readString();
	  e220ttl.sendMessage(input);
  }
}

If you have already changed the configuration, you must restore the base parameter:

//  If you have ever change configuration you must restore It
	ResponseStructContainer c;
	c = e220ttl.getConfiguration();
	Configuration configuration = *(Configuration*) c.data;
	Serial.println(c.status.getResponseDescription());
	configuration.ADDL = 0x03;  // First part of address
	configuration.ADDH = 0x00; // Second part

	configuration.CHAN = 23; // Communication channel

	configuration.SPED.uartBaudRate = UART_BPS_9600; // Serial baud rate
	configuration.SPED.airDataRate = AIR_DATA_RATE_010_24; // Air baud rate
	configuration.SPED.uartParity = MODE_00_8N1; // Parity bit

	configuration.OPTION.subPacketSetting = SPS_200_00; // Packet size
	configuration.OPTION.RSSIAmbientNoise = RSSI_AMBIENT_NOISE_DISABLED; // Need to send special command
	configuration.OPTION.transmissionPower = POWER_22; // Device power

	configuration.TRANSMISSION_MODE.enableRSSI = RSSI_DISABLED; // Enable RSSI info
	configuration.TRANSMISSION_MODE.fixedTransmission = FT_TRANSPARENT_TRANSMISSION; // Enable repeater mode
	configuration.TRANSMISSION_MODE.enableLBT = LBT_DISABLED; // Check interference
	configuration.TRANSMISSION_MODE.WORPeriod = WOR_2000_011; // WOR timing
	e220ttl.setConfiguration(configuration, WRITE_CFG_PWR_DWN_SAVE);
    c.close();

but we are going to see It better in the following article.

Thanks

But this kind of usage is very reductive; in the following articles, we are going more deeply, and we start to use the library massively to simplify the complex configuration and settings.

  1. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: settings and basic usage
  2. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: library
  3. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: configuration
  4. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: fixed transmission, broadcast, monitor, and RSSI
  5. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: power-saving and sending structured data
  6. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and Arduino shield
  7. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and WeMos D1 shield
  8. Ebyte LoRa E220 device for Arduino, esp32 or esp8266: WOR microcontroller and esp32 dev v1 shield

Github library


Spread the love
Exit mobile version