Introduction: LinkIt ONE RF Communication

Picture of LinkIt ONE RF Communication

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.

Step 1: Supplies

Picture of Supplies

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:

Step 2: Preparing the Transmitter

Picture of Preparing the Transmitter

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.

Step 3: Wiring

Picture of Wiring

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.

Step 4: 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

Step 5: 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.

Step 6: Wrap Up

Picture of Wrap Up

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

Comments

luisss749 (author)2015-11-02

Hi, nice project, i like to get your opinion with a problem related with this tutorial, i'm getting values of 470 mhz in serial monitor in linkit one, what do you think?, a damaged rf module?, this happens regardless the transmitter is on or off.

Aviv Mussali (author)luisss7492015-11-02

Sounds like you see noise that might be due to something else that uses the same frequency. I'd try to see what happens when you transmit constant 1's over the air, and see the signal strength (this is why in this tutorial I have used an analog input for the receiver). I think that by increasing the minimal threshold for receiving you can filter these noises. I chose for this filter 65 (find it in my code), maybe you can use a higher number as a better filter.

Let me know if it works.

About This Instructable

924views

8favorites

License:

More by Aviv Mussali:DIY Laser EngravingThe QuadcopterLinkIt ONE Music Player
Add instructable to: