Software apps and online services
In this tutorial, we'll use an BBC micro:bit with two Reyax RYLR896 transceiver modules to read a DHT11 module's humidity and temperature data and send to another micro:bit. (A point-to-point connection is our goal). The coding of this project was also done by Microsoft MakeCode.
LoRa is a Long-Range radio technology developed by Semtech. Here is a definition from Semtech's LoRa FAQ:
"LoRa (Long Range) is a modulation technique that provides significantly longer range than competing technologies. The modulation is based on spread-spectrum techniques and a variation of chirp spread spectrum (CSS) with integrated forward error correction (FEC). LoRa significantly improves the receiver sensitivity and as with other spread‐spectrum modulation techniques, uses the entire channel bandwidth to broadcast a signal, making it robust to channel noise and insensitive to frequency offsets caused from the use of low cost crystals. LoRa can demodulate signals 19.5dB below the noise floor while most frequency shift keying systems (FSK) need a signal power of 8-10dB above the noise floor to demodulate properly. The LoRa modulation is the physical layer (PHY), which can be utilized with different protocols and in different network architecture – Mesh, Star, point to point, etcetera."
You can read this article for more information.
The RYLR896 transceiver module feature the Lora long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimising current consumption.
- Certification: NCC, FCC
- Frequency Range: 868/915 MHz
- Semtech SX1276 Engine
- High efficiency Power Amplifier
- Excellent blocking immunity
- Low Receive current
- High sensitivity
- Control easily by AT commands
- 127 dB Dynamic Range RSSI
- Designed with PCB integrated antenna
- AES128 Data encryption
- Operation temperature: -40℃ to +85℃
- Dimension: 42.5 x 18.36 x 5.5 mm
- Weight: 7g
Read this file for more information.
This module is easy to work with and can be easily transmitted via serial communication with pre-defined commands. To connect the LoRa Module and DHT11 sensor to the Micro:bit, it requires an interface, In this tutorial, we use IOBIT Expansion Board Breakout and ELECFREAKS Octopus:bit.
The project consists of two parts:
In this section, temperature data is received from the DHT11 sensor and transmitted through the RYLR896 module after processing. As you can see in the picture below, the RX pin of LoRa module is connected to the P8 micro:bit pin, TX pin is connected to P12, GND to GND pin and VDD pin is connected to 3v pin. also DHT11 signal pin is connected to P5 pin.
Sender related codes are available at the following link:
The data received from the first section is processed and displayed on the display. Also, after each packet is successfully received, a beep is heard from buzzer.
Receiver related codes are available at the following link:
It is possible to ON and OFF the sound of the buzzer by pressing the A+B keys simultaneously. In addition, data received via Bluetooth UART can be viewed on a mobile phone. You can use the Serial Bluetooth Terminal app to do this.
I suggest watching the below video: