Here is an Online Resistor Calculator Cloud App Free Software to Calculate Resistance of the 4 Band Color Coded Registers. It Can Run on OpenStack Based CDN, OpenShift PaaS, Anywhere and on localhost. We found the Javascript on a website with no proper licensing.
This app is required to calculate the resistance of the registers used in electronics work without a multimeter. It is tough work to calculate using the reference table :
Color | Digit value | Multiplier | Multiplied Out | Tolerance |
Black | 0 | 100 | 1 | |
Brown | 1 | 101 | 10 | |
Red | 2 | 102 | 100 | |
Orange | 3 | 103 | 1,000 | |
Yellow | 4 | 104 | 10000 | |
Green | 5 | 105 | 100,000 | |
Blue | 6 | 106 | 1,000,000 | |
Violet | 7 | 107 | 10,000,000 | |
Gray | 8 | 108 | 100,000,000 | |
White | 9 | 109 | 1,000,000,000 | |
Gold | ±5% | |||
Silver | ±10% |
We only released it for educational purpose. You can download and use it with GNU GPL 3.0 License.
---
Online Resistor Calculator Cloud App Free Software
You can see the demo of Online Resistor Calculator running on HP Cloud CDN. Obviously we have a GitHub Repo of this web application. Usage is very easy :
Explaining the Online Resistor Calculator Cloud App
The main Javascript is this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | <script language="JavaScript"> function calcResistance(input) { msv = document.colorSelect.band1.value; lsv = document.colorSelect.band2.value; mult = document.colorSelect.band3.value; tol = document.colorSelect.band4.value; var bgColors = new Array("black", "#583030", "red", "orange", "yellow", "green", "blue", "purple", "gray", "white", "gold", "silver"); var fgColors = new Array("white", "white", "white", "black", "black", "white", "white", "white", "black", "black", "black", "black"); resistText = msv + lsv; for (var i=0; i<mult; i++) { resistText += "0"; } resistText = addCommas(resistText); // Insert commas resistText += " \u2126 \u00B1"; // Add ohm, space, plus/minus sign if (tol == "10") resistText += "5%"; else if (tol == "11") resistText += "10%"; document.colorSelect.band1.style.background = bgColors[parseInt(msv)]; document.colorSelect.band1.style.color = fgColors[parseInt(msv)]; document.colorSelect.band2.style.background = bgColors[parseInt(lsv)]; document.colorSelect.band2.style.color = fgColors[parseInt(lsv)]; document.colorSelect.band3.style.background = bgColors[parseInt(mult)]; document.colorSelect.band3.style.color = fgColors[parseInt(mult)]; document.colorSelect.band4.style.background = bgColors[parseInt(tol)]; document.colorSelect.band4.style.color = fgColors[parseInt(tol)]; document.getElementById("resistorValue").innerHTML=resistText; } function addCommas(x) { return x.replace(/\B(?=(\d{3})+(?!\d))/g, ","); } </script> |
This must be rendered with this HTML code :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | <table> <tr align="center"><td>Band 1</td><td>Band 2</td><td>Band 3</td><td></td><td>Band 4</td></tr> <tr align="center"><td>Value 1 (MSV)</td><td>Value 2</td><td>Weight</td><td></td><td>Tolerance</td></tr> <tr> <form name="colorSelect" method="" action=""> <td><select name="band1" value="1" onChange="calcResistance(this)" style="width: 150px; color: white; background: #583030;"> <option value="0" style="color: white; background: black;">Black (0)</option> <option value="1" style="color: white; background: #583030;" selected>Brown (1)</option> <option value="2" style="color: white; background: red;">Red (2)</option> <option value="3" style="color: black; background: orange;">Orange (3)</option> <option value="4" style="color: black; background: yellow;">Yellow (4)</option> <option value="5" style="color: white; background: green;">Green (5)</option> <option value="6" style="color: white; background: blue;">Blue (6)</option> <option value="7" style="color: white; background: purple;">Violet (7)</option> <option value="8" style="color: white; background: gray;">Gray (8)</option> <option value="9" style="color: black; background: white;">White (9)</option> </select></td> <td><select name="band2" value="0" onChange="calcResistance(this)" style="width: 150px; color: white; background: black;"> <option value="0" style="color: white; background: black;" selected>Black (0)</option> <option value="1" style="color: white; background: #583030;">Brown (1)</option> <option value="2" style="color: white; background: red;">Red (2)</option> <option value="3" style="color: black; background: orange;">Orange (3)</option> <option value="4" style="color: black; background: yellow;">Yellow (4)</option> <option value="5" style="color: white; background: green;">Green (5)</option> <option value="6" style="color: white; background: blue;">Blue (6)</option> <option value="7" style="color: white; background: purple;">Violet (7)</option> <option value="8" style="color: white; background: gray;">Gray (8)</option> <option value="9" style="color: black; background: white;">White (9)</option> </select></td> <td><select name="band3" value="2" onChange="calcResistance(this)" style="width: 150px; color: white; background: red;"> <option value="0" style="color: white; background: black;" selected>Black (1)</option> <option value="1" style="color: white; background: #583030;">Brown (10)</option> <option value="2" style="color: white; background: red;" selected>Red (100)</option> <option value="3" style="color: black; background: orange;">Orange (1k)</option> <option value="4" style="color: black; background: yellow;">Yellow (10k)</option> <option value="5" style="color: white; background: green;">Green (100k)</option> <option value="6" style="color: white; background: blue;">Blue (1M)</option> <option value="7" style="color: white; background: purple;">Violet (10M)</option> <option value="8" style="color: white; background: gray;">Gray (100M)</option> <option value="9" style="color: black; background: white;">White (1G)</option> </select></td> <td> </td> <td><select name="band4" value="0" onChange="calcResistance(this)" style="width: 150px; color: black; background: gold; size:5;"> <option value="10" style="color: black; background: gold;">Gold (± 5%)</option> <option value="11" style="color: black; background: silver;">Silver (± 10%)</option> </select></td></tr> <tr><font size="24"><center><td colspan="2" align="right"><h4>Resistance: </h4></td><td colspan="3" align="left"><h4><text id="resistorValue">1,000 Ω ±5%</text></h4></td></center></font></tr> </form> </table> |