Ebyte RF E70 CC1310: library (esp32, esp8266, STM32, Arduino, Raspberry Pi Pico)
Ebyte RF E70 CC1310: exploring library (esp32, STM32, Arduino, Raspberry Pi Pico)
The world of wireless communication has been revolutionized by the advent of Long Range (RF) technology, offering a blend of long-range capabilities and low power consumption. The EByte RF E70 module stands out as a prominent player among the various emerging modules. This article delves into the features, applications, and operational modes of the EByte E70, providing insights into its capabilities and potential uses.
The E70 is based on CC1310 series device. This device is not just a microcontroller (MCU); it is a fully integrated wireless MCU designed specifically for low-power, long-range wireless applications. The CC1310 combines a powerful ARM Cortex-M3 processor with a highly efficient sub-1 GHz radio, making it an ideal solution for a wide range of applications, from smart metering to industrial automation and environmental monitoring.
Introduction to EByte RF E70
The EByte E70 is a RF module designed for long-range wireless communication. It operates in the sub-gigahertz frequency bands, making it ideal for various applications that require long-range communication and low power consumption. Its versatility and efficiency have made it a popular choice in IoT (Internet of Things) applications, smart city projects, and industrial automation.
CHANGELOG
2024-02-10 0.0.11 Name issue, change name and description 2024-01-01 0.0.10 Try to remove resource folder to permit to install from Arduino Library Manager 2024-01-01 0.0.9 First release
Key Features of the EByte E70
- Long-Range Communication: The E70 module is known for its exceptional range, capable of transmitting data over several kilometers, depending on environmental conditions.
- Low Power Consumption: It's optimized for low power usage, extending the battery life of devices, which is crucial for IoT applications.
- Multiple Operation Modes: The E70 supports various modes like transparent mode, fixed mode, continuous mode, and sub-package mode, offering flexibility in different use cases.
- Configurable Parameters: Users can configure parameters like frequency, power output, and data rate, making them adaptable to various communication needs.
- Forward Error Correction (FEC): FEC is a method for error control in data transmission. It adds redundancy to the transmitted information using a predetermined algorithm. This redundancy allows the receiver to detect and correct errors without the need for retransmission.
Device specifications
-
The communication distance tested is up to 1.5/6km
-
Maximum transmission power of 1W, software multi-level adjustable;
-
Support air date rate of 2.5kbps~168kbps;
-
Low power consumption for battery-supplied applications;
-
Can achieve up to 115200bps continuous frame unlimited-packet length transmission
-
E70-xxxT30S Support 2.6 ~ 5.5V power supply, more than 5V power supply to ensure the best performance;
-
E70-xxxT14S/S2 support 2.2 ~ 3.8V power supply, more than 3.3V power supply to ensure the best performance;
-
Industrial grade standard design, support -40 ~ 85 degC for working over a long time;
-
Support high-speed continuous transmission, send and receive unlimited data packet length;
-
Support continuous data frame without packetization, perfect support for ModBus protocol;
-
Support custom subcontracting settings to improve communication efficiency;
-
Support fixed-point transmission/broadcast transmission/channel monitoring;
-
Support RSSI signal strength reading;
-
Support over-the-air wake-up, i.e. low-power function, suitable for battery-powered solutions;
-
Developed based on CC1310 chip, built-in dual-core ARM;
-
Ultra-small volume design;
-
Ultra-low receiving current, only about 8mA;
-
E70-433 T30S maximum transmit power of 30dBm, the other three models are 25mW, softwaremulti-level adjustable;
-
Under ideal conditions, the communication distance can reach 1.5km;
-
E70-433T30S built-in PA+LNA, transmission power 1W, communication distance up to 6km;
-
Supports the global license-free ISM 433MHz band;
-
Support 2.5K~168kbps air transmission rate;
-
Support 2.2~3.8V power supply, greater than 3.3V power supply can ensure the best performance;
-
E70-433T30S supports 2.6~5.5V power supply , morethan 5V power supply can ensure the best performance;
-
Dual antenna optional (IPEX/stamp hole) is convenient for users to develop and facilitate integration.
Library
I created a library to simplify usage. You can find It on my GitHub
Or you can directly download from Arduino library manager.
RF E70 variants
E70 has various form factors, the design changes, and also specifications.
E70-433T30S:
- Logic level voltage: 3.3v and 5v support
- Transmit Power: 30dBm (higher power, capable of longer-distance transmission)
- Receive Sensitivity: -107 to -109 dBm
- Reference Distance: 6000m
E70-433T14S:
- Logic level voltage: only 3.3v
- Transmit Power: 14dBm (lower power compared to the T30S)
- Receive Sensitivity: -109 to -111 dBm for T14S and -108 dBm for T14S2 (slightly better sensitivity for the T14S)
- Reference Distance: 1500m
E70-433T14S2:
- Logic level voltage: only 3.3v
- Update of S version.
- Receive Sensitivity: -109 to -111 dBm for T14S and -108 dBm for T14S2 (slightly better sensitivity for the T14S)
- Form factors are simpler to manage.
E70-433MT14S:
- Logic level voltage: only 3.3v
- Transmit Power: 14dBm (same as T14S and T14S2)
- Receive Sensitivity: -108 dBm (same as T14S2)
- Reference Distance: 1500m (same as T14S and T14S2)
RF Parameters
Pinout
Hardware parameters
Pinout E70 xxxT14S2
For my test, I'm going to use an E70 S2 version because It's a comfortable form factor with an onboard SMA antenna.
Connections note
You can find all kinds of wiring diagrams in the previous articles of the series.
I made a set of numerous constructors because we can have more options and situations to manage.
RF\_E70(byte txE70pin, byte rxE70pin, UART\_BPS\_RATE bpsRate = UART\_BPS\_RATE\_9600);
RF\_E70(byte txE70pin, byte rxE70pin, byte auxPin, UART\_BPS\_RATE bpsRate = UART\_BPS\_RATE\_9600);
RF\_E70(byte txE70pin, byte rxE70pin, byte auxPin, byte m0Pin, byte m1Pin, byte m2Pin, UART\_BPS\_RATE bpsRate = UART\_BPS\_RATE\_9600);
The first set of constructors is created to delegate Serial and other pins to the library.
txE70pinandrxE70pinare the pins to connect to UART. They are mandatory.auxPinis a pin that checks the operation, transmission, and receiving status (we are going to explain better next), that pin isn't mandatory; if you don't set It, I apply a delay to permit the operation to complete itself (with latency, if you have trouble, like freeze device, you must put a pull-up 4.7k resistor or better connect to the device ).m0pin,m1Pinandm2Pinare the pins to change operation MODE (see the table upper); I think these pins in "production" are going to connect directly to HIGH or LOW. Still, for a test, they are helpful for the library to manage.bpsRateis the baud rate of SoftwareSerial is typically 9600 (the only baud rate in programming/sleep mode)
A simple example is
A simple example is
#include "RF_E70.h"
RF_E70 e70ttl(2, 3); // e70 TX e70 RX // RF_E70 e70ttl(2, 3, 5, 6, 7); // e70 TX e70 RX We can use a SoftwareSerial directly with another constructor
RF_E70(HardwareSerial* serial, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
RF_E70(HardwareSerial* serial, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
RF_E70(HardwareSerial* serial, byte auxPin, byte m0Pin, byte m1Pin, byte m2Pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
The example upper with this constructor can be done like so.
#include
SoftwareSerial mySerial(2, 3); // e70 TX e70 RX RF_E70 e70ttl(&mySerial); // RF_E70 e70ttl(&mySerial, 5, 6, 7, 8); The last set of constructors is to permit an HardwareSerial instead of SoftwareSerial.
RF_E70(SoftwareSerial* serial, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
RF_E70(SoftwareSerial* serial, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
RF_E70(SoftwareSerial* serial, byte auxPin, byte m0Pin, byte m1Pin, byte m2Pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600);
For esp32, you have three additional constructors to permit to manage pins for HardWare serial.
RF_E70(byte txE70pin, byte rxE70pin, HardwareSerial* serial, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1);
RF_E70(byte txE70pin, byte rxE70pin, HardwareSerial* serial, byte auxPin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1);
RF_E70(byte txE70pin, byte rxE70pin, HardwareSerial* serial, byte auxPin, byte m0Pin, byte m1Pin, byte m2Pin, UART_BPS_RATE bpsRate = UART_BPS_RATE_9600, uint32_t serialConfig = SERIAL_8N1);
Begin
The begin command is used to startup Serial and pins in input and output mode.
void begin(); in execution is
// Startup all pins and UART
e70ttl.begin();
Configuration and method to get information There are many methods for managing configuration and getting information about the device.
Response containers
To simplify the response management, I created a set of containers, which is very useful for managing errors and returning generic data.
ResponseStatus
The ResponseStatus is a status container and has two simple entry points, with this you can get the status code and the description of the status code
Serial.println(c.getResponseDescription()); // Description of code
Serial.println(c.code); // 1 if Success
The code is
E70_SUCCESS = 1,
ERR_E70_UNKNOWN, /* something shouldn't happened */
ERR_E70_NOT_SUPPORT,
ERR_E70_NOT_IMPLEMENT,
ERR_E70_NOT_INITIAL,
ERR_E70_INVALID_PARAM,
ERR_E70_DATA_SIZE_NOT_MATCH,
ERR_E70_BUF_TOO_SMALL,
ERR_E70_TIMEOUT,
ERR_E70_HARDWARE,
ERR_E70_HEAD_NOT_RECOGNIZED,
ERR_E70_NO_RESPONSE_FROM_DEVICE,
ERR_E70_WRONG_UART_CONFIG,
ERR_E70_WRONG_FORMAT,
ERR_E70_PACKET_TOO_BIG,
ERR_E70_NO_STREAM_FOUND