<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[M5CoreInk wake up by EXT0 (PIR Hat)]]></title><description><![CDATA[<p dir="auto">I want to wake up an M5CoreInk by EXT0 (PIR Hat).<br />
If I connect USB counting works. If I disconnect the USB cable the display loses its contrast and the software crashes.<br />
I have no idea what's wrong. A program with wakeup by timer works.<br />
The source is saved at <a href="https://github.com/ckuehnel/Arduino2020/tree/master/M5Stack/CoreInk_PIR" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/ckuehnel/Arduino2020/tree/master/M5Stack/CoreInk_PIR</a>.<br />
Any hint is welcome.<br />
best regards, Claus</p>
]]></description><link>https://community.m5stack.com/topic/3720/m5coreink-wake-up-by-ext0-pir-hat</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Mar 2026 03:58:34 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3720.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Nov 2021 17:20:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Thu, 07 Apr 2022 12:31:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5348">@twostick</a><br />
FYI; light sleep current pulled out of the battery depend on the battery voltage:<br />
&lt;2.7V   device wont wake up anymore<br />
2.7V  4.4mA<br />
3.0V  3.9mA<br />
3.7V  3.1mA<br />
4.2V  2.7mA</p>
<p dir="auto">This dependacy is caused by the DC-DC conversion that converts the Lipo voltage first to 5Vdc. (SY7088 chip).<br />
The 5Vdc gets also down converted to 3v3 (SY8089 chip) .</p>
<p dir="auto">According to the datasheet, the ESP itself should only use 0.8mA in light sleep. So 2mA gets waisted.<br />
What a pitty.</p>
<p dir="auto">dd.07-04-22:<br />
The above is not completely true. I'm using the M5GFX lib and when I execute the function display.sleep(); before going to deep sleep (esp_deep_sleep_start();) the sleep current drops to a 1.25mA. Still considerable...</p>
]]></description><link>https://community.m5stack.com/post/16847</link><guid isPermaLink="true">https://community.m5stack.com/post/16847</guid><dc:creator><![CDATA[TwoStick]]></dc:creator><pubDate>Thu, 07 Apr 2022 12:31:53 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Mon, 07 Mar 2022 07:54:01 GMT]]></title><description><![CDATA[<p dir="auto">You need also to  set the POWER_HOLD_PIN to '1' once. So in your setup:<br />
digitalWrite(POWER_HOLD_PIN,1);                           //needed to put the state to 1<br />
gpio_hold_en(GPIO_NUM_12); //needed apparantly to keep the output also in light sleep WTF?</p>
]]></description><link>https://community.m5stack.com/post/16846</link><guid isPermaLink="true">https://community.m5stack.com/post/16846</guid><dc:creator><![CDATA[TwoStick]]></dc:creator><pubDate>Mon, 07 Mar 2022 07:54:01 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Wed, 10 Nov 2021 14:19:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a><br />
It was a good idea to replace the PIR by a wire. I have tried that w/o success.<br />
I have prepared a Vbat measuring to see if battery is ok when USB is disconnected.<br />
The CoreInk had now 3588 loops w/o USB connected. The battery goes from 4.1 V to 3.721 V after all these cycles (one second each). The battery is ok.<br />
Thanks again.<br />
Claus</p>
]]></description><link>https://community.m5stack.com/post/15423</link><guid isPermaLink="true">https://community.m5stack.com/post/15423</guid><dc:creator><![CDATA[ckuehnel]]></dc:creator><pubDate>Wed, 10 Nov 2021 14:19:37 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Tue, 09 Nov 2021 19:24:02 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1445">@ckuehnel</a></p>
<p dir="auto">hmm, that is strange. I've just tried your code with the two additional lines and my M5CoreInk stays in deep sleep just fine. No fading display and counting up when GPIO36 goes high.</p>
<p dir="auto">My guess is that maybe the battery charge in your M5CoreInk is (too) low. Have you fully charged the battery before testing?</p>
<p dir="auto">I don't have the PIR hat so I am only testing with a wire between GPIO36 and GND or 3.3 V. Maybe the PIR hat is using too much power?</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/15416</link><guid isPermaLink="true">https://community.m5stack.com/post/15416</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Tue, 09 Nov 2021 19:24:02 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Tue, 09 Nov 2021 18:17:33 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/4037">@felmue</a> said in <a href="/post/15400">M5CoreInk wake up by EXT0 (PIR Hat)</a>:</p>
<blockquote>
<p dir="auto">gpio_hold_en(GPIO_NUM_12); // POWER_HOLD_PIN<br />
gpio_deep_sleep_hold_en();</p>
</blockquote>
<p dir="auto">Hi Felix</p>
<p dir="auto">This are the last commands in my setup() now - but w/o success:</p>
<pre><code>  esp_sleep_enable_ext0_wakeup(GPIO_NUM_36,1); //1 = High, 0 = Low

  //Go to sleep now
  if (DEBUG) 
  {
    Serial.println("Going to sleep now");
    Serial.flush();
  }
  delay(2000);
  gpio_hold_en(GPIO_NUM_12); // POWER_HOLD_PIN
  gpio_deep_sleep_hold_en();
  esp_deep_sleep_start();
</code></pre>
<p dir="auto"><img src="/assets/uploads/files/1636481731292-20211109_170602-resized.jpg" alt="0_1636481727413_20211109_170602.jpg" class=" img-fluid img-markdown" /><br />
<img src="/assets/uploads/files/1636481742483-20211109_170613-resized.jpg" alt="0_1636481740807_20211109_170613.jpg" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1636481765018-20211109_170626-resized.jpg" alt="0_1636481762005_20211109_170626.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/15413</link><guid isPermaLink="true">https://community.m5stack.com/post/15413</guid><dc:creator><![CDATA[ckuehnel]]></dc:creator><pubDate>Tue, 09 Nov 2021 18:17:33 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Tue, 09 Nov 2021 06:14:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1445">@ckuehnel</a> said in <a href="/post/15397">M5CoreInk wake up by EXT0 (PIR Hat)</a>:</p>
<blockquote>
<p dir="auto">I want to wake up an M5CoreInk by EXT0 (PIR Hat).<br />
If I connect USB counting works. If I disconnect the USB cable the display loses its contrast<br />
Any hint is welcome.<br />
best regards, Claus</p>
</blockquote>
<p dir="auto">The Display loosing contrast is because you need to set the screen HV to true before writing the frame buffer to the screen. In UIFlow there is a block for this but I have no idea about Arduino.<br />
It sounds like the battery has not charged and so by removing the power you are killing the program.</p>
<p dir="auto">As you are using the Arduino, you may want to look into using the ULP to handle the PIR instead of leaving it to the main cores.</p>
]]></description><link>https://community.m5stack.com/post/15405</link><guid isPermaLink="true">https://community.m5stack.com/post/15405</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Tue, 09 Nov 2021 06:14:55 GMT</pubDate></item><item><title><![CDATA[Reply to M5CoreInk wake up by EXT0 (PIR Hat) on Mon, 08 Nov 2021 18:45:27 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/1445">@ckuehnel</a></p>
<p dir="auto">try adding these two lines before going into deep sleep:</p>
<pre><code>  gpio_hold_en(GPIO_NUM_12); // POWER_HOLD_PIN
  gpio_deep_sleep_hold_en();
</code></pre>
<p dir="auto">This should keep the ESP32 powered even when going into deep sleep.</p>
<p dir="auto">Thanks<br />
Felix</p>
]]></description><link>https://community.m5stack.com/post/15400</link><guid isPermaLink="true">https://community.m5stack.com/post/15400</guid><dc:creator><![CDATA[felmue]]></dc:creator><pubDate>Mon, 08 Nov 2021 18:45:27 GMT</pubDate></item></channel></rss>