LoRa SX1278/76 Arduino Interfacing Tutorial | Sending Sensor Data Wirelessly with LoRa

  Переглядів 79,121

How To Electronics

How To Electronics

День тому

In this tutorial, we will learn about Interfacing SX1278 (Ra-02) LORA Module with Arduino. We will see SX1278 LORA & Arduino example and make a transmitter & receiver circuit. We will control the brightness of LED wirelessly using a potentiometer.
We will also learn about Sending & Receiving Sensor Data Wirelessly with LoRa Ra-02 SX1278 Module & Arduino. We will use DHT11 Humidity & Temperature Sensor & send the Temperature & Humidity value wirelessly from one Arduino to another using SX1278 Ra-02 LoRa Module.
The SX1276/77/78/79 transceivers feature the LoRa® long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption.
Source Code for Interfacing SX1278 (Ra-02) LORA Module with Arduino: how2electronics.com/interfaci...
Source Code for Sending Sensor Data Wirelessly with LoRa SX1278 & Arduino: how2electronics.com/sending-s...
....................................................................................................................................................................................................................................
Drop a like if you liked this video.
Don't forget to subscribe our channel for more Electronics project and tutorials.
Website: how2electronics.com
Facebook: / electronicsbyalex

КОМЕНТАРІ: 117
@Al-bd8hm
@Al-bd8hm 4 роки тому
Excellent video. What are the changes in the sketch if I use a switch instead a potentiometer to turn on and off the led?
@MrNams
@MrNams 2 роки тому
Great video, one question, How to make receiver to receive from particular sender only?
@rodrigod.fernandes5604
@rodrigod.fernandes5604 4 роки тому
A transmissão de dados com dois transceptores Lora E32 433t30D, é em real-time? Ou existe um Delay entre a transmissão e a recepção do dados na outra ponta????
@semihk09
@semihk09 2 роки тому
If we use Arduino UNO in the transmitter circuit and ESP32 in the receiver circuit, will there be anything that needs to be added in the code section other than the pin definitions? So, since there are different devices, do we need to add the necessary config commands for communication, or should it stay the same because the Lora module already communicates?
@monisraza181
@monisraza181 2 роки тому
Why did you not use logic level converters for your connections to the LoRa sx1278 modules which operate on 3.3V logic ? Is there no risk of burning your module by connecting its pins directly to the arduinos which operate on 5V logic??
@siddharth4662
@siddharth4662 2 роки тому
Can you help on creating a Lora based wireless soil moisture sensor from multiple locations to single location displayed via a LED light bar
@Lunarspear2023
@Lunarspear2023 2 роки тому
The soldering of the wires to the lora module was hell!
@HowtoElectronics
@HowtoElectronics 2 роки тому
Haha same here man😂. That is why buy the module which is breadboard friendly.
@Lunarspear2023
@Lunarspear2023 2 роки тому
@@HowtoElectronics I got this because its small but my shaking hands were mad :))) Next purchase will. be a breadboard friendly board
@soha150
@soha150 8 місяців тому
wha about the LORA networkID? Adress?
@electricalcoder3025
@electricalcoder3025 2 роки тому
hey, could you tell me what is the maximum range you got practically with this sx1278
@electronic7979
@electronic7979 4 роки тому
Very good 👍
@anokhautomation4453
@anokhautomation4453 2 роки тому
Nice project. 👍👍 How much the maximum distance range of this module??
@Charles-lt9rr
@Charles-lt9rr Рік тому
Thanks very much my dear for this nice video. Please, assuming I am having 4 receivers, how can I add a keypad on the transmitter side so that I will use the keypad to write the destination address of the receiver that I will like to communicate. The lcd or OLED display in transmitter side will be used to display the receivers destination address when I am typing them. Thanks very much for your understanding and concern. Please, I am waiting for your reply
@antoinekeller2786
@antoinekeller2786 Рік тому
Note that the LoRa module SX1276 for the emitter should not be powered by the Arduino Nano, but by an external 3.3V power supply to have enough current
@shogunvanrepi3555
@shogunvanrepi3555 Рік тому
what is the maximum distance of communication via lora with this module?
@mr-qtime5870
@mr-qtime5870 4 роки тому
i get error in compiling transmitter code in dht sensor . Error - status exit 1 . so how to fix it
@alfiolocatelli5093
@alfiolocatelli5093 3 роки тому
That's very good video, I just wondering how to extrapolate every single analog in such temperature and humidity... For example, if in your program you would like to turn on a Led when temperature is higher then 30° how could you do that? I presume that is needed a swap from char to integer? Thanks
@victorfiliol6706
@victorfiliol6706 2 роки тому
int led_pin_1 = 8; pinMode(led_pin_1, OUTPUT); if (temp>30) { tone(led_pin_1, 100); //100 = 100% of power } else { notone(led_pin_1); } for that, you should connect the pin 8 to the led, and connect the other part with an eletrical resistance to the ground. I not sure about that, but try it, it's the same protocol than a buzzer.
@orotechyoutube6438
@orotechyoutube6438 3 роки тому
Please sir help me how can I can I transmit BME280 sensor data by LoRa module.
@leonardomaia7661
@leonardomaia7661 2 роки тому
how can we identify which module is sending?
@user-eb5zt8ef5y
@user-eb5zt8ef5y Місяць тому
Should we solder antenna to LoraWanmodule ??
@raajushawarma9367
@raajushawarma9367 2 роки тому
how much maximum range can u get by using this module?
@electronicprojectspune3523
@electronicprojectspune3523 3 роки тому
how to read multipal strings in one receiver
@pahar535
@pahar535 3 роки тому
How to add code for soil moisture sensor
@zoomboom3003
@zoomboom3003 Рік тому
How is with wall penetration?
@masidurrahaman2296
@masidurrahaman2296 2 роки тому
How can I secure the transmission ?
@user-yt2qy6th2j
@user-yt2qy6th2j Рік тому
It is uncertain about adressing with this LORA modules because i dont understand how he differ them in one area. I suppose we can make different networks by settign different frequencies and other parameters but what if someone uses the same setting in the same area where i use my modules. I suppose in that case this is my work as a programmer to make adresses with the program itself so strange packets get left out if they come but still i dont understand why nobody who teaches about this modules does not emphasize this.
@sandren6210
@sandren6210 3 роки тому
Hi, I built this, Transmitter works well , receiver works for few minutes and then stops ...is it and input serial buffer that can be overflowing on the the receiver side ?
@Renzo87
@Renzo87 2 роки тому
Hi, did you solve this thing? i used two nano with linear regulator and i had the same problem
@semihk09
@semihk09 2 роки тому
@@Renzo87 Are you running the transmitter and receiver codes on the same pc? When I run both of them in different sketch files on the same pc, I can run the transmitter circuit without any problems, but when I change the port settings and the board option of the receiver circuit, the port settings of the transmitter circuit also change. how can I overcome this problem?
@Infinitecosmosaerospace.123
@Infinitecosmosaerospace.123 2 роки тому
Problem in transmitter code, DHT dht (DHTPIN, DHTTYPE); in this line.how to solve the problem.
@ArshaansEdits
@ArshaansEdits 6 місяців тому
I don't have DIO0 what should i do??
@evisaskarra4887
@evisaskarra4887 3 роки тому
Hello I am using sx1278 ra 01 ai thinker and 2 arduino uno ...but the receiver doesn't receive any packets. Does this have to do with the fact that the arduino operates at 5 V while loRa modules operate at 3.3 V ? Would a level shifter make any difference ?
@HowtoElectronics
@HowtoElectronics 3 роки тому
SX1278 SPI Pins are 5V tolerable
@evisaskarra4887
@evisaskarra4887 3 роки тому
@@HowtoElectronics Thanks, but what can be the problem then ...
@alhapidzteguhgumilar
@alhapidzteguhgumilar 2 роки тому
Can you try to put those 2 in two different city and show to us? What is the best lora modul that can transfer n receive data in more than 200km ?
@gauravdhumatker8210
@gauravdhumatker8210 2 роки тому
200km is not within line of sight. so you cant send it directly. U will have to use satellites to relay your data
@edwinng9916
@edwinng9916 6 місяців тому
what the SPI.h lib for?
@AnuragYadav-gz8sr
@AnuragYadav-gz8sr Рік тому
Sir I did everything same but still my lora not begin what should I do.
@hungdang6333
@hungdang6333 3 роки тому
how to communication master and multi slave?
@nitishnitish9172
@nitishnitish9172 3 роки тому
Sir, is soldering required to this module.. Or can we use it by just inserting a single lead wire into that module..
@MrNams
@MrNams 2 роки тому
requires soldering
@andresrozo6513
@andresrozo6513 4 роки тому
I have a question, this Lora SX1278 need a power supply for 3.3v and the arduino can give it, but the Digital pins voltage in the arduino UNO have 5v, can those 5v damages the LoRa Module, or is possible to connect directly?
@HowtoElectronics
@HowtoElectronics 4 роки тому
Digital pins are 5V tolerable. No problem with 5V except the Vcc pins which need 3.3V.
@andresrozo6513
@andresrozo6513 4 роки тому
@@HowtoElectronics Thanks a lot :)
@andremurilobr
@andremurilobr 3 роки тому
@@HowtoElectronics Hi, I was triying to find this information in SX1278 datasheet and I can not. There are lot of coments in LoRa foruns about that. Some higly recomends using logical converters. Your information is very usefull
@mubasheer5584
@mubasheer5584 4 роки тому
Can i use Lora module for quadcopter ? Is this okay to use? Because I heard everywhere it's had nice feature for long range. If no,which device can I use for quadcopter RC?
@HowtoElectronics
@HowtoElectronics 4 роки тому
Yes lora can be the best solution for quadcopter if you wanna fly it over a long distance.
@mubasheer5584
@mubasheer5584 4 роки тому
@@HowtoElectronics wow ok thank you.. Do you Know any reference design for this for basic coding and etc Sir.
@sarthaksuman6554
@sarthaksuman6554 4 роки тому
How much range?
@HowtoElectronics
@HowtoElectronics 4 роки тому
Almost 6.5 km in open space with this module.
@sarthaksuman6554
@sarthaksuman6554 4 роки тому
@@HowtoElectronics thanks..nice work buddy.. Subbed..
@germas369
@germas369 3 роки тому
Hello,i want to get started with this module. do i need a gateway for this network? there is nearby gateway already in my area
@HowtoElectronics
@HowtoElectronics 3 роки тому
No u don't need gateway for getting started tutorial.
@kryptocat4240
@kryptocat4240 4 роки тому
How to make 12 channel transmitter and receiver with lora
@FardeenKhan-xq2ew
@FardeenKhan-xq2ew 3 роки тому
Hey, doesn't the arduino work at 5v, so won't the isp pins (or any other I/O pin) be at 5v? Will this cause trouble with the 3.3v Lora module? Or have u used a voltage divider in between? I made the connections as u said, but it's not working 😭😭 Sincere call for help.... I think I messed up somewhere
@HowtoElectronics
@HowtoElectronics 3 роки тому
The SPI pins of SX1278 are 5V tolerable. Only VCC needs 3.3V Please check connection for the board to work.
@Abhishekyalla
@Abhishekyalla 4 роки тому
Bro pls make a bidirectional home automation without display and Google and Alexa home automation in one Arduino plss...
@saadzafar6431
@saadzafar6431 Рік тому
H NEED TO ASK. I M USING LORA RAO2 WITH AURDIONO. I NEE 6 OUTPUTS. NOW I M JUST GETTING TWO OUTPUTS . CAN UH GUYS PLEASE HELP
@ayeshayasin7214
@ayeshayasin7214 4 роки тому
Hi. I am following Sending Sensor Data Link (given in the description).I am getting Starting Lora Filed Error at this line if (!LoRa.begin(433E6)) { Serial.println("Starting LoRa failed!"); while (1); } Can any one please help me?
@HowtoElectronics
@HowtoElectronics 4 роки тому
Hi please check SPI pins connection.
@vinothkannanr2804
@vinothkannanr2804 3 роки тому
receiving only zero data in receiver module
@uengel5755
@uengel5755 3 роки тому
Where can I buy SX1278 (Ra-02) LoRa 868 MHz? I only see 433 MHz boards not for EU.
@HowtoElectronics
@HowtoElectronics 3 роки тому
You need to buy SX1276 if you need 868Mhz.
@nitishnitish9172
@nitishnitish9172 3 роки тому
Sir can we solder those pins with single lead wire sir...
@HowtoElectronics
@HowtoElectronics 3 роки тому
Yes you can but it will be little difficult
@nitishnitish9172
@nitishnitish9172 3 роки тому
@@HowtoElectronics yes sir that is where I'm afraid of it sir..
@vedantjoshi1487
@vedantjoshi1487 3 роки тому
Hello sir, Pleaaaassee reply. I have sx1276 based Lora module from hpdtek (hpd13A v1.1), 868Mhz. Will this code work?
@HowtoElectronics
@HowtoElectronics 3 роки тому
Yes this code will work. I too had HPD13A SX1276 module. The code works perfectly. Note: in the code part assign the frequency by replacing 433mhz by 868mhz.
@vedantjoshi1487
@vedantjoshi1487 3 роки тому
@@HowtoElectronics thank you so much But I tried this code and in reciever serial monitor I'm getting message like: Recieved pscket ............ -$-$@-$@+@_@+_+_+&(&(&(+_#+_@-_@-_@--@_@-_- Recieved pscket ............ -$-$@-$@+@_@+_+_+&(&(&(+_#+_@-_@-_@--@_@-_- What could be wrong sir?
@HowtoElectronics
@HowtoElectronics 3 роки тому
Did you change frequency. Seems module is not able to communicate properly.
@vedantjoshi1487
@vedantjoshi1487 3 роки тому
Yes sir I changed it to 868E6 in both codes. I will try again once and if not successful can I get your email id or contact for further help please. 🙏
@vedantjoshi1487
@vedantjoshi1487 3 роки тому
As we have same module too (hpdtek) , please help me in this
@tanaykumar3493
@tanaykumar3493 4 роки тому
which pad is the antenna soldered to?
@HowtoElectronics
@HowtoElectronics 4 роки тому
There is already ant written
@tanaykumar3493
@tanaykumar3493 4 роки тому
@@HowtoElectronics Thank you
@mali.aydemir
@mali.aydemir 4 роки тому
can we plug any wires on lora to arduino digital pins. how to know lora module which wire connect which arduino pin. should be plug like a video or something. is that has a rule or standart. i dont get it. can anyone explain. thanks.
@HowtoElectronics
@HowtoElectronics 4 роки тому
Hi LoRa module is an SPI module. The SPI connection is fixed. You can't change. The connection diagram is given in video and also in website article. You can follow that.
@mali.aydemir
@mali.aydemir 4 роки тому
@@HowtoElectronics thank you
@bodalasagarika3539
@bodalasagarika3539 3 роки тому
How it is differ from esp8266 in case of application
@HowtoElectronics
@HowtoElectronics 3 роки тому
Esp8266 needs wifi to communicate it lora doesn't.
@bodalasagarika3539
@bodalasagarika3539 3 роки тому
@@HowtoElectronics which one is better Either esp8266 or LoRa
@kalanaweerakoon3225
@kalanaweerakoon3225 3 роки тому
Wear to find spi.h library?
@HowtoElectronics
@HowtoElectronics 3 роки тому
It is an inbuilt library. You dnt need any extra library.
@techmechabhi5734
@techmechabhi5734 2 роки тому
Sir long range distance sensor want to me so and two sensor one data sender and other data receiver if both range 1 km. Data sender sensor one and data receiver massage send . Data sender ony massege and one data receiver massege receiver So that sensor name to tell me plz sir
@rohini891986
@rohini891986 3 роки тому
Can i use this lora module in india? This module will work in india?
@HowtoElectronics
@HowtoElectronics 3 роки тому
Yes it will work.
@lokeshacharya3289
@lokeshacharya3289 2 роки тому
need with feed back unite or else no use
@electronicprojectspune3523
@electronicprojectspune3523 3 роки тому
how much maximum distance can cover this project
@HowtoElectronics
@HowtoElectronics 3 роки тому
5-6km
@electronicprojectspune3523
@electronicprojectspune3523 3 роки тому
i want to connect 4 transmitter @ one recever project will you please guide & also want to read 485 data
@kpinnovations6613
@kpinnovations6613 2 роки тому
@@HowtoElectronics How can I get 5-6 km range I also tried many times but range is only 500M not increased I m using lora ra-02 with 433mhz frequency
@asyouwish612
@asyouwish612 9 місяців тому
​@@kpinnovations6613I also want to make drone transmitter and receiver with this ra02 how much range you are getting now and can you suggest other module if it don''t give 5km range Please bro guide me
@kevinjones9586
@kevinjones9586 2 роки тому
WARNING! Unless you use a 3.3V arduino board such as the Pro Mini 328, or use level shifting on your data connections between the Arduino and SX1278, you will have problems. I found this out the hard way. The data outputs on 5V boards are too high for the the SX1278 and will create havoc. It might work, might not, may possibly damage the module, but will be unreliable at best. Make sure you are really clear the Arduino you are using is compatible with the SX1278, or compensate accordingly.
@angelalferez2002
@angelalferez2002 Рік тому
Thank you very much. I was stuck for 2 weeks. your warning comment solve the problem. thank you very very very much
@kevinjones9586
@kevinjones9586 Рік тому
@@angelalferez2002 You're welcome. Using a bidirectional level shifter will work (though hogs real estate.) Be sure you get one fast enough (such as the TXS0108E.) Although I am using simple resistor voltage dividers on several projects and I haven't had any problems. I chose a fairly low resistance so as not to affect speed.
@marekcermak3843
@marekcermak3843 Рік тому
@@kevinjones9586Hello, which of the connection pins are input on the module = need voltage regulation. And how strong resistors did you use for the voltage divider.
@kevinjones9586
@kevinjones9586 Рік тому
@@marekcermak3843 Any pins which could have 5V applied to them, which includes all AFAICT except MISO which is output only. Voltage dividers are a tradeoff for limiting optimal speed against power consumption. My application didn't call for low power consumption so I used 330/680 ohm.
@marekcermak3843
@marekcermak3843 Рік тому
@@kevinjones9586 If i want to keep the speed as high as possible should I use higher or lower ohm resistors, or are there any other sloutions you would recommend? Thanks for replying 😉
@dhanush2060
@dhanush2060 2 роки тому
Can we use sx1278 in india
@HowtoElectronics
@HowtoElectronics 2 роки тому
Yes use it for learning, not for commercial application qs 433MHz frequency is not allowed in india
@dhanush2060
@dhanush2060 2 роки тому
@@HowtoElectronics is it possible to send data from multiple lora node to the single lora node and connect to the network (like lora gateway) without using lorawan
@HowtoElectronics
@HowtoElectronics 2 роки тому
Yes you can do
@dhanush2060
@dhanush2060 2 роки тому
@@HowtoElectronics will you please make a video for that, because there is no the right sources to study about it
@adambubela5946
@adambubela5946 3 роки тому
More ads than content. Useless example as normally you'd like to pair a node with gateway.
@paulrudman1349
@paulrudman1349 3 роки тому
Text-to-speech is just annoying.
@almerodupreez
@almerodupreez 3 роки тому
Computer voice is TERRIBLE
@Hairfire
@Hairfire 16 днів тому
Oh the fake voice is so annoying...
Парковка Пошла Не По Плану 😨
00:12
Глеб Рандалайнен
Переглядів 12 млн
🐩🐕
00:25
Янчик
Переглядів 2 млн
#112 LoRa / LoRaWAN De-Mystified / Tutorial
20:25
Andreas Spiess
Переглядів 996 тис.
Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
Andreas Spiess
Переглядів 709 тис.
Getting Started with LoRa & testing Range in my City
12:39
techiesms
Переглядів 112 тис.
inventor aw - This Device is very helpful ,, you can make at home
6:47
Уроки Ардуино. ПИД регулятор
28:57
Заметки Ардуинщика
Переглядів 445 тис.
The Cheapest Microcontroller? Getting started with the 10 cent Puya PY32.
21:36
Zach of All Trades
Переглядів 23 тис.
ИГРОВОЙ ПК c WILDBERRIES за 40 тысяч рублей
30:17
Ремонтяш
Переглядів 485 тис.
Photo Changing Replace And Edit Backgrounds 65mn With These 10 Tips
0:53
Irfan AN Tech
Переглядів 260 тис.
Зачем вы показываете ноутбук в аэропорту?✈️
0:29
Я Создал Новый Айфон!
0:59
FLV
Переглядів 646 тис.
Как должен стоять ПК?
1:00
CompShop Shorts
Переглядів 443 тис.
Why spend $10.000 on a flashlight when these are $200🗿
0:12
NIGHTOPERATOR
Переглядів 16 млн