        <style>
            #donation_buttons td{
                border:medium none;
                background: inherit !important;
            }
            #donation_buttons table{               
                border:medium none;
                margin: auto;
                width: auto;
            }
        </style>
        {"id":5974,"date":"2020-10-20T18:39:29","date_gmt":"2020-10-20T18:39:29","guid":{"rendered":"http:\/\/rogerbit.com\/wprb\/?p=5974"},"modified":"2020-10-20T18:39:29","modified_gmt":"2020-10-20T18:39:29","slug":"remote-water-level-meter-with-drf1276dm-drf1278dm-and-arduino-lora-modules","status":"publish","type":"post","link":"https:\/\/rogerbit.com\/wprb\/2020\/10\/remote-water-level-meter-with-drf1276dm-drf1278dm-and-arduino-lora-modules\/","title":{"rendered":"Remote water level meter with DRF1276DM\/DRF1278DM and Arduino lora modules"},"content":{"rendered":"<p><iframe loading=\"lazy\" width=\"1160\" height=\"653\" src=\"https:\/\/www.youtube.com\/embed\/8NRqiber7Iw?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p>In this tutorial we will see how to create a system that allows us to measure the water level remotely, with modules lora DRF1278DM\/DRF1276DM (sx1276) and arduino mini pro, in addition the printed circuit is included to create the water probe. We will see the circuits, also the source codes and the operation of the system.<\/p>\n<p><strong>About the Water Level Meter Circuit<\/strong><\/p>\n<p>The ULN2803 integrated circuit is used as a power interface for circuits with CMOS and TTL technology. This integrated has inside 8 NPN transistors in Darlington configuration with protective diodes, to be able to control motors, inductive loads, relays, and more. Each output can control up to 500 mA so you can control different types of loads. Outputs can be connected in parallel when higher loads need to be handled, however it is advisable not to exceed the total power of the circuit.<\/p>\n<hr \/>\n<p style=\"text-align: left;\">You may be interested in projects in Arduino, pic, robotics, telecommunications,\u00a0\u00a0<a href=\"http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1\">http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1<\/a> videos with full source code and diagrams<\/p>\n<p style=\"text-align: left;\"><div id=\"ubm-banners-rotation-n1\" data-interval=\"4000\" class=\"ubm_banners_rotation\" style=\"overflow: hidden; width: 200px; height: 150px;\"><div id=\"3_ubm_banner\" class=\"ubm_rotating_banner\"><a href=\"https:\/\/bit.ly\/3aXRDAu\" target=\"_blank\" rel=\"dofollow\"><img src=\"https:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/useful_banner_manager_banners\/3-2-logo youtube.png\" width=\"100%\" height=\"100%\" alt=\"SUSCRIBETE A NUESTRO CANAL DE YOUTUBE, TUTORIALES GRATIS\" \/><\/a><\/div><\/div><\/p>\n<hr \/>\n<p><b>Features:<\/b><\/p>\n<ul>\n<li>\n<ul>\n<li>8 NPN Darlington transistors in common emitter<\/li>\n<li>8 reverse voltage suppression diodes to handle inductive loads, with common cathode connections<\/li>\n<li>Outputs of 0.5A (500mA) max.<\/li>\n<li>Transistors can be connected in parallel for greater current capacity<\/li>\n<li>Output support voltage: -0.5V to 50V<\/li>\n<li>Max power: 1.47 W<\/li>\n<li>Input resistance to the base: 2.7k<\/li>\n<li>Input voltage: -0.5V to 30V<\/li>\n<li>5V TTL and CMOS compatible inputs<\/li>\n<li>Encapsulated: DIP 18-pin<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><b>Applications:<\/b><\/p>\n<ul>\n<li>Command of relays, lamps, or displays (LED or gas discharge), etc.<\/li>\n<li>Logical buffers<\/li>\n<li>Line drivers<\/li>\n<li>Among other applications<\/li>\n<\/ul>\n<h4><strong>Operation<\/strong><\/h4>\n<p>To activate each output of this integrated circuit, the water must not be pure, in its contents it must have some salts, which help to conduct electricity, that when reaching each of the levels in the container, closes the electrical circuit of the ulN2803 inputs, which detect the high voltage level and turns on the LED corresponding to each output. At each output we can connect for example a relay, a buzzer and even the pump of an engine to refill a water tank, if necessary, up to a certain level and disconnect the water pump when reaching the desired limit.<\/p>\n<p>The following figure shows the ULN2803 pinout. Comes with 8 input pins and 8 output pins.<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-6.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-5321\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-6.png\" sizes=\"(max-width: 509px) 100vw, 509px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-6.png 509w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-6-300x223.png 300w\" alt=\"\" width=\"509\" height=\"378\" \/><\/a><\/p>\n<p>The following figure shows the logical diagram of ULN2803. It is a visual representation and arrangement of how diodes are connected in the component.<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-4-768x1360.png\"><img loading=\"lazy\" class=\"alignnone wp-image-5319\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-4-768x1360-516x1024.png\" sizes=\"(max-width: 342px) 100vw, 342px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-4-768x1360-516x1024.png 516w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-4-768x1360-151x300.png 151w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-4-768x1360.png 583w\" alt=\"\" width=\"342\" height=\"678\" \/><\/a><\/p>\n<p>The following figure shows the schematic diagram for each pair of Darlington.<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-5-768x440.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-5320\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-5-768x440.png\" sizes=\"(max-width: 706px) 100vw, 706px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-5-768x440.png 706w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-5-768x440-300x133.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/introduction-to-uln2803-5-768x440-600x266.png 600w\" alt=\"\" width=\"706\" height=\"313\" \/><\/a><\/p>\n<h4>Materiales<\/h4>\n<p>8 resistores de un 1K<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/1k.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-5309\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/1k.jpg\" sizes=\"(max-width: 136px) 100vw, 136px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/1k.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/1k-150x150.jpg 150w\" alt=\"\" width=\"136\" height=\"136\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>8 10K resistors<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/10k.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-5308\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/10k.jpg\" sizes=\"(max-width: 120px) 100vw, 120px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/10k.jpg 500w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/10k-150x150.jpg 150w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/10k-300x300.jpg 300w\" alt=\"\" width=\"120\" height=\"120\" \/><\/a><\/p>\n<p>Male pins<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/12\/pines.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-5257\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/12\/pines.jpg\" sizes=\"(max-width: 179px) 100vw, 179px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/12\/pines.jpg 696w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/12\/pines-300x200.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/12\/pines-600x400.jpg 600w\" alt=\"\" width=\"179\" height=\"119\" \/><\/a><\/p>\n<p>An integrated circuit uln2803apg<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic.png\"><img loading=\"lazy\" class=\"alignnone wp-image-5310\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-1024x768.png\" sizes=\"(max-width: 169px) 100vw, 169px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-1024x768.png 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-300x225.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-768x576.png 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-600x450.png 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic-820x615.png 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/ic.png 1250w\" alt=\"\" width=\"169\" height=\"127\" \/><\/a><\/p>\n<p>An 18-pin socket<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/zocalo-18-pines.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-5311\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/zocalo-18-pines.jpg\" sizes=\"(max-width: 182px) 100vw, 182px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/zocalo-18-pines.jpg 500w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/zocalo-18-pines-300x225.jpg 300w\" alt=\"\" width=\"182\" height=\"137\" \/><\/a><\/p>\n<p>A printed circuit<\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/pcb.png\"><img loading=\"lazy\" class=\"alignnone wp-image-5312\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/pcb.png\" sizes=\"(max-width: 232px) 100vw, 232px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/pcb.png 431w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/pcb-264x300.png 264w\" alt=\"\" width=\"232\" height=\"264\" \/><\/a><\/p>\n<p>Download gerber\u00a0<a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/Gerber_circuito-medidor-de-nivel-de-agua_20200124220413.zip\">file Gerber_circuito water level meter<\/a><\/p>\n<h4>Diagram<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5313\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-1024x576.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-1024x576.png 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-300x169.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-768x432.png 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-600x338.png 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-820x461.png 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/01\/diagrama-1-1320x743.png 1320w\" alt=\"\" width=\"1024\" height=\"576\" \/><\/a><\/p>\n<h4>About Lora Modules<\/h4>\n<div class=\"desCon\">\n<p>The LoRa radio module is a type of low-speed long-range data radio modem based on Semtech&#8217;s Sx1276. It is a low cost transceiver module of less than 1 GHz designed for operations in the ISM (Industrial Scientific Medical) and LPRD bands without license. Frequency spectrum modulation\/demodulation, multichannel operation, high bandwidth efficiency and anti-lock performance make LoRa modules easy to perform thanks to robust and reliable wireless linking.<\/p>\n<div class=\"desCon\">\n<p>The module can operate in two different modes: standard mode and Star network mode. In standard mode, it acts as a transparent data radio modem that communicates with the host in the preset data format without the need for encoding\/decoding. In startup network mode, a module will be configured for the central node and other modules will be configured as node modules. Communication between the central module and the node module is bidirectional, but node modules cannot communicate with each other. Note that the module does not contain the lorawan protocol. Therefore, the star network function of this module is used with the protocol itself, so it is not compatible with lorawan.<\/p>\n<\/div>\n<div>\n<h4>Features<\/h4>\n<div class=\"desCon\">\n<ul>\n<li>LoRa Frequency Spectrum<\/li>\n<li>Frequency band 433 \/ 490Mhz ISM<\/li>\n<li>-137 dBm receive sensitivity<\/li>\n<li>20 dBm max. output power<\/li>\n<li>Serial activation port<\/li>\n<li>Wireless alarm clock<\/li>\n<li>Star network capacity<\/li>\n<li>Supply voltage 3.4 x 5.5V<\/li>\n<\/ul>\n<h4>Specification<\/h4>\n<div class=\"desCon\">\n<ul>\n<li>Operating Voltage: 2.1 x 3.6V (Battery Powered) or 4.5&#215;5.5V<\/li>\n<li>Working frequency band: 433 MHz<\/li>\n<li>Modulation: LoRa extended spectrum<\/li>\n<li>Output power: \u2264 20dBm<\/li>\n<li>Reception sensitivity: -148dBm<\/li>\n<li>Emission current: \u2264120mA<\/li>\n<li>Receiving current: \u226415.2mA<\/li>\n<li>Sleep current: \u2264 3.9uA<\/li>\n<li>Sleep time: optional 2S, 4S, 6S, 8S, 10S<\/li>\n<li>Breathing time: optional 2ms, 4ms, 8ms, 16ms, 32ms, 64ms<\/li>\n<li>Time to wake up: wake up immediately<\/li>\n<li>Communication interface: TTL serial communication<\/li>\n<li>Serial transmission speed: 1200 x 57600,9600bps (default)<\/li>\n<li>Serial port verification: 8E1.8O1.8N1 (optional)<\/li>\n<li>Operating temperature: -40oC \u2013 + 80oC<\/li>\n<li>Product size: 34.2 * 18.4mm \/ 1.35 * 0.72 inch<\/li>\n<\/ul>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-4866\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1.jpg\" sizes=\"(max-width: 568px) 100vw, 568px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1.jpg 900w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1-300x200.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1-768x512.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1-600x400.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora1-820x547.jpg 820w\" alt=\"\" width=\"568\" height=\"379\" \/><\/a><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora2.jpg\"><img loading=\"lazy\" class=\"alignnone wp-image-4867\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora2.jpg\" sizes=\"(max-width: 567px) 100vw, 567px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora2.jpg 564w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/lora2-300x200.jpg 300w\" alt=\"\" width=\"567\" height=\"378\" \/><\/a><\/p>\n<h4>Data Sheets<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/DRF1276DM.pdf\">DRF1276DM<\/a><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/DRF1278DM.pdf\">DRF1278DM<\/a><\/p>\n<p><strong>PIN OUT<\/strong><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/pin_out.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-4888\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/pin_out.png\" sizes=\"(max-width: 362px) 100vw, 362px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/pin_out.png 362w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/pin_out-300x272.png 300w\" alt=\"\" width=\"362\" height=\"328\" \/><\/a><\/p>\n<h4>Connection Module with Serial USB adapter<\/h4>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-4880\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-1024x576.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-1024x576.png 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-300x169.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-768x432.png 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-600x338.png 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-820x461.png 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen2-1320x743.png 1320w\" alt=\"\" width=\"1024\" height=\"576\" \/><\/a><\/p>\n<p><strong>SETTINGS<\/strong><\/p>\n<p>For some applications, default parameters may not be the best<\/p>\n<p>option, so users may need to change the parameters There are two ways to adjust them: by MCU or by PC. In<\/p>\n<p>configuration mode, the EN pin must be connected to<\/p>\n<p>GND and then the configuration tool or commands can work effectively<\/p>\n<p>By PC: DORJI offers a PC-based configuration tool<\/p>\n<p>that can be used to change parameters through the graphical interface. Users can insert the DRF1278DM module into<\/p>\n<p>serial usb adapter, and connect them to the computer and run the configuration tool.<\/p>\n<h4>DRF TOOL<\/h4>\n<p>This tool allows us to configure the LoRa MODULES DRF1278DM and DRF1276DM<\/p>\n<p>Download\u2014&gt;<a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/DRFTOOL.zip\">DRFTOOL<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1.png\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-4868\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-1024x576.png\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-1024x576.png 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-300x169.png 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-768x432.png 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-600x338.png 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-820x461.png 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2019\/08\/Imagen1-1320x743.png 1320w\" alt=\"\" width=\"1024\" height=\"576\" \/><\/a><\/p>\n<hr \/>\n<p><strong>Program description<\/strong><\/p>\n<p>UART -&gt; Values are set to 9.6k bps and no parity check<\/p>\n<p>RF frequency\u2013&gt; Indicates the central frequency of the RF carrier<\/p>\n<p>RF Mode\u2013&gt; Standard Mode, Center Mode and Node Mode<\/p>\n<p>RF_Factor\u2013&gt; Lora Scatter Factor. A higher value means<\/p>\n<p>higher sensitivity but longer air transmission time. Only users can change it in standard mode<\/p>\n<p>RF_BW\u2013&gt; Lora bandwidth. Higher value means less sensitivity. Recommended value: 125K. Only users can change it in standard mode.<\/p>\n<p>Node ID\u2013&gt; Used only for node-mode modules: 0x65535<\/p>\n<p>Net ID\u2013&gt; Only modules with the same network ID (0 x<\/p>\n<p>255) can communicate with each other. You can avoid module interference<\/p>\n<p>Power\u2013&gt; Used to configure the output power of the DRF1278D. There are 7 power levels. The 7 means the maximum. output power: 20dBm and 0 means the lowest output power<\/p>\n<p>Breath\u2013&gt; The activation period for the module in node mode. Only available for firmware 2.0 or higher<\/p>\n<p>Wake timer\u2013&gt; Time to detect wireless signal during break period, is only available for<\/p>\n<p>firmware 2.7 or higher<\/p>\n<p>Serial transmission rate\u2013&gt; Sets the data rate between DRF1278DM and the host (pc or microcontroller)<\/p>\n<p>Serial Parity\u2013&gt; Defines the parity check between DRF1278DM and the host (pc or microcontroller)<\/p>\n<hr \/>\n<p><strong>STANDARD MODE Standard<\/strong><\/p>\n<p>mode is also called transparent mode in<\/p>\n<p>which the module receives or sends data to the host over the serial port (UART) in the preset data format and users do not need to worry about the data processing within the module. The DRF1278DM AUX<\/p>\n<p>pin will give indication about the IN\/OUT data of the serial port 2 ms in advance, which can be used to wake up the host. In this mode, the EN pin must be set to<\/p>\n<p>low logic in case the module enters deep sleep.<\/p>\n<p>In STANDARD or transparent mode, nodes can work with a point-to-point (P2P) connection the main feature in this way is that no intermediary device is required to manage communication, devices can send information directly between them, this is perfect for simple communications such as turning on a light.<\/p>\n<hr \/>\n<p>The other way is with a star network type where we find a central node that manages the network, its disadvantage is that it is limited to 255 255-node networks* and that the coordinator node can only listen to one node at a time.<\/p>\n<p><strong>STAR NETWORK MODE In<\/strong><\/p>\n<p>this mode, a DRF1278DM module needs to establish a module as a central module<\/p>\n<p>and other modules must be node modules for star networks. For the central module, it works<\/p>\n<p>at full performance so its power consumption is<\/p>\n<p>the same as in standard mode and the EN pin must be connected to the low logic. The logical level of the<\/p>\n<p>SET pin for the central module must be the same as the node module.<\/p>\n<p><strong>Transmitter circuit<\/strong><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua.jpg\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5959\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-1024x914.jpg\" sizes=\"(max-width: 1024px) 100vw, 1024px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-1024x914.jpg 1024w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-300x268.jpg 300w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-768x686.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-600x536.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-820x732.jpg 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/emisor-lora-nivel-de-agua-1320x1179.jpg 1320w\" alt=\"\" width=\"1024\" height=\"914\" \/><\/a><\/p>\n<p><strong>Transmitter source code<\/strong><\/p>\n<pre class=\"lang:arduino decode:true \" title=\"C\u00f3digo Fuente\">\/\/Transmisor de nivel de agua con m\u00f3dulo lora\r\n\/\/M\u00e1s proyectos en http:\/\/www.rogerbit.com\r\n\/\/Suscribete en http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1\r\n\/\/Grupo en Facebook https:\/\/www.facebook.com\/groups\/RogerBit\/\r\n\/\/declaraci\u00f3n de variables\r\nint pin2 = 2;\r\nint pin3 = 3;\r\nint pin4 = 4;\r\nint pin5 = 5;\r\nint pin6 = 6;\r\nint pin7 = 7;\r\nint pin8 = 8;\r\nint pin9 = 9;\r\n\/\/\/\/\r\nint lpin2 = 0;\r\nint lpin3 = 0;\r\nint lpin4 = 0;\r\nint lpin5 = 0;\r\nint lpin6 = 0;\r\nint lpin7 = 0;\r\nint lpin8 = 0;\r\nint lpin9 = 0;\r\nint transistor = 10;\r\n\r\nvoid setup() {\r\n  Serial.begin(9600);\/\/Velocidad dle puerto serie debe ser la misma del m\u00f3dulo lora\r\n  \/\/Configuramos estos pines como entrada para la sonda de agua\r\npinMode(pin2, INPUT_PULLUP);\r\npinMode(pin3, INPUT_PULLUP);\r\npinMode(pin4, INPUT_PULLUP);\r\npinMode(pin5, INPUT_PULLUP);\r\npinMode(pin6, INPUT_PULLUP);\r\npinMode(pin7, INPUT_PULLUP);\r\npinMode(pin8, INPUT_PULLUP);\r\npinMode(pin9, INPUT_PULLUP);\r\n  \/\/Pin 10 como salida\r\npinMode(transistor, OUTPUT);\r\n}\r\n\r\nvoid loop() {\r\n  \/\/Activamos el transistor durante un tiempo corto para evitar la electrolisis del agua y ahorrar energ\u00eda\r\n  digitalWrite(transistor, HIGH);\r\n  delay(100);\r\n  \/\/Lectura de la sonda tiene en total 8 niveles\r\n  lpin2 = digitalRead(pin2);\r\n  lpin3 = digitalRead(pin3);\r\n  lpin4 = digitalRead(pin4);\r\n  lpin5 = digitalRead(pin5);\r\n  lpin6 = digitalRead(pin6);\r\n  lpin7 = digitalRead(pin7);\r\n  lpin8 = digitalRead(pin8);\r\n  lpin9 = digitalRead(pin9);\r\n  delay(100);\r\n  \/\/Desactivamos el transistor y con ello el uln2803\r\n  digitalWrite(transistor, LOW);\r\n \/\/Comparamos el valor de cada pin y en base ha eso enviaremos un dato al puerto serie\r\nif(lpin2 == LOW &amp;&amp; lpin3 == LOW &amp;&amp; lpin4 == LOW &amp;&amp; lpin5 == LOW &amp;&amp; lpin6 == LOW &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"9\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == LOW &amp;&amp; lpin4 == LOW &amp;&amp; lpin5 == LOW &amp;&amp; lpin6 == LOW &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"8\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == LOW &amp;&amp; lpin5 == LOW &amp;&amp; lpin6 == LOW &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"7\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == LOW &amp;&amp; lpin6 == LOW &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n     Serial.print(\"6\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == HIGH &amp;&amp; lpin6 == LOW &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n     Serial.print(\"5\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == HIGH &amp;&amp; lpin6 == HIGH &amp;&amp; lpin7 == LOW &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"4\");\r\n        }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == HIGH &amp;&amp; lpin6 == HIGH &amp;&amp; lpin7 == HIGH &amp;&amp; lpin8 == LOW &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"3\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == HIGH &amp;&amp; lpin6 == HIGH &amp;&amp; lpin7 == HIGH &amp;&amp; lpin8 == HIGH &amp;&amp; lpin9 == LOW){\r\n    Serial.print(\"2\");\r\n    }\r\nif(lpin2 == HIGH &amp;&amp; lpin3 == HIGH &amp;&amp; lpin4 == HIGH &amp;&amp; lpin5 == HIGH &amp;&amp; lpin6 == HIGH &amp;&amp; lpin7 == HIGH &amp;&amp; lpin8 == HIGH &amp;&amp; lpin9 == HIGH){\r\n    Serial.print(\"1\");\r\n    }\r\n    delay(1000);\r\n}<\/pre>\n<p><strong>Receiver circuit<\/strong><\/p>\n<p><a href=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua.jpg\"><img loading=\"lazy\" class=\"alignnone size-large wp-image-5960\" src=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-701x1024.jpg\" sizes=\"(max-width: 701px) 100vw, 701px\" srcset=\"http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-701x1024.jpg 701w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-205x300.jpg 205w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-768x1123.jpg 768w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-600x877.jpg 600w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua-820x1199.jpg 820w, http:\/\/rogerbit.com\/wprb\/wp-content\/uploads\/2020\/10\/receptor-lora-nivel-de-agua.jpg 1276w\" alt=\"\" width=\"701\" height=\"1024\" \/><\/a><\/p>\n<p><strong>Receiver source code<\/strong><\/p>\n<pre class=\"lang:default decode:true \">\/\/Receptor nivel de agua con m\u00f3dulo lora\r\n\/\/M\u00e1s proyectos en http:\/\/www.rogerbit.com\r\n\/\/Suscribete en http:\/\/www.youtube.com\/user\/carlosvolt?sub_confirmation=1\r\n\/\/Grupo en Facebook https:\/\/www.facebook.com\/groups\/RogerBit\/\r\n\/\/declaraci\u00f3n de variables\r\nString cadena;\r\nint pin2 = 2;    \r\nint pin3 = 3;    \r\nint pin4 = 4;    \r\nint pin5 = 5; \r\nint pin6 = 6; \r\nint pin7 = 7; \r\nint pin8 = 8; \r\nint pin9 = 9;    \r\nvoid setup () {\r\n    Serial.begin(9600);\/\/ setea la velocidad del puerto serial seg\u00fan la velocidad del m\u00f3dulo lora\r\n    \/\/Pines  declaraods como salidas\r\n   pinMode(pin2, OUTPUT);\r\n   pinMode(pin3, OUTPUT);\r\n   pinMode(pin4, OUTPUT);\r\n   pinMode(pin5, OUTPUT);\r\n   pinMode(pin6, OUTPUT);\r\n   pinMode(pin7, OUTPUT);\r\n   pinMode(pin8, OUTPUT);\r\n   pinMode(pin9, OUTPUT);\r\n   }\r\nvoid loop () {\r\n  \/\/lee las cadenas que ingresan al puerto serie\r\n  if (Serial.available())  {\r\n    cadena = String(\"\");\r\n    while (Serial.available()) {\r\n      cadena = cadena + char(Serial.read());\r\n      delay(1);\r\n    }\r\n     \r\n    if (cadena == \"9\") {\/\/compara el valor de la cadena obetinada\r\n    \/\/Enciende todos los led indicando el tanque de agua al 100 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,HIGH);\r\ndigitalWrite(pin6,HIGH);\r\ndigitalWrite(pin7,HIGH);\r\ndigitalWrite(pin8,HIGH);\r\ndigitalWrite(pin9,HIGH);\r\n\r\n    }\r\n\r\n if (cadena == \"8\") {\/\/compara el valor de la cadena obetinada\r\n  \/\/Enciende 7 led indicando el tanque de agua al 87 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,HIGH);\r\ndigitalWrite(pin6,HIGH);\r\ndigitalWrite(pin7,HIGH);\r\ndigitalWrite(pin8,HIGH);\r\ndigitalWrite(pin9,LOW); \r\n    }    \r\n    \r\n if (cadena == \"7\") {\/\/compara el valor de la cadena obetinada\r\n  \/\/Enciende 6 led indicando el tanque de agua al 75 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,HIGH);\r\ndigitalWrite(pin6,HIGH);\r\ndigitalWrite(pin7,HIGH);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n\r\n if (cadena == \"6\") {\/\/compara el valor de la cadena obetinada\r\n  \/\/Enciende 5 led indicando el tanque de agua al 63 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,HIGH);\r\ndigitalWrite(pin6,HIGH);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n\r\n if (cadena == \"5\") {\/\/compara el valor de la cadena obetinada\r\n  \/\/Enciende 4 led indicando el tanque de agua al 50 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,HIGH);\r\ndigitalWrite(pin6,LOW);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n   \/\/Activa la bocina\r\n if (cadena == \"4\") {\r\n  \/\/Enciende 3 led indicando el tanque de agua al 37 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,HIGH);\r\ndigitalWrite(pin5,LOW);\r\ndigitalWrite(pin6,LOW);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n   \/\/Desactiva la bocina\r\n if (cadena == \"3\") {\r\n\/\/  Enciende 2 led indicando el tanque de agua al 25 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,HIGH);\r\ndigitalWrite(pin4,LOW);\r\ndigitalWrite(pin5,LOW);\r\ndigitalWrite(pin6,LOW);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n   \/\/Enciende la luz\r\n if (cadena == \"2\") {\r\n  \/\/Enciende 1 led indicando el tanque de agua al 12 porciento\r\ndigitalWrite(pin2,HIGH);\r\ndigitalWrite(pin3,LOW);\r\ndigitalWrite(pin4,LOW);\r\ndigitalWrite(pin5,LOW);\r\ndigitalWrite(pin6,LOW);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n  \/\/Apaga la luz\r\n if (cadena == \"1\") {\r\n  \/\/Todos los led apagados, indicando el tanque de agua vacio\r\ndigitalWrite(pin2,LOW);\r\ndigitalWrite(pin3,LOW);\r\ndigitalWrite(pin4,LOW);\r\ndigitalWrite(pin5,LOW);\r\ndigitalWrite(pin6,LOW);\r\ndigitalWrite(pin7,LOW);\r\ndigitalWrite(pin8,LOW);\r\ndigitalWrite(pin9,LOW);\r\n    }\r\n  Serial.print(cadena); \r\n  }\r\n}<\/pre>\n<p style=\"text-align: left;\">SUBSCRIBE TO OUR NEWSLETTERS, RECEIVE IN YOUR EMAIL THE MOST OUTSTANDING NEWS, JUST BY ENTERING YOUR EMAIL<\/p>\n<p style=\"text-align: left;\">[wysija_form id=&#8221;1&#8243;]<\/p>\n<hr \/>\n<p style=\"text-align: left;\"><div class=\"page-sidebar widget\" id=\"donation_buttons\"><form action=\"https:\/\/www.paypal.com\/cgi-bin\/webscr\" method=\"post\" target=\"_blank\" ><input type=\"hidden\" name=\"business\" value=\"donacion@rogerbit.com\"><input type=\"hidden\" name=\"bn\" value=\"mbjtechnolabs_SP\"><input type=\"hidden\" name=\"cmd\" value=\"_donations\"><input type=\"hidden\" name=\"item_name\" value=\"Ayuda a RogerBit.com\"><input type=\"hidden\" name=\"item_number\" value=\"www.rogerbit.com\"><input type=\"hidden\" class=\"set_donation_button_amount\" name=\"amount\" value=\"1\"><table ><tbody><tr><td><label for=\"rogerBit necesita de tu ayuda para seguir existiendo :-)\">rogerBit necesita de tu ayuda para seguir existiendo :-)<\/label><\/td><\/tr><\/tbody><\/table><table ><tbody><tr><td><input style=\"margin-top:10px;\" type=\"image\" name=\"submit\" border=\"0\" src=\"https:\/\/www.paypal.com\/en_US\/i\/btn\/btn_donateCC_LG.gif\" alt=\"PayPal - The safer, easier way to pay online\"><\/td><\/tr><\/tbody><\/table><input type=\"hidden\" name=\"currency_code\" value=\"USD\"><input type=\"hidden\" name=\"notify_url\" value=\"https:\/\/rogerbit.com\/wprb\/?Donation_Button&#038;action=ipn_handler\"><\/form><\/div><\/p>\n<hr \/>\n<p style=\"text-align: left;\"><strong>RECOMMENDED VIDEO<\/strong><\/p>\n<p><iframe loading=\"lazy\" width=\"1160\" height=\"653\" src=\"https:\/\/www.youtube.com\/embed\/deTEp3B7FRo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<\/div>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will see how to create a system that allows us to measure the water level remotely, with modules lora DRF1278DM\/DRF1276DM (sx1276) and arduino mini pro, in addition the printed circuit is included to create the water probe. We will see the circuits, also the source codes and the operation of the [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":5963,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[648],"tags":[],"_links":{"self":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/5974"}],"collection":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/comments?post=5974"}],"version-history":[{"count":1,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/5974\/revisions"}],"predecessor-version":[{"id":5975,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/posts\/5974\/revisions\/5975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/media\/5963"}],"wp:attachment":[{"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/media?parent=5974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/categories?post=5974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rogerbit.com\/wprb\/wp-json\/wp\/v2\/tags?post=5974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}