Simple infrared / IR transmitter aka Universal remote

I’d like a simple infrared / IR transmitter, it could be used as a universal remote.

I would have it turn on my tv then select a specific input/volume when I get home (motion sensor)

Does anyone else see value in this type of a smart thing?

It could be easily built with the arduino shield or with one of the smart modules.

1 Like

This is something I keep building and rebuilding - the key problem I’ve had in the past is that I can’t reliably tell if the TV is on or not.

1 Like

In the lab I’ve built something very similar, using an Arduino microcontroller and infrared LED. There are libraries out there to code up almost any devices. But  as Alexander says, there is no feedback. Which can be difficult to deal with when trying to find out if the TV is on or off.

A feedback loop is very possible though. Anyone have any ideas on how they would do it?

An inductive loop current sensor on the TV’s power cord should work. A TV in standby will typically draw far less power than one operating. A smart socket with current measuring capacity (power usage) could also work, provided you can get an on-demand measurement from it.

A smart socket would be the way to go, it’s already got current sensing that would be reported back to the cloud. A simple IR array (IR blaster) that runs on batteries would sit somewhere in full view of all the devices. (TV, DVD, etc)

The real trick would be to have an ability to program the device from the cloud, send down what model of tv /DVD player you have. I would also think the feature to learn commands would be key, perhaps a small memory, or even the ability to report the learned code back to the cloud.

Can you tell me more about the device you have already built? I’ve been thinking about doing something similar in the interim.

what about reading the amps used in that socket? Once tv is on, power will spike?

I too want to have my TV turn on when I come home. However, I use Ps3 so would love bluetooth control also. My Ps3 turns on the TV automatically.

The device I have is currently built up on a breadboard. As soon as I get a chance this week I’ll snap a picture of it, but its very simple. Here is a link from Hack A Day that has the same setup.

From a code stand point, having a database that has the remote codes is not too difficult, but upkeep could prove painful. Learning is fairly simple as well.

Current sensing using a SmartPower Outlet is a very feasible way to do it. Like many, my TV is plugged in with a bunch of other devices and I’m worried the TV power wont be large enough/consistant enough to register. Also, with a more precise system, you could manage all commands. Why stop at on/off? Go for full on remote! It would be a run project for a maker/developer to try out.

Good point about the smart outlet if multiple devices are plugged into it. I think it would be easier if just the TV was plugged into the smart outlet. 
Would smart things work with a full remote? I got the impression that it would only work based on physical events, like a pre-programmed button or a door opening?
I’d be interested to know from one of the smart things developers what is realistic here. What would work out of the box?

My end goal right now is to have the tv turn on and play music or start my slide show when I get home. I’d love to expand my idea but I’m not sure what would be possible out of the box ( assuming I had an IR blaster)

DISCLAIMER - I’m not an EE and I’m not particularly good at this - I might be drawing too much power from the Fio, for example.

I’m not going to discuss how to get the IR codes here - http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html discusses how to do it (the library comes with a very easy-to-build and easy-to-use test rig.) Just add a $5 IR Receiver available at any given Radio Shack. :slight_smile:

My current device is more or less based on:

http://www.friday.com/bbum/2012/03/17/teensy-based-ir-blaster/

The simplest wireless solution I could sort out came from:

(1) $25 Arduino Fio* - https://www.sparkfun.com/products/10116
(1) $35 RN-XV 802.11 Wireless Module - https://www.sparkfun.com/products/10822
(2) $2 “High Output” Infrared LEDs from Radio Shack (1.2V / 100mA)
(1) $0.25 10 ohm resistor (per http://led.linear1.org/led.wiz to limit current to the LEDs)
(1) $0.25 100uF/25V capacitor (to keep from browning out the microprocessor)
(1) $1 2N3904 (I used an NTE123, any similar NPN transistor will be fine)
(1) $1 Micro-USB power supply (alternatively you can use a $9 LiPo battery with the Fio - I have one on order, not sure when it will be here.)
(various) jumper wires, headers soldered on to the FIO, solderless breadboard, FTDI cable to program the Fio

*https://www.sparkfun.com/products/11520 is a similar product but won’t require an FTDI cable and can be used to emulate a USB device - it should be possible to plug it in to your PS3 via USB and have it issue HID commands and maybe even monitor power state - I need to do more research here.

It took about an evening to piece it together and write simple firmware that accepts commands via telnet - I had written an HTTP+JSON server but the RN-XV can only serve one socket at a time and is VERY slow to close sockets - one second per request felt like an eternity…I figure I’ll set up a small server application that my wireless-ir remotes will call in to and let that server provide a nice REST API in front of the sockets to the real devices.

Advantages: Works; is quite small.

Disadvantages: Expensive-ish; requires extra software.

Alternative 1: Use a router

(These use my Amazon affiliate account - please feel free to remove the tag but I would otherwise appreciate the kickback! :slight_smile:
(1) $25 Arduino Uno R3
(1) $20 TP-Link Router
(1) $21 Arduino Ethernet Shield
(…) IR parts and miscellany as above

This is $6 more than going pure wireless and will give you a MUCH easier to work with solution (no soldering required) - it’s also possible to find the arduino and shield on sites like dx.com and seeedstudio.com - I paid about $10 for my Arduino and $11 for the shield but had to figure out documentation myself (and bend pins back from damage, and wait about a month for delivery…)

Pros: Much more flexible solution (can use standard Arduino shields to add Bluetooth Low Energy, relay controls, etc.)

Cons: Larger footprint, separate power for router and Arduino, battery support not built in.

Alternative 2: Buy a pre-built USB solution

(1) $19.50 Infrared Toy http://www.seeedstudio.com/depot/usb-infrared-toy-v2-p-831.html?cPath=174

I haven’t personally used this but, from the documentation, it’ll let you read and send IR codes from a usb-equipped computer. If you’ve already got a media center (or you need something to read codes in with) it might be a great solution.

Pros: Easy

Cons: Requires USB

Alternative 3: Buy a pre-built WiFi solution

(1) $110 WF2IR

This company has a series of devices that can control serial port (useful for some receivers such as my Denon AVR3806), contact closure, and infrared devices via WiFi. $110 is more than I wanted to spend…although I’ve easily spent 3x-4x as much prototyping things. :slight_smile:

Pros: Easy

Cons: Expensive

Alternative 4: The Electric Imp

(1) $30 Electric Imp - https://www.sparkfun.com/products/11395
(1) $13 Breakout Board - https://www.sparkfun.com/products/11400
(…) IR parts and miscellany as above

The Electric Imp is a rather nifty device. It’s the size of an SD card, gets programmed online, and can do a variety of general-purpose-microcontroller tasks. Nobody’s written an IR library for it yet (and the Arduino one is top-notch) but it’s theoretically possible - IR Receive would probably not be due to some limitations of the current Imp firmware.

Pros: Tiny, easy to power via battery

Cons: Nobody’s tried it yet. :slight_smile:

 

Most TVs have hidden codes to do “discrete” actions - that is to say, there’s a POWER_OFF and POWER_ON code as well as the usual POWER_TOGGLE that your standard remote sends - that’s one way of getting around unknown initial state. For other detection I think that the most promising approach would be to plug in to a USB port (my TV turns the USB port’s power off if the TV itself is off - the USB port is useless for control :slight_smile: or HDMI port on the TV - http://en.wikipedia.org/wiki/HDMI#CEC sounds like what we really want but it’s not quite there yet.

More later- glad to hear there are others interested in this!

 

2 Likes

Interesting HDMI-CEC links (at least to me):

http://www.kwikwai.com/ - commercial product, $300 USD…

http://arduino.cc/forum/index.php?PHPSESSID=60edb612a10bbd158528555c36c2756f&topic=22327.0 - long informative thread about attempts to interface an Arduino in to CEC.

 

Final update before I go to bed - Logitech’s Harmony database is fantastic for finding these discrete codes - it’s why I can set my TV to a particular input in one button instead of having to cycle through several inputs, etc - I’d highly recommend investing in a cheap Harmony as I couldn’t find any other reliable way to get those codes (and once they’re on the remote, I just point them at my Arduino IR receiver and then I’ve got the correctly-formatted code to re-use!) There are some databases (including LIRC’s) but I wasn’t quite able to figure out how to translate that in to something I could code and use.

1 Like

A smart hdmi CEC dongle might be the way of the future, but I think my skill level is still around an IR Blaster

http://www.cec-o-matic.com/

 

You’ve read my mind!!!

Brainstorming over the past couple of weeks lead me to conclude that an IR transmitter “Thing” would be immensely valuable (even with minimal features — the concept could be expanded in a future version for IR reception/relay, etc.).

But how do specific members of the Developer community join together on a project like this and agree on the profits (and any related patents or other IP, etc.)?

1 Like

How we’ve typically done this in the past is to either to use TVs capable of RS-232, or ones that have a discrete IR power on and power off code (although not all models support one) or through monitoring the voltage of a video output (which most TVs no longer have).  For the ST solution, I think a smart plug monitoring voltage would not only give you some nice metrics of power usage, but also give a relatively easy method to know for sure if your code was received and implemented.  It seems like it would even be fairly easy to make a belt and suspenders method.  For instance, if you see that typically the TV is drawing more power .8 seconds after the command is sent, you could program the system to resend the ON code 1 second after it is first sent if it doesn’t see that power draw.  If it doesn’t see it a second after that, it could throw a code to say “Your TV isn’t turning on, did you unplug it, move your IR emitter, or trip a breaker?”  or some such troubleshooting text.

 

I wanna build something similar, but I want it to turn on my receiver which is in a closed cabinet to the BT input so I can stream music with my phone. So, it would need to be some kind of zigbee/wifi to IR bridge.

How about a global cache piece?  like this http://www.smarthome.com/81186/Global-Cache-WF2IR-iTach-Wi-Fi-to-IR/p.aspx

I would like to add my support to this project. I would like to control my portable AC unit and this would be perfect for this purpose.

I originally had a similar thought and emailed the team asking if they had an IR blaster in mind.  Received an email on 24 Sept saying that yes, they were looking at a few IR blasters.  I was thinking my initial use would be more from a turning it off point of view.  Eg. if no presence was detected for 5 minutes, turn the TV (and possibly lights and A/c if they are on).  It could then be set to turn it back on (along with the other services if they were on), if presence was detected again sau up to 15 minutes after that event.  Failing that, the room would revert to its usual state - if light level (or possibly a time condition) is below a certain level, turn the lights on upon occupancy sensing.  In my house the Kids always seem to leave the room and leave the TV on.

Modern TVs support multiple audio outputs (I use HDMI’s ARC), but I have an open toslink audio output which I do not use. If the TV is on, this output - without fail - is on. It’s a digital optical output of visible red light. I’ve been considering wiring up an arduino to this to read the TV state (light is on, TV is on - light is off TV is off); and integrating some kind of IR blaster to send signals to both my TV and receiver. But I know if I build it, I’ll have electrical tape and exposed circuits hanging around my nice TV, so I may just wait for a proper sealed and polished unit if there ever comes one.

Update: I don’t think you’d have to sacrifice your toslink connection if you do use it, either: http://www.monoprice.com/Product/?p_id=966

@imbrian:

Great idea – unless TV’s start to shutdown the port for power saving reasons if it is not in use. :frowning:

Super easy and fun project to build; just wondering how best to tie it in with the IR transmitter in order to minimize modules.

This is the sort of thing where the ThingModule (“around $10”) was going to be very handy for; since it has GPIO pins, adding a light sensor to have it send a status to ST would be super cheap.

Unfortunately, the ThingModule has been suspended… or so I hear.