LoRa Based Remote Controller | Universal Remote Controller

0 51831 Medium

Hey, what's up, Guys! Akarsh here from CETech.

In this project, we are going to create a remote control which can be used to control a variety of instruments such as LEDs, motors or if we talk about our day-to-day life we can control our home appliances as well from a distance which is in the range of km and that too without any internet. You might be thinking that what kind of magic remote is this but let me tell you that there is no magic. The thing behind this remote is our one and only LoRa module.

What we will be doing is that we are going to recreate a breadboard version of the LoRa based remote controller that we created in one of our older projects. You can refer to that project from here. After creating the prototype we will control two LEDs with that remote for demo purpose.

So let's get started.


Get PCBs for Your Projects Manufactured

projectImage

PCBGOGO, established in 2015, offers turnkey PCB assembly services, including ​PCB manufacturing, PCB assembly, components sourcing, functional testing, and IC programming.
 

Its manufacturing bases are equipped with the most advanced production equipment such as YAMAHA pick and place machine, Reflow oven, Wave soldering Machine, X-RAY, AOI testing machine; and the most professional technical personnel.
 

Though it’s only five years old, their factories have experience in the PCB industry for over 10 years in Chinese markets. It is a leading specialist in surface-mount, thru-hole, and mixed technology PCB assembly and electronic manufacturing services as well as ​turnkey PCB assembly.
 

PCBGOGO provides the order service from prototype to mass production, join them now.​
 

 

About RYLR896 LoRa module

The RYLR896 transceiver module features the Lora long range modem that provides ultra-long range spread spectrum communication and high interference immunity whilst minimizing current consumption. The RYLR896 is certified by NCC and FCC.

projectImage

It comes with the powerful Semtech SX1276 Engine and has an excellent blocking immunity. This module is highly sensitive and can be easily controlled by AT commands. It follows the AES128 Data encryption technique and has an on board integrated Antenna.

projectImage

This module can be a very good asset for IoT applications such as Home Security, Car Alarm, Industrial Monitoring, and control equipment, etc. Basically, it is a very useful and powerful tool that can be used to transfer data from one place to another place which is at a distance of several km without any additional services like the Internet or any other thing. You can read the datasheet of this module from ​here to get more details.

Product Link: ​https://www.amazon.com/....


Insight of the LoRa Based Remote Controller

In this project, we will create a prototype of the remote controller that we created some projects back. You can check that out in the video above and also from the Instructables page for the project from here.

In that project, we created a LoRa based remote controller which was capable of sending control signals to the appliances from a distance of the order of km without using any internet. That remote controller had a LoRa module, an ESP8266 module, an OLED display, a battery, the PCB design of my own, and four buttons for different purposes.

projectImage

To use that we just needed to modify the code according to the application and flash that to the ESP module and we were done. But here we are going to create a simpler version of that on the breadboard so we will use the LoRa module and ESP8266 with only one push button and no display. This will sum up the Remote controller side. On the receiver or the output side, we will have a LoRa module, another ESP8266 module, and two LEDs to obtain the output. Though I have created the separate remote controller for this project still I will show you the previously created remote controller by controlling the LEDs by that.


Setting Up the Remote Controller Side

projectImage

In this step, we will do the hardware setup of the remote controller. You need to follow the steps given below:-

1) Connect the Vcc and GND of the LoRa module with the Vcc and GND of the ESP8266 module.

2) Connect the Rx pin of the LoRa module to the GPIO14 pin of the ESP8266.

3) Connect the Tx pin of the LoRa module to the GPIO15 pin of the ESP8266.

4) Take a pushbutton and connect one end of the button to Vcc. The other end of the button needs to be connected to the GND through a resistor and after that connect the same end to the GPIO pin 13 of the ESP8266.

After completing the above steps your circuit will look something like the one shown in the picture above. You can also get the remote controller manufactured on a PCB you can get the design file of the PCB designed by me on the Github page of this project.


Setting Up the Receiver Side

projectImage

In this step, we are going to assemble the hardware parts for creating the receiver end of the project that will be controlled by the remote controller created in the previous step. You need to follow the steps given below:-

1) Connect the Vcc and GND of the LoRa module with the Vcc and GND of the ESP8266.

2) Connect the Rx of the LoRa module with the GPIO15 pin of the ESP8266.

3) Connect the Tx of the LoRa module with the GPIO13 pin of the ESP8266.

4) Take two LEDs connect the cathode of the two LEDs with the GPIO4 and GPIO5 pin respectively and connect the anode of the LEDs to the GND through a 1k ohm resistor.

In this way, the receiver side of the project is also complete now we just need to flash the codes into the ESP modules and we are done. So let's head over to that step.


Setup the Arduino IDE

projectImage

For coding the ESP8266 using Arduino IDE we need to install the ESP8266 board in the additional boards of the Arduino IDE as they are not preinstalled. For this purpose we need to follow the steps mentioned below:-

1. Go to File > Preferences

2. Add http://arduino.esp8266.com/stable/package_esp8266... to the Additional Boards Manager URLs.

3. Go to Tools > Board > Boards Manager

4. Search for esp8266 and then install the board.

5. Restart the IDE.

Coding the Breadboard Circuits

projectImage

Now we are left with only the coding part for the project. For coding the modules you need to follow the steps given below:- 

Firstly we will code the remote controller part, For that connect the ESP8266 of the remote controller to your PC and after that:-  

1) Head over to the Github repository of this project from ​here. There you will see a file named ​"BreadBoard_Remote.ino". This is the code file for the remote controller. 

2) Copy the code and paste it in Arduino IDE. Select the correct board and COM port and upload the code. Our remote controller is ready. 

Now we need to program the ESP8266 on the receiver side. For that, you need to connect the ESP8266 of the receiver end to your PC and after that:- 

1) Head over to the Github repository of this project from ​here. There you will see a file named ​"LoRa Station.ino". This is the code file for the receiver end of your project. 

2) Copy the code and paste it in Arduino IDE. Select the correct board and COM port and upload the code. And with that, your coding part is also complete. Now you are ready to play with it.
 

 

Using our Remote Controller

As the codes are done the setup is ready to use. The modules are coded in such a way that one of the LEDs will light up when we press the push button on the remote controller. You can add as many buttons as you want and control a number of appliances with the help of those by making changes in the codes and connecting a LoRa module for controlling each and every node which is to be controlled. As this was the prototype of the original remote you can also create the original remote by referring the video added in the "Insight of the LoRa Based Remote Controller" step and control the receiver side from that remote as I did.

projectImage

You can get the PCB designed by me for the remote manufactured using the ​Design file on the ​Github page of the project. This remote also has a display on it which acknowledges the activity done by us. Therefore the code also needs to be changed. You don't need to worry about that and get the code in the ​"Remote.ino" file on the Github page of the project and that's it you are ready to go. You can refer to the video above to get a detailed insight into how the controller works and controls appliances.
 

projectImage

In this way, you can create a remote controller of your own and control several different instruments without any internet and from a distance of several km.

Hope you liked the tutorial. Looking forward to seeing you next time. Until then enjoy with LoRa modules.

License
All Rights
Reserved
licensBg
0