Product Overview

The Ra-01SCH-P is a LoRa series module designed and developed by Ai-Thinker. This module is used for ultra-long-distance spread spectrum communication.

Its RF chip LLCC68+ primarily uses the LoRa™ long-range modem for ultra-long-distance spread spectrum communication, with strong anti-interference capability and minimal current consumption. Leveraging Semtech's patented LoRa™ modulation technology, the module integrates a Power Amplifier (PA) and Low Noise Amplifier (LNA), achieving high sensitivity exceeding -137dBm and +29dBm transmit power for long transmission distances and high reliability. 

Meanwhile, compared with traditional modulation technology, LoRa™ modulation technology also has obvious advantages in anti-blocking and selectivity, solving the problem that traditional design solutions cannot simultaneously balance distance, anti-interference, and power consumption.

Application Scenarios

It can be widely used in automatic meter reading, home and building automation, security systems, remote irrigation systems, etc.

Features

① Default configuration: internal PA uses 3.3V supply voltage; in this state, Tx Power can reach up to +29dBm with an operating current of 750mA;

② Optional configuration: internal PA uses 5V supply voltage; in this state, Tx Power can reach up to +31dBm with an operating current of 1A;


I. Software and Hardware Introduction

1. Code Download and Analysis

Obtain the relevant demo through the following link: https://aithinker-static.oss-cn-shenzhen.aliyuncs.com/docs/example/LLCC68-Ra-01SC-P_Ra-01SCH-P_Driver-V1.0.1.zip 

The NVIC_PriorityGroupConfig() function configures the interrupt priority grouping to 4, allocating all 4 bits for preemptive priority; PB12 pin is configured as a light control pin to indicate when the program sends or receives data; the clock is configured to execute the interrupt function every 1ms, with the interrupt function content shown below.

 

Where the functions ExampleLLCC68ReciveDemo() and ExampleLLCC68SendDemo() are used to set the Ra-01SCH-P module to select whether to use the module for receiving or sending.

1) ExampleLLCC68ReciveDemo() Function

The content of the ExampleLLCC68ReciveDemo() function is shown below:

 

Five callback functions are registered:

 

The Radio.Init( &LLCC68RadioEvents ) function registers the above five callback functions. 

The Radio.SetChannel(LORA_FRE) function is used to set the RF frequency of the Ra-01SCH-P module. 

The Radio.SetTxConfig( MODEM_LORA, LORA_TX_OUTPUT_POWER, 0, LORA_BANDWIDTH, LORA_SPREADING_FACTOR, LORA_CODINGRATE, LORA_PREAMBLE_LENGTH, LORA_FIX_LENGTH_PAYLOAD_ON, true, 0, 0, LORA_IQ_INVERSION_ON, 3000 ) function is used to set the TX mode parameters of the Ra-01SCH-P module.

 

Function parameters:

LoRa mode, transmit power, FSK mode parameter (set to 0 for LoRa mode), bandwidth, spreading factor, error correction coding rate, preamble length, fixed-length packet (default false), CRC check, 0 means frequency hopping disabled, number of symbols between frequency hops (meaningless when frequency hopping is disabled). 

OCP_Value = Radio.Read(REG_OCP) reads the current maximum value of the over-current protection setting;

The Radio.SetRxConfig( MODEM_LORA, LORA_BANDWIDTH, LORA_SPREADING_FACTOR, LORA_CODINGRATE, 0, LORA_PREAMBLE_LENGTH, LORA_LLCC68_SYMBOL_TIMEOUT, LORA_FIX_LENGTH_PAYLOAD_ON, 0, true, 0, 0, LORA_IQ_INVERSION_ON, false ) function is used to set the RX mode parameters of the Ra-01SCH-P module.

Function parameters:

LoRa mode, bandwidth, spreading factor, coding rate, automatic frequency bandwidth control, preamble length, symbol timeout time (maximum time the receiver waits for the next symbol to arrive), whether packet length is fixed, payload length, whether CRC check is enabled, whether frequency hopping is enabled, frequency hopping period (requires frequency hopping to be enabled, otherwise invalid), whether to invert I/Q components, whether to enable continuous reception;

Radio.Rx( 0 ) enters receive mode. The function implementation is shown below:

 

Radio.IrqProcess( ) is the event processing function that determines whether events have occurred. It can judge events: TX_DONE, RX_DONE, CRC_ERROR, CAD_DONE, RX_TX_TIMEOUT, PREAMBLE_DETECTED, SYNCWORD_VALID, HEADER_VALID, HEADER_ERROR. The function implementation is shown below:

 

delay_ms(1) delays 1ms to check once whether an event has occurred;

2) ExampleLLCC68SendDemo() Function

The ExampleLLCC68SendDemo() function is a timed transmission function. 

The difference from the ExampleLLCC68ReciveDemo() function is inside the while() loop. Get_Systicket() is used to get the current program running time (ms).

if(0==u32_count###/span#<1000){

    printf("systick=%d ,send u32 data:%d\r\n", Get_SysTick(),u32_count);

    if(0==u32_count###/span#<2000){

        Radio.Send((uint8_t *)&u32_count,4);

    }else{

        Radio.Send((uint8_t *)sendData,(strlen(sendData)+1));

    }}

u32_count++;delay_ms(1);

The above code sends data every 2 seconds, sending a count value every 2 seconds. The send function implementation is shown below:

 

2. Hardware Introduction

 The general IO pins of LLCC68+ are all available in LoRa™ mode. Their mapping relationship depends on the configuration of the RegDioMapping1 and RegDioMapping2 registers.

1) Special Pin Description

About VCCPA Pin

The internal PA of the module supports multiple supply voltages. With 3.3V supply, the module's maximum transmit power can reach +29dBm; with 5V supply, the module's maximum transmit power can reach +31dBm;

The module's default BOM configuration uses the module's 3V3 pin for PA power supply. Simply leave the module's VCCPA pin floating;

If the PA uses 5V power supply, please contact Ai-Thinker to modify the module BOM and provide 5V power supply to the module's VCCPA pin;

 

About RF_EN Pin

RF_EN is the enable pin for the module's built-in PA chip. When this pin is high, the module's RF is in normal transceiver state; when this pin is low, the module's RF function is turned off, which can reduce the module's power consumption.

The module's default BOM has an internal 10K pull-up resistor (i.e., default is normal transceiver state). For low-power application scenarios, please use an external MCU to control this pin to a low level. In a low-level state, the pin's default pull-up resistor may have leakage current. If the internal pull-up resistor is not needed, please contact Ai-Thinker to modify the BOM.

 

In summary, the module has four BOM configurations:

 

2) Typical Application Circuit

The module's VCCPA is floating by default. If you need a 5V power supply to achieve higher transmit power, please contact Ai-Thinker to modify the BOM.

It is recommended that the external MCU's IO pin control the module's RF_EN to achieve low-power application scenarios.

 

3) Other Notes

In addition to the SPI interface for communication with the main control MCU, BUSY/DIO1 should also be connected to the main control MCU's IO pins.

 

When the antenna is soldered on the main control board, it is recommended to reserve a pi-type matching circuit at the antenna interface.

 

3. Antenna Installation

The Ra-01SCH-P needs to be used with an external antenna. The module has half-hole pads that can be routed to the main board.

For optimal antenna performance, the antenna installation position should be kept away from metal parts.

The antenna installation structure has a significant impact on module performance. Ensure the antenna is exposed, preferably vertically upward. When the module is installed inside a housing, a high-quality antenna extension cable can be used to extend the antenna outside the housing.

The antenna must not be installed inside a metal shell, as this will greatly weaken the transmission distance.

4. Power Supply

Recommended 3.3V voltage with peak current above 1A;

If using DC-DC, it is recommended to keep ripple within 100mV.

DC-DC power supply circuit is recommended to reserve positions for dynamic response capacitors to optimize output ripple when load changes significantly.

It is recommended to add ESD devices at the 3.3V power interface.

When designing the power supply circuit for the module, it is recommended to retain more than 30% current margin, which is beneficial for long-term stable operation of the whole device.

Please pay attention to the correct connection of the power positive and negative poles. A reverse connection may cause permanent damage to the module.

 

5. Software Notes

The FEM chip's maximum input power must not exceed +15dBm, otherwise the FEM chip may be damaged. Users must strictly configure the LLCC68's output power, with 0dBm-3dBm recommended;

This module is LLCC68+peripheral circuits. Users can operate it completely according to the LLCC68 chip manual;

DIO1/DIO2 are general-purpose IO pins that can be configured into multiple functions;  

The RF switch TX/RX control can be controlled by external MCU, or jointly controlled by external MCU and LLCC68's DIO2;

Differences between LLCC68 and SX1262/SX1268:

 

III. Usage Introduction

1. Preparation

Note: If higher transmit power is needed, use 5V to power the PA by providing 5V voltage to the VCCPA pin; (The module uses internal 3.3V for PA power supply by default)

2. Program Flashing

1) Flash Receiver Program

Then connect ST-Link to the STM32 development board, compile and flash;

2) Flash Transmitter Program

Then connect ST-Link to the STM32 development board, compile and flash;

IV. Demonstration

1. Serial Port Debugger Communication Log Information

Left side is the module in transmit mode, right side is the module in receive mode;

2. Module Communication LED Indicator During Operation

Video: LED Demonstration