Interfacing with Arduino over IR

Hi,

I'm hoping that someone may be able to help me understand how to interface my Arduino Diecimilla with my computer over IR. I've searched the forum and googled fairly extensively (unsuccessfuly), but i'm now in the position of just buying things and trying them out, and i'd rather have the benefit of some experience before wasting loads of money on things that won't work together!

This is my first project and I realise that it may be a bit ambitious for a newbie. I've decided to give it a try as an idea for a Christmas present.

The plan is to produce a mulitimedia system for users to play with audio samples on a PC and see corresponding lights react in a piece of art on the wall. I'm using a software package called Freewheeling on Ubuntu Hardy to trigger samples on the PC, hopefully from a couple of Gamepad's (when i've worked out the key bindings). Freewheeling has a very flexible event-based configuration that should be capable of sending out a midi signal when each gamepad button is pressed and loops are triggered. I'm planning to use something like mididings to intercept these midi note signals and launch IRSend commands from the shell.

I've found a likely looking IR Receiver Breakout from CoolComponents.co.uk that could be used fairly easily (I hope!) on the receiving end, hooked up to my Arduino. The bit that I can't work out is what hardware I need on the sending end. I've been looking at USB IRdA devices that will plug in to my PC for sending data from my IRSend commands. The trouble is, these devices don't seem to have a range of more than a meter, and i'm not even sure the IRdA protocol will allow me to send serial data.

Does anyone have any experience with these USB IRda devices and interfacing with an Arduino on the receiving end? If so i'd be really grateful if you chip in with any pointers. Alternatively, if I'm going about this in the wrong way i'd appreciate other ideas.

Thanks in advance

Chris

Alternatively, if I'm going about this in the wrong way i'd appreciate other ideas.

OK I do, the problem with IR is it's limited range and the fact that it is not really suitable for serial communications, it's more of a pulse position modulation transport layer.

If it were me I would look into wireless interfacing, SparkFun has lots of transmitters / receivers and the "making things talk" book is a good grounding.

So you'd recommend using something like RF or Bluetooth instead? I guess that Bluetooth might be an option as it's fairly easy to get hold of a dongle for the PC, but i'm not sure how i'd send out data over Bluetooth (and it's expensive). Same story with RF i'd guess, and what sort of device could send RF from the PC?

I'll check out SparkFun again but i'm a bit in the dark here :-/

Do you actually need two way communication or will Arduino to PC work for you? A simple transmitter at one end and receiver at the other will allow you serial (RS232 like) communications.

I agree Bluetooth is expensive but normal RF (not WiFi) is relatively cheap. Something in the licence free mid hundreds MHz region.

Again I do recommend that book especially if you are new to it all.

Thanks for your help with this Mike. I've just ordered the book from Amazon. I enjoyed Tom's other book so i'm sure that will be a useful addition to the library!

I've identified an RF transmitter/receiver pair in the sparkfun catalogue that should allow data transfer in the 315Mhz range. Following your suggestion I'd have an Arduino at the receiving end. That looks ok as I can find a few tutorials and examples on how this could work.

At the sending end (the PC) i'm still not really sure how to make use of the RF transmitter. I'm guessing that i'll need to interface the transmitter with the PC serial port somehow and perhaps use teletype serial commands (stty) from the shell. Maybe not. Maybe i'll need another Arduino connected to the PC so I can send data out of the transmitter. That would solve the hardware interfacing issue but i'm not sure how I could control the Arduino from the linux shell. Can I talk to the Arduino from the PC using Processing?

Thanks again for your advice with this; any other tips before the book arrives would be gratefully received! :slight_smile:

Chris

From the PC you need to feed the transmitter with a serial signal either from the serial port or a USB to serial adaptor.
You can use any software that talks to the serial port but Processing is probably the best way to use it.

I know it's hard to do but try and resist the temptation to buy the transmitter / receiver before you read the book as no doubt it will open up other ideas and possibilities you are not aware of at the moment.

Best of luck with the project and be sure to post it in the exhibition section when you finish it.

Ah, you smoked me out. I've been looking around on the web for a serial interface for the last half hour!

I think i'll do as you say and wait though. I don't want to needlessly waste money and time. I'll look forward to checking out the book; hopefully it will give me what I need.

If all goes well i'll definitely put something up with photos/details.

Cheers :smiley:

Chris