RF Nano

Last Updated on 1 April 2022 by Suffocation

Der RF Nano ist ein Replik des Arduino Nano zusätzlich verfügt er noch über einen NRF24L01 Bautstein. Was ihm die RF Kommuninkation ermöglicht.

Caution, there are different versions of this Nano, so it's worth looking closely.

Facts

Das Board sieht wie ein gewöhnlicher Nano aus, wenn da nicht die aufgedampfte Antenne(unten) und ein Micro USB anstatt des Mini-USB Anschlusses wären.

Pinbelegung Nano RF
Nano RF Pinout (Source: from manufacturer, see links below)

Comparison with standard

Die Pinbelegung habe ich mit dem Standard verglichen, diese ist bei mir gleich. (Bitte nochmal überprüfen, da andere Imitate abweichende Pin Belegungen haben könnten).

Pin comparison Standard to Nano RF

NRF Connections

The pin information is taken from the manufacturer's circuit diagram.

ACHTUNG: Die Pins für CE und CSN sind bei mir, im Gegenteil zu den meisten Beispielen im Netz, vertauscht, es soll aber auch RF-Nanos mit richtiger Pinbelegung geben.

DescriptionPin
CE10 (9)
Counter-Strike: Global Offensive9 (10)
SCK13
MOSI4
Miso5
RF Nano – Pin assignment

Areas of application

  • Remote control
  • Sensor node
  • Everything that needs to communicate with each other.

Views

Programming

Libraries

Manufacturer-used library

Meine bewährte Bibliothek hat beim ersten Test nicht funktioneirt, weshab ich erstmal die des Herstellers ausprobiert habe. So konnte ich den Fehler in meinem Programm finden.

https://github.com/joewalnes/arduino-play/tree/master/lib/Mirf

https://github.com/tmrh20/RF24/

Standard RF Library

Here is the standard library that I have already used in other projects.

https://github.com/tmrh20/RF24/

Test programme

Manufacturer's programme

Für den ersten Test verwende ich die Programme des Herstellers. Der Quellcode ist auf Github über den folgenden Link verfügbar:

https://github.com/emakefun/emakefun-nano-plus

Ich habe 2 gleiche Nanos erworben und den einen als Empfänger und den anderen als Sender programmiert. Die Ausgabe ist im folgenden Bild zu sehen.

Konsolenausgabe: links Sender, rechts Empfänger.

Test with RF Library

Here's my test program with the RF library. I've simply copied the library files into the project. Here's the code:

Link to the GitHub directory:

https://github.com/sfambach/arduino/tree/master/variants/NanoRF/RFTest

Konsolenausgabe: links Empfänger, rechts Sender.

Remote control test

Ich habe bereits ein paar Tests mit NRF Chips gemacht. Unteranderem habe ich eine SunFounder Fernbedienung in Betrieb genommen. Diese verwende ich in diesem Sketch als Basis. Die Software ist gleich zu der im gelinkten Projekt, jedoch habe ich für den Empfänger (der auf dem Nano RF ist) den CS auf Pin 10 und den CSN auf Pin 9 eingestellt.

Sunfounder nRF24 Remote Control
Link zum Vorgänger Projekt

The current source code can be downloaded from Github

https://github.com/sfambach/arduino/tree/master/variants/NanoRF/SFRemoteTest

Play the receiver as described above to the Nano RF. Play the transmitter as it is to the remote control.

So sieht die Konsolenausgabe auf dem Empfänger aus.

Problems

Initial communication with RF24 failed

The CE and CSN pins are swapped compared to my other projects. CE is on pin 10 and CSN is on pin 9.

ATTENTION Siegfried reports (see below in the comments) that he has received a Nano with the correct pin assignment, i.e. CSN on 10 and CE on 9!

Windows does not recognise Nano

Maybe install a CH340 USB driver.

https://github.com/emakefun/emakefun-nano-plus/tree/master/RF-Nano/CH340_Driver

Nahe stehende Empfänger verbinden sich nicht

Rachid beschreibt (siehe unten in den Kommetaren), dass er Probleme bei nahe beieinander stehenden Sender und Empfängern hat und die Initialisierung schief läuft. Bei ihm hat geholfen dei Power hoch zu setzten. Bei den diskreten nRF Modulen kann dies zu Problemen mit der Spannungsversorgung führen.

 radio.setPALevel(RF24_PA_LOW);   // set power 
// exchanged for
radio.setPALevel(RF24_PA_MAX); 

Set channel

Jens beschreibt (siehe unten in den Kommetaren), dass es von Vorteil sein kann den Kanal manuell zu setzen. Dieser wird in der begin Methode der RF lib zwar auf 76 gesetzt zur Fehlerbehebung kann dies jedoch eine Lösung sein, diesen in Sender/Empfänger gemeinsam auf einen einen anderen Wert zu setzen.

void setup(){
  ...
  radio.setPALevel(RF24_PA_LOW);
  radio.setChannel(99); // Set channel
  ...
}

Conclusion

Ich bin begeistert, ein Nano mit einem RF Chip, alles was man benötigt um Fergesteuerte bots zu bauen. Hier kann man sich das Verdrahten sparen. Über die Stabilität und das Verhalten im Einsatz kann ich noch nichts berichten. Der erste Test war hierfür zu simpel.

Verwandte Beiträge

Sources

https://github.com/emakefun/emakefun-nano-plus

https://github.com/tmrh20/RF24/

https://github.com/emakefun/emakefun-nano-plus/tree/master/RF-Nano/CH340_Driver

https://github.com/nulllaborg/lgt-rf-nano

DateChangeAuthor
06.08.2019Post createdSuffocation

10 thoughts on “RF Nano

  1. I have two RF-Nano Clones V1229 from AliExpress (supposedly V3.0). You can recognise V1x by the lack of an antenna socket.
    They work with RF24 SendRadio(10,9) using the example scripts from the manufacturer's GitHub repo. https://github.com/emakefun/rf-nano. The set transmission power is irrelevant, at least as long as the nanos are next to each other.

  2. Hello Stefan,

    I received an RF Nano from China today (V3.0) and found that it only works when I specify CE on D9 and CSN on D10 in the program. With the variant mentioned in various datasheets and by you, no transmission is established.

    Greetings Siegfried

  3. Hi Stefan,
    Thanks for the info. I think that in the example with the RF library, the channel should still be set, e.g. after the transmit power:
    ...
    radio.setPALevel(RF24_PA_LOW);
    radio.setChannel(99); // NEW
    ,,,

    Kind regards,
    Jens

    1. Hello Jens,
      Thank you for your suggestion. The channel is set to 76 in the begin method of the RF library. I have nevertheless documented it in the code to fix potential problems.
      Greetings from Hesse
      Stefan

      1. Hello Stefan,
        I was pleased that you replied so quickly. I had problems, probably because I was using the transmitter and receiver independently. However, I had also included the RF24 library via the Arduino library manager.
        Kind regards,
        Jens

  4. Good day,

    I've actually followed everything as described. CE and CSN pins are also correct. The wiring is clean so far. Unfortunately, my output always stops at „SPI settings".
    init rf“ and that's it. Where could my problem lie?

    Thank you very much.

    1. Hello Rachid, I don't know your exact test setup, for example what your counterpart is. But the RF modules, especially the newer ones, are very critical regarding the supply voltage. If that's an option, try connecting the Nano to an external power source.
      You can also play around with the settings. Perhaps swap the PIN for CS and CSN again.
      Hello
      Stefan

      1. Hello Stefan,
        Thank you very much for the quick reply.
        I have now swapped PA_LOW with PA_MAX and then it worked. Sometimes too slow and sometimes just right. But I think it's only because the receiver and transmitter are too close.
        Thank you very much.
        Very good,
        Rachid

        1. Hi Rachid,
          Thank you for your solution. It surprises me that more power and in short distances changes something, I will include it in the troubleshooting.
          Greetings from Hesse
          Stefan

Leave a Reply

Your email address will not be published. Required fields are marked *