Introduction: Get Started With XL1276-D01 LoRa (433MHz SPI) Using NodeMCU DevKit 1.0

This project is done by a group of students from Singapore Polytechnic, School of Electrical and Electronic Engineering. We have a total of 3 members in our group, Woon Jun Shen, Li Desheng, Eugene Loh Yong Jing. Our supervisor is Mr Teo Shin Jen.

The purpose of our project is to create a smart, solar-powered and portable device for post disaster relief. It is designed for the victims of natural disaster so that the rescue team will be able to locate where the victim is.

In this project, we are trying to make point-to-point connection with XL1276-D01 LoRa (433MHz) which we got it from AliExpress using NodeMCU

Step 1: Connecting XL1276-D01 With NodeMCU

In order to build the things up, the components required are:

1. 2x NodeMCU DevKit 1.0
2. 2x XL1276-D01 433MHz SPI
3. Jumper wires


Pin:
1. ANT => Solder to the Antenna provided
2. GND => GND
3. DIO1 => D2 / GPIO 4
4. VCC => 3.3V
5. DIO0 => D1 / GPIO 5
6. RESET => D0 / GPIO 16
7. SCK => D5 / GPIO 14
8. MISO => D6 / GPIO 12
9. MOSI => D7 / GPIO 13
10. NSS => D8 / GPIO 15

The connection for both Transmitting and Receiving parts are same as shown in the Pin Definition above.

Step 2: Programming the XL1276-D01 Using Arduino IDE 1.6.5

For Transmit and Receive, we need two Arduino IDE to run at the same time. So, we install one Arduino IDE in C Drive and another one in D Drive. Run both at the same time and copy the code to both the Arduino IDE. The code of the program is uploaded to GitHub, Code for Code for Transmitter and Code for Receiver.

Before you compile the code, remember to download both the SPI.h and SX1278.h. SX1278.h and SX1278.cpp can be downloaded at Library for SX1278

When you are trying to compile, remember to change the Board Setting to NodeMCU at 'Tools' tab as shown in the diagram. Once it is done with uploading, open up the Serial Monitor at each side. You will see the configuration settings first. After everything is successfully configured, the Transmitter will start to send messages over and you can see the received message at the Receiver side.

If there is any Error in Package Receiving or Configuration, go to SX1278.h and change SX1278_debug_mode_0 to 2. When you compile it, the Serial Monitor will print out the Debug Log for both Transmitter and Receiver. It is best if you save it in a Notepad for troubleshoot or future reference.

Step 3: Simple Demo