{"id":8249,"date":"2025-12-01T11:15:11","date_gmt":"2025-12-01T08:15:11","guid":{"rendered":"https:\/\/www.temrinler.com\/?p=8249"},"modified":"2025-12-01T11:15:11","modified_gmt":"2025-12-01T08:15:11","slug":"direnc-hesaplayici-4-5-bant","status":"publish","type":"post","link":"https:\/\/www.temrinler.com\/?p=8249","title":{"rendered":"D\u0130REN\u00c7 HESAPLAYICI \u2013 4\/5 BANT"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"tr\">\n<head>\n<meta charset=\"UTF-8\">\n<title>3D Diren\u00e7 Hesaplay\u0131c\u0131 (SPA)<\/title>\n\n<style>\n    body {\n        margin: 0;\n        font-family: Arial, sans-serif;\n        background: #1a1a1a;\n        color: #eee;\n        display: flex;\n        justify-content: center;\n        padding: 20px;\n    }\n\n    .kutu {\n        width: 100%;\n        max-width: 700px;\n        background: #000;\n        padding: 20px 25px;\n        border-radius: 12px;\n        box-shadow: 0 0 20px #000;\n    }\n\n    h1 {\n        font-size: 32px;\n        font-weight: bold;\n        margin-bottom: 15px;\n    }\n\n    select {\n        padding: 7px;\n        margin: 4px;\n        width: 80px;\n        border-radius: 6px;\n        background: #222;\n        color: #fff;\n        border: 1px solid #555;\n        cursor: pointer;\n    }\n    select:hover {\n        border-color: #999;\n    }\n\n    \/* 3D Diren\u00e7 G\u00f6rseli *\/\n    .direnc-wrap {\n        margin: 25px auto;\n        width: 100%;\n        display: flex;\n        justify-content: center;\n        align-items: center;\n    }\n\n    .tel {\n        width: 120px;\n        height: 6px;\n        background: linear-gradient(to right, #666, #999);\n    }\n\n    .govde {\n        width: 200px;\n        height: 60px;\n        background: #e5cd96;\n        border-radius: 30px;\n        position: relative;\n        margin: 0 10px;\n\n        \/* 3D I\u015f\u0131k efekti *\/\n        box-shadow:\n            inset 15px 10px 20px rgba(255,255,255,0.4),\n            inset -15px -10px 20px rgba(0,0,0,0.4),\n            0 0 10px rgba(0,0,0,0.8);\n    }\n\n    .bant {\n        width: 18px;\n        height: 62px;\n        position: absolute;\n        top: -1px;\n        border-radius: 3px;\n        box-shadow: 0 0 6px rgba(0,0,0,0.6);\n    }\n<\/style>\n<\/head>\n\n<body>\n\n<div class=\"kutu\">\n    <h1>Diren\u00e7 Hesaplama (4 \/ 5 Bant)<\/h1>\n\n    Bant Say\u0131s\u0131:\n    <select id=\"bantSayisi\">\n        <option value=\"4\">4 Bant<\/option>\n        <option value=\"5\">5 Bant<\/option>\n    <\/select>\n\n    <div id=\"secimler\">\n        <select id=\"b1\"><\/select>\n        <select id=\"b2\"><\/select>\n        <select id=\"b3\"><\/select>\n        <select id=\"carpan\"><\/select>\n        <select id=\"tol\"><\/select>\n    <\/div>\n\n    <!-- 3D Diren\u00e7 -->\n    <div class=\"direnc-wrap\">\n        <div class=\"tel\"><\/div>\n        <div class=\"govde\" id=\"govde\">\n            <div class=\"bant\" id=\"g1\" style=\"left:40px;\"><\/div>\n            <div class=\"bant\" id=\"g2\" style=\"left:70px;\"><\/div>\n            <div class=\"bant\" id=\"g3\" style=\"left:100px;\"><\/div>\n            <div class=\"bant\" id=\"g4\" style=\"left:130px;\"><\/div>\n            <div class=\"bant\" id=\"g5\" style=\"left:160px;\"><\/div>\n        <\/div>\n        <div class=\"tel\"><\/div>\n    <\/div>\n\n    <div id=\"sonuc\" style=\"font-size:20px;margin-top:15px;\"><\/div>\n    <div id=\"minmax\" style=\"font-size:16px;margin-top:8px;color:#ccc;\"><\/div>\n\n<\/div>\n\n<script>\n\/* RENK TABLOLARI *\/\nconst renkler = [\n {ad:\"siyah\",deger:0,carpan:1,renk:\"#000\"},\n {ad:\"kahverengi\",deger:1,carpan:10,renk:\"#8B4513\"},\n {ad:\"kirmizi\",deger:2,carpan:100,renk:\"#f00\"},\n {ad:\"turuncu\",deger:3,carpan:1000,renk:\"#f60\"},\n {ad:\"sari\",deger:4,carpan:10000,renk:\"#ff0\"},\n {ad:\"yesil\",deger:5,carpan:100000,renk:\"#080\"},\n {ad:\"mavi\",deger:6,carpan:1000000,renk:\"#00f\"},\n {ad:\"mor\",deger:7,carpan:10000000,renk:\"#808\"},\n {ad:\"gri\",deger:8,carpan:100000000,renk:\"#777\"},\n {ad:\"beyaz\",deger:9,carpan:1000000000,renk:\"#fff\"}\n];\n\nconst tolerans = [\n {ad:\"kahverengi\",tol:1,renk:\"#8B4513\"},\n {ad:\"kirmizi\",tol:2,renk:\"#f00\"},\n {ad:\"yesil\",tol:0.5,renk:\"#080\"},\n {ad:\"mavi\",tol:0.25,renk:\"#00f\"},\n {ad:\"mor\",tol:0.1,renk:\"#808\"},\n {ad:\"gri\",tol:0.05,renk:\"#777\"},\n {ad:\"altin\",tol:5,renk:\"#D4AF37\"},\n {ad:\"gumus\",tol:10,renk:\"#ccc\"}\n];\n\n\/* SELECT DOLDURMA *\/\nfunction doldur() {\n    const b1=document.getElementById(\"b1\");\n    const b2=document.getElementById(\"b2\");\n    const b3=document.getElementById(\"b3\");\n    const carp=document.getElementById(\"carpan\");\n    const tol=document.getElementById(\"tol\");\n\n    renkler.forEach((r,i)=>{\n        if(i!==0) b1.add(new Option(r.ad,i)); \n        b2.add(new Option(r.ad,i));\n        b3.add(new Option(r.ad,i));\n        carp.add(new Option(r.ad,i));\n    });\n    tolerans.forEach((t,i)=>tol.add(new Option(t.ad,i)));\n}\ndoldur();\n\n\/* HESAPLAMA *\/\nfunction hesapla(){\n    const bs = document.getElementById(\"bantSayisi\").value;\n\n    const b1 = renkler[document.getElementById(\"b1\").value];\n    const b2 = renkler[document.getElementById(\"b2\").value];\n    const b3 = renkler[document.getElementById(\"b3\").value];\n    const c  = renkler[document.getElementById(\"carpan\").value];\n    const t  = tolerans[document.getElementById(\"tol\").value];\n\n    \/\/ G\u00f6rsel bant renkleri\n    g1.style.background = b1.renk;\n    g2.style.background = b2.renk;\n    g3.style.background = (bs==\"5\") ? b3.renk : \"transparent\";\n    g4.style.background = c.renk;\n    g5.style.background = t.renk;\n\n    \/\/ de\u011fer hesaplama\n    let ohm = (b1.deger*10 + b2.deger);\n    if(bs==\"5\") ohm = (ohm*10) + b3.deger;\n    ohm *= c.carpan;\n\n    function fmt(x){\n        if(x>=1e6) return (x\/1e6).toFixed(2)+\" M\u03a9\";\n        if(x>=1e3) return (x\/1e3).toFixed(2)+\" k\u03a9\";\n        return x.toFixed(2)+\" \u03a9\";\n    }\n\n    document.getElementById(\"sonuc\").innerHTML = \n        \"Diren\u00e7: <b>\"+fmt(ohm)+\"<\/b>  (\u00b1\"+t.tol+\"%)\";\n\n    let min = ohm - ohm*(t.tol\/100);\n    let max = ohm + ohm*(t.tol\/100);\n\n    document.getElementById(\"minmax\").innerHTML =\n        \"\ud83d\udcc9 Min: \"+fmt(min)+\"<br>\ud83d\udcc8 Max: \"+fmt(max);\n}\n\n\/* Bant say\u0131s\u0131 de\u011fi\u015fince 3. bant g\u00f6r\u00fcn\u00fcr\/gizlenir *\/\ndocument.getElementById(\"bantSayisi\").addEventListener(\"change\", ()=>{\n    if(bantSayisi.value==\"4\"){\n        b3.style.display=\"none\";\n        g3.style.display=\"none\";\n    } else {\n        b3.style.display=\"inline-block\";\n        g3.style.display=\"block\";\n    }\n    hesapla();\n});\n\n\/* Olay ba\u011flama *\/\n[\"b1\",\"b2\",\"b3\",\"carpan\",\"tol\"].forEach(id=>{\n    document.getElementById(id).addEventListener(\"change\",hesapla);\n});\n\nb3.style.display=\"none\";\ng3.style.display=\"none\";\nhesapla();\n<\/script>\n\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>3D Diren\u00e7 Hesaplay\u0131c\u0131 (SPA) Diren\u00e7 Hesaplama (4 \/ 5 Bant) Bant Say\u0131s\u0131: 4 Bant5 Bant<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/posts\/8249"}],"collection":[{"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8249"}],"version-history":[{"count":1,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/posts\/8249\/revisions"}],"predecessor-version":[{"id":8250,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=\/wp\/v2\/posts\/8249\/revisions\/8250"}],"wp:attachment":[{"href":"https:\/\/www.temrinler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8249"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.temrinler.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}