{"id":8693,"date":"2026-08-14T09:12:52","date_gmt":"2026-08-14T07:12:52","guid":{"rendered":"https:\/\/www.softon.it\/wpress\/?page_id=8693"},"modified":"2026-08-21T12:55:31","modified_gmt":"2026-08-21T10:55:31","slug":"mos-gate-resistor","status":"publish","type":"page","link":"https:\/\/www.softon.it\/wpress\/mos-gate-resistor\/","title":{"rendered":"Calcolo della resistenza di Gate del MOS"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"background-color:#00a63a;flex-basis:1%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:97%\">    <div class=\"softon-ricerca softon-search-base\">\n                <style>\n          .calc-container {\n            max-width: 640px;\n            margin: 0 auto; \/* Centramento automatico in colonna\/pagina *\/\n            background: #1e1e2f;\n            color: #f8f8f2;\n            padding: 16px 20px;\n            border-radius: 12px;\n            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n            box-shadow: 0 6px 20px rgba(0,0,0,0.4);\n            box-sizing: border-box;\n          }\n          .calc-title {\n            margin-top: 0;\n            color: #00d2ff !important;\n            font-size: 1.25rem;\n            border-bottom: 2px solid #333;\n            padding-bottom: 6px;\n            margin-bottom: 12px;\n            background: transparent !important;\n          }\n          \/* GRID DI INPUT *\/\n          .calc-grid {\n            display: grid;\n            grid-template-columns: repeat(2, minmax(0, 1fr)); \n            gap: 12px 34px;                                     \n            margin-bottom: 12px;                                \n          }\n          .calc-group {\n            display: flex;\n            flex-direction: column;\n          }\n          .calc-group label {\n            font-size: 0.85rem;\n            font-weight: bold;\n            color: #fff;\n            margin-bottom: 2px;\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n          }\n\n          \/* BADGE SIGLE DATASHEET IN EVIDENZA *\/\n          .ds-tag {\n            background: #ff79c6;\n            color: #121212;\n            font-size: 0.72rem;\n            font-family: monospace;\n            font-weight: bold;\n            padding: 1px 6px;\n            border-radius: 4px;\n            letter-spacing: 0.5px;\n          }\n          .ds-tag-cyan {\n            background: #00d2ff;\n            color: #121212;\n            font-size: 0.72rem;\n            font-family: monospace;\n            font-weight: bold;\n            padding: 1px 6px;\n            border-radius: 4px;\n          }\n          .ds-tag-yellow {\n            background: #f1fa8c;\n            color: #121212;\n            font-size: 0.72rem;\n            font-family: monospace;\n            font-weight: bold;\n            padding: 1px 6px;\n            border-radius: 4px;\n          }\n\n          .calc-sublabel {\n            font-size: 0.72rem;\n            color: #8be9fd;\n            margin-bottom: 4px;\n            line-height: 1.1;\n          }\n\n          \/* INPUT TEXTBOX COMPATTE *\/\n          .calc-group input[type=number]::-webkit-inner-spin-button, \n          .calc-group input[type=number]::-webkit-outer-spin-button { \n            -webkit-appearance: none; \n            margin: 0; \n          }\n          .calc-group input[type=number] {\n            -moz-appearance: textfield;\n            background: #2d2d44;\n            border: 1px solid #555;\n            color: #fff;\n            padding: 4px 8px;\n            height: 28px;\n            border-radius: 5px;\n            font-size: 0.9rem;\n            font-weight: bold;\n            box-sizing: border-box;\n            width: 100%;\n          }\n          .calc-group input:focus {\n            border-color: #00d2ff;\n            outline: none;\n            background: #363654;\n          }\n\n          \/* BOTTONE CALCOLA COMPATTO *\/\n          .calc-btn-container {\n            margin: 10px 0;\n          }\n          .calc-btn {\n            width: 100%;\n            background: #00d2ff;\n            color: #121212;\n            border: none;\n            padding: 7px 12px;\n            font-size: 0.9rem;\n            font-weight: bold;\n            border-radius: 6px;\n            cursor: pointer;\n            text-transform: uppercase;\n            letter-spacing: 1px;\n            transition: background 0.2s ease, transform 0.1s ease;\n          }\n          .calc-btn:hover { background: #50fa7b; }\n          .calc-btn:active { transform: scale(0.99); }\n\n          \/* SCONTRINO VALORI DERIVATI *\/\n          .calc-info-box {\n            background: #282a36;\n            border: 1px solid #44475a;\n            border-radius: 8px;\n            padding: 10px 12px;\n            margin-bottom: 12px;\n          }\n          .calc-info-title {\n            font-size: 0.78rem;\n            color: #bd93f9;\n            text-transform: uppercase;\n            font-weight: bold;\n            margin-bottom: 6px;\n          }\n          .calc-info-row {\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            font-size: 0.85rem;\n            margin-bottom: 4px;\n          }\n          .calc-info-val {\n            font-family: monospace;\n            font-weight: bold;\n            color: #f1fa8c;\n          }\n\n          \/* SCONTRINO SEQUENZIALE REALE *\/\n          .calc-step-box {\n            background: #282a36;\n            border: 1px solid #44475a;\n            border-radius: 8px;\n            padding: 12px;\n            margin-bottom: 14px;\n          }\n          .calc-step-title {\n            font-size: 0.8rem;\n            color: #ff79c6;\n            text-transform: uppercase;\n            font-weight: bold;\n            margin-bottom: 8px;\n          }\n          .calc-step-row {\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            padding: 3px 0;\n            font-size: 0.85rem;\n          }\n          .calc-step-row.border-bottom {\n            border-bottom: 1px dashed #555;\n            padding-bottom: 6px;\n            margin-bottom: 6px;\n          }\n          .calc-step-val {\n            font-family: monospace;\n            font-size: 0.95rem;\n            font-weight: bold;\n            color: #f1fa8c;\n          }\n\n          \/* RISULTATO BANCO CON RANGE E RESISTENZA DINAMICA *\/\n          .calc-final-box {\n            background: #193549;\n            border: 2px solid #50fa7b;\n            border-radius: 8px;\n            padding: 12px;\n            text-align: center;\n            margin-bottom: 14px;\n          }\n          .calc-final-label {\n            font-size: 0.8rem;\n            color: #fff;\n            text-transform: uppercase;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            gap: 8px;\n          }\n          .calc-final-val {\n            font-size: 2rem;\n            font-weight: bold;\n            color: #50fa7b;\n            line-height: 1.1;\n            margin: 2px 0;\n          }\n\n          \/* SCHEMA RESISTENZA A COLORI DINAMICA REALISTICA *\/\n          .resistor-svg-container {\n            margin: 10px auto 12px auto;\n            max-width: 240px;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n          }\n          .resistor-svg {\n            width: 100%;\n            height: auto;\n            filter: drop-shadow(0px 3px 5px rgba(0,0,0,0.5));\n          }\n\n          .calc-range-val {\n            font-size: 0.9rem;\n            color: #f1fa8c;\n            font-weight: bold;\n            margin-bottom: 2px;\n          }\n          .calc-final-sub {\n            font-size: 0.78rem;\n            color: #8be9fd;\n          }\n\n          \/* SCHEMI DI COLLEGAMENTO SVG *\/\n          .calc-schemas {\n            display: grid;\n            grid-template-columns: 1fr 1fr;\n            gap: 12px;\n            background: #181824;\n            padding: 10px;\n            border-radius: 8px;\n            border: 1px solid #333;\n          }\n          .schema-card {\n            background: #252538;\n            padding: 8px;\n            border-radius: 6px;\n            text-align: center;\n          }\n          .schema-card h4 {\n            margin: 0 0 4px 0;\n            font-size: 0.8rem;\n            color: #ff79c6;\n          }\n          .schema-svg {\n            width: 100%;\n            max-height: 90px;\n          }\n\n          \/* ADATTAMENTO MOBILE (< 600px) *\/\n          @media (max-width: 600px) {\n            .calc-container {\n              padding: 12px 12px;\n              border-radius: 8px;\n            }\n            .calc-grid, \n            .calc-schemas {\n              grid-template-columns: 1fr;\n              gap: 12px;\n            }\n            .calc-group label {\n              font-size: 0.82rem;\n            }\n            .calc-info-row, \n            .calc-step-row {\n              flex-direction: column;\n              align-items: flex-start;\n              gap: 2px;\n              padding: 4px 0;\n            }\n            .calc-info-val, \n            .calc-step-val {\n              align-self: flex-end;\n            }\n            .calc-final-val {\n              font-size: 1.6rem;\n            }\n            .calc-range-val {\n              font-size: 0.82rem;\n            }\n          }\n        <\/style>\n\n        <div class=\"calc-container\">\n          <h3 class=\"calc-title\">\u26a1 MOS - Gate Resistor Calculator<\/h3>\n          \n          <div class=\"calc-grid\">\n            <!-- TENSIONE GATE -->\n            <div class=\"calc-group\">\n              <label>Tensione di Gate (V)<span class=\"ds-tag\">[Vgs]<\/span><\/label>\n              <span class=\"calc-sublabel\">Tensione di comando (es. 12V, 20V)<\/span>\n              <input type=\"number\" id=\"vgs\" value=\"12\" step=\"0.1\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n\n            <!-- CORRENTE MAX DRIVER -->\n            <div class=\"calc-group\">\n              <label>Corrente Max Driver (A) <span class=\"ds-tag\">[Ipk]<\/span><\/label>\n              <span class=\"calc-sublabel\">Limite max del pin\/driver<\/span>\n              <input type=\"number\" id=\"ipk\" value=\"2.0\" step=\"0.01\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n\n            <!-- CISS -->\n            <div class=\"calc-group\">\n              <label>Capacit\u00e0 Ingresso (pF)<span class=\"ds-tag\">[Ciss]<\/span><\/label>\n              <span class=\"calc-sublabel\">Da datasheet MOSFET (es. 1500 pF)<\/span>\n              <input type=\"number\" id=\"ciss\" value=\"1500\" step=\"10\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n\n            <!-- RISE TIME -->\n            <div class=\"calc-group\">\n              <label>Rise Time Target (ns)<span class=\"ds-tag\">[tr]<\/span><\/label>\n              <span class=\"calc-sublabel\">Tempo di salita in nanosecondi<\/span>\n              <input type=\"number\" id=\"tr_ns\" value=\"25\" step=\"1\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n\n            <!-- FREQUENZA PWM IN HZ -->\n            <div class=\"calc-group\">\n              <label>Frequenza PWM (Hz)<span class=\"ds-tag\">[fsw]<\/span><\/label>\n              <span class=\"calc-sublabel\">Scala in Hz (es. 1000 Hz)<\/span>\n              <input type=\"number\" id=\"fsw_hz\" value=\"1000\" step=\"100\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n\n            <!-- LUNGHEZZA PISTA PCB -->\n            <div class=\"calc-group\">\n              <label>Lunghezza Pista PCB (mm)<span class=\"ds-tag-cyan\">[L_pcb]<\/span><\/label>\n              <span class=\"calc-sublabel\">Distanza Driver \u2794 Gate in mm<\/span>\n              <input type=\"number\" id=\"pista_mm\" value=\"15\" step=\"1\" oninput=\"calcolaMOSFET()\">\n            <\/div>\n          <\/div>\n\n          <div class=\"calc-btn-container\">\n            <button class=\"calc-btn\" onclick=\"calcolaMOSFET()\">CALCOLA RESISTENZA<\/button>\n          <\/div>\n\n          <!-- SCONTRINO 1: DINAMICA DI CARICA -->\n          <div class=\"calc-info-box\">\n            <div class=\"calc-info-title\">\ud83d\udcca Dinamica di Commutazione (Dati Teorici):<\/div>\n            <div class=\"calc-info-row\">\n              <span>Carica di Gate Trasportata <span class=\"ds-tag-yellow\">[Qg]<\/span>:<\/span>\n              <span class=\"calc-info-val\" id=\"val_qg\">0.018 \u00b5C<\/span>\n            <\/div>\n            <div class=\"calc-info-row\">\n              <span>Corrente di Gate di picco (Ig = Qg \/ tr) <span class=\"ds-tag-yellow\">[Ig]<\/span>:<\/span>\n              <span class=\"calc-info-val\" id=\"val_ig\">0.72 A<\/span>\n            <\/div>\n          <\/div>\n\n          <!-- SCONTRINO 2: SEQUENZIALE REALE PER IL BANCO -->\n          <div class=\"calc-step-box\">\n            <div class=\"calc-step-title\">\ud83d\udee0\ufe0f Bilancio Resistenze di Circuito:<\/div>\n            \n            <div class=\"calc-step-row\">\n              <span>1. Resistenza Totale Minima Necessaria: <span class=\"ds-tag-cyan\">[Rtot]<\/span>:<\/span>\n              <span class=\"calc-step-val\" id=\"step_totale\">6.0 \u03a9<\/span>\n            <\/div>\n            \n            <div class=\"calc-step-row border-bottom\">\n              <span>2. Meno Resistenza Interna Chip (Driver + Gate): <span class=\"ds-tag-cyan\">[Rdrv + Rg,int]<\/span>:<\/span>\n              <span class=\"calc-step-val\" style=\"color:#ff79c6;\">- 2.2 \u03a9<\/span>\n            <\/div>\n            \n            <div class=\"calc-step-row\">\n              <span><strong>3. Resistenza Netta da Aggiungere: <span class=\"ds-tag-cyan\">[Rg,ext]<\/span>:<\/strong><\/span>\n              <span class=\"calc-step-val\" style=\"color:#50fa7b;\" id=\"step_netta\">3.8 \u03a9<\/span>\n            <\/div>\n          <\/div>\n\n          <!-- RISULTATO FINALE BANCO CON RANGE E SCHEMATICO RESISTENZA REALISTICO -->\n          <div class=\"calc-final-box\">\n            <div class=\"calc-final-label\">\n              \ud83d\uded2 Valore Commerciale Principale <span class=\"ds-tag-yellow\">[Rg]<\/span>\n            <\/div>\n            <div class=\"calc-final-val\" id=\"res_commerciale\">3.9 \u03a9<\/div>\n            \n            <!-- SCHEMA RESISTENZA DINAMICA REALISTICA (THT DOG-BONE) -->\n            <div class=\"resistor-svg-container\">\n              <svg class=\"resistor-svg\" viewBox=\"0 0 240 50\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <defs>\n                  <!-- Sfumatura del corpo ceramico beige -->\n                  <linearGradient id=\"bodyGrad\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n                    <stop offset=\"0%\" stop-color=\"#e8cf9b\"\/>\n                    <stop offset=\"20%\" stop-color=\"#f5e1b8\"\/>\n                    <stop offset=\"50%\" stop-color=\"#d1b275\"\/>\n                    <stop offset=\"85%\" stop-color=\"#a6884e\"\/>\n                    <stop offset=\"100%\" stop-color=\"#7a6232\"\/>\n                  <\/linearGradient>\n\n                  <!-- Sfumatura metallica reofori -->\n                  <linearGradient id=\"leadGrad\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n                    <stop offset=\"0%\" stop-color=\"#888\"\/>\n                    <stop offset=\"40%\" stop-color=\"#eee\"\/>\n                    <stop offset=\"70%\" stop-color=\"#aaa\"\/>\n                    <stop offset=\"100%\" stop-color=\"#555\"\/>\n                  <\/linearGradient>\n                <\/defs>\n\n                <!-- Reofori Sinistro e Destro (Piedini metallici) -->\n                <rect x=\"0\" y=\"23\" width=\"60\" height=\"4\" fill=\"url(#leadGrad)\" rx=\"1\"\/>\n                <rect x=\"180\" y=\"23\" width=\"60\" height=\"4\" fill=\"url(#leadGrad)\" rx=\"1\"\/>\n\n                <!-- Cappucci terminali metallici -->\n                <rect x=\"55\" y=\"19\" width=\"8\" height=\"12\" fill=\"url(#leadGrad)\" rx=\"2\"\/>\n                <rect x=\"177\" y=\"19\" width=\"8\" height=\"12\" fill=\"url(#leadGrad)\" rx=\"2\"\/>\n\n                <!-- Corpo Principale Resistore THT (Sagoma Osso \/ Dog-Bone) -->\n                <rect x=\"60\" y=\"11\" width=\"16\" height=\"28\" fill=\"url(#bodyGrad)\" rx=\"6\"\/>\n                <rect x=\"72\" y=\"14\" width=\"96\" height=\"22\" fill=\"url(#bodyGrad)\"\/>\n                <rect x=\"164\" y=\"11\" width=\"16\" height=\"28\" fill=\"url(#bodyGrad)\" rx=\"6\"\/>\n\n                <!-- Anelli Colorati (Bande di Codice Colore Dinamiche) -->\n                <rect id=\"band1\" x=\"78\" y=\"14\" width=\"7\" height=\"22\" fill=\"#000000\"\/>\n                <rect id=\"band2\" x=\"98\" y=\"14\" width=\"7\" height=\"22\" fill=\"#000000\"\/>\n                <rect id=\"band3\" x=\"118\" y=\"14\" width=\"7\" height=\"22\" fill=\"#000000\"\/>\n                <rect id=\"band4\" x=\"148\" y=\"14\" width=\"7\" height=\"22\" fill=\"#D4AF37\"\/> <!-- Tolleranza Oro 5% -->\n\n                <!-- Riflesso Lucido Superiore -->\n                <path d=\"M 64,13 Q 120,16 176,13\" stroke=\"rgba(255,255,255,0.4)\" stroke-width=\"2\" fill=\"none\"\/>\n              <\/svg>\n            <\/div>\n\n            <div class=\"calc-range-val\" id=\"res_range\">Range per test da banco: 3.3 \u03a9 \u2794 5.6 \u03a9 (E24)<\/div>\n            \n            <div class=\"calc-final-sub\" id=\"res_potenza\">Potenza consigliata: 1\/4W (THT \/ SMD 0805)<\/div>\n          <\/div>\n\n          <!-- SCHEMI FISICI INTEGRATI -->\n          <div class=\"calc-schemas\">\n            <div class=\"schema-card\">\n              <h4>MOS Canale N<\/h4>\n              <svg class=\"schema-svg\" viewBox=\"0 0 160 100\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <rect x=\"110\" y=\"15\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"#50fa7b\" stroke-width=\"2\"><\/rect>\n                <text x=\"120\" y=\"24\" fill=\"#50fa7b\" font-size=\"8\" text-anchor=\"middle\">RL<\/text>\n                <line x1=\"120\" y1=\"5\" x2=\"120\" y2=\"15\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <line x1=\"120\" y1=\"27\" x2=\"120\" y2=\"40\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <circle x=\"120\" y=\"5\" r=\"3\" fill=\"#ff5555\"><\/circle>\n                <circle x=\"60\" y=\"50\" r=\"22\" fill=\"none\" stroke=\"#00d2ff\" stroke-width=\"2\"><\/circle>\n                <line x1=\"20\" y1=\"50\" x2=\"42\" y2=\"50\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <rect x=\"27\" y=\"46\" width=\"11\" height=\"8\" fill=\"#181824\" stroke=\"#f1fa8c\" stroke-width=\"1.5\"><\/rect>\n                <text x=\"32\" y=\"42\" fill=\"#f1fa8c\" font-size=\"7\" text-anchor=\"middle\">Rg<\/text>\n                <line x1=\"48\" y1=\"36\" x2=\"48\" y2=\"64\" stroke=\"#00d2ff\" stroke-width=\"2\"><\/line>\n                <line x1=\"54\" y1=\"40\" x2=\"72\" y2=\"40\" stroke=\"#00d2ff\" stroke-width=\"2\"><\/line>\n                <line x1=\"72\" y1=\"40\" x2=\"120\" y2=\"40\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <line x1=\"54\" y1=\"60\" x2=\"72\" y2=\"60\" stroke=\"#00d2ff\" stroke-width=\"2\"><\/line>\n                <line x1=\"72\" y1=\"60\" x2=\"72\" y2=\"85\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <circle x=\"72\" y=\"85\" r=\"3\" fill=\"#8be9fd\"><\/circle>\n              <\/svg>\n            <\/div>\n\n            <div class=\"schema-card\">\n              <h4>MOS Canale P<\/h4>\n              <svg class=\"schema-svg\" viewBox=\"0 0 160 100\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                <circle x=\"60\" y=\"50\" r=\"22\" fill=\"none\" stroke=\"#ff79c6\" stroke-width=\"2\"><\/circle>\n                <line x1=\"20\" y1=\"50\" x2=\"42\" y2=\"50\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <rect x=\"27\" y=\"46\" width=\"11\" height=\"8\" fill=\"#181824\" stroke=\"#f1fa8c\" stroke-width=\"1.5\"><\/rect>\n                <text x=\"32\" y=\"42\" fill=\"#f1fa8c\" font-size=\"7\" text-anchor=\"middle\">Rg<\/text>\n                <line x1=\"48\" y1=\"36\" x2=\"48\" y2=\"64\" stroke=\"#ff79c6\" stroke-width=\"2\"><\/line>\n                <line x1=\"54\" y1=\"40\" x2=\"72\" y2=\"40\" stroke=\"#ff79c6\" stroke-width=\"2\"><\/line>\n                <line x1=\"72\" y1=\"40\" x2=\"72\" y2=\"10\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <circle x=\"72\" y=\"10\" r=\"3\" fill=\"#ff5555\"><\/circle>\n                <line x1=\"54\" y1=\"60\" x2=\"72\" y2=\"60\" stroke=\"#ff79c6\" stroke-width=\"2\"><\/line>\n                <line x1=\"72\" y1=\"60\" x2=\"120\" y2=\"60\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <rect x=\"110\" y=\"60\" width=\"20\" height=\"12\" fill=\"none\" stroke=\"#50fa7b\" stroke-width=\"2\"><\/rect>\n                <text x=\"120\" y=\"69\" fill=\"#50fa7b\" font-size=\"8\" text-anchor=\"middle\">RL<\/text>\n                <line x1=\"120\" y1=\"72\" x2=\"120\" y2=\"85\" stroke=\"#fff\" stroke-width=\"2\"><\/line>\n                <circle x=\"120\" y=\"85\" r=\"3\" fill=\"#8be9fd\"><\/circle>\n              <\/svg>\n            <\/div>\n          <\/div>\n        <\/div>\n\n        <script>\n        const e24 = [1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2, \n                     10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 100];\n\n        const colorMap = {\n          0: '#000000', \/\/ Nero\n          1: '#8B4513', \/\/ Marrone\n          2: '#FF0000', \/\/ Rosso\n          3: '#FF8C00', \/\/ Arancione\n          4: '#FFD700', \/\/ Giallo\n          5: '#008000', \/\/ Verde\n          6: '#0000FF', \/\/ Blu\n          7: '#8A2BE2', \/\/ Viola\n          8: '#808080', \/\/ Grigio\n          9: '#FFFFFF', \/\/ Bianco\n          '-1': '#D4AF37', \/\/ Oro (0.1x)\n          '-2': '#C0C0C0'  \/\/ Argento (0.01x)\n        };\n\n        function trovaE24(val) {\n          if (val <= 1) return 1.0;\n          for (let i = 0; i < e24.length; i++) {\n            if (e24[i] >= val) return e24[i];\n          }\n          return Math.round(val);\n        }\n\n        function trovaE24Infe(val) {\n          if (val <= 1) return 1.0;\n          for (let i = e24.length - 1; i >= 0; i--) {\n            if (e24[i] <= val) return e24[i];\n          }\n          return 1.0;\n        }\n\n        function aggiornaColoriResistenza(valoreOhm) {\n          if (valoreOhm <= 0 || isNaN(valoreOhm)) return;\n\n          let d1, d2, multExp;\n\n          if (valoreOhm < 10) {\n            let valMoltiplicato = Math.round(valoreOhm * 10);\n            d1 = Math.floor(valMoltiplicato \/ 10);\n            d2 = valMoltiplicato % 10;\n            multExp = -1; \/\/ Banda Oro\n          } else {\n            let exp = Math.floor(Math.log10(valoreOhm));\n            let norm = valoreOhm \/ Math.pow(10, exp - 1);\n            let valRounded = Math.round(norm);\n            \n            d1 = Math.floor(valRounded \/ 10);\n            d2 = valRounded % 10;\n            multExp = exp - 1;\n          }\n\n          const b1 = document.getElementById('band1');\n          const b2 = document.getElementById('band2');\n          const b3 = document.getElementById('band3');\n\n          if (b1) b1.setAttribute('fill', colorMap[d1] || '#000000');\n          if (b2) b2.setAttribute('fill', colorMap[d2] || '#000000');\n          if (b3) b3.setAttribute('fill', colorMap[multExp] || '#000000');\n        }\n\n        function calcolaMOSFET() {\n          const vgs = parseFloat(document.getElementById('vgs').value) || 0;\n          const ipk = parseFloat(document.getElementById('ipk').value) || 0.001;\n          const ciss_pF = parseFloat(document.getElementById('ciss').value) || 0;\n          const tr_ns = parseFloat(document.getElementById('tr_ns').value) || 1;\n          const fsw_hz = parseFloat(document.getElementById('fsw_hz').value) || 0;\n          const pista_mm = parseFloat(document.getElementById('pista_mm').value) || 0;\n\n          const r_interna = 2.2; \n\n          const C = ciss_pF * 1e-12;\n          const tr = tr_ns * 1e-9;\n          const L = pista_mm * 1e-9;\n\n          const qg_coulomb = C * vgs;\n          const qg_uC = qg_coulomb * 1e6;\n          const ig_teorica = qg_coulomb \/ tr;\n\n          const r_tot_driver = vgs \/ ipk;\n          const r_tot_tr = vgs \/ Math.max(ig_teorica, 0.001);\n          let r_tot_damp = 0;\n          if (L > 0 && C > 0) {\n            r_tot_damp = 2 * Math.sqrt(L \/ C);\n          }\n\n          const r_tot_finale = Math.max(r_tot_driver, r_tot_tr, r_tot_damp);\n          const r_netta = Math.max(0, r_tot_finale - r_interna);\n\n          const r_comm = trovaE24(r_netta);\n          const r_min_range = trovaE24Infe(r_netta * 0.8);\n          const r_max_range = trovaE24(r_netta * 1.5);    \n\n          const p_tot = C * Math.pow(vgs, 2) * fsw_hz;\n          let p_res = 0;\n          if (r_tot_finale > 0) {\n            p_res = p_tot * (r_netta \/ r_tot_finale);\n          }\n\n          document.getElementById('val_qg').innerText = qg_uC.toFixed(3) + \" \u00b5C\";\n          document.getElementById('val_ig').innerText = ig_teorica.toFixed(2) + \" A\";\n\n          document.getElementById('step_totale').innerText = r_tot_finale.toFixed(1) + \" \u03a9\";\n          document.getElementById('step_netta').innerText = r_netta.toFixed(1) + \" \u03a9\";\n\n          document.getElementById('res_commerciale').innerText = r_comm + \" \u03a9\";\n          document.getElementById('res_range').innerText = \"Range di valori possibili: \" + r_min_range + \" \u03a9  \u2794  \" + r_max_range + \" \u03a9 (Valori E24)\";\n\n          let p_str = \"Potenza consigliata: 1\/4W (THT a strato \/ SMD 0805 o 1206)\";\n          if (p_res > 0.5) {\n            p_str = \"Potenza dissipata: \" + p_res.toFixed(2) + \"W \u2794 Usare resistenza da 1W\";\n          } else if (p_res > 0.2) {\n            p_str = \"Potenza dissipata: \" + (p_res*1000).toFixed(0) + \"mW \u2794 Usare resistenza da 1\/2W\";\n          }\n          document.getElementById('res_potenza').innerText = p_str;\n\n          \/\/ Aggiorna dinamicamente i colori del componente grafico\n          aggiornaColoriResistenza(r_comm);\n        }\n\n        \/\/ Inizializzazione al caricamento\n        calcolaMOSFET();\n        <\/script>\n            <\/div>\n    \n<\/div>\n\n\n\n<div class=\"wp-block-column has-background is-layout-flow wp-block-column-is-layout-flow\" style=\"background-color:#fd2600;flex-basis:1%\"><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-8693","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/pages\/8693","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/comments?post=8693"}],"version-history":[{"count":12,"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/pages\/8693\/revisions"}],"predecessor-version":[{"id":9047,"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/pages\/8693\/revisions\/9047"}],"wp:attachment":[{"href":"https:\/\/www.softon.it\/wpress\/wp-json\/wp\/v2\/media?parent=8693"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}