diggy
Posts: 20
Joined: Fri Aug 19, 2011 9:52 pm
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Aug 22, 2011 1:29 pm

I am thinking of building a keyboard/mouse less Media Center to hide behind my TV.

Instead of attaching a usb mouse + keyboard (seperately or a cableless bluetooth combo) and occupying a usb port, I want to build an IR receiver (possibly using TSOP1738) to be connected directly on Rpi using some of the available IO ports.

I want to have a big remote with alphanumerics labels on the keys (I have this one http://linuxtv.org/wiki/images.....remote.jpg) that can be used both as a keyboard (mobile style typing) and a mouse.

My hope is to have the 0-9 digits act either as numbers or letters (using a toggle key) the direction buttons moving the mouse and clicking and the other keys used as shortcuts to applications or actions.

I have built an IR receiver before for windows (the one here http://lnx.manoweb.com/lirc/?p.....troduction)
I have been using a program called IRassistant that I made to work exactly as I said above.

The problem now is how to port this idea to linux/Rpi. (I am kinda new to Linux).

What do you think of this idea? Anyone willing to help?

PS. I could even reuse my TV's remote using some unassigned keys to switch to another -PC control- mode. This could be done utilizing the TV/radio/DVD key that changes the keys' assignment. Given eg that no DVD is connected (that can be control by the same remote), when I want to control my Rpi I can switch the remote to DVD and use it to control my Rpi.

PS. What would be best to interface to: GPIO, I2C or SPI? I found this link: http://linuxtv.org/wiki/index......ollers-V4L.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Aug 22, 2011 2:11 pm

i'm assuming the raspi will be connected to the internet, and you have a smartphone. there are several smartphone programs that let you remotely control vlc, xbmc... you avoid Yet Another Electronic Gizmo, and a fair bit of work and headaches.

jacklang
Posts: 166
Joined: Thu Aug 04, 2011 10:59 am

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Aug 22, 2011 2:36 pm

Including an IR receiver diode on the board is a feature under discussion

diggy
Posts: 20
Joined: Fri Aug 19, 2011 9:52 pm
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Aug 22, 2011 4:30 pm

Quote from jacklang on August 22, 2011, 15:36
Including an IR receiver diode on the board is a feature under discussion

I would rather have the IR receiver available as an add-on module.
There could be an add-on dongle that could connect to predetermined pins on the Rpi.
That way someone could either buy a module from you guys or build it himself.

One other important reason NOT to have the IR receiver on board, is line-of-sight.
Having the IR onboard would mean that Rpi should be placed in a way that the IR diode has a clean line-of-sight with where the user will be. Having in mind that most likely Rpi will have connectors at three sides, most likely with cables connected on each connector, would give an "ugly"/"messy" sight.

A would rather have the pins predefined on the board and be able to wire a seperate tiny PCB (either ready or homemade) that I can stick with hook-and-loop fastener (Velcro) wherever I want.

Lakes
Posts: 267
Joined: Wed Aug 24, 2011 2:17 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Sat Aug 27, 2011 11:32 am

Bit late now, but make add-on boards stackable like they are for the arduino.

Michael
Posts: 340
Joined: Sat Jul 30, 2011 6:05 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Sat Aug 27, 2011 12:10 pm

Quote from jacklang on August 22, 2011, 15:36
Including an IR receiver diode on the board is a feature under discussion

Actually, leaving the IR receiver off might be better. It would make an excellent candidate project kit - just assemble IR receiver and perhaps cap, resistor and diode on a tiny pcb, hook up to a GPIO and write a tiny device driver. Simple, cheap and a great introduction to a bunch of hardware and software concepts.

A more advanced project could involve using a PIC and the USB connection - indeed Richard Watts (Kynesim / Cambridge Uni) has everything needed here to create the education materials: http://kynesim.blogspot.com/20.....fared.html

For HTPC, HDMI-CEC is more interesting, especially given the size of R.Pi.

[Edit: diggy beat me to it - lesson: don't go and make your lunch half-way through replying to a forum post ;)]

diggy
Posts: 20
Joined: Fri Aug 19, 2011 9:52 pm
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Sun Aug 28, 2011 12:23 am

For HTPC, HDMI-CEC is more interesting, especially given the size of R.Pi.
See, now you've beat me to it, so let's call it even :)

That was my first thought but I thought with all the CEC implementations fragmentation, it might not be worth the trouble.
On the other hand, I have no idea how CEC works. Could there be a driver accessing/controling PIN 13 (CEC) or the implementation doesn't allow that (and we have to unsolder and rewire)?

Maybe even get a driver per brand going? (I personally have LG so, Simplink is for me).

Bloodred
Posts: 26
Joined: Wed Aug 17, 2011 12:22 am

Re: Keyboard/Mouse less Media Center using IR Remote

Sun Aug 28, 2011 1:42 am

I was thinking of using some simple MCU along with an IR sensor that would interface with the RasPi via RS232 (or USB). I got this idea when I started thinking how you'd be able to power the RasPi on/off by using a remote, if the RasPi isn't running you can't really do anything to turn it on with an IR sensor depending on it in order to work.

A simple MCU would monitor input from an IR sensor and maybe trigger a relay to turn the RasPi on or off when you press a button on your remote. It would of course also relay commands via RS232 after the RasPi is on, so you can control it.

This would also be useful if CEC turns out to not be supported. You could easily add an IR transmitter to the MCU and use that together with the RasPi to control your TV or your entire entertainment center. This would make it possible for the RasPi to send commands to all your devices, so it could automatically turn your TV on, switch to the proper input and generally be in charge of anything else (stereo, etc.) by interpreting commands from a single remote. This would be achievable with a universal remote as well, but it would be more expensive and definitely lack in flexibility/automation compared to making something like this.

Blars
Posts: 88
Joined: Sun Aug 28, 2011 3:22 am
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Sun Aug 28, 2011 4:35 am

LIRC could probably be easily adapted for this -- it normally uses the control pins on a serial port.
This would give you a trainable send and receive for IR with very little in hardware costs, and it would only use a couple of gpio pins.

Bloodred
Posts: 26
Joined: Wed Aug 17, 2011 12:22 am

Re: Keyboard/Mouse less Media Center using IR Remote

Sun Aug 28, 2011 2:03 pm

Just had a look at the LIRC web page and it does seem the perfect software for the job.

Blars
Posts: 88
Joined: Sun Aug 28, 2011 3:22 am
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Sun Aug 28, 2011 6:26 pm

If you preferer going with the microcontroler, take a look at dangerousprototypes USB IR toy. Open hardware and software. The $20 price tag could be brought down if you are willing to make thousands.

LIRC is of course already packaged for Debian.

Bloodred
Posts: 26
Joined: Wed Aug 17, 2011 12:22 am

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Aug 29, 2011 5:38 am

I was actually thinking of programming the MCU myself (RS232 probably, I don't see what advantage USB would have in this case) and also making the circuit myself, it's going to be simple anyway.

The dangerousprototypes IR Toy does look like a nice product though, I just think I'll have more fun building it myself.

User avatar
Montekuri
Posts: 449
Joined: Thu Sep 22, 2011 6:26 pm
Contact: Website

Re: Keyboard/Mouse less Media Center using IR Remote

Thu Sep 22, 2011 7:43 pm

Geexbox has a good material to start a media center.
http://www.geexbox.org/
It is a small linux distro that play any kind of video and can accept remote commands using homemades infrared receptors.
Only need a serial port (RS232) to work.
I use it on an old computer with a 200Mb HD.

Bacan
Posts: 347
Joined: Sun Sep 25, 2011 10:03 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Mon Sep 26, 2011 6:31 pm

The hard work I see, is in making any off the street commercial IR TV remote work with the R-Pi. There must be a site or assn holding all the key codes that the remote manufacturers have dreamed up. A very worth while project. Adding it to my R-Pi FOSS ideas list.

For low-cost system at home, a TV remote that can tell the R-Pi that it is the AUX device answers a low cost need. The remote comes with the TV. Has Up, Dn, Lf, Rt, Select/Enter, Cancel/Esc, Help/Guide plus a numeric pad. Just what a simple training system needs.

+1 vote for a IR receiver kit / plug-in module.

crashingdutchman
Posts: 27
Joined: Sat Sep 10, 2011 6:31 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Tue Sep 27, 2011 3:58 pm

Anyone thinks Boxee can work with the Raspberry Pi?

I am using DVBLink Connect with a Server and a Client. Since a few days it can work with Boxee. If the 100MBps ethernet is fast enough, it would be great to use a Raspberry Pi as a client.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 21651
Joined: Sat Jul 30, 2011 7:41 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Tue Sep 27, 2011 4:17 pm

For a remote, I'd use a Wiimote and USB Bluetooth receiver. Pretty sure the protocol is pretty well known by now. Put some icons on the screen to point at (when B pressed for example so not on screen all the time), and Bob's your Uncle. Mouse and remote all in one.

Or perhaps a Kinect????
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

The Cageybee
Posts: 17
Joined: Fri Sep 16, 2011 11:28 pm

Re: Keyboard/Mouse less Media Center using IR Remote

Tue Oct 11, 2011 7:24 am

Sounds really good to me. I like the idea of being able to turn the rPi on via remote.

Using an external uC it should all be pretty easy to do. For sending commands to the rPi it would be best to use the UART. RS232 protocol, but at TTL levels. Makes things nice and easy.

To be able to turn the rPi on/off via remote you'd need to tap into the power on switch and, I reckon a 'power on' LED. If the rPi is in an off state, determined by checking if the power LED is off, then toggle the power switch. If the rPi is on, send a serial command which the rPi processes and triggers the shutdown command, so that it goes down gracefully rather than just cutting the power.

We'll have to see if the shutdown procedure will automatically cut the power once the kernel has quit. If not, you'd just have to have the uC monitor the shutdown then toggle the power once it's complete.

User avatar
crundy
Posts: 310
Joined: Fri Aug 12, 2011 7:47 am

Re: Keyboard/Mouse less Media Center using IR Remote

Tue Oct 11, 2011 12:49 pm

Are there any linux apps that can turn a machine into a Windows MCE extender?

Return to “Other projects”