Home

使用Arduino的简单DIY通用遥控器

在这个项目中,我们将看到如何使用Arduino设计简单的DIY通用遥控器。使用此远程应用程序,您可以控制T.V.,A.C。,DVD播放器等各种电子设备。

I have implemented the Universal Remote using Arduino Nano and places it on a small perf board along with all the buttons, power supply etc. The final build looks something like this.

DIYUniversal Remote using Arduino Remote Image

Introduction

IR遥控器是基于视觉的无线通信设备,与IR接收器同时起作用。您可以在几乎所有主要的电子设备中找到红外遥控器和相应的红外接收器,例如电视,空调,电视盒,音频播放器等。

此设置的主要问题是,每个设备都有自己的IR遥控器,并且您拥有的设备数量越多,远程控件堆就越越大。

What if you have a single remote control that can control, if not all then majority of your electrical appliances? This concept is known as Universal Remote Control and it is already existing in the market.

为了将相同的概念带给制造商和业余爱好者,在该项目中开发了使用Arduino的DIY通用遥控器。使用Arduino构建自己的通用遥控器的原因可能很简单,就像用自己的手构建实用应用程序的满意度,或者可以绕过已经存在的现有通用遥控器的成本。

使用Arduino的通用遥控器背后的原理

The main principle behind the implementation of an Arduino based Universal Remote Control is very simple. First, using an existing remote control of any appliance like TV for example, the IR Signals are decoded.

然后将这些确定的信号用于最终应用中,以使用IR发射极LED发射相应的红外信号。

使用Arduino解码IR信号

The first logical step is to decode all the infrared signals from the existing remote controls. I have a Sony TV and a Voltas AC. Using these two remote controls, I have decoded the basic buttons like Power, Volume Up, Volume Down, Previous, Next, Source for the TV and Power, Temperature Up, Temperature Down, Swing, Fan, Turbo for the AC.

在继续之前,我建议你去through this simple project called “Arduino IR Receiver Tutorial”,我讨论了与Arduino设置IR接收器并解码信号的所有重要方面。

电路

目前,下面显示了用于解码电视和交流远程键的电路图,我在其中使用了Arduino Nano和TSOP1740 IR接收器。

DIYUniversal Remote using Arduino Receiver Circuit

代码

下面给出了用于解码IR信号的代码。

所有解码的信号将出现在串行窗口上。记下所有解码值。

NOTE:该项目使用了一个名为“ Inremote”的特殊库。您可以使用Arduino Ide的图书馆经理直接安装它,并通过Shirriff搜索Inremote或下载ZIP文件thisGitHub page.

使用Arduino的通用遥控电路

现在,我们已经解码了原始遥控器中的所有必要信号,我们现在可以使用Arduino进行了通用遥控器的实际构建。电路图如下所示。

使用Arduino电路图DIY通用遥控器

成分

  • Arduino Nano
  • ir led
  • 按钮x 8
  • CR2032 Battery x 2
  • CR2032 Battery Holder x 2
  • RGB LED X 1
  • 10KΩ Resistor x 2
  • Connecting Wires
  • 完美板
  • 女头条条(适用于Arduino Nano)

电路设计

首先,将IR LED连接到数字IO引脚3。然后按下按下按下:

按钮 Arduino Digital IO PIN
力量 4
Mode 5
Up 6
Down 7
剩下 8
正确的 9
选择 10

此外,还有一个连接到数字IO引脚2的唤醒按钮。数字IO引脚使用10kΩ电阻器向下拉下,而所有其他按钮销都在内部拉动。所有按钮(唤醒按钮除外)的另一端已连接。唤醒按钮的另一端连接到VCC。

DIYUniversal Remote using Arduino Remote Image 1

An RGB LED is used to indicate the appliance selected. The RGB LED used here has a common anode terminal, which is connected to VCC through a 10KΩ Resistor. The R, G and B ends of the LED are connected to pins 11, 12 and 13 respectively.

整个系统串联由几个CR2032 3V锂细胞供电。

代码

以下是使用Arduino通用遥控器的代码。从先前收集的值中,将相应值放在代码中为TC和AC提供的适当数组中。

These arrays are named tv_onoff[], tv_volup[], tv_voldown[], tv_prev[], tv_next[], tv_source[] for TV related data and ac_onoff[], ac_tempup[], ac_tempdown[], ac_swing[], ac_fan[], ac_turbo[] for AC.

NOTE:An additional library called “LowPower” is used to put the Arduino to sleep after a preset time to save battery. Download this library fromthisGitHub page.

在职的

在插入解码值并将代码上传到Arduino Nano之后,您可以开始使用该应用程序作为通用遥控器。首先,按模式按钮选择设备。我为电视和AC的绿色LED分配了红色LED。

使用Arduino远程图像2

因此,通过按模式按钮,您可以在电视和AC之间进行选择,而LED可以作为视觉指示器。设置模式后,您可以将遥控器用于该特定设备。如果没有钥匙在10秒内施加钥匙,那么低功率图书馆将开始并让Arduino入睡。

使用“唤醒”按钮唤醒Arduino。

Conclusion

这里设计了一个简单但非常有用的DIY项目,称为Universal Remote使用Arduino Nano。使用此应用程序,您可以借助单个遥控器来控制许多电子设备。

Leave a Reply

您的电子邮件地址不会被公开。

电子豪华粉丝
<\/i>","library":""}}" data-widget_type="nav-menu.default">
Baidu