dacv393
Posts: 2
Joined: Sun Jun 25, 2017 7:51 pm

Help with Universal Remote (LIRC and Audio output)

Sun Jun 25, 2017 7:57 pm

This is long, so bear with me.


Intro

This summer, I decided to buy a Raspberry Pi and Arduino to amp up my projector setup at school. So far I have successfully purchased and setup the required materials for Hyperion to have an Ambilight behind my projector. My next goal is to make a universal remote app - I have a lot of different IR controlled devices, way too many remotes, and don't want to spend $200 on a simple Logitech one. Instead, I am attempting to make a web app that my roommates and I can all easily access on our phones, to control all of the devices, including Hyperion, with.


Setup

The setup for my overall goal is like this: A Raspberry Pi acts as the main driver for the various functions. Its the version 3 so I think it can handle everything. For Hyperion (the ambilight clone), a hdmi splitter splits signal to my projector and to an AV converter. This converter sends the video signal to a video capture device that sends the video signal to the raspberry pi via USB. The Hyperion application is running on the raspberry pi, which extracts colors from the video feed, and sends this info to the Arduino. The Arduino correctly powers the LEDs which will be setup behind the projector screen. This ties into the remote because I want the remote to be able to turn the Hyperion application on and off, or change the color of the LEDs. There is already a remote application to do this from a computer or smartphone. The smartphone app costs money for the full version, and is not in a streamlined web app with the other devices like I described above. Also, I already have a strand of other LED lights set up that are controlled by a crappy IR remote. So it would be nice to use the web app to be able to control all of these lights without needing to go into separate apps, since this is the whole point of combining all of the remotes into one app. Hyperion has a server functionality built in where you can SSH in to to call these commands, but in my case I hope to just call them locally on the Raspberry Pi.

The next main factor of the setup is the IR remote. I don't know what I'm doing with electrical engineering, but after countless guides online, I managed to be able to store IR codes from a remote, and send them. I couldn't figure out how to setup the transistor to power the LED better, since my LED is weird compared to ones online and has 3 prongs instead of 2. [Here](http://imgur.com/HWS9xp0) is a simple pic of the setup, but I am hoping this won't even matter. I can correctly record the IR codes for a new remote using LIRC, so hopefully I won't need any more enhancing of my awful circuit. After trying out a ton of commands and restoring my pi, I eventually was able to get the transistorless IR LED to turn off and on one of my devices.

Where I Got Stuck

After a lot of learning and hard work, all seemed to be going well, until now, when my frustration has peaked. At my house at school, I have an Xbox One. I don't think many people know this, but Xbox tried to promote this whole media center thing and their Kinect can send IR codes to control your devices. The new Xbox One can do this without a Kinect, but the old one can't. In order to do so, you just have to buy a very simple and cheap IR emitter that looks like [this](http://imgur.com/xu9qfPm). Once I plugged this in to mx Xbox, the configuration tool was very useful and I am now able to use my Xbox to turn up the volume on my audio receiver/amp, change the channels of my basic cable package, etc. The Xbox team must have developed their own well-functioning version of LIRC with tons of pre-configured IR commands. After discovering how simple it was to do this on my Xbox, I figured it must be pretty easy to do so myself. I was very wrong, and now I'm here with a Raspberry Pi and a halfway-finished project. Now, all I have left to do is to figure out how to use that IR emitter to send codes from the Raspberry Pi to my devices, and build the web app. I understand that I *could* do this by teaching myself EE, how to solder, buying a bunch of LED IRs and setting them up around my house to be able to control my devices. However, I really, really want to be able to send the IR codes from the already-built in 3.5 mm jack on the Raspberry Pi. There are tons and tons of threads online about how hard it is to use that jack for IR, but... these people are trying to use an IR *receiver* with the jack, not an IR *transmitter*. Some random forums led me to the discovery that you can emulate IR codes by simply playing an audio file through the jack on full volume. This seemed like the super-easy solution I was looking for. This led me down the confusing rabbit hole of the different frequencies of getting the IR signals from 19Hz to 34Hz or whatever - stuff I don't think I'm capable of understanding. The nice thing about LIRC was that it figured all of this out for you. If you want to generate .mp3 files to send IR signals, you're on your own. Or so I thought.. I eventually discovered this "JP1" project (http://www.hifi-remote.com/forums/faq.p ... aedd304e83), that seems to accomplish something along the lines of what I am trying to do. I just cannot for the life of me understand any of it or how to use it. So after all of this information, I just want to be able to send codes out of the 3.5mm jack through my IR emitter, and then to make a web app that controls it all.

Please Help

I know this seems a bit ambitious, but it seems so doable if I just had the right guidance. The main areas I need help with are these:

[*] Figuring out how to send IR codes out of 3.5mm jack with the IR emitter. With LIRC, I can manage to get some hex codes for the IR commands. [Some](http://imgur.com/pPsfIWc) of them are a ton of characters, and [some](http://imgur.com/n77rfb6) are only 4. I figure I will need these hex codes to generate the audio files needed to send the IR codes through the jack. I just have absolutely no way how to get from point A to point B. If someone could point me in the right direction or explain how to do this, I would be forever grateful.

[*] The next problem is something that doesn't involve confusing math/physics and electrical engineering, and that is the web app. I suppose if I try hard enough that I will be able to figure this out on my own eventually, but guidance is also appreciated. A guy named Alex who has contributed a lot to a universal remote project built an LIRC-powered web app that has very similar functionality to what I am trying to do. It looks like [this](http://imgur.com/AjO4HFS) when installed and configured and I surprisingly got it to work. I could use my phone to turn on and off my insignia stereo receiver. Sadly, my scope is a little different, since I will want to have a web app that just produces simple commands when a button is pushed. If anyone could explain how I can create this (I have no knowledge of how to host a web app on the Pi), I would also be extremely appreciative. Basically it just needs to be a screen that looks good on mobile, with about 20 buttons (like Vol + and Vol - , that I can get pics of online). When me or one of my roommates hits a button, its respective command is run on the Pi. So if its to turn on Hyperion, the Pi will run that command. If its to turn the volume up on the receiver, the Pi will play that .mp3 or other audio file to emit the IR code. Lastly, this is a stretch, but I would love to be able to have some sort of color wheel or color picker for my LEDs - the simple IR controlled LEDs and/or the ones that Hyperion runs on. [Here](http://imgur.com/4zOA5Jw) is a screenshot from the Hyperion app, so if I could have some similar mode to this on my web app, that would be awesome, I just have no idea how to create that.


Any help whatsoever is extremely appreciated!
Last edited by dacv393 on Sat Oct 14, 2017 12:45 am, edited 1 time in total.

drgeoff
Posts: 9612
Joined: Wed Jan 25, 2012 6:39 pm

Re: Help with Universal Remote (LIRC and Audio output)

Mon Jun 26, 2017 6:17 pm

dacv393 wrote:This is long, so bare with me.
The length may be a significant contributory factor to the paucity of replies.

And 'bare with me' has a completely different meaning from what I assume you intended.

a380ife
Posts: 2
Joined: Wed Nov 28, 2018 10:36 pm

Re: Help with Universal Remote (LIRC and Audio output)

Wed Nov 28, 2018 10:40 pm

Hello - were you able to make your project work? I am looking to undertake something similar and am researching how to issue IR commands through the 3.5mm jack.

dacv393
Posts: 2
Joined: Sun Jun 25, 2017 7:51 pm

Re: Help with Universal Remote (LIRC and Audio output)

Thu Nov 29, 2018 1:02 pm

So I kind of got it working, but not through the 3.5mm jack. I ended up buying https://www.iguanaworks.net/products/us ... ansceiver/. Setting this up was nearly impossible, and after long emails with their customer support and modifications to their driver's binary files and my Raspbian software, I eventually made it to the point where I could send out IR commands from the Raspberry Pi, just using this device instead of the 3.5mm jack.

I'm trying to remember why I ended up going down this path, and if I remember correctly, I think it had something to do with the 3.5mm jack not being able to drive enough power to transmit IR codes more than a few inches. I actually think back to when I was testing, I got the 3.5mm jack to successfully send IR codes to turn on and off one of my devices, but it would only work from a very short range. So I believe my options were to either build or buy some sort of power amplifier or to buy a premade device. I'm pretty sure you could also remake the device I purchased for cheaper, but I know nothing about soldering or electrical engineering so simply buying it was good for me.

a380ife
Posts: 2
Joined: Wed Nov 28, 2018 10:36 pm

Re: Help with Universal Remote (LIRC and Audio output)

Thu Nov 29, 2018 5:58 pm

Many thanks. I've encountered a number of reports of the distance issue. In my case, I need to send the signal down 50' approx. of emitter wire (these are already pulled throughout the walls of the house). I'm toying with using these: https://www.adafruit.com/product/2915?g ... F0EALw_wcB - but am concerned that perhaps the signal won't be strong enough. I also found this https://www.globalcache.com/products/itach/ip2irspecs/ which I may use and just use the pi to host my UI.

Return to “Media centres”