Tableau à clic LR 2
Tableau à clic LR 2
Overview
La carte Click Board™ LR 2 est une carte complémentaire compacte qui contient un émetteur-récepteur longue portée à faible consommation. Cette carte est équipée de l'émetteur-récepteur SRD RN2903 basé sur la technologie RF, qui fonctionne à une fréquence de 915 MHz de Microchip Technology. Cette carte Click Board™ est dotée d'une pile intégrée conforme à la norme LoRaWAN de classe A, offrant une communication à spectre étalé longue portée avec une immunité élevée aux interférences. Le module RN2903 est entièrement conforme aux réglementations des États-Unis (FCC) et du Canada (IC), combiné à l'interface de commande avancée et simple permettant une intégration facile dans l'application finale. Cette carte Click Board™ offre une solution simple et fiable pour le développement de réseaux IoT longue portée hautement intégrés, de systèmes de sécurité, de réseaux d'alarme, de contrôle des bâtiments, d'interfaces M2M et d'applications similaires qui nécessitent des solutions de mise en réseau simples et fiables.
Le LR 2 Click Board™ est pris en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette Click Board™ est un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
How Does The LR 2 Click Board™ Work?
The LR 2 Click Board™ as its foundation uses the RN2903, a low-power long-range RF technology-based transceiver module from Microchip Technology. It features the Class A LoRaWAN compliant stack, optimized for robust LoRaWAN networking, immune to interferences, and suitable for long-range wireless operation. It offers a long-range spread spectrum communication with high interference immunity. A receiver with a sensitivity of -148dBm combined with the 18.5dBm integrated amplifier allows for extended range links that can achieve up to 15km in an open area (by the module manufacturer specification). The LR 2 Click Board™ offers data rates of 300kbps with FSK modulation and 12500bps with LoRa Technology modulation and is associated with the 915MHz ISM band suitable for applications in the United States, Canada, Australia, and New Zealand.
To join a LoRaWAN network, the RN2903 requires a LoRaWAN concentrator/gateway. The endpoint device has to use a unique endpoint address, an application session key, and a network session key. The first method is called over-the-air activation (OTAA), where these keys are issued after a specific join procedure. The second method is to assign these keys manually, using UART commands. This method is called activation by personalization (ABP) and can be prone to some security issues. In any case, before an end-device can communicate on the LoRaWAN network, it must be activated.
The LR 2 Click Board™ communicates with MCU using the UART interface with commonly used UART RX and TX pins, including the hardware flow control pins CTS and RTS (Clear to Send, Ready to Send) at data rates up to 57600bps for the data transfer. There are three groups of commands used to configure and operate the separate layers of the RN2903 (SYSTEM, MAC, and RADIO). Each of these layers is controlling a specific area of the module, and every UART command starts with one of the three keywords, which represent an abbreviation of the layer name they are controlling. The module is also equipped with a non-volatile memory (EEPROM) for storing the configuration settings and some additional data.
Explanation of all the configuration parameters, as well as the in-depth explanation of each feature of the RN2903 module, can be found in the Command Reference User's Guide. Please note that improper settings of some parameters might render the device unresponsive. Also, this Click board™ can be reset through the Hardware Reset pin, labelled as RST on the mikroBUS™ socket, by setting this pin to a low logic state.
The LR 2 Click Board™ features the SMA antenna connector with an impedance of 50Ω, so it can be equipped with the appropriate 915MHz compliant antenna that MikroE has in its offer.
The LR 2 Click Board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. A proper logic voltage level conversion is performed by the TXB0106 voltage level shifter, while the LDO ensures that recommended values power the module. This allows for both 3.3V and 5V capable MCUs to use the UART communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
SPECIFICATIONS
Type | LoRa |
Applications | The LR 2 Click Board™ can be used for developing highly integrated long-range IoT networks, security systems, alarm networks, building control, M2M interfaces, and similar applications that require simple and reliable networking solutions. |
On-board modules | RN2903 - low-power long-range RF technology-based transceiver module from Microchip Technology |
Radio Region | North America |
Key Features | Modem is compliant for use in USA (FCC), Canada (IC), Australia and New Zealand. Sensitivity: -146 dBm. Embeds LoRaWAN® Class A protocol stack |
Interface | UART |
Compatibility | mikroBUS |
Click board size | L (57.15 x 25.4 mm) |
Input Voltage | 3.3V or 5V |
PINOUT DIAGRAM
This table shows how the pinout of LR 2 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Reset | RST | 2 | RST | INT | 15 | CTS | UART Clear-To-Send |
UART Ready-To-Send | RTS | 3 | CS | RX | 14 | TX | UART TX |
NC | 4 | SCK | TX | 13 | RX | UART RX | |
NC | 5 | MISO | SCL | 12 | NC | ||
NC | 6 | MOSI | SDA | 11 | NC | ||
Power supply | +3.3V | 7 | 3.3V | 5V | 10 | +5V | Power supply |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
LR 2 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
Operating Frequency Range | 902 | 915 | 928 | MHz |
UART interface baud rate | - | 57600 | - | bps |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the LR 2 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE Github account.
Library Description
This library contains API for the LR 2 Click Board™ driver.
Key Functions
void lr_cfg_setup ( lr_cfg_t *cfg );
- Config Object Initialization function.LR_RETVAL lr_init ( lr_t *ctx, lr_cfg_t *cfg );
- Initialization function.void lr_default_cfg ( lr_t *ctx, bool cb_default, void ( *response_p )( char *response ) );
- Click Default Configuration function.
Example Description
This example reads and processes data from LR clicks.
The demo application is composed of two sections :
void application_task ( void ) { char *ptr; lr_process( ); #ifdef DEMO_APP_RECEIVER rx_state = lr_rx( &lr, LR_ARG_0, &tmp_txt[ 0 ] ); if ( rx_state == 0 ) { tmp_txt[ 12 ] = 0; ptr = ( char* )&int_data; hex_to_int( &tmp_txt[ 10 ], ptr ); log_printf( &logger, "%c", int_data ); } #endif #ifdef DEMO_APP_TRANSMITTER for ( cnt = 0; cnt < 9; cnt++ ) { send_data = send_message[ cnt ] ; int8_to_hex( send_data, send_hex ); tx_state = lr_tx( &lr, &send_hex[ 0 ] ); if ( tx_state == 0 ) { log_printf( &logger, " Response : %srn", &tmp_txt[ 0 ] ); } Delay_ms( 1000 ); } #endif }
The full application code, and ready to use projects can be installed directly form compilers IDE(recommended) or found on LibStock page or mikroE GitHub account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LR
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The LR 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Software Support
We provide a library for the LR 2 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE Github account.
Library Description
This library contains API for the LR 2 Click Board™ driver.
Key Functions
void lr_cfg_setup ( lr_cfg_t *cfg );
- Config Object Initialization function.LR_RETVAL lr_init ( lr_t *ctx, lr_cfg_t *cfg );
- Initialization function.void lr_default_cfg ( lr_t *ctx, bool cb_default, void ( *response_p )( char *response ) );
- Click Default Configuration function.
Example Description
This example reads and processes data from LR clicks.
The demo application is composed of two sections :
void application_task ( void ) { char *ptr; lr_process( ); #ifdef DEMO_APP_RECEIVER rx_state = lr_rx( &lr, LR_ARG_0, &tmp_txt[ 0 ] ); if ( rx_state == 0 ) { tmp_txt[ 12 ] = 0; ptr = ( char* )&int_data; hex_to_int( &tmp_txt[ 10 ], ptr ); log_printf( &logger, "%c", int_data ); } #endif #ifdef DEMO_APP_TRANSMITTER for ( cnt = 0; cnt < 9; cnt++ ) { send_data = send_message[ cnt ] ; int8_to_hex( send_data, send_hex ); tx_state = lr_tx( &lr, &send_hex[ 0 ] ); if ( tx_state == 0 ) { log_printf( &logger, " Response : %srn", &tmp_txt[ 0 ] ); } Delay_ms( 1000 ); } #endif }
The full application code, and ready to use projects can be installed directly form compilers IDE(recommended) or found on LibStock page or mikroE GitHub account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.LR
Additional Notes and Information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
MIKROSDK
The LR 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.