M5Dial, no wake up with button



  • Please correct me if i am wrong.
    I think that it is not possible to wakeup the M5Dial after you have send it to sleep, using the button. This conclusion is based on this statement :
    On the ESP32, you additionally have the option to wake up on any RTC pin (GPIO0, GPIO2, GPIO4, GPIO12, GPIO13, GPIO14, GPIO15, GPIO25, GPIO26, GPIO27, GPIO32, GPIO39).
    Please tell me i am wrong. Ha ha
    Regards



  • @happyuser This might also be related to your power consumption problem.

    What happens if you press the reset button just before pressing the "start" button?



  • Thank you, to be honest, no idea, but it is not an option. If the M5Dial is build in a dashboard this button is not accessible anymore.
    I also tried
    M5Dial.Power.timerSleep(30);
    M5Dial.Power.powerOff();

    and direct after setup this
    digitalWrite(GPIO_NUM_46,HIGH);

    then the device wakes up after 30 seconds but wont wake up with the button.
    Weird, becuase the product page states :
    Power-on: WAKE up can be started by pressing the "Wake" button and IRQ signal triggered by RTC periodically. After triggering the wake up signal, the hold(G46) pin needs to be set to a high level (1) during program initialization to maintain the power supply, otherwise the device will enter the sleep state again.



  • @happyuser said in M5Dial, no wake up with button:

    Thank you, to be honest, no idea, but it is not an option.

    I understand that it might not be possible to use the reset button in your final solution, but it is still interesting to know for the ongoing troubleshooting....



  • @cognitive5525 You are right. Just tried it. Still no wake up.
    Maybe i could get the touch screen to work.
    (* I do hope that someone from M5Stack is able to explain what they really mean with :
    Power-on: WAKE up can be started by pressing the "Wake" button and IRQ signal triggered by RTC periodically. After triggering the wake up signal, the hold(G46) pin needs to be set to a high level (1) during program initialization to maintain the power supply, otherwise the device will enter the sleep state again.



  • @happyuser said in M5Dial, no wake up with button:

    digitalWrite(GPIO_NUM_46,HIGH);

    If you have M5.begin(); in your setup it shouldn't be necessary to pull pin 46 high, this should be done by the begin() function.

    Also to wake with the "wake" button you might need to keep it pressed for a short while.



  • @cognitive5525 A long press (up to 25 sec) does not wake up the device.
    Documentation says :After triggering the wake up signal, the hold(G46) pin needs to be set to a high level (1) during program initialization to maintain the power supply
    So, therefor this is what i do :
    pinMode(GPIO_NUM_46, OUTPUT);
    digitalWrite(GPIO_NUM_46,HIGH);

    Maybe this only works when powered by a battery. In our use case it should be powered by an external source connected to the green connector on the back side.

    (* Btw, the button itself works, i have checked that already in another test program *)



  • Hello guys

    from my understanding M5Dial has two sleep modes and a shutdown mode. The sleep modes are ESP32 specific (deep sleep and light sleep). The shutdown mode is done via MOSFET and HOLD GPIO.

    In ESP32 deep or light sleep most of M5Dial is still powered; only ESP32 is actually sleeping. In other words the MOSFET is still on and therefore the wake button (or the RTC interrupt) cannot do anything and has no effect.

    On the other hand when M5Dial is in shutdown mode the MOSFET is off (the only thing still running is the RTC IC). So then either the wake button or the RTC can power the M5Dial back on.

    That said, in my tests I found that M5Dial can only fully shutdown when powered from the battery connector. If it is powered from USB or the green connector my M5Dial doesn't shutdown. (You can see that by the red LED in the back which is still on.)

    BTW: here are my measurements for the two ESP32 sleep modes and shutdown mode when powered via battery connector:
    ESP32 light sleep: ~18 mA / 4.2 V
    ESP32 deep sleep: ~14 mA / 4.2 V
    shutdown mode: ~ 4.8 uA / 4.2 V

    Thanks
    Felix



  • The M5stack way of "sleeping" is not possible if you power via the USB..
    Unless there is a bug in M5Unified library for the M5Dial I'm pretty sure M5.begin will take care of keeping G46 high.



  • @felmue Thank you for your elaborate answer and the supporting experiments that you have done. Am i interpreting your answer correctly that you are also saying that when the device is powered with the green connector you can not wake it up with the button ?



  • @cognitive5525 Correct, all my test are done solely with external power.



  • @felmue said in M5Dial, no wake up with button:

    On the other hand when M5Dial is in shutdown mode the MOSFET is off (the only thing still running is the RTC IC). So then either the wake button or the RTC can power the M5Dial back on.

    Agree!
    This is completely similar to the CoreINK, but as I mentioned in this post: when the board is shut down but the BM8563 RTC is setup to wake it up then this is in "my book" also a kind of sleep mode.



  • @happyuser said in M5Dial, no wake up with button:

    external power.

    External power as-in via the green power terminals?



  • @cognitive5525 Indeed, via the green power terminals.



  • Hello guys

    @Cognitive5525 : everybody can call any of the sleep / shutdown modes as they like. I try to be consistent in writing deep or light sleep when I mean the sleep modes of the ESP32 and shutdown mode when I mean it is done via MOSFET.

    @HappyUser : yes, that is what I am saying. The reason that it cannot be woken up from deep sleep is because the wake button is connected to a non RTC GPIO like you wrote initially. And when powered from the green connector (or USB) M5Dial never fully shuts down (at least in my experiments) and therefore it cannot be powered on by wake button (as it hasn't shutdown in the first place.)

    Note: I haven't fully understood why M5Dial cannot shutdown when powered from the green connector. The schematic suggests it should be possible, but maybe the schematic is wrong?

    BTW: you can also check if M5Dial has fully shutdown by measuring the 5 V output of the both Groove connectors.

    Thanks
    Felix



  • @felmue said in M5Dial, no wake up with button:

    everybody can call any of the sleep / shutdown modes as they like. I try to be consistent in writing deep or light sleep when I mean the sleep modes of the ESP32 and shutdown mode when I mean it is done via MOSFET.

    Agree and I know you are. Unfortunately M5Stack are not very consistent! They call it "sleep" when the board is shut down. Their timerSleep() function is supposed to shut down their boards with BM8563 RTC.

    I also agree the M5Dial should be able to "shutdownsleep" (new term 😜) when powered from the green power terminals (P5 ?).
    However, where does this one lead?
    0_1715802097926_1736d106-893d-4a6a-ab6a-505c7ab873ee-image.png



  • Hello @Cognitive5525

    you are correct, M5Stack is not consistent and the function M5Dial.Power.timerSleep(10);, when followed down the rabbit hole, does all of the above (deep / light sleep or shutdown) depending on the core and possibilities.

    Good find. M5V is the 5V of the M5Stamp. Now we know why M5Dial stays powered on when powered from the green connector. I wonder why M5Stack thought this connection is needed as M5Stamp is already powered through 3.3V. Strange.

    Thanks
    Felix



  • Thank you all for sharing your insights. I hope it offers help to others.

    For us it means back to the drawing board.
    Regards to you all.
    Btw, M5Din meter is also not an option because I recognize the same electronic scheme.



  • Hello guys

    @Cognitive5525 : I think I know the reason for that 5 V connection between M5Stamp and the M5Dial board. It is required for battery charging when powered from USB. But M5Stack probably should have used a diode there to make sure power can only flow from USB to the battery charger, but not the other way round.

    BTW: as an experiment to prove the above I removed the 5 V connection between M5Stamp and M5Dial board and now I can power M5Dial from the green connector and it does a proper shutdown (same as when powered from battery) and can be woken by the wake button.

    Please note: If you go that route yourself, please be aware that I cannot be held responsible for any damage that might occur and you most likely void the warranty of your M5Dial.

    Thanks
    Felix



  • Wow, I take full responsibility for my own. But how did you do that? Please elaborate.
    I assume you removed the 5volt pin of the M5Stamp. ?