Best RF module for robust connections between two arduinos

Hi all,

I spent some time on this forum looking for the best way to connect two Arduinos wirelessly.

Here is a simplified schematic of the system :

One Arduino will be used as a remote, and the other as an interface to control motors drives, the range must be about 100m, indoors, with obstacles such as wooden frames and fabrics but no walls. Some safety will be implemented in the code (the motors will stop if the connection to the remote is lost for example), but the project still needs a robust connection to avoid the motors stopping because of a lost connection.

I found the HC-12 module, which seemed to have sufficient range, and easy setup (just sending character via serial !)

I also thought about the Digi XBee® RR Module from sparkfun, with arduino shield, but it seemed a bit too complicated to setup.

Do you have other suggestions ? I saw the MKR family for example, but it didn't seem suited to the project. Budget isn't an issue.

We use hc-12 on a couple of projects and is working reliably.
We use a 'standard' setting of 11dbm as in the same environment there are a few different units ( working on different channels ), and increase it only if necessary ( non standard applications ). Good product, and super simple to setup ( we previusly used a bluetooth module that required a binding between rx and tx ), with simple addressing you can do 1-to-1, 1-to-multi...

1 Like

Thank you for sharing your experience with the module, we might go with that !

Plus, Half Duplex is enough for the project.

I am also interested in this topic. I have two HC-12 devices under test now talking to each other and lighting a led to indicate transmission/receipt and they seem OK, recovering from power cycles at either end etc. I've tested using two of the transmission modes , FU3 and FU1. The concept is that they provide a serial tunnel between two Arduinos so are easy to use. I've not yet verified the power consumption but with a claimed 22uA in sleep mode, should be suitable for long term battery operation in the case that small amounts of data are transmitted at intervals of tens of seconds or more.
However, they do not seem to provide any error checking and automatic retries, such as is provided by the NRF24L01 and others, so you should probably include some sort of check sum with any data sent to be able to recognise any errors in transmission.

1 Like

Hi 6v6gt, thank you for your response.

Indeed, I was worried about error checking and retries. I intend to implement it myself in the code, but as it's a half duplex communication, I'm a bit worried about loosing transmissions during a retry... I'll have to be precise with the timings as I intend to sent a message every 100ms !

Have you noticed changes in performances/stability between these two modes (FU1 and FU3)?
@davidefa @6v6gt What baud rate are you using ? And what distance ? It seems like there's a balance to find between the range you want, and the speed at which you communicate.

I'll come back here to let you know how it goes once we start programming everything. :slightly_smiling_face:

For robust or reliable communications I would suggest the following is needed;

  1. You need to use a send and acknowledge system, so you can be sure sent data has been received.

  2. Data sent should be protected by a data CRC so you don't attempt to act on corrupt or rogue data.

  3. Data sent should be protected by an ID so you can be sure the data being acted on is not from some other source.

  4. The modules should be capable of a longer distance that they will actually be used at, preferably at much greater distances.

  5. You should be able to configure or change the frequency of operation, so as to potentially avoid external interference.

1 Like

Hi srnet,

Thank you very much for your advice, it confirms some things I wanted to implement and adds some I hadn't thought about !

  1. The remote sends a command each 100ms, the motor side will answer with a status update each time. (And a safety timeout will be implemented in case of lost connection)

  2. I intend to use CRC - Arduino Reference

  3. Good idea for the ID, I'll add that to the packet

  4. The HC-12 is supposed to be able to reach 1000m range, and it'll be interfaced with an antenna.

  5. The HC-12 working frequency range starts at 433MHz and ends at 473MHz, I hope it'll be enough !

See jdx-40/41, it are the rf modules , similar to hc-12 in matter of communication range and reliability.
Two modules can be used as transparent serial link. Jdx40is way cheaper than hc-12

Better check the laws/rules for using the 433mHz band in your area. Transmission timing is very limited to how often your device can transmit.

Cheers, I'll look into it !

Great remark ! I checked, and there's only a power limit where I am : 2.5W
Way more than I need.

1 Like

For hc12 I use FU3 ( faster response ) at 57600 baud.
For jdy40 ( never used it ), it is 2.4GHz, max 12dbm, and only pcb antenna ( no external connector )

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.