Arduino communication via RF tranceiver

For a project I’m starting I need to setup communication between an Arduino and PC via an RF transceiver. Ideally I would like to be able to transmit a video and data stream simultaneously. The power output of the transmitter should be 1W at least to cover a few km in open terrain. And a single transceiver unit should be be small enough to fit a cylinder of 2inch. Ideally I would like to use standalone components (boards or ICs) that can be embedded in the custom build Arduino that will supply the data stream.

I’ve been looking on the internet but was not able to find something useful so far. Has anyone ever attempted communications over RF with an Arduino and PC over such distances?

Any help appreciated. TIA!

An Arduino does not have the speed or memory capacity to do reasonable sized still images - never mind video.

As far as I know you will need a licence for a 1W transceiver

...R

Thanks for you mail!

The video should not go via the Arduino, I understand that this is beyond its capabilities. The data steam however will come from the Arduino. So some sort of modem interface will be needed for this.

A license is part of the scope :slight_smile:

When you identify a suitable transceiver I may (or may not) be able to help with the code.

Are you planning to use the same transceiver for the Arduino and the video or are you planning to keep them separate?

The HC12 transceivers may be suitable for the Arduino stuff. I don't know if you can connect one directly to a PC or if you would need another Arduino at the PC end to act as a bridge

...R

Hi Robin2,

Thanks again. I immediately checked out the HC-12 and I really think that this might be what I've been looking for. I also found an article that describes the HC-12 and some of the most important AT commands on the internet. HC-12 433MHz wireless serial communication module configuration | QuadMeUp

I immediately ordered two modules and will start testing in the coming days. The article btw also describes that the HC-12 module can be connected via a serial to usb converter. I do have a programmer lying around and will try later to connect one HC-12 directly to a PC.

As for programming the HC-12 modules; my starting point will be the following project: GitHub - lukepereira/arduino-rf: Radiofrequency communication with Arduino Nano and HC-12, written in C. Later I will need to develop a PC application that will allow to interact (send AT commands and read/write communication data) with the HC-12s. If you would like to join, then I can setup a github project so we can work on it together.

Rgds, d

daarie:
If you would like to join, then I can setup a github project so we can work on it together.

Thanks but no-thanks. I will restrict my helping to this Forum.

...R

Sorry for that I misunderstood your previous message (July 1st). If I do stumble onto issues I will post here. Hopefully then you will be able to help or at least hint. Just like you did before. :wink:

So I've started programming the HC-12 units and until now I am not able to setup any communication between two units unfortunately. I am able to connect to the units via AT commands so I know that they work and are connected correctly. For the sender I use:

HC12.println("test123");

For the receiver I use:

if (HC12.available() > 0) {
  Serial.println(HC12.read());
}

The code is available on GitHub: GitHub - daar/HC-12: HC-12 library for Arduino

Any suggestions?

Please post the complete programs here.

...R

Here’s the receive program:

#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial HC12(rxPin, txPin);
long baud = 9600;

void setup() {
  // define pin modes for tx, rx:
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  Serial.begin(baud);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("Serial monitor available... OK");

  Serial.print("Serial link available... ");
  HC12.begin(9600);
  if (HC12.isListening()) {
    Serial.println("OK");
  } else {
    Serial.println("NOK");
  }

  //test HC-12
  Serial.print("HC-12 available... ");
  HC12.write("AT+DEFAULT");
  delay(1000);
  while (HC12.available() > 0) {
    Serial.write(HC12.read());
  }
  Serial.println();
  Serial.println("initialization done.");
}

void loop() {

  //data is waiting in the buffer
  if (HC12.available() > 0) {

    Serial.print(millis());
    Serial.print(" RF: ");
    Serial.println(HC12.read());
  }
}

and the send program:

#include <SoftwareSerial.h>

#define rxPin 2
#define txPin 3

SoftwareSerial HC12(rxPin, txPin); 
long baud = 9600;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);

  // define pin modes for tx, rx:
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);

  Serial.begin(baud);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  Serial.println("Serial monitor available... OK");

  Serial.print("Serial link available... ");
  HC12.begin(9600);
  if (HC12.isListening()) {
    Serial.println("OK");
  } else {
    Serial.println("NOK");
  }

  //test HC-12
  Serial.print("HC-12 available... ");
  HC12.write("AT+DEFAULT");
  delay(1000);
  while (HC12.available() > 0) {
    Serial.write(HC12.read());
  }
  Serial.println();
  Serial.println("initialization done.");
}

boolean state = false;

void loop() {

  digitalWrite(LED_BUILTIN, state);

  HC12.println("test123");
  delay(1000);

  state = not state;
}

I can see several lines in both programs with Serial.print() statements. What output do you actually get from the programs?

And have a look at the examples in Serial Input Basics - simple reliable ways to receive data. If this was my project I would use the 3rd example in both of my Arduinos.

...R

The information I get from the Arduino is:

Serial monitor available... OK
Serial link available... OK
HC-12 available... OK+DEFAULT

initialization done.

Thanks for the hint, I will have a look at the examples.

That suggests that the initialization works properly. I don’t have any HC12 modules so I can’t think of any other things to try.

…R

SOLVED!

I finally found the issue and that was that I grounded the SET pins. All I needed to so was to remove the ground and everything works perfectly!

@Robin2: thank you for your support and for the link to the other examples. I will now improve my two simple test apps and push them to my GitHub repository for posterity.

Good to hear you are making progress.

…R

Hallo, if you are still working on this i have a very nice solution for you, im afraid i cant tell you exactly what i did as it is a company project and i am locked under a conventionality clause but ill point you in the right direction, i design an rf transceiver and it works with the arduino, you can send and receive excessively large streams of data aswel as video. for the arduino i used the mega 2560 as it has all the necessary ports and then i bought the 8.5ghz RX and TX set, they cost R300 for both they are actually very cheap. its actually a vpf module but i modified it to such an extent that it is now a very powerful wireless link capable of very high speeds.
it is the Boscam fpv 5.8ghz rx and tx, its two very small pcb that can fit in anywhere.
receiver is RX5805 and transmitter is TX5813.

i wish i could help more but my company will fire me if i show you how to manipulate it to do what you need it to do.