Arduino - IR Repeater Tutorial (Part 1)

Goal: 
To share a Set Top Box in living room with Bedroom TV using the same Remote Control.

Preface: 
Recently, I subscribed a VOD (Video On Demand) service that came with a Set Top Box in the living room. However, I would like to occasionally watch VOD in the bedroom, but the Set Top Box is in the living room. As you know, there is no way to control the Set Top Box in the living room from the bedroom.  Yeah, an IR repeater is all I need. There are commercial products available in the market already, but I quickly thought about the Control celling light with a TV remote Arduino project I have done before might be an replacement for the IR repeater I need. After all, this is why I learn Arduino - May my life easier!!

Drawbacks of this project:
Either one VOD TV program can be watched from living or bedroom at a time, since the Set Top Box is shared. 


Arduino Programming Logic:
The programming logic to repeat the IR signal is quite simple
  • Receive remote control signal from IR receiver
  • Decode the IR code
  • Send the decoded IR code from the IR emitter

IR Repeater Setup Illustration:
The illustration below shows you how the whole IR Repeater is setup in my apartment to share Set Top Box in two rooms.
  1. Living Room TV
  2. Bedroom TV
  3. Set Top Box (HDMI out connect to a HDMI switch, yes you need this!)
  4. HDMI cable from Set Top Box to bedroom TV
  5. Arduino IR Box 
  6. IR Emitter
  7. A hole on the wall
* The IR remotes shown below are actually the same remote

Working IR Repeater Prototype Video:
See the working prototype in the video below. As you can see, even through the IR repeater, the Set Top Box response time is fairly quick!


Material Needed:
  1. Arduino Mini Pro
  2. IR Emitter 940nm * 1 
  3. IR Receiver LED, Aixin AX-1838HS 38KHz * 1 (Other brand 38KHz should work)
  4. ProtoBoard * 1
  5. 100 ohm resistor * 1
  6. Short Jump wires * 10 
  7. 5 meter long single wires * 2 

LED Lineup:
Starts from the left: IR LED receiver, IR LED emitter, green LED, and red LED.
In the end, I didn't use red and green and LED, but relied on the Arduino built-in red LED on pin 13 and Serial port green LED in this project.



IR Repeater Wiring:
Wiring up is quite easy as you can see below. (I forgot to draw the 100 Ohm resistor in the illustration below, but you need it.)
  1. IR Emitter GND to GND
  2. IR Emitter Data to 100 Ohm resistor to Arduino pin 3
  3. IR Receiver Data to Arduino pin 2
  4. IR Receiver GND to Arduino GND
  5. IR Receiver VCC to Arduino VCC
  6. Proton board GND to power source GND
  7. Proton board VCC to power source VCC (USB power adapter)

In part 2, I will show you how I made the IR Repeater box, schematic, and Arduino code I modified from github by Lauszus. If you are interested, you may take a look at the code first.

To be continued. 

------------------------------

目的: 
不用另外租用一個額外的 MOD 機上盒,只要使用同一個搖控器,該你在臥室裡也可以觀看客廳所訂閱的中華電信 MOD! 

前言: 
最近,我訂閱了中華電信MOD系統,我把機上盒放在客廳裡。但是,我偶爾想在臥室裡收看MOD。可是機上盒在客廳裡,要怎麼辦呢?大家都知道,我不可能從臥室裡控制位於客廳的MOD。是的,我只需要一個紅外線(轉發器, 這個名詞正確嗎?)。市面上的相關產品有一大堆,但是我很快的想起我以前做的 以電視遙控器控臥室天花板電燈開關。這就是為什麼我要學Arduino - 讓我生活的更方便!

此作品之缺點:
因為機上盒是共用的,所以無法同時在客廳和臥室一起觀看不同的頻道。

Arduino 程式邏輯:
要讓紅外線信號重複的邏輯還蠻簡單的

  • 用紅外線接收器接收遙控器的信號
  • 將紅外線信號解碼
  • 從紅外線發射器傳送出解過碼的IR信號

紅外線轉發器安裝方法示圖
下圖展示出整個紅外線轉發器是如何安裝在我的家裡,使得兩個房間能分享機上盒。
  1. 客廳電視
  2. 臥室電視
  3. 機上盒
  4. HDMI延長線要從臥室電視連到機上盒
  5. Arduino紅外線轉發器
  6. 紅外線發射器
  7. 牆上的鑽孔
*下圖中的兩個遙控器代表同一個遙控器



紅外線轉發器原型運作影片:
請看以下的原型運作影片  可以看到即使經過轉接器 機上盒的反應仍舊相當迅速

所需材料:
  1. Arduino Mini Pro * 1
  2. 紅外線發射 LED 940nm * 1
  3. 紅外線接收 LED Aixin AX-1838HS 38KHz * 1 (只要是 38KHz 應該就能用)
  4. 麵包板 * 1
  5. 100歐姆電阻 * 1
  6. 短跳線*10
  7. 7.5 米長電線


各式 LED:
由左算起,IR 接收 LED, IR 發射 LED, 綠色 LED, 紅色 LED
這個專案裡,我最後沒有用到綠色 LED, 紅色 LED,我用的 Arduino 內建在13腳的紅色 LED, 和 Serial port 訊號的 LED.



紅外線轉發器接線方式:
接線很簡單,請參考下圖:(我忘了畫 100 Ohm 電阻,不過我們需要這個電阻)
  1. IR Emitter GND to GND
  2. IR Emitter Data to 100 Ohm resistor to Arduino pin 3
  3. IR Receiver Data to Arduino pin 2
  4. IR Receiver GND to Arduino GND
  5. IR Receiver VCC to Arduino VCC
  6. Proton board GND to power source GND
  7. Proton board VCC to power source VCC (USB power adapter)

接好了嗎?很簡單吧!
在第二段教學裡,我會把我如何用手邊棄不用的東西來製作紅外線轉發器的外盒(不是很好看,但墈用),及分享我用的程式碼。如果你等不及,那你可以參考 Github by Lauszus. 我就是用這位前輩的程式碼來修改完成這個作品的。

未完待續...
















Comments

  1. Where is the code? Please give the code.

    ReplyDelete
    Replies
    1. Hi Didar,

      the navigation to part 2 is unfortunately not that obvious:

      https://stonez56.blogspot.com/2015/11/arduino-ir-repeater-tutorial-part-2.html?m=0

      Delete

Post a Comment

Popular posts from this blog

Arduino - DFPlayer Mini MP3 Module

Android control color RGB LED using HC-05 Bluetooth with Arduino (Part I)

Arduino #27 AsyncWifimanager ElegantOTA ESP32 (WiFi Password Mgnt. + WiFi Firmware Update)