Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Everything about electronics
Everything about electronics
Enter a resistance value and this tool will find the closest EIA-96 resistor value and its code.
Ω
kΩ
MΩ
const eia96Table = {
“01”: 100, “02”: 102, “03”: 105, “04”: 107, “05”: 110, “06”: 113, “07”: 115, “08”: 118, “09”: 121, “10”: 124,
“11”: 127, “12”: 130, “13”: 133, “14”: 137, “15”: 140, “16”: 143, “17”: 147, “18”: 150, “19”: 154, “20”: 158,
“21”: 162, “22”: 165, “23”: 169, “24”: 174, “25”: 178, “26”: 182, “27”: 187, “28”: 191, “29”: 196, “30”: 200,
“31”: 205, “32”: 210, “33”: 215, “34”: 221, “35”: 226, “36”: 232, “37”: 237, “38”: 243, “39”: 249, “40”: 255,
“41”: 261, “42”: 267, “43”: 274, “44”: 280, “45”: 287, “46”: 294, “47”: 301, “48”: 309, “49”: 316, “50”: 324,
“51”: 332, “52”: 340, “53”: 348, “54”: 357, “55”: 365, “56”: 374, “57”: 383, “58”: 392, “59”: 402, “60”: 412,
“61”: 422, “62”: 432, “63”: 442, “64”: 453, “65”: 464, “66”: 475, “67”: 487, “68”: 499, “69”: 511, “70”: 523,
“71”: 536, “72”: 549, “73”: 562, “74”: 576, “75”: 590, “76”: 604, “77”: 619, “78”: 634, “79”: 649, “80”: 665,
“81”: 681, “82”: 698, “83”: 715, “84”: 732, “85”: 750, “86”: 768, “87”: 787, “88”: 806, “89”: 825, “90”: 845,
“91”: 866, “92”: 887, “93”: 909, “94”: 931, “95”: 953, “96”: 976
};
const eia96Multiplier = {
‘Z’: 0.001,
‘Y’: 0.01,
‘R’: 0.1,
‘A’: 1,
‘B’: 10,
‘C’: 100,
‘D’: 1000,
‘E’: 10000,
‘F’: 100000
};
function findNearestEIA() {
const inputValue = parseFloat(document.getElementById(“inputResistance”).value);
const unit = parseFloat(document.getElementById(“resUnit”).value);
if (isNaN(inputValue)) {
document.getElementById(“nearestResult”).innerHTML = “Please enter a valid resistance value.”;
return;
}
const resistance = inputValue * unit;
let closest = null;
let minDiff = Infinity;
let codeMatch = “”;
let multMatch = “”;
Object.entries(eia96Table).forEach(([code, value]) => {
Object.entries(eia96Multiplier).forEach(([letter, multiplier]) => {
const realValue = value * multiplier;
const diff = Math.abs(realValue – resistance);
if (diff < minDiff) {
minDiff = diff;
closest = realValue;
codeMatch = code + letter;
}
});
});
document.getElementById("nearestResult").innerHTML = `
Nearest EIA-96 Value: ${formatResistance(closest)}
EIA-96 Code: ${codeMatch}
`;
}
function clearNearestEIA() {
document.getElementById(“inputResistance”).value = “”;
document.getElementById(“nearestResult”).innerHTML = “”;
}
function formatResistance(ohms) {
if (ohms >= 1e6) return (ohms / 1e6).toFixed(2) + ” MΩ”;
if (ohms >= 1e3) return (ohms / 1e3).toFixed(2) + ” kΩ”;
return ohms.toFixed(2) + ” Ω”;
}
(adsbygoogle = window.adsbygoogle || []).push({});