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
The illustration below shows you how the whole IR Repeater is setup in my apartment to share Set Top Box in two rooms.
- Living Room TV
- Bedroom TV
- Set Top Box (HDMI out connect to a HDMI switch, yes you need this!)
- HDMI cable from Set Top Box to bedroom TV
- Arduino IR Box
- IR Emitter
- A hole on the wall
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!
- Arduino Mini Pro
- IR Emitter 940nm * 1
- IR Receiver LED, Aixin AX-1838HS 38KHz * 1 (Other brand 38KHz should work)
- ProtoBoard * 1
- 100 ohm resistor * 1
- Short Jump wires * 10
- 5 meter long single wires * 2
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 Emitter GND to GND
- IR Emitter Data to 100 Ohm resistor to Arduino pin 3
- IR Receiver Data to Arduino pin 2
- IR Receiver GND to Arduino GND
- IR Receiver VCC to Arduino VCC
- Proton board GND to power source GND
- Proton board VCC to power source VCC (USB power adapter)
------------------------------
此作品之缺點:
因為機上盒是共用的,所以無法同時在客廳和臥室一起觀看不同的頻道。
Arduino 程式邏輯:
要讓紅外線信號重複的邏輯還蠻簡單的
- 用紅外線接收器接收遙控器的信號
- 將紅外線信號解碼
- 從紅外線發射器傳送出解過碼的IR信號
紅外線轉發器安裝方法示圖
下圖展示出整個紅外線轉發器是如何安裝在我的家裡,使得兩個房間能分享機上盒。
- 客廳電視
- 臥室電視
- 機上盒
- HDMI延長線要從臥室電視連到機上盒
- Arduino紅外線轉發器
- 紅外線發射器
- 牆上的鑽孔
請看以下的原型運作影片 可以看到即使經過轉接器 機上盒的反應仍舊相當迅速
- Arduino Mini Pro * 1
- 紅外線發射 LED 940nm * 1
- 紅外線接收 LED Aixin AX-1838HS 38KHz * 1 (只要是 38KHz 應該就能用)
- 麵包板 * 1
- 100歐姆電阻 * 1
- 短跳線*10
- 7.5 米長電線
接線很簡單,請參考下圖:(我忘了畫 100 Ohm 電阻,不過我們需要這個電阻)
- IR Emitter GND to GND
- IR Emitter Data to 100 Ohm resistor to Arduino pin 3
- IR Receiver Data to Arduino pin 2
- IR Receiver GND to Arduino GND
- IR Receiver VCC to Arduino VCC
- Proton board GND to power source GND
- Proton board VCC to power source VCC (USB power adapter)
在第二段教學裡,我會把我如何用手邊棄不用的東西來製作紅外線轉發器的外盒(不是很好看,但墈用),及分享我用的程式碼。如果你等不及,那你可以參考 Github by Lauszus. 我就是用這位前輩的程式碼來修改完成這個作品的。







