LinkIt ONE RF Communication

by Aviv Mussali in Circuits > Microcontrollers

1763 Views, 8 Favorites, 0 Comments

LinkIt ONE RF Communication

IMG_2039.JPG

A great push to the home automation field was introduced when you could control your electronics using wireless communication. Bluetooth and wifi are great, but they make things a little bit more complicated.

Sometimes the easiest solution is playing with raw wireless communication. For example this instructable proves the ability to communicate between an Arduino and a MediaTek LinkIt ONE board. The Arduino is connected to a transmitter and sends a 1-second-HIGH-signal every 2 seconds, where the MediaTek LinkIt ONE board, is connected to a receiver, and whenever it receives a HIGH signal, it turns on the LED.

Supplies

IMG_2042.JPG
IMG_2036.JPG

We use the MediaTek Linkit ONE micro controller. This board is equipped with ARMv7, 4GB Ram, bluetooth, GSM, GPRS and Wifi. I was lucky enough to put my hands on this board, and I can't leave it :)

Back to our project, I have used the following things:

Preparing the Transmitter

IMG_2041.JPG
IMG_2040.JPG

For the transmitter to be able communicate with the receiver, we need to build an external antenna. I have found that aluminium foil is good enough for the receiver to be able to receive the communication.

On the transmitter board, you can see a small hole on the upper right corner with the caption ANT, which stands for antenna. Use a foil in order to connect it as an antenna, that touches the inside of the ANT hole.

Wiring

IMG_2037.JPG

Transmitter (Arduino Leonardo):

  • Arduino 5V Vcc connected to Transmitter's Vcc
  • Arduino GND connected to Transmitter's GND.
  • Arduino Digital Pin 4 connected to Transmitter's DATA pin (some versions has ATAD written on them, chinese typo :P)

Receiver (MediaTek LinkIt ONE):

  • LinkIt ONE 5V Vcc connected to Receiver's Vcc.
  • LinkIt ONE GND connected to Receiver's GND.
  • LinkIt ONE Analog Pin A0 connected to Receiver's Data (the pin next to the GND pin).
  • LinkIt ONE Digital Pin 4 connected to the LED's longer leg.
  • LinkIt ONE GND connect to the LED's shorter leg through a resistor.

Coding

Transmitter:

#define TX_PIN 4

void setup() {

pinMode(TX_PIN, OUTPUT);

}

void loop() {

digitalWrite(TX_PIN, HIGH);

delay(1000);

digitalWrite(TX_PIN, LOW);

delay(1000);

}

Code can be found in TX.ino


Receiver:

#define RX_PIN A0
#define LED_PIN 4

void setup() {

Serial.begin(9600);

pinMode(LED_PIN, OUTPUT);

}

void loop() {

long data = analogRead(RX_PIN);

if (data > 65) {

digitalWrite(LED_PIN, HIGH);

} else {

digitalWrite(LED_PIN, LOW);

}

Serial.print("received: "); Serial.println(data);

delay(500);

}

Code can be found in RX.ino

Downloads

MediaTek LinkIt ONE A0 Pin

We have used the A0 Analog pin of the LinkIt board. In order to understand the correct threshold to be used in order to determine a HIGH bit over the air we added a console print, which prints its value. This is also a nice tool to debug your system, and see the signal strength.

Wrap Up

IMG_2038.JPG

Personally, I'm a big fan of the 433MHz module. It's extremely useful for any RF communication that doesn't need the complication and load of wifi or bluetooth.

Hope you enjoyed :)

Aviv Mussali