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

Поделиться
HTML-код
  • Опубликовано: 27 июл 2024
  • 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
  • НаукаНаука

Комментарии • 129

  • @electronic7979
    @electronic7979 4 года назад +1

    Very good 👍

  • @Lunarspear2023
    @Lunarspear2023 3 года назад

    The soldering of the wires to the lora module was hell!

    • @HowtoElectronics
      @HowtoElectronics  3 года назад +1

      Haha same here man😂. That is why buy the module which is breadboard friendly.

    • @Lunarspear2023
      @Lunarspear2023 3 года назад

      @@HowtoElectronics I got this because its small but my shaking hands were mad :))) Next purchase will. be a breadboard friendly board

  • @Al-bd8hm
    @Al-bd8hm 4 года назад +1

    Excellent video. What are the changes in the sketch if I use a switch instead a potentiometer to turn on and off the led?

  • @semihk09
    @semihk09 2 года назад +1

    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 года назад +3

    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??

  • @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????

  • @siddharth4662
    @siddharth4662 3 года назад +1

    Can you help on creating a Lora based wireless soil moisture sensor from multiple locations to single location displayed via a LED light bar

  • @electricalcoder3025
    @electricalcoder3025 3 года назад

    hey, could you tell me what is the maximum range you got practically with this sx1278

  • @mr-qtime5870
    @mr-qtime5870 4 года назад +1

    i get error in compiling transmitter code in dht sensor . Error - status exit 1 . so how to fix it

  • @shogunvanrepi3555
    @shogunvanrepi3555 Год назад +1

    what is the maximum distance of communication via lora with this module?

  • @anokhautomation4453
    @anokhautomation4453 3 года назад

    Nice project.
    👍👍
    How much the maximum distance range of this module??

  • @orotechyoutube6438
    @orotechyoutube6438 3 года назад +1

    Please sir help me how can I can I transmit BME280 sensor data by LoRa module.

  • @antoinekeller2786
    @antoinekeller2786 Год назад +1

    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

  • @leonardomaia7661
    @leonardomaia7661 3 года назад +1

    how can we identify which module is sending?

  • @N1ghtR1der666
    @N1ghtR1der666 2 месяца назад

    can you send anything other than a string? seems crazy and slow to have to do string analysis to convert larger amounts of data

  • @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

  • @ArshaansEdits
    @ArshaansEdits 9 месяцев назад

    I don't have DIO0 what should i do??

  • @raajushawarma9367
    @raajushawarma9367 2 года назад

    how much maximum range can u get by using this module?

  • @pahar535
    @pahar535 3 года назад +1

    How to add code for soil moisture sensor

  • @user-eb5zt8ef5y
    @user-eb5zt8ef5y 4 месяца назад

    Should we solder antenna to LoraWanmodule ??

  • @alfiolocatelli5093
    @alfiolocatelli5093 4 года назад

    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 3 года назад +1

      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.

  • @zoomboom3003
    @zoomboom3003 Год назад

    How is with wall penetration?

  • @electronicprojectspune3523
    @electronicprojectspune3523 4 года назад

    how to read multipal strings in one receiver

  • @Infinitecosmosaerospace.123
    @Infinitecosmosaerospace.123 3 года назад

    Problem in transmitter code, DHT dht (DHTPIN, DHTTYPE); in this line.how to solve the problem.

  • @AnuragYadav-gz8sr
    @AnuragYadav-gz8sr Год назад

    Sir I did everything same but still my lora not begin what should I do.

  • @masidurrahaman2296
    @masidurrahaman2296 2 года назад

    How can I secure the transmission ?

  • @MrNams
    @MrNams 2 года назад +1

    Great video, one question, How to make receiver to receive from particular sender only?

    • @LAVISH-yv9yg
      @LAVISH-yv9yg 25 дней назад +1

      Have u got the answer of your question

    • @MrNams
      @MrNams 25 дней назад

      @@LAVISH-yv9yg Yes, I am using different My LoRa unit does not accept messages from other that specified address.

    • @LAVISH-yv9yg
      @LAVISH-yv9yg 24 дня назад

      @@MrNams but we are not using addresses in the code ??

  • @soha150
    @soha150 11 месяцев назад

    wha about the LORA networkID?
    Adress?

  • @kryptocat4240
    @kryptocat4240 4 года назад +3

    How to make 12 channel transmitter and receiver with lora

  • @evisaskarra4887
    @evisaskarra4887 4 года назад +1

    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  4 года назад

      SX1278 SPI Pins are 5V tolerable

    • @evisaskarra4887
      @evisaskarra4887 4 года назад

      @@HowtoElectronics Thanks, but what can be the problem then ...

  • @hungdang6333
    @hungdang6333 3 года назад

    how to communication master and multi slave?

  • @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

  • @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

  • @edwinng9916
    @edwinng9916 9 месяцев назад

    what the SPI.h lib for?

  • @ayeshayasin7214
    @ayeshayasin7214 4 года назад +1

    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?

  • @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 3 года назад

      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?

  • @mehulkini9384
    @mehulkini9384 12 дней назад

    Should both of the Code should be uploaded simultaneously and then run it together

  • @germas369
    @germas369 4 года назад

    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  4 года назад

      No u don't need gateway for getting started tutorial.

  • @FardeenKhan-xq2ew
    @FardeenKhan-xq2ew 4 года назад

    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  4 года назад

      The SPI pins of SX1278 are 5V tolerable. Only VCC needs 3.3V
      Please check connection for the board to work.

  • @alhapidzteguhgumilar
    @alhapidzteguhgumilar 3 года назад

    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

  • @kevinjones9586
    @kevinjones9586 2 года назад +7

    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 Год назад +1

      @@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 😉

  • @mubasheer5584
    @mubasheer5584 4 года назад +2

    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 года назад +1

      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 года назад +1

      @@HowtoElectronics thanks..nice work buddy.. Subbed..

  • @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 года назад +1

      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 года назад +1

      @@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

  • @uengel5755
    @uengel5755 3 года назад

    Where can I buy SX1278 (Ra-02) LoRa 868 MHz? I only see 433 MHz boards not for EU.

  • @Abhishekyalla
    @Abhishekyalla 4 года назад

    Bro pls make a bidirectional home automation without display and Google and Alexa home automation in one Arduino plss...

  • @vinothkannanr2804
    @vinothkannanr2804 3 года назад

    receiving only zero data in receiver module

  • @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

  • @vedantjoshi1487
    @vedantjoshi1487 3 года назад +1

    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?

  • @kalanaweerakoon3225
    @kalanaweerakoon3225 3 года назад

    Wear to find spi.h library?

    • @HowtoElectronics
      @HowtoElectronics  3 года назад

      It is an inbuilt library. You dnt need any extra library.

  • @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 года назад +1

      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

  • @rohini891986
    @rohini891986 3 года назад

    Can i use this lora module in india? This module will work in india?

  • @bodalasagarika3539
    @bodalasagarika3539 4 года назад

    How it is differ from esp8266 in case of application

    • @HowtoElectronics
      @HowtoElectronics  4 года назад +1

      Esp8266 needs wifi to communicate it lora doesn't.

    • @bodalasagarika3539
      @bodalasagarika3539 4 года назад

      @@HowtoElectronics which one is better
      Either esp8266 or LoRa

  • @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..

  • @lokeshacharya3289
    @lokeshacharya3289 2 года назад

    need with feed back unite or else no use

  • @user-yt2qy6th2j
    @user-yt2qy6th2j Год назад +1

    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.

    • @LAVISH-yv9yg
      @LAVISH-yv9yg 25 дней назад

      Did u got the solution buddy ??

    • @user-yt2qy6th2j
      @user-yt2qy6th2j 25 дней назад

      @@LAVISH-yv9yg unfortunately, i didnt. I dropped learning LORA a long time ago since i didnt find it useful for my projects.

    • @LAVISH-yv9yg
      @LAVISH-yv9yg 24 дня назад

      @@user-yt2qy6th2j okay , actually i am using Lora right now in my project !!
      but there is an issue that my LoRa module is not getting initialize

    • @Upadhyaylavish
      @Upadhyaylavish 9 дней назад

      Actually if u use multiple transmitter and receiver in an area then we have to define unique identifier for each transmitter and will use same identifier in the code of corresponding receiver that it will receive data packets from corresponding transmitter.

  • @dhanush2060
    @dhanush2060 2 года назад +1

    Can we use sx1278 in india

    • @HowtoElectronics
      @HowtoElectronics  2 года назад +1

      Yes use it for learning, not for commercial application qs 433MHz frequency is not allowed in india

    • @dhanush2060
      @dhanush2060 2 года назад +1

      @@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 года назад +1

      Yes you can do

    • @dhanush2060
      @dhanush2060 2 года назад +1

      @@HowtoElectronics will you please make a video for that, because there is no the right sources to study about it

  • @electronicprojectspune3523
    @electronicprojectspune3523 4 года назад

    how much maximum distance can cover this project

    • @HowtoElectronics
      @HowtoElectronics  4 года назад

      5-6km

    • @electronicprojectspune3523
      @electronicprojectspune3523 4 года назад

      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 Год назад

      ​@@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

    • @LAVISH-yv9yg
      @LAVISH-yv9yg 25 дней назад

      bro have u really tested it ??

  • @adambubela5946
    @adambubela5946 3 года назад +1

    More ads than content. Useless example as normally you'd like to pair a node with gateway.

  • @paulrudman1349
    @paulrudman1349 3 года назад +3

    Text-to-speech is just annoying.

  • @almerodupreez
    @almerodupreez 3 года назад +1

    Computer voice is TERRIBLE

  • @Hairfire
    @Hairfire 3 месяца назад

    Oh the fake voice is so annoying...