<?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[m5stack tough for power monitoring suggestion]]></title><description><![CDATA[<p dir="auto">Hi</p>
<p dir="auto">I'm looking to monitor amp and voltage usage on a wire with a clamp type transformer sensor and M5stack tough device. I</p>
<p dir="auto">I have been trying to use SCT-013 20AMP/1V clamp sensor without any success. The configuration of the sensor is as per the attached figure <img src="/assets/uploads/files/1743969824932-sct013-wiring.jpg" alt="sct013 wiring.jpg" class=" img-fluid img-markdown" />  connecting it to the adc 36 pin and 3.3v supply and ground pins.</p>
<p dir="auto">But not having much of a luck.</p>
<p dir="auto">Is there any suggestion on the most cost effective and reliable method of monitoring 20 amps of power on a wire with minimal infrastructure, non invasive connection, using M5 stack tough device. I need specific suggestion on the use of clamp type sensor, code and wiring arrangements.</p>
<p dir="auto">Thanks</p>
]]></description><link>https://community.m5stack.com/topic/7478/m5stack-tough-for-power-monitoring-suggestion</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Apr 2026 13:52:51 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/7478.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 06 Apr 2025 20:07:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Tue, 22 Apr 2025 07:39:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/168358">@aiconnection</a> your initial post states  " connecting it to the adc 36"  then in the code posted later : "ADC_PIN = 35"</p>
]]></description><link>https://community.m5stack.com/post/28939</link><guid isPermaLink="true">https://community.m5stack.com/post/28939</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Tue, 22 Apr 2025 07:39:47 GMT</pubDate></item><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Sat, 19 Apr 2025 14:47:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5596">@robski</a> good morning..any idea on the code please</p>
]]></description><link>https://community.m5stack.com/post/28933</link><guid isPermaLink="true">https://community.m5stack.com/post/28933</guid><dc:creator><![CDATA[aiconnection]]></dc:creator><pubDate>Sat, 19 Apr 2025 14:47:43 GMT</pubDate></item><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Mon, 07 Apr 2025 15:53:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/168358">@aiconnection</a><br />
import M5<br />
from M5 import *<br />
from machine import ADC, Pin<br />
import time</p>
<p dir="auto">ADC_PIN = 35</p>
<p dir="auto">label_raw = None</p>
<p dir="auto">def setup():<br />
"""Initialize the system."""<br />
global label_raw<br />
try:<br />
log("INFO", "Initializing system")<br />
M5.begin()<br />
Widgets.fillScreen(0xffffff)  # White background</p>
<pre><code>    label_raw = Widgets.Label("Raw ADC:", 5, 40, 1.0, 0x000000, 0xffffff, Widgets.FONTS.DejaVu18)


    adc = ADC(Pin(ADC_PIN))
    adc.atten(ADC.ATTN_11DB)  # Set ADC range to 0-3.3V
    adc.width(ADC.WIDTH_12BIT)  # Set 12-bit resolution

    log("INFO", "System initialized successfully")
    return adc
except Exception as e:
    log("ERROR", f"Setup failed: {str(e)}")
    time.sleep(5)
    reset()
</code></pre>
<p dir="auto">def log(level, message):<br />
"""Log messages with a timestamp."""<br />
ts = time.localtime()<br />
print(f"[{level}][{ts[3]:02d}:{ts[4]:02d}:{ts[5]:02d}] {message}")</p>
<p dir="auto">def loop(adc):<br />
"""Main loop to read and display raw ADC values."""<br />
try:<br />
while True:<br />
# Read raw ADC value<br />
raw_value = adc.read()</p>
<pre><code>        # Update display
        label_raw.setText(f"Raw ADC: {raw_value}")

        # Log raw value
        log("DEBUG", f"Raw ADC: {raw_value}")

        # Wait before next reading
        time.sleep(5)
except Exception as e:
    log("ERROR", f"Loop error: {str(e)}")
    time.sleep(5)
    reset()
</code></pre>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
try:<br />
# Initialize system and ADC<br />
adc = setup()</p>
<pre><code>    # Start the main loop
    loop(adc)
except Exception as e:
    log("ERROR", f"Fatal error: {str(e)}")
    time.sleep(5)
    reset()
</code></pre>
]]></description><link>https://community.m5stack.com/post/28831</link><guid isPermaLink="true">https://community.m5stack.com/post/28831</guid><dc:creator><![CDATA[aiconnection]]></dc:creator><pubDate>Mon, 07 Apr 2025 15:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Mon, 07 Apr 2025 14:43:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/168358">@aiconnection</a> what is your code that doesn't work?</p>
]]></description><link>https://community.m5stack.com/post/28830</link><guid isPermaLink="true">https://community.m5stack.com/post/28830</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Mon, 07 Apr 2025 14:43:59 GMT</pubDate></item><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Mon, 07 Apr 2025 14:31:43 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/5596">@robski</a> hi I have 20amp, 110v, 60hz load</p>
]]></description><link>https://community.m5stack.com/post/28829</link><guid isPermaLink="true">https://community.m5stack.com/post/28829</guid><dc:creator><![CDATA[aiconnection]]></dc:creator><pubDate>Mon, 07 Apr 2025 14:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to m5stack tough for power monitoring suggestion on Mon, 07 Apr 2025 07:01:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://community.m5stack.com/uid/168358">@aiconnection</a></p>
<p dir="auto">what type of load are you monitoring?</p>
]]></description><link>https://community.m5stack.com/post/28826</link><guid isPermaLink="true">https://community.m5stack.com/post/28826</guid><dc:creator><![CDATA[robski]]></dc:creator><pubDate>Mon, 07 Apr 2025 07:01:51 GMT</pubDate></item></channel></rss>