looked around on the shiny shiny internet, and thanks to this thread in the arduino fourm (and my advisor david mellis) i made this neat little wireless connection:
its super simple (and CHEAP!). super nice thing is that you can block the signal with your hand (mirrors? lenses?) this is real cool for my project, as this means that you can jam musical data coming from one unit to another. jam as in trash / mash up. also one unit will interfere with another. yeah: data chaos!
below is pictures of the setup / schematic and code:

transmitter:

TX code:
//dirt cheap wireless TX
//generates 38kHz carrier wave on pin 9 and 10
//sends data via TX every 500ms
void setup()
{
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
// Clear Timer on Compare Match (CTC) Mode
bitWrite(TCCR1A, WGM10, 0);
bitWrite(TCCR1A, WGM11, 0);
bitWrite(TCCR1B, WGM12, 1);
bitWrite(TCCR1B, WGM13, 0);
// Toggle OC1A and OC1B on Compare Match.
bitWrite(TCCR1A, COM1A0, 1);
bitWrite(TCCR1A, COM1A1, 0);
bitWrite(TCCR1A, COM1B0, 1);
bitWrite(TCCR1A, COM1B1, 0);
// No prescaling
bitWrite(TCCR1B, CS10, 1);
bitWrite(TCCR1B, CS11, 0);
bitWrite(TCCR1B, CS12, 0);
OCR1A = 210;
OCR1B = 210;
Serial.begin(2400);
}
void loop()
{
Serial.println("testing testing testing");
delay(500);
}
receiver:

RX code:
//dirt cheap wireless RX
void setup()
{
Serial.begin(2400);
pinMode(13, OUTPUT);
}
void loop()
{
// if incoming serial
if (Serial.available()) {
readSerial();
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
delay(10);
}
void readSerial() {
char val = Serial.read();
Serial.print(val);
}





13 Comments
Nice post! Simple, cheap!
I wonder if you can program an Arduino that way.. Hmm..
That is a nice trick. How far apart can you get it before the communication gets garbled?
that depends on the IR LEDs really. i haven’t tried it over greater distances, but my guess would be that with clear line of sight and not too much sun light / interference, you could reach pretty long distances.
This is awesome. AWESOME.
Any chances of higher resolution pictures?
hm… i took these pictures with my phone while doing the prototyping…. so i’m not sure if higher resolution will give you a lot more info… are you looking for something special on the photos? connections?
Nice work.
Definitely I will try this.
I can see applications for this in swarm robotics. A secondary fail-safe communication, passing data from one to another if other methods fail.
good job
wireless data trasmission using robot which measure temperature and send data to recevier & it display on LCD.
This is great trick instead of using
x-bee. Can you explain how you generate
the carrier at 38KHz in arduino?
the carrier wave is generated by some pretty low level interrupt driven C code, you can look in the posted code example. i am not a great C coder, so i cant really explain exactly how it works (i got a bit of help with this part)
How about using lasers instead for long distance line of sight communications?
yes, lasers would work — ony problem with laser are that they are so linear / precise i.e. you have to point EXACTLY at the receiver / transmitter to get a signal. just being a couple of mm of would render you signal non-existing…
11 Trackbacks/Pingbacks
[...] is a really simple and dirt cheap wireless system that you can use for your next micro-controller project. its super simple (and CHEAP!). [...]
[...] is a really simple and dirt cheap wireless system that you can use for your next micro-controller project. its super simple (and CHEAP!). [...]
[...] is a really simple and dirt cheap wireless system that you can use for your next micro-controller project. its super simple (and CHEAP!). [...]
[...] you need to send some wireless data from one microcontroller to another have a look at this Cheap Microcontroller IR Data Transmission project for inspiration. It uses an IR LED, a resistor and an optional visible LED for the [...]
[...] you need to send some wireless data from one microcontroller to another have a look at this Cheap Microcontroller IR Data Transmission project for inspiration. It uses an IR LED, a resistor and an optional visible LED for the [...]
[...] you need to send some wireless documents from one microcontroller to another have a look at that Cheap Microcontroller IR details Transmission project for inspiration. It uses an IR LED, a resistor and an optional visible LED for the [...]
[...] you need to send some wireless data from one microcontroller to another have a look at this Cheap Microcontroller IR Data Transmission project for inspiration. It uses an IR LED, a resistor and an optional visible LED for the [...]
[...] Link Share and Enjoy: [...]
[...] an easy way to transfer data with an infrared LED and an infrared remote control demodulator. The example uses an Arduino, but the technique will work with any [...]
[...] del Video | Mas detalles del Proyecto | Comunicacion con [...]
[...] Arduino minimal infrared serial wireless | http://tthheessiiss.wordpress.com/2009/08/05/dirt-cheap-w... <blockquote> <pre> //dirt cheap wireless TX //generates 38kHz carrier wave on pin 9 and 10 //sends data via TX every 500ms void setup() { pinMode(9, OUTPUT); pinMode(10, OUTPUT); [...]