Solar Cable Size Calculator

Solar Cable Size Calculator: Ensure Optimal Performance & Safety :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ccc; –card-background: #fff; –shadow: 0 2px 5px rgba(0,0,0,0.1); } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 1000px; margin: 20px auto; padding: 20px; background-color: var(–card-background); border-radius: 8px; box-shadow: var(–shadow); } header { background-color: var(–primary-color); color: white; padding: 20px 0; text-align: center; margin-bottom: 20px; border-radius: 8px 8px 0 0; } header h1 { margin: 0; font-size: 2.2em; } .sub-heading { font-size: 1.2em; color: #eee; margin-top: 5px; } .calculator-section { margin-bottom: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .calculator-section h2 { color: var(–primary-color); margin-top: 0; text-align: center; margin-bottom: 25px; } .input-group { margin-bottom: 20px; display: flex; flex-direction: column; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input[type="number"], .input-group select { width: 100%; padding: 12px; border: 1px solid var(–border-color); border-radius: 4px; box-sizing: border-box; font-size: 1em; } .input-group input[type="number"]:focus, .input-group select:focus { outline: none; border-color: var(–primary-color); box-shadow: 0 0 0 2px rgba(0, 74, 153, 0.2); } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .error-message { color: #dc3545; font-size: 0.85em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; justify-content: space-between; margin-top: 25px; gap: 10px; } .button-group button { padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; font-weight: bold; transition: background-color 0.3s ease; } .btn-calculate { background-color: var(–primary-color); color: white; flex-grow: 1; } .btn-calculate:hover { background-color: #003366; } .btn-reset { background-color: #6c757d; color: white; } .btn-reset:hover { background-color: #5a6268; } .btn-copy { background-color: #ffc107; color: #212529; } .btn-copy:hover { background-color: #e0a800; } #results-container { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); text-align: center; } #results-container h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; } .result-item { margin-bottom: 15px; font-size: 1.1em; } .result-item strong { color: var(–primary-color); } .primary-result { font-size: 1.8em; font-weight: bold; color: var(–success-color); background-color: #e9f7ef; padding: 15px; border-radius: 5px; margin-bottom: 20px; display: inline-block; min-width: 70%; } .formula-explanation { font-size: 0.9em; color: #555; margin-top: 15px; padding: 10px; background-color: #f0f0f0; border-radius: 4px; text-align: left; } .chart-container { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); text-align: center; } .chart-container h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; } canvas { max-width: 100%; height: auto; } .table-container { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); overflow-x: auto; } .table-container h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; text-align: center; } table { width: 100%; border-collapse: collapse; margin-top: 15px; } th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; } th { background-color: var(–primary-color); color: white; font-weight: bold; } tr:nth-child(even) { background-color: #f2f2f2; } tr:hover { background-color: #e9e9e9; } .article-content { margin-top: 40px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .article-content h2, .article-content h3 { color: var(–primary-color); margin-top: 30px; margin-bottom: 15px; } .article-content h2 { font-size: 1.8em; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } .article-content h3 { font-size: 1.4em; } .article-content p { margin-bottom: 15px; } .article-content ul, .article-content ol { margin-left: 20px; margin-bottom: 15px; } .article-content li { margin-bottom: 8px; } .article-content strong { color: var(–primary-color); } .faq-item { margin-bottom: 15px; padding: 10px; border-left: 3px solid var(–primary-color); background-color: #f0f8ff; border-radius: 4px; } .faq-item strong { display: block; margin-bottom: 5px; color: var(–primary-color); } .internal-links { margin-top: 30px; padding: 25px; border: 1px solid var(–border-color); border-radius: 8px; background-color: var(–card-background); box-shadow: var(–shadow); } .internal-links h3 { color: var(–primary-color); margin-top: 0; margin-bottom: 20px; text-align: center; } .internal-links ul { list-style: none; padding: 0; } .internal-links li { margin-bottom: 10px; } .internal-links a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .internal-links a:hover { text-decoration: underline; } .internal-links span { font-size: 0.9em; color: #555; display: block; margin-top: 3px; } .summary { font-size: 1.1em; color: #555; text-align: center; margin-bottom: 20px; } .tooltip { position: relative; display: inline-block; cursor: help; border-bottom: 1px dotted var(–primary-color); } .tooltip .tooltiptext { visibility: hidden; width: 220px; background-color: #555; color: #fff; text-align: center; border-radius: 6px; padding: 5px 10px; position: absolute; z-index: 1; bottom: 125%; left: 50%; margin-left: -110px; opacity: 0; transition: opacity 0.3s; font-size: 0.85em; line-height: 1.4; } .tooltip .tooltiptext::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #555 transparent transparent transparent; } .tooltip:hover .tooltiptext { visibility: visible; opacity: 1; }

Solar Cable Size Calculator

Determine the optimal cable cross-section for your solar PV system

PV System Cable Sizing

Enter your system parameters to calculate the recommended solar cable size. This calculator considers voltage drop, current carrying capacity, and ambient temperature.

Nominal DC voltage of your solar array (e.g., 600V, 1000V, 1500V).
Maximum expected short-circuit current from your PV array.
One-way length from array to inverter/combiner box.
Copper Aluminum Select the conductor material for resistance calculation.
The expected maximum ambient temperature where the cable is installed.
Recommended maximum voltage drop percentage (e.g., 1-3%).

Calculation Results

Recommended Cable Size:
Required Current Carrying Capacity (Amps): A
Calculated Voltage Drop (V): V
Voltage Drop Percentage: %
Adjusted Current Capacity (Amps): A
Formula Explanation: The calculation involves determining the required current carrying capacity based on system current, then calculating the necessary conductor cross-sectional area (CSA) to keep voltage drop within the specified limit. Ambient temperature adjustments are applied to the cable's current carrying capacity.

Voltage Drop vs. Cable Length

■ Voltage Drop (V) ■ Max Allowable Drop (V)

Standard Cable Sizes & Capacities (Copper Example)

Cable Size (mm²) Resistance (Ω/km) Current Capacity (A) Voltage Drop per 100m (V/100m)

Note: Current capacities are based on standard conditions (e.g., 30°C ambient, single-core in free air). Adjustments for temperature and installation method are critical.

What is Solar Cable Sizing?

Solar cable sizing refers to the critical process of determining the appropriate cross-sectional area (thickness) of the electrical cables used in a photovoltaic (PV) system. These cables connect solar panels to inverters, combiner boxes, and ultimately to the grid or battery storage. Proper sizing is paramount for ensuring the safe, efficient, and reliable operation of the entire solar installation. It directly impacts energy yield, system longevity, and compliance with electrical safety standards.

Who should use it? Anyone involved in designing, installing, or maintaining solar PV systems, including solar installers, electricians, system designers, engineers, and even homeowners who want to understand the technical aspects of their solar investment. Accurate solar cable sizing prevents potential hazards and maximizes the return on investment by minimizing energy losses.

Common misconceptions about solar cable sizing include assuming that any sufficiently thick wire will do, or that standard household wiring practices are directly transferable. In reality, solar DC circuits operate under different conditions (higher voltages, specific temperature ranges, UV exposure) and require specialized, UV-resistant, and often larger gauge cables than AC circuits. Another misconception is that voltage drop is negligible; even small percentages can significantly reduce energy production over the system's lifetime.

Solar Cable Sizing Formula and Mathematical Explanation

The core of solar cable sizing involves balancing two primary concerns: ensuring the cable can safely carry the required current without overheating (current carrying capacity) and minimizing energy loss due to resistance (voltage drop). The process typically follows these steps:

1. Determine Required Current Carrying Capacity (Amps)

The current flowing through the DC side of a solar system is primarily determined by the short-circuit current (Isc) of the solar array, with a safety factor applied. A common safety factor is 1.25, as per electrical codes like the NEC (National Electrical Code).

Required Current Capacity = Isc * 1.25

2. Calculate Maximum Allowable Voltage Drop (Volts)

Electrical standards often recommend a maximum voltage drop percentage for the DC side of a solar system to ensure efficient power delivery. A typical recommendation is 1-3%.

Max Allowable Voltage Drop = System Voltage * (Max Voltage Drop Percentage / 100)

3. Calculate Required Conductor Cross-Sectional Area (CSA) for Voltage Drop

This step uses Ohm's Law (V=IR) and the total cable resistance. The resistance of a cable is proportional to its length and resistivity, and inversely proportional to its cross-sectional area.

Resistance per unit length (R/L) = Resistivity (ρ) / CSA

The total resistance (R_total) for a round trip (array to inverter and back) is:

R_total = 2 * Cable Length * (Resistivity / CSA)

Substituting into Ohm's Law (Voltage Drop = Current * R_total):

Max Allowable Voltage Drop = Required Current Capacity * (2 * Cable Length * Resistivity / CSA)

Rearranging to solve for CSA:

CSA = (2 * Cable Length * Resistivity * Required Current Capacity) / Max Allowable Voltage Drop

4. Adjust Current Carrying Capacity for Ambient Temperature

Cables lose some of their current carrying capacity as ambient temperature increases. This is accounted for using a temperature correction factor (Kc).

Adjusted Current Capacity = Cable's Rated Capacity * Kc

The value of Kc depends on the cable type, installation method, and the difference between the rated temperature (often 75°C or 90°C for PV cables) and the actual ambient temperature. For simplicity in this calculator, we use a standard approximation.

5. Select the Final Cable Size

The selected cable size must satisfy BOTH conditions: its current carrying capacity (adjusted for temperature) must be greater than or equal to the required current capacity, AND its resistance must be low enough to keep the voltage drop within the allowable limit. The calculator selects the smallest standard cable size that meets both criteria.

Variables Table

Variable Meaning Unit Typical Range
Isc Maximum Short Circuit Current Amperes (A) 5 – 20+ A (per string)
System Voltage Nominal DC Voltage of Array Volts (V) 200 – 1500 V
Cable Length One-way length of cable run Meters (m) 1 – 100+ m
Resistivity (ρ) Electrical resistivity of conductor material Ohm-meter (Ω·m) Copper: ~1.72 x 10⁻⁸, Aluminum: ~2.82 x 10⁻⁸
CSA Conductor Cross-Sectional Area Square millimeters (mm²) 4 – 16 mm² (common for residential/commercial PV)
Max Voltage Drop % Maximum allowable voltage loss Percent (%) 1 – 3 %
Ambient Temperature Maximum surrounding air temperature Degrees Celsius (°C) -20 to 50 °C (varies by location)
Kc Temperature Correction Factor Unitless 0.5 – 1.2 (approx.)

Practical Examples (Real-World Use Cases)

Example 1: Standard Residential Rooftop System

A homeowner installs a 5kW solar system. The DC string feeding the inverter has the following characteristics:

  • System Voltage: 450 V
  • Max Short Circuit Current (Isc): 12 A
  • Total Cable Length (one-way): 25 m
  • Cable Material: Copper
  • Ambient Temperature: 35 °C
  • Maximum Allowable Voltage Drop: 2%

Calculation Steps:

  1. Required Current Capacity = 12 A * 1.25 = 15 A
  2. Max Allowable Voltage Drop = 450 V * (2 / 100) = 9 V
  3. Using the calculator, it determines the required CSA based on voltage drop.
  4. Temperature correction factor for 35°C ambient (assuming 90°C rated cable) is approx. 0.91.
  5. The calculator finds the smallest standard copper cable size (e.g., 6 mm²) that meets both the 15A adjusted capacity requirement and the voltage drop limit.

Result Interpretation: The calculator recommends a 6 mm² copper cable. This size ensures that the current is carried safely and the voltage drop is less than 9V (2%), maximizing energy harvest from the panels.

Example 2: Larger Commercial Installation

A commercial building installs a larger PV array with longer cable runs:

  • System Voltage: 1000 V
  • Max Short Circuit Current (Isc): 18 A
  • Total Cable Length (one-way): 80 m
  • Cable Material: Copper
  • Ambient Temperature: 40 °C
  • Maximum Allowable Voltage Drop: 1.5%

Calculation Steps:

  1. Required Current Capacity = 18 A * 1.25 = 22.5 A
  2. Max Allowable Voltage Drop = 1000 V * (1.5 / 100) = 15 V
  3. The calculator computes the necessary CSA. Given the longer length and stricter voltage drop requirement, a larger CSA will be needed compared to Example 1.
  4. Temperature correction factor for 40°C ambient (approx. 0.84).
  5. The calculator identifies the smallest standard copper cable size (e.g., 10 mm² or potentially 16 mm²) that satisfies both current and voltage drop criteria after temperature adjustment.

Result Interpretation: For this larger system, a 10 mm² or 16 mm² copper cable might be recommended. The longer distance and tighter voltage drop limit necessitate a larger conductor to minimize energy losses and ensure system efficiency.

How to Use This Solar Cable Size Calculator

Using our solar cable size calculator is straightforward. Follow these steps to get accurate results:

  1. Gather System Information: Collect the necessary data for your specific PV system. This includes the nominal system voltage (e.g., 600V, 1000V), the maximum short-circuit current (Isc) for the relevant string(s), the total one-way length of the cable run from the panels to the inverter or combiner box, the ambient temperature, and your desired maximum voltage drop percentage.
  2. Select Cable Material: Choose whether your cables are made of copper or aluminum. Copper has lower resistance, generally allowing for smaller cable sizes or lower voltage drop for the same size.
  3. Enter Data: Input the gathered information into the corresponding fields in the calculator. Ensure you use the correct units (Volts, Amps, Meters, °C, %).
  4. Calculate: Click the "Calculate Cable Size" button.
  5. Review Results: The calculator will display the recommended cable size (e.g., in mm²), the required current carrying capacity, the calculated voltage drop in volts and percentage, and the adjusted current capacity considering temperature.
  6. Interpret the Output: The primary result, "Recommended Cable Size," is the most crucial. It indicates the minimum cross-sectional area needed. The intermediate results provide context on voltage drop and current capacity, helping you understand the trade-offs.
  7. Use the Table and Chart: The table provides data on standard cable sizes, their resistance, and typical current capacities. The chart visually represents how voltage drop changes with cable length for your system parameters.
  8. Reset or Copy: Use the "Reset" button to clear the fields and start over. Use the "Copy Results" button to save the key findings for your records or reports.

Decision-Making Guidance: Always choose a cable size that meets or exceeds the recommended size. If you are between standard sizes, it's generally safer and more efficient to opt for the larger size. Consult local electrical codes and the manufacturer's specifications for your solar panels and inverter for any specific requirements.

Key Factors That Affect Solar Cable Size Results

Several factors influence the required solar cable size. Understanding these helps in accurate calculation and system design:

  1. Current (Amperage): Higher current requires a larger cable size to prevent overheating and excessive voltage drop. This is directly related to the solar array's configuration and the number of parallel strings.
  2. Voltage: While higher voltage systems might seem less affected by voltage drop percentage-wise, the actual voltage drop in volts can still be significant. The calculation ensures the absolute voltage drop remains within acceptable limits.
  3. Cable Length: Longer cable runs increase the total resistance, leading to higher voltage drops and requiring larger cable sizes. This is a critical factor, especially for ground-mounted systems or large buildings.
  4. Conductor Material: Copper has lower resistivity than aluminum, meaning it offers less resistance for the same cross-sectional area. This often allows for smaller copper cables compared to aluminum cables for equivalent performance.
  5. Ambient Temperature: Higher ambient temperatures reduce a cable's ability to dissipate heat, thereby decreasing its maximum safe current carrying capacity. This necessitates oversizing the cable or using cables rated for higher temperatures.
  6. Installation Method: How cables are installed (e.g., in conduit, clipped directly, bundled with other cables) affects heat dissipation. Cables bundled together or enclosed in conduit experience higher operating temperatures and have reduced current carrying capacities compared to single cables in free air.
  7. Allowable Voltage Drop: Electrical codes and best practices dictate maximum allowable voltage drop percentages (e.g., 1-3% for DC). Stricter limits require larger cable sizes, especially over long distances.
  8. System Efficiency Goals: While codes provide minimum requirements, aiming for lower voltage drop (e.g., 1% instead of 3%) through slightly larger cables can improve overall system energy yield and long-term performance, especially in high-temperature climates or with long cable runs.

Frequently Asked Questions (FAQ)

Q1: What is the difference between DC and AC cable sizing for solar?

DC cable sizing (between panels and inverter) focuses on high current, potential for higher voltages, and specific DC voltage drop limits. AC cable sizing (between inverter and grid/meter) deals with AC power, different safety factors, and often uses standard AC wiring tables, though voltage drop is still a consideration.

Q2: Can I use standard electrical wire for my solar panels?

No. Solar cables (PV wire) are specifically designed to withstand UV radiation, ozone, moisture, and temperature fluctuations common in outdoor environments. They also have specific insulation ratings suitable for the high DC voltages involved. Always use certified PV wire.

Q3: How does temperature affect solar cable capacity?

Higher temperatures reduce a cable's ability to carry current safely. The insulation material degrades faster, and heat dissipation is less efficient. Correction factors must be applied to the cable's rated capacity based on the expected ambient temperature.

Q4: What happens if my solar cables are too small?

If cables are undersized, they can overheat, posing a fire risk. They also lead to significant voltage drop, reducing the system's power output and efficiency, thus lowering energy generation and financial returns. Undersized cables can also lead to premature failure of components.

Q5: Does the calculator account for voltage drop in the inverter?

This calculator primarily focuses on the voltage drop within the DC cabling from the array to the inverter. Voltage drop within the inverter itself is an internal characteristic of the device and is not typically included in external cable sizing calculations.

Q6: What does "Isc" mean in solar cable sizing?

Isc stands for "Short-Circuit Current." It's the maximum current a solar panel or array can produce under specific test conditions when its positive and negative terminals are shorted together. It's a key parameter for determining the minimum required current carrying capacity of the associated wiring.

Q7: Should I use the 1.25x factor for current calculation?

Yes, the 1.25 multiplier (or higher, depending on specific codes) is a safety factor required by most electrical codes (like NEC 690.8(A)(1)) to account for potential overcurrent conditions and ensure the cable can handle currents exceeding the rated Isc under certain circumstances.

Q8: How do I find the correct "Total Cable Length"?

This is the one-way distance from the solar array (or combiner box) to the point where the DC current is converted or collected (typically the inverter). Measure the actual path the wires will take, not just the straight-line distance, as bends and conduit runs add length.

© 2023 Your Solar Solutions. All rights reserved.

// Constants for material properties and safety factors var COPPER_RESISTIVITY = 1.72e-8; // Ohm-meters at 20°C var ALUMINUM_RESISTIVITY = 2.82e-8; // Ohm-meters at 20°C var STANDARD_TEMP_RATING = 90; // °C for PV wire insulation var CURRENT_SAFETY_FACTOR = 1.25; var COPPER_RESISTANCE_TABLE = [ { size: 4, resistance_ohm_km: 4.61, capacity_a: 30, voltage_drop_v_100m: 0.23 }, { size: 6, resistance_ohm_km: 3.08, capacity_a: 40, voltage_drop_v_100m: 0.15 }, { size: 10, resistance_ohm_km: 1.83, capacity_a: 55, voltage_drop_v_100m: 0.09 }, { size: 16, resistance_ohm_km: 1.15, capacity_a: 75, voltage_drop_v_100m: 0.06 }, { size: 25, resistance_ohm_km: 0.73, capacity_a: 95, voltage_drop_v_100m: 0.04 }, { size: 35, resistance_ohm_km: 0.52, capacity_a: 120, voltage_drop_v_100m: 0.03 } ]; var ALUMINUM_RESISTANCE_TABLE = [ { size: 6, resistance_ohm_km: 3.08, capacity_a: 35, voltage_drop_v_100m: 0.15 }, // Aluminum starts at 6mm2 typically { size: 10, resistance_ohm_km: 1.83, capacity_a: 50, voltage_drop_v_100m: 0.09 }, { size: 16, resistance_ohm_km: 1.15, capacity_a: 65, voltage_drop_v_100m: 0.06 }, { size: 25, resistance_ohm_km: 0.73, capacity_a: 85, voltage_drop_v_100m: 0.04 }, { size: 35, resistance_ohm_km: 0.52, capacity_a: 105, voltage_drop_v_100m: 0.03 }, { size: 50, resistance_ohm_km: 0.37, capacity_a: 130, voltage_drop_v_100m: 0.02 } ]; var chartInstance = null; // To hold the chart instance function getInputValue(id) { var element = document.getElementById(id); if (!element) return null; var value = parseFloat(element.value); return isNaN(value) ? null : value; } function setErrorMessage(id, message) { var errorElement = document.getElementById(id); if (errorElement) { if (message) { errorElement.innerText = message; errorElement.style.display = 'block'; } else { errorElement.innerText = "; errorElement.style.display = 'none'; } } } function validateInput(value, id, min, max, name) { var errorId = id + 'Error'; if (value === null || value === ") { setErrorMessage(errorId, name + ' is required.'); return false; } if (value < 0) { setErrorMessage(errorId, name + ' cannot be negative.'); return false; } if (min !== null && value max) { setErrorMessage(errorId, name + ' must be no more than ' + max + '.'); return false; } setErrorMessage(errorId, "); // Clear error return true; } function calculateSolarCableSize() { // Get input values var systemVoltage = getInputValue('systemVoltage'); var shortCircuitCurrent = getInputValue('shortCircuitCurrent'); var cableLength = getInputValue('cableLength'); var cableMaterial = document.getElementById('cableMaterial').value; var ambientTemperature = getInputValue('ambientTemperature'); var maxVoltageDropPercent = getInputValue('maxVoltageDropPercent'); // Clear previous errors setErrorMessage('systemVoltageError', "); setErrorMessage('shortCircuitCurrentError', "); setErrorMessage('cableLengthError', "); setErrorMessage('ambientTemperatureError', "); setErrorMessage('maxVoltageDropPercentError', "); // Validate inputs var isValid = true; if (!validateInput(systemVoltage, 'systemVoltage', 100, 1500, 'System Voltage')) isValid = false; if (!validateInput(shortCircuitCurrent, 'shortCircuitCurrent', 1, 100, 'Short Circuit Current')) isValid = false; if (!validateInput(cableLength, 'cableLength', 0.1, 500, 'Cable Length')) isValid = false; if (!validateInput(ambientTemperature, 'ambientTemperature', -20, 60, 'Ambient Temperature')) isValid = false; if (!validateInput(maxVoltageDropPercent, 'maxVoltageDropPercent', 0.5, 5, 'Max Voltage Drop')) isValid = false; if (!isValid) { document.getElementById('recommendedCableSize').innerText = 'Error'; document.getElementById('requiredCurrentCapacity').innerText = '–'; document.getElementById('calculatedVoltageDrop').innerText = '–'; document.getElementById('voltageDropPercentage').innerText = '–'; document.getElementById('adjustedCurrentCapacity').innerText = '–'; updateChart([], []); // Clear chart return; } // — Calculations — // 1. Required Current Carrying Capacity (with safety factor) var requiredCurrentCapacity = shortCircuitCurrent * CURRENT_SAFETY_FACTOR; document.getElementById('requiredCurrentCapacity').innerText = requiredCurrentCapacity.toFixed(2); // 2. Maximum Allowable Voltage Drop (in Volts) var maxAllowableVoltageDrop = systemVoltage * (maxVoltageDropPercent / 100); // document.getElementById('maxAllowableVoltageDrop').innerText = maxAllowableVoltageDrop.toFixed(2); // Not displayed directly, used internally // 3. Determine Resistivity based on material var resistivity = (cableMaterial === 'copper') ? COPPER_RESISTIVITY : ALUMINUM_RESISTIVITY; var resistanceTable = (cableMaterial === 'copper') ? COPPER_RESISTANCE_TABLE : ALUMINUM_RESISTANCE_TABLE; // Populate table based on selected material populateCableSizeTable(resistanceTable); // 4. Calculate required CSA for Voltage Drop // CSA = (2 * L * rho * I) / V_drop var requiredCSA_forVD = (2 * cableLength * resistivity * requiredCurrentCapacity) / maxAllowableVoltageDrop; // 5. Temperature Correction Factor (Simplified approximation) // Assumes cable rated for 90°C. Kc decreases as ambient temp increases. // This is a simplified model; actual Kc values depend on specific cable standards and installation. var tempCorrectionFactor = 1.0; if (ambientTemperature > 30) { // Example: For 90°C rated cable, at 40°C ambient, Kc might be ~0.84. At 50°C, ~0.71. // This is a rough approximation. Real values are found in cable datasheets. if (ambientTemperature <= 40) tempCorrectionFactor = 0.91; else if (ambientTemperature <= 50) tempCorrectionFactor = 0.84; else if (ambientTemperature <= 60) tempCorrectionFactor = 0.71; // Add more ranges if needed, or use a formula if available } else if (ambientTemperature < 20) { // If ambient is cooler than standard reference (e.g., 30°C), capacity increases // Simplified: assume capacity is higher, but correction factor is capped at 1.0 for simplicity tempCorrectionFactor = Math.min(1.0, 1.0 + (20 – ambientTemperature) * 0.01); // Slight increase } // Ensure factor is not excessively high or low tempCorrectionFactor = Math.max(0.5, Math.min(1.2, tempCorrectionFactor)); // 6. Find the smallest standard cable size that meets BOTH criteria var recommendedSize = null; var selectedCableData = null; for (var i = 0; i = requiredCurrentCapacity; // Check if cable meets voltage drop requirement // Calculate resistance per meter for this cable size var resistancePerMeter = (cable.resistance_ohm_km / 1000); // Ohm per meter var calculatedVoltageDrop = requiredCurrentCapacity * (2 * cableLength * resistancePerMeter); var calculatedVoltageDropPercent = (calculatedVoltageDrop / systemVoltage) * 100; var meetsVoltageDrop = calculatedVoltageDropPercent maxPoints) { labels.shift(); dataset1.shift(); dataset2.shift(); } chartInstance.update(); } // Initial chart setup document.addEventListener('DOMContentLoaded', function() { initializeChart(); // Trigger initial calculation with default values calculateSolarCableSize(); // Set initial table based on default material var defaultMaterial = document.getElementById('cableMaterial').value; var defaultResistanceTable = (defaultMaterial === 'copper') ? COPPER_RESISTANCE_TABLE : ALUMINUM_RESISTANCE_TABLE; populateCableSizeTable(defaultResistanceTable); }); // Update table when material changes document.getElementById('cableMaterial').addEventListener('change', function() { var selectedMaterial = this.value; var resistanceTable = (selectedMaterial === 'copper') ? COPPER_RESISTANCE_TABLE : ALUMINUM_RESISTANCE_TABLE; populateCableSizeTable(resistanceTable); // Recalculate to update results and chart based on new material properties calculateSolarCableSize(); });

Leave a Comment