Wake pro mini when nrf data received....



  • I have read some messages on here, but they are 4 years old now.
    I want to know how to wake a node from sleep whenever a message is received by nrf24. Is it just setting sleep with interrupt and connecting the nrf24 int to one of the int pins on the arduino, or is there more that needs to be done? Can the my_message_buffer function work for a node like this?

    Thanks.


  • Mod

    @skywatch the nrf24 will consume 8.9mA in receive mode, so sleeping the pro mini (which consumes 3.58mA when active) will not result in significant power savings. To my knowledge, that's the reason why there is no easy way to do what you ask in MySensors.



  • OK thanks, I wanted to sleep that nodeto save on energy use.

    It's just that I have a 4 relay node that gets only a few messages to turn on or off each day - so would have been kinder to the planet if I could sleep it between messages and only wake it when it gets a message to change state of a relay....Is this not possible at the moment?

    No big deal if not possible - just thought I'd ask! 😉

    Thanks for reply! 🙂


  • Mod

    @skywatch sleeping the nrf24 is not possible if you want to receive incoming messages. It needs to be in receive mode to receive messages.



  • @mfalkvidd

    Yep, pretty obvious when you think about it ....... TsM



  • @skywatch If it's acceptable for the relay to not react immediately on request from your controller, then you could queue the request at the server end and wait for the relay node to wake up and check in. For example, a system opening the blinds when the sun comes up wouldn't care if it was exactly at a given moment. If a delay of up to 10 minutes is acceptable, this could be quite a bit of battery savings but even 1 minute would probably save some battery.

    You could also just keep transmitting until there is an ack (be sure to comply with your local version of the FCC for transmission time limits.)

    Unfortunately, holding most relays closed takes a whole lot of power and toggle type relays are quite expensive. An SSR might significantly reduce this but would still require some power to hold the SSR and some circuitry to latch it while the node is sleeping.

    All of this might take a bit of a smarter home automation controller or some separate glue code between the controller and MySensors. (I use Node Red which could do this easily.)



  • @chisight

    Thanks for the idea, I'll keep it in mind but for this project some of the relays will be controlling lights etc, so minimum delay is desireable.

    Thanks.


 

391
Online

7.6k
Users

8.5k
Topics

91.3k
Posts