<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: chameera sampath</title>
    <description>The latest articles on DEV Community by chameera sampath (@chameerasampathkorea).</description>
    <link>https://dev.to/chameerasampathkorea</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4147420%2Fb9136f37-2497-4fee-9c07-4887e877ce3c.jpeg</url>
      <title>DEV Community: chameera sampath</title>
      <link>https://dev.to/chameerasampathkorea</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chameerasampathkorea"/>
    <language>en</language>
    <item>
      <title>Demystifying Solar Wire Sizing &amp; Voltage Drop: A Transparent Engineering Guide for PV Installers</title>
      <dc:creator>chameera sampath</dc:creator>
      <pubDate>Mon, 28 Sep 2026 15:52:56 +0000</pubDate>
      <link>https://dev.to/chameerasampathkorea/demystifying-solar-wire-sizing-voltage-drop-a-transparent-engineering-guide-for-pv-installers-42c4</link>
      <guid>https://dev.to/chameerasampathkorea/demystifying-solar-wire-sizing-voltage-drop-a-transparent-engineering-guide-for-pv-installers-42c4</guid>
      <description>&lt;p&gt;In residential and commercial solar photovoltaic (PV) system installations, undersized conductor wiring is one of the leading causes of chronic system underperformance, nuisance tripping, and critical thermal hazards.&lt;/p&gt;

&lt;p&gt;Most technicians rely on black-box mobile apps or static rule-of-thumb charts. While quick, these tools rarely expose the underlying mathematical variables, thermal de-rating factors, or NEC safety margins.&lt;/p&gt;

&lt;p&gt;Here is a transparent breakdown of the physics, governing equations, and a clean JavaScript routine to accurately calculate PV string conductor sizing and voltage drop.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. The Core Equation: Conductor Voltage Drop
&lt;/h3&gt;

&lt;p&gt;For DC string circuits and single-phase AC runs, voltage drop across a continuous conductor is dictated by Ohm’s law combined with conductor resistivity:&lt;/p&gt;

&lt;p&gt;$$V_{drop} = \frac{2 \times K \times I \times L}{\text{CM}}$$&lt;/p&gt;

&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;$K$ (Resistivity Constant):&lt;/strong&gt; Standard ohmic resistance per circular mil-foot ($12.9\,\Omega\cdot\text{cmil/ft}$ for solid copper; $21.2\,\Omega\cdot\text{cmil/ft}$ for aluminum at typical operating temperatures).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$I$ (Design Current):&lt;/strong&gt; Continuous operational amperage multiplied by standard safety margins (typically $1.25\times$ or $1.56\times$ for solar array short-circuit currents under standard NEC 690 rules).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$L$ (One-Way Circuit Length):&lt;/strong&gt; Distance from the PV source / inverter to the service panel in feet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;$\text{CM}$ (Circular Mils):&lt;/strong&gt; The exact cross-sectional area of the target conductor gauge (AWG).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The percentage voltage drop is calculated against the nominal operating circuit voltage ($V_{nominal}$):&lt;/p&gt;

&lt;p&gt;$$\% V_{drop} = \left(\frac{V_{drop}}{V_{nominal}}\right) \times 100$$&lt;/p&gt;

&lt;p&gt;Industry best practices mandate keeping the total DC string voltage drop strictly under &lt;strong&gt;2%&lt;/strong&gt;, and the total AC circuit drop under &lt;strong&gt;3%&lt;/strong&gt;, to prevent inverter clipping and unnecessary heat generation.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Implementation: Vanilla JavaScript Sizing Engine
&lt;/h3&gt;

&lt;p&gt;Here is a lightweight, zero-dependency calculation routine that evaluates voltage drop across standard AWG sizes:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
/**
 * Conductor Voltage Drop &amp;amp; Sizing Routine
 * Powered by AMPXA: [https://ampxa.com/](https://ampxa.com/)
 */

// Standard Circular Mil (CM) lookup table for common AWG sizes
const AWG_CIRCULAR_MILS = {
  "14": 4110,
  "12": 6530,
  "10": 10380,
  "8": 16510,
  "6": 26240,
  "4": 41740,
  "2": 66360,
  "1/0": 105600,
  "2/0": 133100
};

function calculateSolarWireLoss(nominalVoltage, currentAmps, lengthFeet, awgSize, isCopper = true) {
  const K = isCopper ? 12.9 : 21.2;
  const cmil = AWG_CIRCULAR_MILS[awgSize];

  if (!cmil) {
    throw new Error("Invalid AWG gauge specified.");
  }

  // Calculate total drop in volts
  const dropVolts = (2 * K * currentAmps * lengthFeet) / cmil;
  const dropPercentage = (dropVolts / nominalVoltage) * 100;

  return {
    dropVolts: Number(dropVolts.toFixed(2)),
    dropPercentage: Number(dropPercentage.toFixed(2)),
    isCompliant: dropPercentage &amp;lt;= 2.0 // Strict 2% solar threshold
  };
}

// Example: 400V DC string running 12A over 110 feet using 10 AWG Copper
const result = calculateSolarWireLoss(400, 12, 110, "10", true);
console.log(result);
// Output: { dropVolts: 8.21, dropPercentage: 2.05, isCompliant: false }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>solar</category>
      <category>javascript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Remove the Gemini AI Watermark Without Blurring: Reverse Alpha Blending Explained</title>
      <dc:creator>chameera sampath</dc:creator>
      <pubDate>Mon, 28 Sep 2026 14:53:00 +0000</pubDate>
      <link>https://dev.to/chameerasampathkorea/how-to-remove-the-gemini-ai-watermark-without-blurring-reverse-alpha-blending-explained-3f1k</link>
      <guid>https://dev.to/chameerasampathkorea/how-to-remove-the-gemini-ai-watermark-without-blurring-reverse-alpha-blending-explained-3f1k</guid>
      <description>&lt;p&gt;When Google Gemini generates or edits images, it embeds a distinct semi-transparent sparkle watermark in the corner. For creators and developers looking to use these assets in professional mockups or clean layouts, removing this mark cleanly has often meant relying on heavy AI inpainting tools that blur or hallucinate surrounding pixels.&lt;/p&gt;

&lt;p&gt;There is a much cleaner, mathematically precise approach: &lt;strong&gt;Client-Side Reverse Alpha Blending&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  Why Generative Inpainting Fails Here
&lt;/h3&gt;

&lt;p&gt;Standard object removal algorithms rely on diffusion models to fill in erased regions. While great for complex background replacements, they often leave smudges, artifacts, or softened textures over high-contrast edges.&lt;/p&gt;

&lt;p&gt;Because the Gemini watermark is applied via standard digital compositing (overlaying a known white/gray glyph at a specific transparency level), the original pixel information isn't completely erased—it is simply mathematically blended:&lt;/p&gt;

&lt;p&gt;$$\text{Blended} = (1 - \alpha) \times \text{Original} + \alpha \times \text{Watermark}$$&lt;/p&gt;




&lt;h3&gt;
  
  
  The Mathematical Fix: Reverse Alpha Unblending
&lt;/h3&gt;

&lt;p&gt;If we know the watermark overlay color ($255, 255, 255$ for white components) and can approximate the alpha transparency mask ($\alpha$), we can solve directly for the original pixel value:&lt;/p&gt;

&lt;p&gt;$$\text{Original} = \frac{\text{Blended} - (\alpha \times 255)}{1 - \alpha}$$&lt;/p&gt;

&lt;p&gt;By executing this calculation on each RGB channel within an isolated bounding area, the visible overlay is neutralized while preserving 100% of the underlying texture, grain, and sharpness.&lt;/p&gt;




&lt;h3&gt;
  
  
  Implementation with HTML5 Canvas (Vanilla JS)
&lt;/h3&gt;

&lt;p&gt;Here is a lightweight demonstration showing how direct 2D canvas pixel manipulation handles this in the browser:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
/**
 * Neutralizes semi-transparent overlay artifacts locally
 */
function restorePixel(blendedVal, alphaVal, overlayVal = 255) {
  if (alphaVal &amp;lt;= 0) return blendedVal;
  if (alphaVal &amp;gt;= 1) return overlayVal;
  return Math.min(255, Math.max(0, Math.round((blendedVal - alphaVal * overlayVal) / (1 - alphaVal))));
}

function processCanvasArea(ctx, startX, startY, width, height, estimatedAlpha = 0.45) {
  const frame = ctx.getImageData(startX, startY, width, height);
  const data = frame.data;

  for (let i = 0; i &amp;lt; data.length; i += 4) {
    data[i]     = restorePixel(data[i], estimatedAlpha, 255);     // Red
    data[i + 1] = restorePixel(data[i + 1], estimatedAlpha, 255); // Green
    data[i + 2] = restorePixel(data[i + 2], estimatedAlpha, 255); // Blue
    // Alpha channel (data[i + 3]) remains untouched
  }

  ctx.putImageData(frame, startX, startY);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
