<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Vibe Coding Fun Series on VibeRX360 Fun - Building Cool Stuff with AI</title>
    <link>https://viberx360.com/blog/en/tags/vibe-coding-fun-series/</link>
    <description>Recent content in Vibe Coding Fun Series on VibeRX360 Fun - Building Cool Stuff with AI</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 07 Nov 2025 18:56:18 +0800</lastBuildDate><atom:link href="https://viberx360.com/blog/en/tags/vibe-coding-fun-series/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Coffee Shop Battery Detective: A Weekend Vibe Coding Story</title>
      <link>https://viberx360.com/blog/en/lifestyle/coffee-shop-battery-detective-a-weekend-vibe-coding-story/</link>
      <pubDate>Fri, 07 Nov 2025 18:56:18 +0800</pubDate>
      
      <guid>https://viberx360.com/blog/en/lifestyle/coffee-shop-battery-detective-a-weekend-vibe-coding-story/</guid>
      <description>One weekend, one pocket computer, one cup of coffee - solving a 4G crash issue that plagued the community for months. This is the magic of Vibe Coding.</description>
      <content:encoded><![CDATA[<h2 id="from-it-crashed-again-to-i-know-why">From &ldquo;It Crashed Again&rdquo; to &ldquo;I Know Why&rdquo;</h2>
<p>Ever had that experience? Your device has an annoying problem, forum discussions go in circles, but nobody really knows the answer. You think: &ldquo;Can I figure this out myself?&rdquo;</p>
<p>This is my story with the <a href="https://www.clockworkpi.com/uconsole">ClockworkPi uConsole</a>. A pocket-sized Linux computer, clamshell form factor, mechanical keyboard, fits in your backpack - a hacker&rsquo;s dream. But it had a critical problem:</p>
<p><strong>Enable 4G module + battery power = random system freeze</strong></p>
<p>The only fix? Remove battery, restart. Repeat.</p>
<h2 id="vibe-coding-begins-coffee-shop--portable-device--curiosity">Vibe Coding Begins: Coffee Shop + Portable Device + Curiosity</h2>
<p>One weekend afternoon, sitting in a coffee shop, staring at my crashed uConsole again, I had a thought:</p>
<blockquote>
<p>What if I build the diagnostic tools directly on this device? No waiting to get home, no desktop workstation - just here, using the device experiencing the problem to solve its own problem.</p>
</blockquote>
<p>Sounds a bit crazy, but also fun. So I started.</p>
<img src="/images/lifestyle/vibe-coding-battery-adventure/uconsole-debugging-4g.jpg" alt="Debugging the 4G modem issue on uConsole itself" />
<p><em>Building the solution on the device experiencing the problem - true vibe coding in action</em></p>
<h3 id="the-toolkit-was-simple">The Toolkit Was Simple</h3>
<ul>
<li><strong>The uConsole itself</strong> (on battery power, running Ubuntu)</li>
<li><strong>Claude Code</strong> (AI-assisted development, letting me focus on problem-solving instead of syntax details)</li>
<li><strong>Next.js + TypeScript</strong> (rapid prototyping, hot reload, instant feedback)</li>
<li><strong>A cup of coffee</strong> (essential!)</li>
</ul>
<p>No complex lab equipment. No expensive oscilloscope. Just these.</p>
<h2 id="the-joy-of-building-real-time-monitoring--problem-discovery">The Joy of Building: Real-time Monitoring → Problem Discovery</h2>
<p>Step one: I need to see what&rsquo;s actually happening to the battery.</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl"><span class="c1"># Start dev server</span>
</span></span><span class="line"><span class="cl">npm run dev
</span></span></code></pre></td></tr></table>
</div>
</div><p>Minutes later, a simple web interface appeared:</p>
<ul>
<li>Real-time voltage</li>
<li>Real-time current</li>
<li>Real-time power</li>
<li>Real-time battery percentage</li>
</ul>
<p>Live-updating charts dancing in the browser. I enable the 4G module, watch the screen&hellip;</p>
<p><strong>Voltage dropped!</strong> From 3.7V straight down below 3.4V.</p>
<p>&ldquo;Wait, this isn&rsquo;t a power issue, it&rsquo;s a <strong>voltage</strong> issue!&rdquo;</p>
<h2 id="following-the-trail-datasheets-dont-lie">Following the Trail: Datasheets Don&rsquo;t Lie</h2>
<p>After some searching, I found the SIM7600G-H 4G module specs:</p>
<ul>
<li>Operating voltage range: 3.4V ~ 4.2V</li>
<li><strong>Minimum safe voltage: ~3.45V</strong></li>
<li>Peak current: up to 2A during transmission</li>
</ul>
<p>The mystery solved:</p>
<ol>
<li>4G module suddenly draws 2A current</li>
<li>Battery internal resistance causes voltage to sag instantly</li>
<li>Voltage drops below 3.45V → module brownout</li>
<li>USB bus hangs → system freeze</li>
<li>Only battery removal resets it</li>
</ol>
<p><strong>Key insight:</strong> It&rsquo;s not about battery capacity, it&rsquo;s about voltage dropping too fast.</p>
<h2 id="the-deeper-discovery-half-your-battery-is-unusable">The Deeper Discovery: Half Your Battery Is Unusable</h2>
<p>I dug deeper, running a complete discharge test:</p>
<ul>
<li>From 100% to nearly 0%</li>
<li>Recording voltage, current, energy every second</li>
<li>Total of 4,318 data points over 2 hours 48 minutes</li>
</ul>
<p>Then I plotted: <strong>Energy Output vs Voltage</strong>, with a red line at 3.45V.</p>
<img src="/images/lifestyle/vibe-coding-battery-adventure/feb4000-energy-output-with-threshold.jpg" alt="Battery Energy Output vs Voltage with 3.45V Threshold" />
<p><em>The red line shows the 4G module&rsquo;s minimum voltage. Everything to the right is unusable for 4G connectivity.</em></p>
<p>The shocking result:</p>
<ul>
<li>Total battery capacity: 24.79 Wh</li>
<li><strong>Usable above 3.45V</strong>: 13.39 Wh (54%)</li>
<li><strong>Unusable below 3.45V</strong>: 11.40 Wh (46%)</li>
</ul>
<p>In other words: <strong>For reliable 4G operation, you can only use about half your battery capacity.</strong> The remaining 40-50%? Still there, but useless for 4G.</p>
<h3 id="complete-discharge-data">Complete Discharge Data</h3>
<img src="/images/lifestyle/vibe-coding-battery-adventure/feb4000-battery-percentage.jpg" alt="FEB-4000 Battery Percentage" />
<p><em>Complete discharge curve from 100% to ~2%</em></p>
<img src="/images/lifestyle/vibe-coding-battery-adventure/feb4000-voltage-current.jpg" alt="FEB-4000 Voltage and Current" />
<p><em>Voltage drop and current spike patterns</em></p>
<h2 id="the-solution-smart-power-management">The Solution: Smart Power Management</h2>
<p>With the root cause identified, the fix became obvious:</p>
<p><strong>Reduce current draw → Less voltage sag → Stay above 3.45V</strong></p>
<p>I wrote an automated script:</p>
<ul>
<li>Detect when 4G module is active</li>
<li>Detect when running on battery</li>
<li>If both true: Reduce CPU frequency to 1.8GHz (from 2.4GHz)</li>
<li>Lower power = less current = stable voltage</li>
</ul>
<p>Test results:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">Before: CM5 @ 2.4GHz + 4G + battery = voltage &lt; 3.45V → crash ❌
</span></span><span class="line"><span class="cl">After:  CM5 @ 1.8GHz + 4G + battery = voltage &gt; 3.45V → stable ✓
</span></span></code></pre></td></tr></table>
</div>
</div><p>Problem solved!</p>
<h2 id="why-this-is-vibe-coding">Why This Is Vibe Coding</h2>
<p>Looking back, what excites me most isn&rsquo;t just solving the problem (though that&rsquo;s great), but <strong>the process itself</strong>:</p>
<h3 id="zero-context-switching">Zero Context Switching</h3>
<ul>
<li>Problem is on this device</li>
<li>Solution is built on this device</li>
<li>Testing runs on this device</li>
<li>Everything in one place, one moment</li>
</ul>
<h3 id="instant-feedback">Instant Feedback</h3>
<ul>
<li>Change code → Save → Browser auto-refreshes → See results</li>
<li>From idea to validation in seconds</li>
<li>No compile wait, no deployment steps</li>
</ul>
<h3 id="location-freedom">Location Freedom</h3>
<ul>
<li>Coffee shop</li>
<li>Park bench</li>
<li>On the train</li>
<li>On the couch</li>
</ul>
<p>Anywhere with WiFi and power (or a charged battery), becomes your lab.</p>
<h3 id="ai-assisted-joy">AI-Assisted Joy</h3>
<ul>
<li>Claude Code helps scaffold quickly</li>
<li>No wrestling with syntax details</li>
<li>Focus on the problem essence</li>
<li>Faster iterations, more experimentation</li>
</ul>
<h2 id="this-isnt-just-for-programmers">This Isn&rsquo;t Just for Programmers</h2>
<p>Ten years ago, solving this would require:</p>
<ul>
<li>An engineering lab</li>
<li>Thousands of dollars in test equipment</li>
<li>Cross-compilation toolchains</li>
<li>Days of setup time</li>
</ul>
<p>Today? A $200 pocket computer and one focused weekend.</p>
<p><strong>This means more people can:</strong></p>
<ul>
<li>Tinker with battery-powered projects</li>
<li>Debug hardware issues</li>
<li>Test and compare battery performance</li>
<li>Fix device problems on-site</li>
<li>Learn by building, see results immediately</li>
</ul>
<p>The barrier to DIY problem-solving just collapsed.</p>
<h2 id="open-source-try-it-yourself">Open Source, Try It Yourself</h2>
<p>The entire project is open source (GPL v3):</p>
<p><strong>Repository:</strong> <a href="https://hiwifi.denq.us:8418/denq/battery-monitor">battery-monitor</a></p>
<p><strong>Quick Start:</strong></p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span><span class="lnt">5
</span><span class="lnt">6
</span><span class="lnt">7
</span><span class="lnt">8
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">git clone https://hiwifi.denq.us:8418/denq/battery-monitor.git
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> battery-monitor
</span></span><span class="line"><span class="cl">npm install
</span></span><span class="line"><span class="cl">npm run dev  <span class="c1"># Visit http://localhost:3000</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># Install smart power management (optional)</span>
</span></span><span class="line"><span class="cl"><span class="nb">cd</span> scripts
</span></span><span class="line"><span class="cl">sudo ./install-uconsole-power-regulator.sh install
</span></span></code></pre></td></tr></table>
</div>
</div><p><strong>What you get:</strong></p>
<ul>
<li>Real-time battery monitoring dashboard</li>
<li>Voltage/current/power charts</li>
<li>Discharge curve analysis (Energy vs Voltage)</li>
<li>3.45V threshold visualization</li>
<li>Smart power regulator (auto frequency scaling)</li>
<li>Session recording and data export</li>
</ul>
<h2 id="the-joy-of-building">The Joy of Building</h2>
<p>Building the solution on the device experiencing the problem - there&rsquo;s something special about that.</p>
<p>No &ldquo;I&rsquo;ll fix this later.&rdquo; No &ldquo;when I have time.&rdquo; Just now, right here, solving it directly.</p>
<p>The uConsole now runs stably on battery with 4G active. The community understands why some batteries work better. The entire solution was built in one fun weekend.</p>
<p><strong>This is Vibe Coding:</strong></p>
<ul>
<li>With curiosity</li>
<li>When inspiration strikes</li>
<li>Wherever you&rsquo;re comfortable</li>
<li>Using modern tools and AI assistance</li>
<li>Building what you need</li>
</ul>
<p>Not because you must, but because you <strong>can</strong>, because it&rsquo;s <strong>fun</strong>.</p>
<p>The tools exist. The hardware is affordable. AI assistants are ready.</p>
<p>The only question is: Are you ready to start your Vibe Coding journey?</p>
<hr>
<h2 id="community-impact">Community Impact</h2>
<p><strong>Share Your Results:</strong></p>
<ul>
<li>Test your batteries with the discharge curve tool</li>
<li>Share findings in forums</li>
<li>Help build the community battery database</li>
</ul>
<p><strong>Questions? Want to contribute?</strong></p>
<ul>
<li>ClockworkPi Forum: <a href="https://forum.clockworkpi.com/c/uconsole">https://forum.clockworkpi.com/c/uconsole</a></li>
<li>Gitea Issues: <a href="https://hiwifi.denq.us:8418/denq/battery-monitor/issues">https://hiwifi.denq.us:8418/denq/battery-monitor/issues</a></li>
</ul>
<hr>
<p><em>This article is part of the <strong>Vibe Coding Fun Series</strong>, documenting real projects built on portable devices. Follow along to see what happens when development becomes truly mobile.</em></p>
<p><strong>Coming next:</strong> Generating travel posters with AI in five minutes at a coffee shop</p>
<hr>
<p><strong>License:</strong> GPL v3</p>
<p><strong>Project link:</strong> <a href="https://hiwifi.denq.us:8418/denq/battery-monitor">battery-monitor on Gitea</a></p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
