Questions about power and repeater



  • Hello,

    After playing a while with mysensors, I'm trying to make some optimizations.
    My first question is, when enable the repeater mode in a node?
    By default, every node in my env has this feature enabled. Then I've configured two variables to send to the gateway/controller the parent node of every node, as well as the distance. Most of the nodes are in the same room. The gateway is in another room.
    Well, I've seen that all nodes are not connected directly to the gateway (node0) but they are connected in a chain! Should be better to enable the repeater mode only on those that are near on the GW and disable this feature to the other? Or it's better to have a node that's acting ONLY as repeater without any sensor and disable the repeater feature everywhere?
    I've placed this option in some nodes:

    #define MY_PARENT_NODE_ID 0
    

    but I've read it's not mandatory, so it could not be used for sure.

    .
    Then...
    I've seen that API2.0 has some problems with the power. Would this directive help? In case, what does it exactly?

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    

    Even adding a capacitor, seems the node needs time to register correctly.
    In case do I need to apply this setting to EVERY node + gateway?

    And what are these for?

    #define RF24_PA_LEVEL_GW RF24_PA_MAX
    #define RF24_DATARATE RF24_250KBPS
    

    Last but not least I've read that in some circumstances if the GW and the node are too near, it gives problems? Why that??

    Sorry for all those questions... Thanks for the help!

    Simon



  • I add some informations on the setup:

    • Every module nrf24l01+ have their one capacitor, around 100u.
    • The gateway has a nrf24l01+pa+lna (mqtt client) and ethernet shield on arduino 2009
    • The gateway is near wifi router (but some nodes are working very well)
    • issues are related on nodes on the same room. On a separate room two nodes are ok. The reason is related to the fact that they are connected in a chain and the last hop before the GW has problems, so all have problems....

    I would like to unterstand better what asked above to better improove.

    Thanks!

    Simon


  • Hardware Contributor

    Hi @xefil. I will try to answer some questions how i see them - but it depends on your setup and other.

    @xefil said:

    when enable the repeater mode in a node?

    Well, first of all not on any battery nodes. Also for me this is trial and error. First i only hade one GW, but when i extended the nodes out in the garden i found they didnt reach so I added a repeater in a strategic location in the house. If you dont define the parent they will find the best way and that could be in a chain. I just add the repeater function in the nodes in the central part of my network.

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define RF24_PA_LEVEL_GW RF24_PA_MAX

    Im not sure if these have changed in 2.0 - im not up to date but...
    This can be changed if you use the nrf24l01+ pa/lna. Most people use this bigger nrf module on the gateway and I use them on some repeaters as well. They will need extra power though so connecting them through a pro mini might not be sufficient.
    Capaciors on the standard nrf24l0+ is the most vital part!

    Here is some good links:
    https://forum.mysensors.org/topic/653/nrf24l01-pa
    https://forum.mysensors.org/topic/1142/nrf24l01-pa-lna
    http://forum.mysensors.org/topic/1877/solved-2-x-nrf24l01-pa-lna-with-rf24_pa_max
    http://forum.mysensors.org/topic/3353/nrf24l01-with-antenna-not-working/2
    http://forum.mysensors.org/topic/3447/nrf24l01-pa-lna

    http://blog.blackoise.de/2016/02/fixing-your-cheap-nrf24l01-palna-module/

    #define RF24_DATARATE RF24_250KBPS

    the nrf24l01+ can send in different datarates, I always use 250 but if you for some reason got hold of a nrf24l01 (without +) this module cant handle 250. This has been covered in the forum as well - search and you will find.

    Last but not least I've read that in some circumstances if the GW and the node are too near, it gives problems? Why that??

    I dont know why - but I see it all the time. I have my gateway in a celler with big walls. Powering a node inside the same room as the gw is impossible - but going outside that room its all right.



  • @sundberg84 thanks for the informations.
    I'll try to DISABLE the repeater feature everywhere expect on those I think are required.
    I've updated the thread the same time with extra informations.
    My gateway is on:

    • arduino 2009 + ethernet shield wiz5100 (MQTTClient)
    • radio NRF24L01+ PA/LNA (only the gateway)
    • powered via USB port from my wifi router 🙂

    All the other nodes have normal NRF24L01+

    Do you suggest to apply those setting ONLY on the gateway?

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define RF24_PA_LEVEL_GW RF24_PA_MAX
    

    What do they do?

    And what about:

    #define RF24_DATARATE RF24_250KBPS
    

    Should I apply it on EVERY node including the GW?
    I don't need speed, but range/stability.

    About the distance, uh, very strange that close gives problems.

    BTW I'll look now your links!

    Thanks!!!

    Simon


  • Admin

    Setting PA level only have an effect on amplified NRFs (if I'e understood it correctly).

    If you're setting a custom data rate, you'll have to do it on all nodes and gateway.

    Nodes to close to each other can sometimes to hear each other. Think of it like someone standing by you SCREAMING directly in your ear.



  • @hek said:

    Setting PA level only have an effect on amplified NRFs (if I'e understood it correctly).

    If you're setting a custom data rate, you'll have to do it on all nodes and gateway.

    Nodes to close to each other can sometimes to hear each other. Think of it like someone standing by you SCREAMING directly in your ear.

    Ok, thanks.
    I've only the GW with the NRF+PA+LNA. Do you suggest any best-practice value for MY_RF24_PA_LEVEL + RF24_PA_LEVEL_GW to add on the GW sketch? (I'm still not understanding what exactly those two settings do)

    And what is the default speed? Suggestions to decrease?

    Thanks!

    Simon


  • Hardware Contributor

    @xefil said:

    • powered via USB port from my wifi router 🙂

    If you ever find it unstable or alof of dropped messages, you might want to change this - as i said, sometimes the amplified radios needs more power than the arduino can give.



  • @sundberg84 @hek ,

    I've improoved the stability a lot with following modifications:

    • I've applied the isolation on the NRF24L01+PA+LNA, moved away from the router and connected the Arduino 2009 with external source (no more power via USB)
    • I've then changed the configuration of my chain sensors. Tracing the exact sequence of all nodes I've noticed that the last hop of all nodes with problems was a node that I'm using to monitor power usage. It reads from analog input via a "current clamp". This is taking a value every second and saves it in an array to make an average of 60 values. It gives not much time to this node to act well as repeater. Disabling the repeater feature the chain has broken and two nodes from the second room are now connected directly.

    So, with those modifications I've seen big improovments.
    I'll take a look in the next days (I'l start for holidays 😉 ) to check if it's stable as well.

    BTW, I'm still confusing on how, when and why use these settings:

    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define RF24_PA_LEVEL_GW RF24_PA_MAX
    

    So, only to improove my knowledges 😉

    Thanks a lot!

    Simon


  • Admin

    @xefil said:

    RF24_PA_LEVEL_GW

    I can't find this define used in the code. Where did you see it?



  • Googling and some posts on the forum as well


  • Admin

    Ok, but it's gone in 2.0.


Log in to reply
 

Suggested Topics

  • 3
  • 2
  • 2
  • 4
  • 2
  • 2

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts