Electronic – the cheapest way for two devices spaced less than 10 feet apart to communicate wirelessly with each other

communicationmicrocontrollerwireless

I'm building a musical instrument that comprises of two separate devices…one device is the master…has an accelerometer and a speaker. The master's buddy device also has an accelerometer.

When the buddy tilts, the buddy device interprets the accelerometer data and then sends a note to the master. The master plays the note using instrument voice 1.

The master, at the same time is processing it's own accelerometer information. Based on accelerometer data, it will play other notes using instrument voice 2.

If the user moves device one and then moves device two in special ways, a flourish will play.

My question is…taking into account the type/amount of data that I'm sending…essentially short control bytes, what would be the cheapest way for the two to communicate wirelessly?

–CLARIFICATION–
These devices ideally would be wireless and not tethered to each other. Also, these devices will be moved around freely so any line of sight method is less than ideal.

Best Answer

I'll assume you want to do this wireless, otherwise the solution is obvious.

I would go for infrared. The transmitter can be a small microcontroller sending a pair of bytes to an IR receiver module.

These receiver modules are tuned to a particular protocol. You can use an RC-5 module; RC-5 transmits 14-bit at a time using Manchester encoding. You can easily add a pair of bits to it, and define your own codes.

A 3 m range should not be a problem. I've used Vishay RC-5 receivers at 15 m range. At shorter distances you probably won't even have to direct the LED to the receiver. In a normal size room the signal will reflect off the walls.

A cheap RF solution is the RFM70:

enter image description here

Less than 5 dollar at Digikey. That's far less than an Xbee.

Related Topic