Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. GregFordyce
    3. Posts
    G
    • Continue chat with GregFordyce
    • Start new chat with GregFordyce
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by GregFordyce

    • RE: No reset when USB power removed [SOLVED]

      By adding a 1N4148 diode across pins 1 & 8 of the IP5306 the M5Stack is forced to turn on whenever the power is connected to the USB port. Note that if you do this mod it will mean that you won't be able to switch off the M5 whenever power is connected but for my application this doesn't matter. I need the M5 to be on whenever power is connected.

      1N4148 diode

      I've used a PROTO module to house the MAX40200 and connected as per the schematic above. My program sets GPIO2 HIGH in the setup loop and after detecting that power has been removed, and completing required house keeping routines, it will set GPIO2 LOW which switches off the MAX40200 and removes VBAT from VCC_5V.

      posted in M5stack Grey
      G
      GregFordyce
    • RE: GROVE I2C 5V or 3.3V?

      @on4aa said in GROVE I2C 5V or 3.3V?:

      From this discussion, I gather HPWR is meant to be VBUS, the power received directly from the USB port.

      HPWR appears to be an isolated power bus that is not connected to any of the power busses on the M5 Core, but can be used between modules that may require higher voltages.

      posted in FAQS
      G
      GregFordyce
    • RE: No reset when USB power removed [SOLVED]

      I'll try and stick with this profile for all future posts. :-)

      Using the schematic above and this sketch, MAX40200.ino, I am now able to remove the USB cable without resetting the MAX40200.

      The sketch is the digital clock example with 7 lines of code added. The code sets the M5Stack to power off instead of resetting when the USB power is removed, then enables the MAX40200 by setting GPIO2 as an output (HIGH). Then if button A is pressed GPIO2 goes LOW. When GPIO2 is high the MAX40200 acts as a diode and will feed BAT to the 5V pin. This prevents a reset when unplugging the USB cable. Pressing button A drives GPIO2 LOW which switches off the MAX40200. This should prevent excessive battery drain because once battery voltage drops to 3.0 volts the ESP32 is shutdown and that shutdown will also drive GPIO2 LOW.

      The only thing left to do is to configure the M5Stack to turn on when power is connected. Sometimes it does and sometimes it doesn't, I think it has to do with how long it's been off, further investigation is required.

      posted in M5stack Grey
      G
      GregFordyce
    • RE: No reset when USB power removed [SOLVED]

      I seem to have 2 profiles! oops.

      It looks like a MAX40200 will be the answer. It acts as an ideal diode that can also be switched off. I'll order some for testing and report back.

      posted in M5stack Grey
      G
      GregFordyce
    • RE: No reset when USB power removed [SOLVED]

      @macsbug The diode works perfectly to keep the M5 from resetting but it does change some of the behaviour with powering on/off.

      Here's an english translation of the diode solution.

      posted in M5stack Grey
      G
      GregFordyce
    • RE: No reset when USB power removed [SOLVED]

      @world101 Thanks for the reply. I have ordered some 2200uF caps to try. I did try 400uF but that isn't enough to keep the M5 from resetting. The caps might also need a resistor to limit inrush current when powering on as the M5 didn't always start up when power was applied. I'll update next week when I get the caps.

      posted in M5stack Grey
      G
      GregFordyce
    • No reset when USB power removed [SOLVED]

      Hi all,

      When the M5Stack Gray has the power to the USB cable turned off the device resets and then restarts. Is it possible to configure it so that it doesn't reset when the USB cable is removed or power to the cable is switched off? Or maybe there is a hardware limitation that prevents the M5 switching from USB power to battery power without a reset?

      I need the device to stay on for a period, after losing power, to do some house keeping, store values, etc so that when power is restored it can reload the values. I have been looking at the power api but I don't think any of those do what I need.

      Thanks in advance, Greg

      posted in M5stack Grey
      G
      GregFordyce
    • setLowPowerShutdownTime() usage

      I am having trouble using this function. Example code below.

      #include <M5ez.h>
      #include <M5Stack.h>

      void setup() {
      ez.begin();
      M5.Power.begin();
      M5.Power.setLowPowerShutdownTime(ShutdownTime::SHUTDOWN_16S);
      }

      void loop() {
      ez.msgBox("M5ez minimal program", "Hello World !", "Settings");
      ez.settings.menu();
      }

      When I compile I get the error "exit status 1 'ShutdownTime' has not been declared"

      What am I doing wrong?

      What I am trying to do is to have the M5Stack Gray stay on for a short time after the USB is unplugged. At the moment when the USB is unplugged the M5 resets and then restarts.

      posted in Arduino
      G
      GregFordyce
    • Detect when power is removed from M5Stack Gray

      Does M5.Power.isCharging() return true even if the battery is fully charged but power is still connected through USB port?

      I need to save some values and shut down the M5Stack when power is removed from the USB port under both battery charging and battery fully charged conditions.

      Thanks in advance, Greg

      posted in Arduino
      G
      GregFordyce
    • RE: "M5" functions/commands documentation?

      api docs

      The link above is broken, what is the current link to the API docs?

      posted in Arduino
      G
      GregFordyce