#Guide, how to increase the range of nRF24L01 radio modules of MySensors v2 projects (hardware, configuration)

Table of Contents

Simple appearance on paper (the screen!), the realization of an object connected with nRF24L01 radio module can quickly be complicated to the point if we want to pass data long distance (several tens of meter, see hundreds). After spending many hours testing different materials to find the right settings, I propose this article that summarizes a few tips for a successful project MySensors-nRF24L01 based.

Warning. This article for no claims to meet all configurations. All advice given in this article are from empirical tests carried out with cheap materials from Asia accessible by everyone. The results can vary from one material to another, even if he is from the same manufacturer.

The tutorial for been written with the version 2.0 of the MySensors library, but it should also work with earlier versions (1.4, 1.5…).

Addressed points:

  • Error of transmission (!TSM:failure error)
  • Which nRF24L01+ radio module to choose ?
  • Choose what antenna?
  • Diet controlled 3V3, easier wiring and less (without) parasites
  • Impossible to present a node after a upload
  • Other issues

MySensors : !TSM:FAILURE error

When starting with a MySensors project, can quickly be confronted with many difficult to decipher messages. Here are the most common error message. Everything seems fine with begin

  • TSM: RADIO: OK, the connection of the radio module is correct.
  • TSP:MSG:SEND-255-255-255-255 s = 255, c = 3, t = 7, pt = 0, l = 0, sg = 0, ft = 0, st = bc:, great way to start
  • ! TSM:FPAR:fail, and not
  • ! TSM:failure, everything is floor!
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:

With this type of error, do not on the side of the wiring, this side everything is good. You have to look on the side of the transmission of data that can be affected by several factors:

  • bad power supply. NRF24L01 modules must be supplied with 3, 3V. The quality of the controller built into the Arduino Micro clones can be poor. Not only the power supply is unstable but in addition it can be disruptive. In this case, opt for an adapter. Go to the paragraph “use an adapter with regulated power supply.
  • Supply voltage is too low. This happens often for projects on battery. Increase the number of batteries, or use a more powerful LiPo battery. ‘Use an adapter with regulated power supply’ and mandatory in this case.
  • A poor quality antenna. Antenna 2dBi can give disappointing results. Go to the paragraph ‘what antenna choose’
  • MySensors library version 2 is able to assign an identifier when a new node appears. In practice, this mechanism is still problematic. At the moment, the best solution is to continue to assign its own identifiers. Go to the paragraph “Connection problems after the update of a node”.

Which module nRF24L01 to choose?

antenne nrf24l01 sma 15dbiThe choice of the module will depend on several criteria which the main:

  • Brought desired:
    • Indoors, a few dozen meters
    • Mixed
    • Outdoor. The receiver (the gateway) will be inside the
  • Configuration: in a House, outdoor, mixed
    • Wall: thickness, constitution (reinforced concrete doesn’t really help), number
    • Flat terrain or relief
    • Vegetation, fence
    • Electromagnetic disturbance: transformer, pumps…
  •  Application
    • Statement of data or actuator control simple (relay…). A low data rate will be enough
    • Data Acquisition. Little data but a high frequency.

Whatever the application, the best is to install a antenna high performance (at least 6dBi) on the gateway to ensure best reception of the data. Equipped with a SMA connector, it will replace the 2dBi antenna that team usually cheap Asian modules.

nRF24L01, with antenna engraved on the PCB

Project in interior or short distance (100m in free field).

nRF24L01+PA+LNA, with 2dBi external antenna

This module has an SMA connector for using an external antenna. In general, the modules are delivered with a 2dBi antenna to reach 1000m in free field (really free!). The slightest vegetable greatly diminishes the signal. If the environment is very difficult, consider buying a 6dBi antenna or 15 dBi.

Use an adapter with regulated power supply

adaptateur cablage nRF24L01Whatever the radio module employee nRF24L01 (standard or PA + LNA, long distance), it is preferable to use an adapter. Indeed, these modules includes a (step-down) voltage regulator which allows you to supply the radio in stably 3V3 module. The regulator of food is of better quality than those fitted to the Arduino (or Arduino Micro). If the power supply is unstable or creative disruption, the reception or the transmission of data packets can be severely disrupted.

2pcs Socket Adapter plate Board f 8Pin NRF24L01+ Wireless Transceive​ module 51
RobotDyn® Socket Adapter For NRF24L01 With 3.3V Regulator For Arduino
CHF 5.87
2Pcs Socket Adapter Plate For 8Pin NRF24L01+ Wireless Module
CHF 6.84
5Pcs Socket Adapter Module Board For 8 Pin NRF24L01+ Wireless Transceiver
CHF 8.80
10Pcs RobotDyn® Socket Adapter For NRF24L01 With 3.3V Regulator For Arduino
CHF 13.70

nrf24l01 adpater plate

Which antenna to choose?

Hard to tell if any particular module radio (from Asia) will work. It is unclear by which they are made. Standard modules without external connector nRF24L01 work very well in general. These are rather the nRF24L01 + PA + LNA (long distance) modules which can be a problem, or the less the more often the antenna that does not give full satisfaction. In this case you can replace it with a higher power antenna. Already obtained excellent results with an antenna 6dBi (in indoor, outdoor, mixed).

2-3 dBi 6 dBi, 75Ω, 28cm antenna, 1.5 m cable 15 dBi
Uncertain results Advised Not yet tested
antenne nrf24l01 sma 2dbi antenne nrf24l01 sma 15dbi antenne nrf24l01 sma 15dbi

6dBi Replacement Antenna

15dBi Replacement Antenna

-31% 1PC Router Antenna 6DBI Dual Band 2.4GHz 5GHz 5.8GHz For ASUS WiFi...
$0.54 $0.79
Buy this item
aliexpress.com AliExpress
-31% 2.4G Antennas 15dbi Wireless RP-SMA Connector wifi antenna Booster High Gain Amplifier...
$2.71 $3.93
Buy this item
aliexpress.com AliExpress
-31% 22 cm 18dBi 2.4Ghz WiFi Antenna SMA Male Plug Signal Booster Wireless...
$2.71 $3.98
Buy this item
aliexpress.com AliExpress
-9% 2.4G 18dBi Aerial Wireless WIFI Antenna Booster Omni-Directional Antena RP-SMA For Linksys...
$3.99 $4.39
Buy this item
aliexpress.com AliExpress

Problems connecting after updating a node

Connection problems may occur after an update of the Arduino code. Here are some track to solve:

  • Assign an identifier to each node . Theoretically version 2 incorporates a system of automatic assignment of ID but in many cases, the allocation is very long or does not work. For the moment, I you Council therefore to attribute to each node a ID by adding this line at the beginning of the code (before the setup)
 #define MY_NODE_ID xx
  • If the problem persists, erase EEPROM in which MySensors stores internal variables. The program is located in the examples
  • Change antenna . The quality of the antennas of the cheap modules seems very variable. Replace the antenna can solve the problem.

Other questions

Can you mix short antennae and long distances?

YES, it works very well. Use instead an external (of at least 6 dBi) antenna for the gateway.

Battery operation, choose what power?

Depends on the used Arduino. If it runs from 3.3V, you can use 2 or 3 batteries AA (or AAA). In this case please use an adapter to not to exceed 3.3V and get a power supply. If the power is too low, you will have cuts of transmission or message! Dreaded TSM:failure! In this case choose a more powerful LiPo battery for example.

Click to rate this post!
[Total: 0 Average: 0]

Thanks for your reading

Did you like this project ? Don't miss any more projects by subscribing to our weekly newsletter!

Are you having a problem with this topic?

Maybe someone has already found the solution, visit the forum before asking your question
We will be happy to hear your thoughts

Leave a Reply

Read more
DIY Projects
DIY Projects