FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Lorenz Development Board Evaluation - LORA communication based on SX1278 module and Arduino

     

    "Have you ever thought about how to make Arduino wireless communication distance? Have you ever thought about creating a small Internet of INT, but later because remote communication needs to be larger power and give up? Or wanted to build a Explore the world's robot, and you are sitting on the chair, leisurely, don't worry, don't worry, now there is a solution! In this article, I will introduce you to "Lorenz-Arduino Development Board", not only all of these tasks, not only to complete all these tasks. And you can bring you more features. In addition, more importantly, Lorenz software and hardware are completely open! hardware 2 Arduino Uno / MEGA 2 sets of Lorenz Rev. B development boards and modules 2 SX1278 modules What can the development board do? It is compatible with Arduino Uno and Arduino EGA, which can provide hundreds of meters of communication distance, and power costs at the same time as low as 80mA. This is only equivalent to the power consumption of 5 ordinary LEDs. In addition, I also built a library, which makes the entire system very easy to use, even for beginners. real! Do you want to send a message? Enter a command! Ok, send success! Legal disclaimer Before we start, I have to declare that although the communication frequency of LORA technology is free of license, such as 433MHz or 868MHz, etc. (usually called ISM - Industry, Science and Medical), but the area you live may still be legally restricted. Restrictions may include power output limits, bandwidth limits, and even transmit and receive data types. I don't know which state or which country is read, so I can only give you the most general recommendations: Always follow the current legal provisions in your area! When using the Lorenz development board or Loralib, the author and DevicePlus.com are not responsible for your operations. Now, if you abide by relevant laws, then we will start from the core function of the development board - LORA modulation - start. LORA modulation Abstract of Lora - Long Range - is a smart electromagnetic signal modulation method. Signal modulation is to load more information into the wireless signal by encoding, this manner is very smart. The history of modulation is long, in fact, they can be traced back to the end of the 19th century and the radio inventions. In fact, most people are familiar with "Modulation" terminology because of the presence of the radio: Have you heard of AM (amplitude modulation) or FM (frequency modulation)? When the amplitude modulation, the information is encoded by the change in carrier amplitude. Similarly, the frequency of the carrier will change when frequency modulation. The main reason for using modulation is that we can "fit" into high-frequency carriers to low frequency information (such as speech or music). So, which modulation is LORA? Both are not. Lora is a different type of modulation, although it is similar to FM. LORA is actually CSS modulation-啁啾 spread spectrum modulation. The technology itself is proprietary technology and has patents, but the basic principle is to encode or decrease the carrier frequency over time by using 啁啾. This modulation anti-noise is very powerful, so it is very useful when communicating at low power long distances. Fortunately, the modules using this technology are very cheap and easy to use. The most popular SX1278 chip manufactured by Semtech, the price of modules equipped with this chip can be as low as $ 7. Search for "SX1278 Modules" with Google, you will see a lot of shops selling the product. Now we have learned what Lora is and how to get, then let's take a look at the development board itself - first, how to get this development board? Lorenz development board Unfortunately, you can't buy this development board from the store because no one is produced. The development board is completely customized, so you must download Eagle files from my github, purchase all components, find a local processing PCB board, and then weld all components together. The total price of the element should be around 20 US dollars, so the development board is not expensive. In fact, when I develop this product, the most expensive part is actually the shipping cost of the PCB. But even if you include shipping, the price of each development board should not exceed $ 30 - of course, depending on the area you live. Next, let's take a look at all components on the development board and its functions: 3.3 V Power Supply Regulators Since the Arduino onboard power supply can only provide a current of 150 mA, I decided to add a separate 1117 regulator - capable of providing a current of at least 800 mA. This is much more much higher than the theoretical power, however, there will be some more than some. The screw terminal passes the terminal you can use almost any type of battery to power the development board! The allowed voltage range is 6-20V, but the power supply is also powered by Arduino, so I recommend using the battery between 7 to 12V. The UNO / MEGA pin SX1278 module communicates with Arduino via the SPI bus. The bus is 10-13 pins on the Arduino UNO, but is 50-52 pins on MEGA. I want the development board as common as possible, so I added this pin connector. When using Arduino UNO, just keep all three-to-short jumper. When using MEGA, remove the short-circuit jumper and connect the corresponding pin according to the figure below. Select pin from the device This may be a bit overkill, but if you want to use multiple Lorenz development boards on a single Arduino? With this pin, you can use up to four (!) Development boards! Simply short of different positions. SX1278 Module Slots You can use this slot to connect any type of SX1278 module to the development board, just ensure that the power supply is 3.3V. I recommend using precision slot connections to keep the overall height of the development board, the better. Logic Level Converters As far as I know, all SX1278 modules on the market use 3.3V logic. To connect Arduino - use 5V logic, we need to perform some logic level conversion. This is the role of these two ICs. One of them converts the Arduino output from 5 V to 3.3 V, and another converts SX1278 output from 3.3 V to 5 V. In this way, the system is also very stable even if the battery is low. In order to indicate the activity status of SX1278, I set a LED indicator on the developer. To enable LED, you must short the EN pad with solder. If you don't want to use the LED indicator, just remove the solder of the EN pad, the LED will no longer consume valuable current. In the experimental area, I designed an experimental area on the vacancy place on the development board, so that you have added additional design. This area comes with 3.3V, 5V and GND connections! You also need an expansion board. Due to several different types of SX1278 modules on the market, we need some "adapter" to connect all modules to the Lorenz development board. This is the role of this small plate. We weld the SX1278 module on the expansion board and then insert it into the slot of the development board. These expansion boards are also equipped with a coaxial cable connector that connects the external antenna to achieve longer communication distance! These components look good, right? But now we are still lacking a very important part. Hardware requires software to work. In order to control the LORENZ development board built in the Arduino long distance communication tutorial - LORENZ development board, I developed the open source Arduino library for SX1278 chips. This library is designed from zero, with only one for the purpose: making easy-to-use APIs, even beginners can also implement LORA communication. The goal of the library is to make remote communications as simple as serial communication. software Arduino IDE Loralib Arduino library (available on Github) Loralib library SX1278 has a variety of different settings, allowing users to completely customize scope, data rates, and power consumption, but the most important three settings are as follows: The bandwidth of the bandwidth SX1278 is set to 7.8 kHz to 500 kHz. The higher the bandwidth value, the faster the data transmission. However, this is to reduce the total sensitivity, therefore reduces the maximum range. The spreading factor is represented by multiple 啁啾 in LORA modulation. The spreading factor refers to how many 啁啾 per person. SX1278 supports 7 different settings, the higher the spreading factor, the slower the data transmission, the greater the range. The coding rate is in order to increase the stability of the transmission, and the SX1278 can perform an error check function. This error checks are called the coding rate, and four values ​​can be set. When the encoding rate is set to the lowest 4/5, the transfer is not stable, and the speed is slightly. When the coding rate is set to 4/8, the link is more reliable, but the cost is slower than the data transfer rate. The default setting of the library is: bandwidth is 500 kHz, the coding rate is 4/5 and the spreading factor is 12. These settings are reasonable balance between range, stability and data rate. Of course, these settings can be changed at any time through functions. The library built into packet classes and addressing systems. The address length is 8 bytes, then the largest address quantity is 1.8 billion (1.8 × 10 ^ 19). This value is large. In contrast, NASA estimates that the number of stars in our galaxy is only "400 million" (4 × 10 ^ 11). Each packet consists of a payload consisting of a source address, a destination address, and a maximum of 240 bytes. Of course, the library also provides several ways to read and write packet data. Let us look at how easy it is to use this library. Suppose we have two Lorenz development boards with SX1278 modules. They can take a few hundred meters away, so we can use the default settings. First, we must contain the libad file. We then create an instance of the LORA class with the default settings, create an instance of the Packet class with the target address and message. The source address is automatically generated by the library and writes Arduino EEPROM. To check if all content is saved correctly, we read the packet information and print it to the serial port. Next, we only need to call the TX () function. After a while ... complete! Just a command, our packets are successful! Of course, we need the second set of Arduino with the Lorenz development board to receive the packet. The system settings are constant, but this time we call the RX () function, then print the received packet. This function will wait for the packet, if the data is not arriving at some time, so that your code will not hang completely. The library even checks if the transferred packet is corrupt. If yes, it will discard it. Of course, this is just the most basic example. The library itself can do more things, and I am still going to develop more features. For more deeper information about the library and all other features, please refer to my GitHub and a managed document. Arduino encryption Before this article, I also want to discuss the encryption of Arduino. I mentioned this issue in the previous article. Now, all the data we send is unencrypted. This means that there is the same configuration, anyone who uses the same module and the same settings can intercept and read our news. Attackers can even send their own news, but we can't distinguish. Obviously, this is not safe. The easiest solution is to use some kind of encryption. Specifically, I decided to use the RIJNDAEL password. Have you heard of it? This is because this name is Dutch, so it is not good memory and pronunciation. The password itself is actually very common, but the name is more compelling: AES. It is a symmetric password that provides excellent balance between encryption speed and security. In addition, Arduino also provides a few AES libraries! The library used by this project is Aeslib developed by Davy Landman (available on Github). As mentioned above, AES is a symmetric password - which means it uses the same key to encrypt and decrypt messages. Now, we have only two devices, so it is very easy to encode the key to Arduino. Of course, if we want to dynamically add more devices and create some wireless network, we must implement security key exchange in some way, such as switching with Diffie-Hellman. But we will not go deep into this field now, we only need to hardcode key hardcore to our Arduino program. So how should we modify the code in the previous chapter? There are not many modifications. To tell the truth, we only need to add a key and an encrypted or decrypted data. This is the transmitter section, encrypts through the AES128_ENC_SINGLE () function. The receiver portion is decrypted as follows, and the same key and the function AES128_DEC_SINGLE () are completed. After using the key, our news is now safe. If someone has aid to talk about our conversation, he can't see anything other than the address, and each packet is 240 bytes of garbled. Similarly, if an attacker tries to transfer his own message, we will immediately know that because the news he transmits will not encrypt. Using AES encryption on Arduino, it is very simple, so I recommend using this encryption method. This is not just a good programming practice. You never know who and why you may end you like innocent dialogue. in conclusion Now, the short-term trip from Arduino remote wireless communications is over. If you develop your own Lorenz development board and apply it to some cool Arduino projects, please tell me! If you have the idea of ​​improving the Lorenz development board and the Loralib library, please share with me on Github. I tested the development board. When the bandwidth is 500kHz, the expansion factor is 12, when the coding rate is 4/8, I can achieve more than 500 meters in the accessibility environment; the transmission distance in the dense forest is more than 200 meters. All of this is only implemented by a 10cm antenna, and the transmitter power is only a cheap 9V battery (the receiver is electrocuted from the USB port, eventually powered by the Arduino board regulator). This distance can also be longer (by reducing bandwidth), but this will result in significant decrease in transmission speed, and the transmission speed is approximately 1 kbps in the case where the setting is unchanged. However, for my future projects, these are more than enough. Please pay attention to DevicePlus in the social media so you will not miss any interesting content! "

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us