Cheapest LoRa Transceiver with the LLCC68 and ESP32‑C3 supermini plus

Facebooktwitterredditpinterestmail

In this post I’ll show you how to set up a basic LoRa transmitter and receiver using the LLCC68 radio module and an ESP32‑C3 board. The modules used in this experiment were the cheapest available on Aliexpress. I spent a lot of time studying them, reading the datasheets and other online documents as not much info is available to specifically interface these 2 cheap modules. So tried to explain the hardware connections, share the minimal sender and receiver code examples (using RadioLib library), and provide a simple circuit diagram so you can see how everything is wired together.

Here is a simple connection interface between the Esp32-c3 to LLCC68 modules:


  +-----------------+                +-------------------+
  | ESP32-C3        |                |      LLCC68       |
  |            3.3v |<-------------->| 3.3v              |
  |            21   |<--- MISO ----->|      MISO         |
  |            8    |<--- MOSI ----->|      MOSI         |
  |            7    |<--- SCK  ----->|      SCK          |
  |            6    |<--- CS   ----->|      CS           |
  |            2    |<--- BUSY ----->|      BUSY         |
  |           10    |<--- RESET ---->|      RESET        |
  |  GND       4    |<--- DIO1 ----->|      DIO1     GND |
  +-----------------+                +-------------------+
      |                                               |
      |                  Common Ground                |
      +-----------------------------------------------+

Just solder the Pins from Esp32-c3 as shown above (i.e esp32 pin 21 to MISO on llcc68, esp32 pin 8 to MOSI on llcc68 and so on). Also note llcc68 is a 3.3v device so do not power it with any other voltage. only use 3.3v.

Here is my very crude setup, Sender circuit looks really bad and messy due to the use of crocodile pin wires used while testing it, but the receiver came out quite well 🙂

Once soldered, connect each of the ep32-c3 and LLCC68 pairs to with USB cable to the computer and upload below Sender and Receiver code using the Arduino IDE. (You will need the RadioLib library installed)

Sender Code Example

The sender continuously transmits a “Hello, World!” message every 2 seconds.

#include <Arduino.h>
#include <SPI.h>
#include <RadioLib.h>

// Pin definitions
#define PIN_SPI_MISO  21
#define PIN_SPI_MOSI  8
#define PIN_SPI_SCK   7
#define PIN_SPI_CS    6
#define PIN_BUSY      2
#define PIN_RESET     10
#define RADIO_DIO1    4

// Create the LLCC68 radio object
LLCC68 radio = new Module(PIN_SPI_CS, RADIO_DIO1, PIN_RESET, PIN_BUSY);

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for Serial port to connect.
  }
  Serial.println("LLCC68 Sender Test");

  // Begin SPI with defined pins
  SPI.begin(PIN_SPI_SCK, PIN_SPI_MISO, PIN_SPI_MOSI, PIN_SPI_CS);

  // Initialize the radio using SF7
  int state = radio.begin(
    915.0,    // Frequency in MHz
    250.0,    // Bandwidth in kHz
    7,        // Spreading Factor (SF7)
    5,        // Coding Rate (represents 4/5)
    0x12,     // Sync word
    22,       // Output power in dBm
    8         // Preamble length
  );

  if (state != RADIOLIB_ERR_NONE) {
    Serial.print("Radio init failed, code ");
    Serial.println(state);
    while (true);  // Halt on failure.
  } else {
    Serial.println("Radio init succeeded!");
  }
}

void loop() {
  Serial.println("Sending message...");
  int state = radio.transmit("Hello, World!");

  if (state == RADIOLIB_ERR_NONE) {
    Serial.println("Transmission successful!");
  } else {
    Serial.print("Transmission failed, code ");
    Serial.println(state);
  }

  delay(2000);  // Transmit every 2 seconds.
}

Receiver Code Example

The receiver waits for an incoming message. It is configured with the exact same settings (frequency, bandwidth, SF, etc.) as the sender.

#include <Arduino.h>
#include <SPI.h>
#include <RadioLib.h>

// Pin definitions (matching sender)
#define PIN_SPI_MISO  21
#define PIN_SPI_MOSI  8
#define PIN_SPI_SCK   7
#define PIN_SPI_CS    6
#define PIN_BUSY      2
#define PIN_RESET     10
#define RADIO_DIO1    4

// Create the LLCC68 radio object
LLCC68 radio = new Module(PIN_SPI_CS, RADIO_DIO1, PIN_RESET, PIN_BUSY);

void setup() {
  Serial.begin(115200);
  while (!Serial) {
    ; // Wait for Serial port.
  }
  Serial.println("LLCC68 Receiver Test");

  SPI.begin(PIN_SPI_SCK, PIN_SPI_MISO, PIN_SPI_MOSI, PIN_SPI_CS);

  // Initialize radio with same parameters as sender
  int state = radio.begin(
    915.0,    // Frequency in MHz
    250.0,    // Bandwidth in kHz
    7,        // Spreading Factor set to 7
    5,        // Coding Rate (4/5 represented as 5)
    0x12,     // Sync word
    22,       // Output power in dBm
    8         // Preamble length
  );

  if (state != RADIOLIB_ERR_NONE) {
    Serial.print("Radio init failed, error code: ");
    Serial.println(state);
    while (true) {
      ; // Halt on failure.
    }
  } else {
    Serial.println("Radio init succeeded!");
  }

  Serial.println("Radio set to receive mode...");
}

void loop() {
  Serial.println("Waiting for incoming message...");
  String str;
  // Blocking receive call with default timeout.
  int state = radio.receive(str);

  if (state == RADIOLIB_ERR_NONE) {
    Serial.print("Received message: ");
    Serial.println(str);
  } else {
    Serial.print("Receive failed, error code: ");
    Serial.println(state);  // Typically returns -6 on timeout.
  }

  delay(2000);  // Wait 2 seconds before the next reception attempt.
}

Once the code is uploaded to both the Sender and receiver circuits, power them ON and open the serial monitor. You will see the sender instantly starting to transmit the Hello World! message. The receiver takes about 15-20 seconds to settle down and start receiving the messages.

Hope you like it and are able to put together this simple LoRA radio setup. I plan to upgrade it further and turn it into a full Meshtastic nodes if it at all works. if you have any doubts or suggestions, do leave a comment and let me know !

Amogh Desai
Facebooktwitterrssyoutube

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.