LoRa Daughter Board¶
Description¶
LoRa is a radio technology that enables sending short data packets over a long range (generally kilometers). The LoRa daughter board is designed around the HopeRF RFM95W LoRa-enabled radio module. An FPC antenna (915/868 MHz) makes the board handy and easy to carry anywhere. For users who want more range, an external antenna can be added using the included U.fl connector.
The LoRa daughter board is powered directly from the WiPhone mainboard which means you don't need any external power connections. Just install the daughter board on the back of a WiPhone and you are ready to send data packets.
Features¶
- Uses the license-free ISM bands: "European ISM" @ 868MHz or "American ISM" @ 915MHz
- 915/868MHz FPC antenna. U.fl connector for external antenna.
- +5 to +20 dBm up to 100 mW Power Output Capability (power output selectable in software)
- ~100mA peak during +20dBm transmit, ~30mA during active radio listening.
- Range of approx. 2Km, depending on obstructions, frequency, antenna and power output. (For more info please visit LoRa Range Testing Results)
Technical Details¶
DB Pin # | Pin Name | Arduino Pin | Description |
---|---|---|---|
14 | 3.3V | 3.3V Power Supply for RFM95W LoRa Module. | |
2,11,13 | GND | This pin is connected to System GND. | |
3 | Interrupt | 38 | Interrupt pin for RFM95W module |
7 | MISO | 12 | RFM95W SPI Data output . |
8 | MOSI | 13 | RFM95W SPI Data input . |
10 | SCK | 14 | RFM95W SPI Clock input . |
9 | NSS | 27 | RFM95W SPI Chip select input . |
4 | DIO1 | 32 | RFM95W Digital I/O, software configured . |
15 | Reset | EXTENDER_PIN(10) | RFM95W Reset input . |
17 | DIO2 | EXTENDER_PIN(12) | RFM95W Digital I/O, software configured . |
Hardware Overview¶
HoPeRF RFM95W¶
The RFM95W transceivers (868 or 915 MHz) feature the LoRaTM long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
For further detail Please refer to HopeRF Website .
FPC Antenna¶
- Frequency: 824-960Mhz
- Impedance: 50 Ohm
- S.W.R <= 1.5
- Polarization: Linear
- Gain: 5dbi
- Size: 51x16x0.2mm
- Connector: ipex1 connector
Software Overview¶
By default, LoRa daughterboard support is turned ON in firmware. To disable LoRa board with the WiPhone firmware, comment #define LORA_MESSAGING
in config.h
The LoRa board pin definitions and configuration can be seen in code below.
Hardware.h:
334 335 336 337 338 339 340 341 342 343 | #define RFM95_RST -1
#define RFM95_CS 27
#define RFM95_INT 38
#define HSPI_MISO 12
#define HSPI_MOSI 13
#define HSPI_SCLK 14
#define HSPI_SS 27
#define RF95_FREQ 915.0
|
Note
Make sure your entered correct frequency (915 or 868) as per your hardware, you can change the frequency with #define RF95_FREQ 915.0
(see Warning below).
Warning
Setting wrong frequency may result in degraded performance and poor range. In worse scenario it may damage your hardware.
For LoRa Daughter Boards communication we are using RadioHead Library version=1.112.
In order to get RadioHead library working with WiPhone firmware, We had to slightly change the library so that it can use the SPI bus assign to Daughter Board connector.
lora.cpp:
23 24 25 26 27 28 29 30 31 32 | void Lora::setup() {
log_i("Initializing LoRa: %d", ESP.getFreeHeap());
loraSPI = new RHSoftwareSPI();
rf95 = new RH_RF95(RFM95_CS, RFM95_INT, *loraSPI);
loraSPI->setPins(HSPI_MISO, HSPI_MOSI, HSPI_SCLK);
pinMode(RFM95_RST, OUTPUT);
rf95->init();
rf95->setFrequency(RF95_FREQ);
rf95->setTxPower(23, false);
|
LoRa Contacts and Messages¶
LoRa Contacts¶
To send LoRa messages you'll first need to enter the recipient's LoRa address into your contacts:
- Select Menu > Phonebook > Add.
- Write the name of the contact in Name field. The name is only required for distinguishing contacts and can be anything easy for you to remember.
- Enter the LoRa address in the LoRa address field.
- Press the Save soft key to save the contact.
Note
To find your LoRa address, select Menu > Tools > Development > Diagnostics. The last 6 digits of your MAC address are your LoRa address.
LoRa Messages¶
- Select Menu > Message > New Message.
- Press Choose soft button and add the recipient in the To field and select the option LoRa and enter the message text in the Message field.
- Press the Send soft key to send the message.
OR
- Select Menu > Phonebook > Select Contact.
- Select Send Message and select the option LoRa and enter the message text.
- Press the Send soft key to send message.
OR
- Select Menu > Message > New Message.
- Type the 6 digit address of the recipient in the To field and enter the message text in the Message field.
- Press the Send soft key to send the message.
Note
- Character limit for LoRa messaging is set to 230 characters in firmware.
- Address 000000 can be used to send LoRa broadcast message.
This video will teach you everything you need to know about LoRa messages.