Problem with MY_RF24_POWER_PIN



  • I am trying to configure an arduino pro mini/nRF24L01 radio module that will run on 2 AA batteries for at least a few months.
    I think I can do this by using some power saving techniques (removing the LED) and using the sleep() function. However, when I power the nRF24 via pin d2, set MY_RF24_POWER_PIN to 2, and loop between delay(20000) and sleep(20000,true) the voltage on pin d2 does not change--it is constant at 3 volts and the current flow to RAW is a constant about 20 milliamps. Most of the power seems to be needed for the nRF24 module.

    The message I get when sleep() is call is:

    MCO:SLP:MS=20000,SMS=1,I1=255,I2=255,M2=255
    !MCO:SLP:REP

    What am I doing wrong?

    Thank you
    Tom


  • Mod

    Welcome to the forum @Takato-Umeda

    !MCO SLP REP means Sleeping not possible, repeater feature enabled

    Documentation: https://www.mysensors.org/apidocs/group__MySensorsCoregrp.html

    Log parser: https://www.mysensors.org/build/parser



  • @mfalkvidd
    Thank you for pointing to my error.
    Subsequently, I tried again without setting the MY_REPEATER_FEATURE and ran into what seems like a radio communications problem. My program which cycles between a sleep() state and awake state with an interval of 20 seconds works for the one or two cycles, but then seems to get stuck when waking up.
    In this stuck state the LED next to the reset button flashes at ~5hz, and the hardware reset button stops the flashing, but does not reset the program--it returns to the stuck state. Only cycling power to the Arduino resets to program.
    The last radio communication received comes from the presentation() stage.
    The loop() portion starts with a delay(timeMS) instruction where in the original case timeMS=20000. Experimenting with an timeMS<8000 causes no problem; however, for several timeMS >9000 the program gets stuck.

    What is the cause of this behavior?

    Thank you


  • Mod

    @Takato-Umeda if the hardware reset button stops working, the only possible cause is hardware fault. No software can affect the hardware reset.


Log in to reply
 

Suggested Topics

  • 54
  • 186
  • 5
  • 10
  • 1
  • 4
  • 182
  • 10

74
Online

10.5k
Users

10.8k
Topics

110.6k
Posts