๐Ÿ’ฌ Connecting the Radio


  • Admin

    This thread contains comments for the article "Connecting the Radio" posted on MySensors.org.



  • If you are powering the device by batteries, I'd suggest to avoid electrolytic decoupling capacitors and go for ceramic or film one since the latter have a smaller leakage current, avoiding battery drain.


  • Hardware Contributor

    Don't forget the antenna if you use a RFM69 or you may damage your device.


  • Hardware Contributor

    @FotoFieber - Good one, I added the warning on the build site.


  • Admin

    Might be good with a antenna wire-cutting guide for different frequencies as well.


  • Hardware Contributor

    @hek - I can look into that.



  • Hi all,

    I'm using the Arduino Micro with al NRF24L01 radio. With the micro it's not posible to use the pin config of the Nano.
    I got it working with the connections below.

    NRF24 > Micro
    Miso > Miso
    Mosi > Mosi
    SCK > SCK
    CSN > Pin D7
    CE > Pin D8

    Thereby I put the code below in my arduino code before de "#include <SPI.h>"

    // Pin Confuguration for Arduino Micro
    #define MY_RF24_CE_PIN 8
    #define MY_RF24_CS_PIN 7

    Maybe this is helpful for some other users.

    Grtz Diver



  • "try adding a decoupling capacitor of 4.7ยต - 47ยตF (the exact size usually doesn't matter)"

    I can use 4.7ยต or 47ยต only ? or a size between 4.7 and 47 ?



  • @carmelo42 Any size between 4.7ยต any 47ยต will be fine.



  • thanks @arraWX ๐Ÿ™‚



  • Can I use a RFM69HCW as radio?



  • Can I use an arduino nano for this? If so, What pins do I use? Also, will I need to change the code?


  • Admin

    @drradkin said:

    Can I use an arduino nano for this? If so, What pins do I use? Also, will I need to change the code?

    Yes you can. Use the same pins for Nano.



  • I used RFM69 with Arduino before and a library where I have to initialize the radio with the frequency (868MHZ in my case) Does the mysensors library work for all frequencies of RFM69 without telling it which frequency to use?


  • Mod

    @gvorster 868 is the default so you don't need to do anything. If you want to change it, add

    #define MY_RFM69_FREQUENCY
    

    before including MySensors.h in your sketch. See https://github.com/mysensors/MySensors/blob/a31eff112e4895198bf6ec385fdeedb2910bb628/MyConfig.h#L588 for valid settings.



  • @mfalkvidd said:

    @gvorster 868 is the default so you don't need to do anything. If you want to change it, add

    #define MY_RFM69_FREQUENCY
    

    Great, thanks!



  • @DiverAlpha said:

    Hi all,

    I'm using the Arduino Micro with al NRF24L01 radio. With the micro it's not posible to use the pin config of the Nano.
    I got it working with the connections below.

    NRF24 > Micro
    Miso > Miso
    Mosi > Mosi
    SCK > SCK
    CSN > Pin D7
    CE > Pin D8

    Thereby I put the code below in my arduino code before de "#include <SPI.h>"

    // Pin Confuguration for Arduino Micro
    #define MY_RF24_CE_PIN 8
    #define MY_RF24_CS_PIN 7

    Maybe this is helpful for some other users.

    Grtz Diver

    @DiverAlpha
    Thanx a lot for commenting with that information. I was having problems with the Arduino Mega. I connected the NRF24L01+ to the appropriate SPI pins on the Mega and then just defined the CE and CS pins in the code an now it works. Thanks again



  • Hi all,

    I tried a lot in the last coup[le of days but I can't get my network up and running...

    I've got a Micro DHT sensor ans a Uno Ethernet Gateway.

    The output of the Gateway:
    0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
    0;255;3;0;9;TSM:INIT
    0;255;3;0;9;TSM:RADIO:OK
    0;255;3;0;9;TSM:GW MODE
    0;255;3;0;9;TSM:READY
    IP: 192.168.5.8

    So I think this is nice but I'm not complete sure.

    The output of the DHT sensor:
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=105)
    TSM:FPAR
    TSP:MSG:SEND 105-105-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 105-105-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 105-105-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSM:FPAR
    TSP:MSG:SEND 105-105-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT

    To me it seems that the sensor cannot get a good connection to the gateway by the RF connection. The physical distance between de two RF modules is about 15 cm and I'm using a 10uF condensator on both of the RF modules.

    Can someone tell me what I'm doing wrong?

    Tnx in advance!


  • Mod

    @DiverAlpha try moving the nodes further apart. It might be counter-intuitive, but many have had problems when nodes are too close.

    Do you get nothing at all in the log of the gateway when the sensor tries to find parent?



  • @mfalkvidd, They are now 2 meters apart from each other but still the same problem. I was thinking in this direction also but because I build those two on the same breadboard, it was a bit difficult to separate them. I now build the sensor on another breadboard and moved is 2 meters away. It can't be any longer because of the length of my USB cables.

    All the logging I got from the gateway is posted in my previous post. So there is nothing about any child in there.


 

Suggested Topics

317
Online

7.5k
Users

8.3k
Topics

89.8k
Posts