Introduction

IR (Infrared Remote) controller is widely used to control appliances (such as TV, air-conditioner, projector...). However, it has limitation on the controlling range due to characteristic of Infrared signal.

Imagine yourself having an air-conditioner or any IR-controlled appliance at your home/office. You might want to control them before arriving home/office, which you cannot do it only with the IR controller. This project is to help you how to control IR-controlled appliances!

Demonstration




Things Used In This Project
  • PHPoC Blue or Black
  • Grove - Infrared Receiver
  • Grove - Infrared Emitter
  • Grove - Serial Camera
  • PHPoC Grove Expansion Board

How It Works

Before using, we need to do some settings. Therefore, the project is divided into two modes.

Setting mode: the device (PHPoC + IR receiver + IR emitter + camera) will scan IR signal. When the IR signal is captured through IR receiver, its pattern is saved in flash memory along with a user-chose button name.

Control mode: when user access web user interface of PHPoC via web browser and press the assigned button, a command and button name is sent to PHPoC via WebSocket. When receiving the command and button name, PHPoC lookup in flash memory to get IR pattern, and then emit the IR pattern via IR emitter to control the appliance.

A camera is added to check the status of appliance.

Things Used In This Project[
  • Stack PHPoC Grove Expansion Board on PHPoC Blue or Black

    Click image for larger version  Name:	ctrl_ir_0.jpg Views:	1 Size:	33.7 KB ID:	700
  • Connect the infrared receiver to HT0.
  • Connect the infrared emitter to the HT2.
  • Connect the jumper to HT1. (HT1-HT2 pin)

    Click image for larger version  Name:	ctrl_ir_1.jpg Views:	1 Size:	35.6 KB ID:	701
  • Connect the camera to UART0.
  • Connect 1KΩ resistor to PWR5 and HT2.
  • Jumper connection to PWR pin 5V.
  • Power to PHPoC (DC 5V)

    Click image for larger version  Name:	ctrl_ir_2.jpg Views:	1 Size:	32.3 KB ID:	702
  • Refer to this page to see how to set network parameters and see the IP address of PHPoC.


How To Use It

1. Setting Mode
  • Open the browser and connect to the IP address of PHPoC.
  • Select SETUP menu
  • You can register each button manually when you enter that page. in the below example, I am going to show how to
  • use the ON/OFF button.

    Click image for larger version  Name:	ctrl_ir_3.jpg Views:	1 Size:	21.8 KB ID:	703
  • Click the SCAN button. The SCAN button blinks until the IR signal is captured.

    Click image for larger version  Name:	ctrl_ir_4.jpg Views:	1 Size:	21.8 KB ID:	704
  • Direct your remote controller to IR receiver and press the button you want to use on the remote controller. (in this case is ON/OFF button)
  • If the IR signal is scanned, the SCAN button stops blinking and TEST button is activated.
  • Press TEST button to make sure that the signal is captured correctly (due to noise). If it does not work, try scanning again.

    Click image for larger version  Name:	ctrl_ir_5.jpg Views:	1 Size:	22.4 KB ID:	705
  • Choose any button to assign to the captured signal. (in this example is ON/OFF button). After choosing a button, the SAVE button is activated.

    Click image for larger version  Name:	ctrl_ir_6.jpg Views:	1 Size:	24.1 KB ID:	706
  • Click SAVE button to save signal form and the assigned button to flash memory.

    Click image for larger version  Name:	ctrl_ir_7.jpg Views:	1 Size:	24.2 KB ID:	707

Add another buttons you want to.

2. Control Mode

Control the appliance from anywhere.

Click image for larger version  Name:	ctrl_ir_8.jpg Views:	1 Size:	29.3 KB ID:	708

As you can see, the assigned button is active now. You can control the appliance by pressing the button and see the status of appliance via camera area on web page from anywhere.

Note: If you use a private IP address, you need to set "Port Forwarding" on your router or Wi-Fi access point.

Add more button to do others controlling function.



Source Code and Explanation

This project is the combination of two following projects:You can see how it is implemented via above links. The UI (User Interface) has been changed.

If you have any question, leave a comment bellow.