Professional Documents
Culture Documents
Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
(https://www.facebook.com/PDAControl) () (https://plus.google.com/+PDAControl)
PDAControl (http://pdacontrolen.com/)
Share & Learn – Programming Design Automation & Control
MENU
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 1/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
(http
Tweet
s://w
eb.w
hats
app.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 2/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
com
One of the most named technologies to be implemented for the Internet of Things, which has very striking features long
/sen
distance communication and low power reflected in its low consumption, LoRa “Lo ng – Ra nge”, this type of modulation has
d?
been become very popular in data sending and receiving projects, there are some libraries already implemented for platforms
text
ESP8266 (http://s.click.aliexpress.com/e/b6QNZfy), Arduino, Raspberry pi and ESP32.
=Co
mm
Documentation of ESP-LoRa below. (https://youtu.be/MDLi_7Byuro)
unic
atio
In this opportunity we will carry out a very simple test with ESP8266 (http://s.click.aliexpress.com/e/b6QNZfy) and RFM95
n%2
(http://s.click.aliexpress.com/e/Be2rrvB) LoRa.
0LoR
a%2
0ESP
826
6%2
0%2
6%2
0Ra
dio
%20
RFM
95%
20%
231
http
%3A
%2F
%2F
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 3/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
olen.
com
Introduction LoRa & Modulo RFM95%2FHoperf
com
unic
Introduction LoRa & Module RFM95 Hoperf (http://pdacontrolen.com/introduction-lora-module-rfm95-
atio
hoperf/)
n-
lora-
esp8
2 BHK
266- in Raymond Realty- Thane
radi
Ad With over 1500 trees on central area,
stayo-close to nature @Raymond Realty’s…
rfm9
Raymond Realty
5-
1%2
Learn more
F)
Tests Performed
We will use 2 modules ESP8266 NodeMCU (http://s.click.aliexpress.com/e/b6QNZfy), which will communicate through the SPI
bus with the RFM95 modules (http://s.click.aliexpress.com/e/Be2rrvB) using the RH_RF95.h library of RadioHead, this test
will be very simple, the sending of a message plus a counter from one module to another at 915MHz, Factory demarcation on
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 4/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
In this tutorial the LoRa modulation will be used, we will not implement LoRaWAN not to confuse.
In detail for this test only the LoRa modulation is used, LoRaWAN is not being implemented in this case, pending for future
tests.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 5/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
It should be noted that they already sell modules ESP8266 (http://s.click.aliexpress.com/e/b6QNZfy) and ESP32 with
modules LoRa a module / pcb but I think it better to perform a test with independent modules so that the test is more
affordable when buying components and take into account the band / frequency of the module according to their area /
area or region and regulations, complete information on legal uses LoRa.
An advantage, the design / pinout of the Radio RFM95 (http://s.click.aliexpress.com/e/Be2rrvB)is compatible with white PCBs
Adapters for ESP8266 (http://s.click.aliexpress.com/e/mAIA6mA), facilitating protoboard mounting.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 6/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
IMPORTANT: remove the 3 resistors and voltage regulators to the white adapter PCBs
(http://s.click.aliexpress.com/e/mAIA6mA), to weld the RFM95 (http://s.click.aliexpress.com/e/Be2rrvB).
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 7/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Learn more
Arduino IDE Code
In this opportunity we will use the RH_RF95.h library of RadioHead, very used in examples of Adafruit for the test of its PCBs
and modules, technically the module ESP8266 (http://s.click.aliexpress.com/e/b6QNZfy) configures the parameters of the
RFM95 through the SPI bus protocol.
Since it is a very simple test, only the following parameters will be configured in both modules:
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 9/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
The message “PDAControl -” and the value of a sent message / packet counter will be sent.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 10/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 11/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 12/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 13/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 14/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Antenna Manufacturing
For this test the antenna has been manufactured with UTP Cable (Unshielded Twisted Pair) a 7.8 cm wire was taken, thanks
to absolutelyautomation.com (http://absolutelyautomation.com/) for the information, to calculate the length of the
antenna, only I have modified the most important parameter Frequency, in the case of my module it is to 915.0.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 15/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Learn more
Connections
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 16/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Note: The GPIO’s of Radio RFM95 (http://s.click.aliexpress.com/e/Be2rrvB) works at 3.3v, higher voltages will burn them !!.
ESP8266 – RFM95/96
Gpio15/D8 – NSS
Gpio13/D7 – MOSI
Gpio12/D6 – MISO
Gpio14/D5 – SCK
Gpio05/D1 – DIO0
Gpio02/D4 – DIO1
Gpio16/D0 – RST
VCC – 3.3V
GND – GND
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 17/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Conclusions
As indicated previously in this test LoRaWAN is not being implemented, only the LoRa technology is being used, that is, only
the modulation and communication of the radios.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 18/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Applications of this kind of projects, creation of Gateway LoRa-Wifi, for the sending of data from remote sensors to
applications on the Internet.
Create sensors for long distance shipping under battery consumption and it is free, unlike GSM and 4G.
I would say that LoRa is the perfect technology for the Internet of Things.
In this case the Wifi of the ESP8266 12E (http://s.click.aliexpress.com/e/b6QNZfy) will not be used.
In next tutorials we will measure the maximum distance with this kind of antenna and this module, I suppose that since it is a
very economical and affordable module I doubt a bit of the 10 or 20Km in the open field and we will try to see.
Learn more
Update Prototype ESP-LoRa
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 19/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
To advance in this project after many protoboard tests, I have created a PCB for esp8266 12e
(http://s.click.aliexpress.com/e/b6QNZfy) and the modules / radio RFM95 or LORA1276-C1, allowing the possibility of
configuring as module LoRa and LoRaWAN – GATEWAY & LoRaWAN – NODE (http://pdacontrolen.com/introduction-lora-
module-rfm95-hoperf/) for possible connections with TTN or “The Things Network” (http://pdacontrolen.com/introduction-
and-create-account-in-platform-the-things-network-iot-lorawan/) IoT platform based on LPWAN networks
(http://pdacontrolen.com/introduction-lora-module-rfm95-hoperf/) “Low-Power Wide-Area Network”.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 20/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
In the following tutorial I will indicate how to design 10 PCB prototypes with the company Seeedstudio
(http://pdacontrolen.com/10-pcbs-professionals-with-seeed-studio-fusion-esp-lora-prototypes/)with the help of KICAD.
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 21/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
PDAControl 0
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 22/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Learn more
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 23/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Recommended Tutorials
References
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 24/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
Downloads / Github
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 25/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl
PDAControl (http://pdacontrolen.com/author/nitro/)
PDAControl is a space for electronic testing, automation and everything related to open source & diy
pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 26/26