Stufin
Home Quick Cart Profile

STMicroelectronics P-NUCLEO-LRWAN2

Buy Now on Stufin

Component Name

STMicroelectronics P-NUCLEO-LRWAN2

Description

The STMicroelectronics P-NUCLEO-LRWAN2 is a development board designed for LoRaWAN IoT applications. It is a part of the NUCLEO family of boards, which are designed to provide a flexible and scalable platform for prototyping and developing IoT devices. The P-NUCLEO-LRWAN2 board is specifically tailored for LoRaWAN technology, enabling developers to create IoT devices that can connect to LoRaWAN networks.

Functionality

The P-NUCLEO-LRWAN2 board is designed to facilitate the development of LoRaWAN-based IoT devices, such as smart sensors, trackers, and gateways. The board provides a comprehensive platform for developers to create, test, and deploy LoRaWAN-enabled devices. The board's functionality can be summarized as follows

LoRaWAN Connectivity

The board features a LoRaWAN module that enables devices to connect to LoRaWAN networks, allowing for bidirectional communication between devices and the cloud.

Microcontroller

STM32L0

Sensor Integration

The board offers a range of peripherals and interfaces, such as GPIOs, I2C, SPI, and UART, allowing developers to integrate various sensors and peripherals into their IoT devices.

Power Management

The board features a power management system that enables efficient power consumption, making it suitable for battery-powered IoT devices.

LoRaWAN Module

Certified LoRaWAN module

Low Power Consumption

The board is designed for low power consumption, making it suitable for battery-powered IoT devices.

Compact Form Factor

The board features a compact form factor, making it easy to integrate into small IoT devices.

Arduino-compatibleThe board is compatible with the Arduino ecosystem, allowing developers to leverage the vast library of Arduino resources and sketches.
On-Board AntennaThe board features an on-board antenna, which provides a compact and convenient solution for LoRaWAN connectivity.

Extension Headers

The board provides extension headers for connecting additional peripherals and modules, such as GPS modules, accelerometers, and more.

Frequency

868 MHz or 915 MHz (depending on the region)

Range

Up to 10 km (urban area) or 40 km (rural area)

Power Consumption

Low power consumption (< 10 mA in sleep mode)

Operating Temperature

-40C to +85C

Dimensions

45 mm x 34 mm

The STMicroelectronics P-NUCLEO-LRWAN2 is an ideal development platform for IoT developers, allowing them to create innovative LoRaWAN-based IoT devices with ease.

Pin Configuration

  • STMicroelectronics P-NUCLEO-LRWAN2 Documentation
  • Overview
  • The P-NUCLEO-LRWAN2 is a development board from STMicroelectronics, designed to enable LoRaWAN connectivity for IoT applications. The board is based on the STM32L0 microcontroller and features a Murata CMWX1ZZABZ-078 LoRa module.
  • Pinout Description
  • The following section provides a detailed description of each pin on the P-NUCLEO-LRWAN2 board:
  • UART and Debug Interfaces
  • 1. TX (Pin 1): Transmit pin of the UART interface, connected to the STM32L0 microcontroller's USART2_TX pin.
  • 2. RX (Pin 2): Receive pin of the UART interface, connected to the STM32L0 microcontroller's USART2_RX pin.
  • 3. GND (Pin 3): Ground pin for the UART interface.
  • 4. SWO (Pin 4): Serial Wire Output pin for debugging purposes, connected to the STM32L0 microcontroller's SWO pin.
  • 5. SWCLK (Pin 5): Serial Wire Clock pin for debugging purposes, connected to the STM32L0 microcontroller's SWCLK pin.
  • Power Supply
  • 6. VIN (Pin 6): Input voltage pin, can be connected to a power source (e.g., USB, battery, or external power supply).
  • 7. 3V3 (Pin 7): 3.3V power output pin, regulated by the on-board voltage regulator.
  • 8. GND (Pin 8): Ground pin for the power supply.
  • LoRa Module Interface
  • 9. RF_IO (Pin 9): RF input/output pin, connected to the Murata CMWX1ZZABZ-078 LoRa module.
  • 10. RF_VCC (Pin 10): Power supply pin for the LoRa module, connected to the 3V3 power output.
  • 11. RF_GND (Pin 11): Ground pin for the LoRa module.
  • 12. NSS (Pin 12): Chip Select pin for the LoRa module, connected to the STM32L0 microcontroller's SPI_NSS pin.
  • 13. SCK (Pin 13): Serial Clock pin for the LoRa module, connected to the STM32L0 microcontroller's SPI_SCK pin.
  • 14. MISO (Pin 14): Master In Slave Out pin for the LoRa module, connected to the STM32L0 microcontroller's SPI_MISO pin.
  • 15. MOSI (Pin 15): Master Out Slave In pin for the LoRa module, connected to the STM32L0 microcontroller's SPI_MOSI pin.
  • Analog and Digital Interface
  • 16. A0 (Pin 16): Analog input pin, connected to the STM32L0 microcontroller's ADC1_IN0 pin.
  • 17. A1 (Pin 17): Analog input pin, connected to the STM32L0 microcontroller's ADC1_IN1 pin.
  • 18. D2 (Pin 18): Digital input/output pin, connected to the STM32L0 microcontroller's GPIO_PIN2.
  • 19. D3 (Pin 19): Digital input/output pin, connected to the STM32L0 microcontroller's GPIO_PIN3.
  • 20. D4 (Pin 20): Digital input/output pin, connected to the STM32L0 microcontroller's GPIO_PIN4.
  • Reset and Boot Mode
  • 21. NRST (Pin 21): Active-low reset pin, connected to the STM32L0 microcontroller's NRST pin.
  • 22. BOOT0 (Pin 22): Boot mode selection pin, connected to the STM32L0 microcontroller's BOOT0 pin.
  • Additional Features
  • 23. LED1 (Pin 23): On-board LED, connected to the STM32L0 microcontroller's GPIO_PIN5.
  • 24. LED2 (Pin 24): On-board LED, connected to the STM32L0 microcontroller's GPIO_PIN6.
  • Connector Pins
  • The P-NUCLEO-LRWAN2 board features a morpheus connector (20-pin, 2-row, 1.27mm pitch) for connecting to an ARDUINO Uno or other compatible boards.
  • Pin Connection Structure
  • When connecting the pins, ensure proper alignment and secure connections to avoid damage to the board or components. Use the following structure to connect the pins:
  • Pin 1 (TX): Connect to the UART receiver (e.g., USB-to-UART adapter or serial terminal)
  • Pin 2 (RX): Connect to the UART transmitter (e.g., USB-to-UART adapter or serial terminal)
  • Pin 3 (GND): Connect to the ground of the power supply or UART interface
  • ...
  • Pin 24 (LED2): Connect to a current-limiting resistor and an optional LED for indication purposes
  • For power supply, connect a power source (e.g., USB, battery, or external power supply) to Pin 6 (VIN) and Pin 8 (GND).
  • When connecting the LoRa module, ensure proper alignment and secure connections to the Murata CMWX1ZZABZ-078 module. Connect Pin 9 (RF_IO) to the module's RF input/output pin, Pin 10 (RF_VCC) to the module's power supply pin, and Pin 11 (RF_GND) to the module's ground pin.
  • For the SPI interface, connect Pin 12 (NSS) to the LoRa module's chip select pin, Pin 13 (SCK) to the LoRa module's serial clock pin, Pin 14 (MISO) to the LoRa module's master in slave out pin, and Pin 15 (MOSI) to the LoRa module's master out slave in pin.

Code Examples

STMicroelectronics P-NUCLEO-LRWAN2 Documentation
The P-NUCLEO-LRWAN2 is a development board from STMicroelectronics that integrates a LoRaWAN transceiver module, enabling the creation of low-power wide-area network (LPWAN) applications. This documentation provides an overview of the board's features, specifications, and code examples to help developers get started with using the P-NUCLEO-LRWAN2 in various contexts.
Features and Specifications
Microcontroller: STM32WL55JC ultra-low-power microcontroller with 256 KB of flash memory and 64 KB of SRAM
 LoRaWAN Transceiver: SX1262, a sub-GHz radio module with a range of up to 10 km (6.2 miles)
 Frequency Bands: Supports EU868, US915, and AS923 frequency bands
 Power Supply: Can be powered via USB, battery, or external power source
 Interfaces: USB, UART, SPI, I2C, I2S, and GPIO
Code Examples
### Example 1: Sending a LoRaWAN Message Using the Arduino Framework
This example demonstrates how to send a LoRaWAN message using the Arduino framework.
```cpp
#include <LoRaWAN.h>
// Define the LoRaWAN frequency band and spreading factor
LoRaWANFrequency band = EU868;
int spreadingFactor = 7;
void setup() {
  // Initialize the LoRaWAN module
  LoRaWAN.begin();
  LoRaWAN.setFrequency(band);
  LoRaWAN.setSpreadingFactor(spreadingFactor);
}
void loop() {
  // Create a LoRaWAN message
  char message[] = "Hello, LoRaWAN!";
  
  // Send the message
  LoRaWAN.send(message, sizeof(message));
  
  delay(1000);
}
```
### Example 2: Receiving a LoRaWAN Message Using the Mbed Framework
This example demonstrates how to receive a LoRaWAN message using the Mbed framework.
```cpp
#include <mbed.h>
#include <LoRaWAN.h>
// Define the LoRaWAN frequency band and spreading factor
LoRaWANFrequency band = US915;
int spreadingFactor = 12;
int main() {
  // Initialize the LoRaWAN module
  LoRaWAN.begin();
  LoRaWAN.setFrequency(band);
  LoRaWAN.setSpreadingFactor(spreadingFactor);
  
  while (true) {
    // Wait for incoming data
    if (LoRaWAN.available()) {
      // Read the received message
      char message[256];
      int length = LoRaWAN.read(message, 256);
      
      // Print the received message
      printf("Received message: %s
", message);
    }
  }
}
```
### Example 3: Using the P-NUCLEO-LRWAN2 with the LoRaWAN OTAA (Over-the-Air Activation) Protocol
This example demonstrates how to use the P-NUCLEO-LRWAN2 with the LoRaWAN OTAA protocol.
```cpp
#include <LoRaWAN.h>
// Define the LoRaWAN frequency band and spreading factor
LoRaWANFrequency band = AS923;
int spreadingFactor = 10;
// Define the OTAA keys
char appEUI[] = "YOUR_APP_EUI_HERE";
char appKEY[] = "YOUR_APP_KEY_HERE";
char devEUI[] = "YOUR_DEV_EUI_HERE";
void setup() {
  // Initialize the LoRaWAN module
  LoRaWAN.begin();
  LoRaWAN.setFrequency(band);
  LoRaWAN.setSpreadingFactor(spreadingFactor);
  
  // Set the OTAA keys
  LoRaWAN.setAppEUI(appEUI);
  LoRaWAN.setAppKEY(appKEY);
  LoRaWAN.setDevEUI(devEUI);
}
void loop() {
  // Join the LoRaWAN network using OTAA
  if (!LoRaWAN.joinOTAA()) {
    Serial.println("Failed to join network");
    delay(1000);
  } else {
    Serial.println("Joined network successfully");
    // Send a message to the LoRaWAN network
    char message[] = "Hello, LoRaWAN!";
    LoRaWAN.send(message, sizeof(message));
    delay(1000);
  }
}
```
Note: Replace `YOUR_APP_EUI_HERE`, `YOUR_APP_KEY_HERE`, and `YOUR_DEV_EUI_HERE` with your actual OTAA credentials.
These examples demonstrate the basic functionality of the P-NUCLEO-LRWAN2 and provide a starting point for developers to build their own LoRaWAN applications. For more information, please refer to the official documentation and datasheets provided by STMicroelectronics.