Sunteți pe pagina 1din 26

5/18/2019 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 

Communication LoRa ESP8266 & Radio RFM95 #1


Posted on May 3, 2018
by PDAControl (http://pdacontrolen.com/author/nitro/)

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

A while ago I got 2 modules / radios LoRa reference RFM95 of HopeRF


pdac(http://s.click.aliexpress.com/e/Be2rrvB), at a frequency
of 915.0 MHz, then a tutorial recommended Introduction LoRa andontr
the quick review to the module RFM95:

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

the back of the PCB.

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).

VERY Cheap Materials !!

2 ESP8266 NodeMCU (http://s.click.aliexpress.com/e/b6QNZfy)


2 Radio RFM95 ,in my case 915.0 MHz (http://s.click.aliexpress.com/e/Be2rrvB)
2 white PCBs Adapters for ESP8266 12E/F (http://s.click.aliexpress.com/e/mAIA6mA)
2 Protoboard
Wire antenna, UTP cable, calculate length below

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 7/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

2 BHK in Raymond Realty- Thane


AdWith over 1500 trees on central area,
stay close to nature @Raymond Realty’s…
Raymond Realty

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.

Note: Download and / or github links below.

Bus SPI: by Wikipedia. (https://es.wikipedia.org/wiki/Serial_Peripheral_Interface)

Since it is a very simple test, only the following parameters will be configured in both modules:

Potency of transmission : 23 dBm = rf95.setTxPower(23, false)


Frequency / Band: 915MHz = #define RF95_FREQ 915.0

Important the correct configuration of Pins for ESP8266 (http://s.click.aliexpress.com/e/b6QNZfy):


pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 8/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

RFM95_CS = CS (Chip Selector or Slave Selector ).


RFM95_RST = Reset Radio when initializing.
RFM95_INT =Interruption from DIO0 output.

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 9/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Example of Transmission Module # 1

The message “PDAControl -” and the value of a sent message / packet counter will be sent.

Note: Download and / or github links below.

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 10/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Serial Terminal … Transmitting Message.

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 11/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Example of Reception Module # 2

The module is in reception mode.

Note: Download and / or github links below.

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 12/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Serial Terminal … Receiving, Message and RSSI

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.

Website: M0ukd.com 1/4 Wave Ground Plane Antenna Calculator (https://m0ukd.com/calculators/quarter-wave-


ground-plane-antenna-calculator/)

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 15/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Video: Communication LoRa ESP8266 & Radio RFM95 # 1

Communication LoRa ESP8266 & Radio RFM95 # 1:…


1:…

2 BHK in Raymond Realty- Thane


AdWith over 1500 trees on central area,
stay close to nature @Raymond Realty’s…
Raymond Realty

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.

2 BHK in Raymond Realty- Thane


AdWith over 1500 trees on central area,
stay close to nature @Raymond Realty’s…
Raymond Realty

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.

Recommended : 10 PCB’s Professionals with Seeed Studio Fusion – ESP-LoRa


Prototypes (http://pdacontrolen.com/10-pcbs-professionals-with-seeed-
studio-fusion-esp-lora-prototypes/)

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 21/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

10 PCB’s Professionals with Seeed Studio


Fusion – ESP-LoRa Prototypes
A few days ago I finished tests on my breadboard, being positive I
decided to migrate my project to a pcb not only for functionality and
practicality, but also for aesthetics, I have chosen the PCB manufacturer
company Seeedstudio.com, we all know it as a manufacturer of
hardware and IoT solutions , but they also have … Continue reading

PDAControl 0

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 22/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

2 BHK in Raymond Realty- Thane


AdWith over 1500 trees on central area,
stay close to nature @Raymond Realty’s…
Raymond Realty

Learn more

Communication ESP-LoRa V1.0 ESP8266 & Radio RFM95 #LoRa

Communication ESP-LoRa V1.0 ESP8266 & Radio R…


R…

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 23/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

Recommended Tutorials

Internet Of Things (IoT) Using NiceRf LoRa1276 by absolutelyautomation.com


(http://absolutelyautomation.com/articles/2015/12/30/internet-things-iot-using-nicerf-lora1276)

Internet Of Things IoT Using NiceRf LoRa1276

References

Introduction LoRa & Module RFM95 Hoperf


(http://pdacontrolen.com/introduction-lora-module-rfm95-hoperf/)
website: M0ukd.com 1/4 Wave Ground Plane Antenna Calculator (https://m0ukd.com/calculators/quarter-wave-
ground-plane-antenna-calculator/)
Internet Of Things (IoT) Using NiceRf LoRa1276 (http://absolutelyautomation.com/articles/2015/12/30/internet-
things-iot-using-nicerf-lora1276)

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 24/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

RadioHead Packet Radio library for embedded microprocessors


(http://www.airspayce.com/mikem/arduino/RadioHead/)

Downloads / Github

Libraries PaulStoffregen (https://github.com/PaulStoffregen)/RadioHead


(https://github.com/PaulStoffregen/RadioHead)
Examples ESP8266 LoRa RFM96 Transmission & Reception (https://github.com/JhonControl/ESP8266-LoRa-RFM95)

 All (http://pdacontrolen.com/category/all/), Connecting (http://pdacontrolen.com/category/connecting/), ESP8266


(http://pdacontrolen.com/category/platforms/esp8266/), IoT (http://pdacontrolen.com/category/iot/), LoRa & LoRaWAN
(http://pdacontrolen.com/category/projects/lora-lorawan/)
 esp8266 (http://pdacontrolen.com/tag/esp8266/), esp8266 LoRa (http://pdacontrolen.com/tag/esp8266-lora/),
HopeRF (http://pdacontrolen.com/tag/hoperf/), LoRa (http://pdacontrolen.com/tag/lora/), lora easy

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 25/26
5/18/2019 Communication LoRa ESP8266 & Radio RFM95 #1 - PDAControl

(http://pdacontrolen.com/tag/lora-easy/), RFM95 (http://pdacontrolen.com/tag/rfm95/)

PDAControl (http://pdacontrolen.com/author/nitro/)

PDAControl is a space for electronic testing, automation and everything related to open source & diy

Proudly powered by WordPress ( https://wordpress.org/) / Simplent Theme by Rafay (https://abdulrafay.me/)


PDAControl - pdacontrolen.com 2019

pdacontrolen.com/comunication-lora-esp8266-radio-rfm95-1/ 26/26

S-ar putea să vă placă și