Infrared Remote

/Infrared Remote
Total score : 4.88 (19.5 / 4)
|
x 0

Idea

You are armed with a lightweight and time-saving universal remote control system.
Universal infrared remote using Serial 2 Ethernet(S2E).

Classification
IoT
O/S
CLOUD
MQTT
Project participants
piyush_27(pyushsingh27@gmail.com)
Used parts
Classification Part Name Parts link
device WIZnet WIZ750SR-TTL-EVB Kit https://www.wiznet.io/product-item/wiz750sr-evb-ttl-rs232/
Arduino Board arduino uno & genuino uno https://www.arduino.cc/
device android device https://www.android.com/
sensor IR transmitter and receiver https://www.electronicshub.org/ir-transmitter-receiver-circuits/
Etc USB-A to Micro-USB Cable https://www.monoprice.com/category?c_id=103&cp_id=10303&cs_id=1030307
Etc Jumper wires (generic) http://blog.sparkfuneducation.com/what-is-jumper-wire
Etc Arduino USB 2.0 Cable Type A/B https://store.arduino.cc/usa/usb-2-0-cable-type-a-b

Project summary

Infrared Remote is a perfect solution for controlling any infrared reception device without worrying about problems like, checking the remote batteries, the reception angle for operating, if a button on the remote control is stuck down, causing it to enter sleep mode. release the button to wake the remote control up, strong fluorescent lighting, direct sunlight, or other infrared device signals may interfere so, dim the lights or move the device away from the sun or any interfering equipment.
It is easy to use, you just need to have an android device and you can easily register with the service to continue(as mentioned in the video below).


Project Content

 

Components

  • Arduino UNO: It is the decision maker. It decides which button is pressed in the app or what command is given to the device from the app.
  • Cloud Broker: Our broker in this project is online to control the transfer of messages via MQTT.
  • WIZ750SR/S2E: It is a protocol converter that transmits data sent by serial equipment (e.g. Arduino) as TCP/IP data and converts the TCP/IP data received through the network(e.g. Mobile App) back into serial data to the serial equipment. Hence, it receives data from the Android app installed on a mobile and transmits this data serially to the Arduino.
  • WIZ750SR-EVB: This is the evaluation board for the WIZ750SR. The S2E can be fixed on top of this board.
  • IR transmitter
  • IR receiver

Circuit Setup

Front View

Front View

Top View

Top view

1. First, we power on both the board (S2E, Arduino Uno).

2. Then, we connect the Ethernet cable to the S2E.

3. From here, we connect the RS232 to the S2E, and connect the other end to the Arduino using the jumper wires by connecting the Rx, Tx of the RS232 to the Pin 10, 11 and the GND pin to the GND of the Arduino.

4. Now, we connect the IR receiver to the Arduino board, using the jumper wires, the ouput pin of the IR receiver is connected to the pin 12 of the arduino board, and the GND and 3.3v is connected respectively.

5. Finally, we connect the IR transmitter to the arduino board, the ouput pin of the transmitter is connected to the pin 3 of the arduino and the GND is connected to the GND of the Arduino.

Take a female to female RS232 cable and plug it into the RS232 port of the S2E. The other end of the RS232 cable needs to be connected to the Arduino. In the RS232 female head, pin 2 acts as the transmitter and pin 3 acts as the receiver. These pins are connected to the Arduino digital pins 11 and 10 respectively. The ground of the RS232 (pin 5) is connected to the ground of the Arduino.

Setting Up Android Studio

To go through the installation process of Android Studio, go through the below link: https://developer.android.com/studio/install

After setting up the Android Studio for the code, go through the link below:

https://github.com/piyushsingh27/Infrared-Remote

      

Setting Up the Broker

We used the cloudMQTT online broker. Just make an account on cloudMQTT and you are good to go. Make a note of the host name, port number, username and password. These credentials would be used in android application as well as WIZ7500P(S2E).

Upload the Code to S2E

S2E board fixed on top of evaluation board

1. First and foremost, set the pin on the evaluation board of the S2E to BOOT mode and press reset. i.e. move the center switch (highlighted using a black box in the bottom left hand corner of the above image) to the right before starting the next step.

2. Then, download the W7500P ISP tool from the following link : http://wizwiki.net/wiki/doku.php?id=products:wiz750sr:download:start.The ISP tool will look as shown below:

 

W7500P ISP tool

3. Connect the S2E to a laptop via its microUSB port to figure which COM number is assigned to it using “Device Manager”. The USB to UART driver can be downloaded from https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers If it’s not installed on your device. In the image below it can be seen that COM6 has been assigned to the S2E.

Then hit “Refresh” button in the ISP tool and select the appropriate port number from the drop down list. The baud rate should be fixed at 9600.

4. Then hit “Open” button in the ISP tool. If successful, one can see the result – “Serial Open Complete” in the left bottom corner.

5. The S2E uses ARM Cortex-M0 architecture. In order to program the S2E we’ll have to use the ARM compiler that can be accessed using: http://os.mbed.com/compiler. When you login into the compiler select the board as “WIZwiki- W7500P”.

Uploading the Code to Arduino

The Arduino is the mastermind of the project. It receives the signal from the IR transmitter and recognizes the command given to the device and so the execution can be made accordingly. IR receiver is connected to the arduino which receives the signal and further through the broker it is sent to the MQTT terminal that gives the output (for reference) and the device would work according to the command given.

In order to use the Arduino we must first install its IDE. The Arduino IDE is easy to use as well as open source and can be easily downloaded from the official Arduino website. Once the IDE is installed, the next step would be to select the board. The board can be selected by going through the “Tools” option as depicted in the image below:

 

Select Board

Once the board is selected. The port at which the Arduino will be available for serial communication needs to be selected as depicted below:

 

Select COM Port

The next step would be to upload the “Arduino_code”(available in the code section of this project’s description) into the IDE. Once that is done the code can be compiled and uploaded onto the board by clicking the tick mark and arrow button respectively.

 

Compile and Upload sketch 

Final Result

We can use CoolTerm to test out the serial port, which can be downloaded from https://coolterm.en.lo4d.com/. CoolTerm will enable us to read all the messages sent to the COM port.

When the message is sent via the app the response output from the Arduino can be seen on the CoolTerm terminal.

CoolTerm Terminal

 

The MQTT model, publishes the message from the Android app to the broker i.e. the Raspberry Pi, where the broker forwards the data to any devices subscribing to that data. In the case of our project, the S2E is the device subscribing to the data available with the broker. The data read by the S2E is interpreted by the Arduino which then decides the command for the device sent from the app.

 
0 39 0

Leave a Reply