meta data for this page
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| com:ai_thinker_products [2026/03/05 15:40] – created - external edit 127.0.0.1 | com:ai_thinker_products [2026/03/28 16:20] (current) – [RA-01 / RA-02 Pinout] vamsan | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ====== lamaPLC: AI-Thinker LoRA products ====== | ====== lamaPLC: AI-Thinker LoRA products ====== | ||
| {{ : | {{ : | ||
| - | Ai-Thinker' | + | Ai-Thinker' |
| The Ai-Thinker Ra-01 and Ra-02 series consists of compact, low-power LoRa transceiver modules designed for long-range wireless data communication in the Internet of Things (IoT). Both modules are built around the Semtech SX1278 chip and operate primarily in the 410 MHz to 525 MHz frequency range, making them a standard choice for DIY and industrial projects requiring high interference resistance and low power consumption. | The Ai-Thinker Ra-01 and Ra-02 series consists of compact, low-power LoRa transceiver modules designed for long-range wireless data communication in the Internet of Things (IoT). Both modules are built around the Semtech SX1278 chip and operate primarily in the 410 MHz to 525 MHz frequency range, making them a standard choice for DIY and industrial projects requiring high interference resistance and low power consumption. | ||
| + | |< 100%>| | ||
| ^Product Series^Model^Frequency^Core Chip^Interface^Primary Use Case| | ^Product Series^Model^Frequency^Core Chip^Interface^Primary Use Case| | ||
| ^Ra Series (SPI)|Ra-01|410–525 MHz|SX1278|SPI|Low-cost DIY, spring antenna included| | ^Ra Series (SPI)|Ra-01|410–525 MHz|SX1278|SPI|Low-cost DIY, spring antenna included| | ||
| Line 29: | Line 29: | ||
| * **Ai-Thinker Ra-01:** Has a fixed coil (spring) antenna that is usually soldered directly onto the module. It is more compact and ideal for short- to medium-range projects where an external antenna isn't needed. | * **Ai-Thinker Ra-01:** Has a fixed coil (spring) antenna that is usually soldered directly onto the module. It is more compact and ideal for short- to medium-range projects where an external antenna isn't needed. | ||
| * **Ai-Thinker Ra-02:** Uses an IPEX (U.FL) connector instead of a spring antenna. This permits users to connect high-gain external antennas, expanding the possible communication distance up to 10,000 meters under ideal conditions. | * **Ai-Thinker Ra-02:** Uses an IPEX (U.FL) connector instead of a spring antenna. This permits users to connect high-gain external antennas, expanding the possible communication distance up to 10,000 meters under ideal conditions. | ||
| + | |||
| + | ==== RA-01 / RA-02 Supported Network Topologies ==== | ||
| + | |||
| + | * **Point-to-Point (P2P):** The simplest setup where one module (e.g., Ra-01) acts as a transmitter, | ||
| + | * **Star Network (Master-Slave): | ||
| + | * **Mesh Network:** While more complex, these modules can participate in mesh networks when managed by a compatible software library (such as RadioHead or LoRaMesh), in which each node can relay data for others. | ||
| + | * **LoRa Gateway:** A Ra-02 connected to an internet-enabled board (like ESP32) can serve as a local gateway, collecting data from multiple Ra-01 nodes and uploading it to a server or The Things Network (TTN). | ||
| + | |||
| + | **Network Configuration Requirements** | ||
| + | |||
| + | To ensure these modules communicate in the same network, they must share identical software settings: | ||
| + | |||
| + | * **Frequency: | ||
| + | * **Spreading Factor (SF):** Must match (ranges from SF7 to SF12). | ||
| + | * **Bandwidth (BW):** The standard is often 125 kHz. | ||
| + | * **Coding Rate (CR):** Standard is 4/5. | ||
| + | * **Sync Word:** A shared //" | ||
| + | |||
| + | **Range and Performance in a Network** | ||
| + | |||
| + | * **Mixed Nodes:** In a network with both, the Ra-02 nodes will generally have superior range (up to 4km–10km) due to external antenna support, while Ra-01 nodes are best suited for shorter-range tasks (approx. 2.8km) within the same network area. | ||
| + | * **Library Support:** Use the Sandeep Mistry LoRa library for simple P2P/Star setups, as it provides consistent performance across both module types. | ||
| + | |||
| + | ==== RA-01 / RA-02 Pinout ==== | ||
| + | {{ : | ||
| + | ^Pin^Label^Type^Description| | ||
| + | ^1|ANT / GND|Antenna|Ra-01: | ||
| + | ^2|GND|Power|Ground| | ||
| + | ^3|3.3V|Power|Supply Voltage (2.5V - 3.7V). Do not use 5V| | ||
| + | ^4|RESET|Input|Reset pin (active low)| | ||
| + | ^5|DIO0|I/ | ||
| + | ^6|DIO1|I/ | ||
| + | ^7|DIO2|I/ | ||
| + | ^8|DIO3|I/ | ||
| + | ^9|DIO4|I/ | ||
| + | ^10|DIO5|I/ | ||
| + | ^11|SCK|SPI|SPI Serial Clock| | ||
| + | ^12|MISO|SPI|SPI Master In Slave Out| | ||
| + | ^13|MOSI|SPI|SPI Master Out Slave In| | ||
| + | ^14|NSS|SPI|SPI Chip Select (Slave Select)| | ||
| + | ^15|GND|Power|Ground| | ||
| + | ^16|GND|Power|Ground| | ||
| + | |||
| + | **DIO Functionality in LoRa Mode** | ||
| + | |||
| + | ^Pin^Default/ | ||
| + | ^DIO0|RX/TX Done|Signals //RxDone// (packet received) or //TxDone// (packet sent).| | ||
| + | ^DIO1|Timeout|Signals // | ||
| + | ^DIO2|FHSS/ | ||
| + | ^DIO3|CAD/ | ||
| + | ^DIO4|Preamble/ | ||
| + | ^DIO5|System Ready|Signals // | ||
| + | |||
| + | **Important Wiring Notes** | ||
| + | |||
| + | * **Voltage Warning:** Both modules require 3.3V power. <color red> | ||
| + | * **Antenna Requirement: | ||
| + | * **Interrupts: | ||
| + | |||
| + | |||
| + | === Compatibility between RA-01 and RA-02 === | ||
| + | The Ai-Thinker Ra-01 and Ra-02 are fully compatible and can communicate with each other because they are functionally identical and share the same internal hardware. | ||
| + | |||
| + | * **Communication Protocol:** Both use an SPI interface to communicate with microcontrollers such as Arduino or ESP32. | ||
| + | * **Driver Code:** They can use the same software libraries (such as the standard LoRa.h or RadioHead) and driver configurations. | ||
| + | * **Electrical Specs:** Both operate at 3.3V logic levels and require level shifters if used with 5V boards like the Arduino Uno | ||
| + | |||
| + | ==== Arduino example code ==== | ||
| + | To use the Ai-Thinker Ra-01 with an Arduino, the most popular and reliable choice is the //Sandeep Mistry// LoRa library. This library allows for simple point-to-point communication using the SX1278 chip found in the Ra-01. | ||
| + | |||
| + | **Wiring** | ||
| + | |||
| + | Because the Arduino Uno/Nano uses 5V logic and the Ra-01 uses 3.3V, you must use a [[sensor: | ||
| + | |||
| + | |< | ||
| + | ^Ra-01 Pin^Logic level converter^Arduino Pin (Uno/ | ||
| + | ^VCC|Va - Vb|5V|< | ||
| + | ^GND|GND|GND|< | ||
| + | ^SCK|A4 - B4|D13|< | ||
| + | ^MISO|A3 - B3|D12|< | ||
| + | ^MOSI|A2 - B2|D11|< | ||
| + | ^NSS|A1 - B1|D10 (or D7)|< | ||
| + | ^RESET|A8 - B8|D9 (or D6)|< | ||
| + | ^DIO0|A7 - B7|D2|< | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | **Basic Transmitter Example** | ||
| + | |||
| + | This sketch sends a //" | ||
| + | |||
| + | <code c> | ||
| + | #include < | ||
| + | #include < | ||
| + | |||
| + | // Define custom pins for the Ra-01 module | ||
| + | const int csPin = 10; // LoRa radio chip select | ||
| + | const int resetPin = 9; // LoRa radio reset | ||
| + | const int irqPin = 2; // Hardware interrupt pin (DIO0) | ||
| + | |||
| + | int counter = 0; | ||
| + | |||
| + | void setup() { | ||
| + | Serial.begin(9600); | ||
| + | while (!Serial); | ||
| + | |||
| + | Serial.println(" | ||
| + | |||
| + | // Override default pins | ||
| + | LoRa.setPins(csPin, | ||
| + | |||
| + | // Initialize Ra-01 at 433 MHz (E6 is exponent for MHz) | ||
| + | if (!LoRa.begin(433E6)) { | ||
| + | Serial.println(" | ||
| + | while (1); | ||
| + | } | ||
| + | | ||
| + | Serial.println(" | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | Serial.print(" | ||
| + | Serial.println(counter); | ||
| + | |||
| + | // Send packet | ||
| + | LoRa.beginPacket(); | ||
| + | LoRa.print(" | ||
| + | LoRa.print(counter); | ||
| + | LoRa.endPacket(); | ||
| + | |||
| + | counter++; | ||
| + | delay(5000); | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **Key Library Functions** | ||
| + | |||
| + | * **LoRa.setPins(ss, | ||
| + | * **LoRa.begin(frequency): | ||
| + | * **LoRa.parsePacket(): | ||
| + | * **LoRa.packetRssi(): | ||
| ===== Lora topics on lamaPLC ===== | ===== Lora topics on lamaPLC ===== | ||
| Line 36: | Line 177: | ||
| \\ | \\ | ||
| \\ | \\ | ||
| - | {{tag> | + | {{tag> |
| \\ | \\ | ||
| This page has been accessed for: Today: {{counter|today}}, | This page has been accessed for: Today: {{counter|today}}, | ||