Extended IoT Remote

by Jonathan033 in Circuits > Microcontrollers

389 Views, 0 Favorites, 0 Comments

Extended IoT Remote

IMG_20210107_233446.jpg
IMG_20210107_233438.jpg

Video:

https://drive.google.com/file/d/1XRimAkkusXeV4gXDK...

IoT Extended Remote is a device that allows all of your previously remote controlled device, such as TVs and ACs, to be integrated with IoT (Internet of Things). This project uses the ESP8266 microcontroller and can be controlled through an Android application that we made.

By: Jonathan and Nicholas - BINA NUSANTARA University - Computer Engineering Major - Binusian 2022

Supplies

Software:

  • Arduino IDE
  • NodeMCU Board Manager
  • Firebase Console
  • MIT App Inventor

Hardware:

  • 2 x 220 ohm resistor
  • 1 x BC547 transistor
  • 1 x IR LED
  • 1 x IR receiver
  • 6 x jumper male-to-male cable
  • 1 x ESP8266
  • USB cable for ESP8266

Prepare the Hardware

step1 gambar 1.jpg
step1 gambar 2.jpg

1. Buy the hardware needed to make this device.

2. Connect the IR Receiver to ESP8266. When the receiver part of the IR Receiver is facing you, the leftmost pin is the output pin and connect it to the D5 pin. The middle pin is connected to Ground, and the rightmost pin is connected to Vcc, in this case it is connected to 3.3V.

3. Connect the IR LED and the Transistor to the ESP8266. Way to connect the transistor and the LED can be seen in the second picture

Preparing the Software

unknown (1).png

1. Install Arduino IDE.

2. Make a new file in Arduino IDE

3. Go to File -> Preferences -> Additional Board Manager URLs and paste the link below:

[http://arduino.esp8266.com/stable/package_esp8266com_index.json] (without the brackets)

4. Then go to Tools -> Board -> Board Manager -> Search "esp8266" and install esp8266 by ESP8266 Community.

5. Install the Firebase ESP8266 Client and the IRremoteESP8266 library.
Go to Sketch -> Include Library -> Manage Libraries... -> Search Firebase ESP8266 Client and install, and install the IRremoteESP8266 too.

6. Copy the following coding:

The coding is for receiving data required to make the remote. The data should appear on your serial monitor. Make sure to takes notes of the code because we are going to the it in the next code in the following step.

Making the Remote

Screenshot (1559).png

1. Download the following codes:

2. Replace the rawdata.h with the raw data you obtained from the last code.

3. Make sure the header files and the arduino file are in the same folder when uploading code to the ESP.

Circuit Diagram

TR Micon.jpg
diagramTR.png

This is the diagram for the circuit that we used.

Setting Up Firebase

Screenshot (1560).png
Screenshot 2021-01-08 122343.jpg
Screenshot 2021-01-08 122556.jpg
Screenshot 2021-01-08 122829.jpg

1. Go to console.firebase.google.com/u/0

2. Click the + to add a new project.

3. Name your project.

4. Choose whether to enable or disable Google Analytics.

5. On the left side of the screen, you will see the Build tab, click Realtime Database and click Create Database.

6. The firebase is done and ready to be used. You can monitor the changes in value of the database.

Making the Android Application

Screenshot 2021-01-08 123257.jpg
Screenshot 2021-01-08 124814.jpg
Screenshot 2021-01-08 124838.jpg

1. Visit http://ai2.appinventor.mit.edu/

2. Login to a user account, you can use your Google Account here for an easy access.

3. Go to Projects -> Start new project

4. Design UI to your liking. To make a remote you will need a Button.

5. Drag Button from the left side of the screen to the phone in the center.

6. Then, we need to connect the Firebase to the app by finding the experimental tab from the left side of the screen.

7. Copy the link of the firebase and insert it to the firebase URL in the MIT app inventor.

8. Code the button so that the button will change a value when pressed. The code will be in the fourth picture.

9. The coding blocks that we use will be displayed in the next step.

Coding Blocks

tr1.png
tr2.png
tr3.png
tr4.png

These are the codes we use to make the android application.