Cov txheej txheem:

Yuav Ua Li Cas Kom Tau Txais Kev Kuj/Capacitance Siv Cov Khoom Uas Koj Muaj Lawm!: 6 Cov Kauj Ruam
Yuav Ua Li Cas Kom Tau Txais Kev Kuj/Capacitance Siv Cov Khoom Uas Koj Muaj Lawm!: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Kom Tau Txais Kev Kuj/Capacitance Siv Cov Khoom Uas Koj Muaj Lawm!: 6 Cov Kauj Ruam

Video: Yuav Ua Li Cas Kom Tau Txais Kev Kuj/Capacitance Siv Cov Khoom Uas Koj Muaj Lawm!: 6 Cov Kauj Ruam
Video: Yuav ua li cas | yuav ua li cas sai sai | heev | noj qaib ntawm | qaib tom tsev | qaib | ua li 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Ua Kom Muaj Kev Kuj/Muaj Peev Xwm Siv Cov Khoom Uas Koj Muaj Lawm!
Yuav Ua Li Cas Ua Kom Muaj Kev Kuj/Muaj Peev Xwm Siv Cov Khoom Uas Koj Muaj Lawm!

Qhov no tsis yog tsuas yog lwm qhov/sib npaug sib npaug tiv taus lub laij lej! Qhov program no suav yuav ua li cas ua ke cov resistors/capacitors uas koj tam sim no yuav tsum ua tiav lub hom phiaj tsis kam/tus nqi peev txheej uas koj xav tau.

Koj puas tau xav tau tus tshwj xeeb resistor lossis tus capacitor uas koj tsis muaj lossis tsis muaj nyob? Tsis txhob ntshai! Koj tuaj yeem zaum ua qhov tshwj xeeb tiv taus lossis tus nqi peev txheej siv cov khoom koj twb muaj. Hloov chaw ntawm kev daws teeb meem loj ntau qhov sib txawv ua kom zoo nrog ntau lab ntawm kev sib txuas sib txawv, siv txoj haujlwm no!

Tsuas yog xaiv tus tiv thaiv lossis tus capacitor, nkag mus rau lub hom phiaj, nkag mus rau tus lej siab tshaj plaws ntawm cov khoom koj xav siv, sau cov npe ntawm qhov tseem ceeb ntawm cov khoom koj muaj, thiab nyem xam! Qhov kev zov me nyuam yuav nthuav tawm cov khoom siv twg thiab yuav txuas lawv li cas kom ua tiav koj lub hom phiaj.

Txhawm rau sim tawm lub laij lej, mus saib daim ntawv thov web no.

Txhawm rau saib qhov chaws, mus ntsib Github qhov chaw cia khoom no.

Thov qhia rau kuv paub yog tias koj muaj lus qhia ntxiv txhawm rau txhim kho kev siv tau ntawm cov cuab yeej tsim qauv no!

Kauj ruam 1: Tom qab

Keeb kwm yav dhau
Keeb kwm yav dhau

Daim ntawv thov web no tau tsim tawm ntawm qhov xav tau. Muaj ntau ntau yam kev sib txawv uas kuv tsim uas xav tau tshwj xeeb heev resistor lossis capacitor. Ntau zaus, Kuv tsis muaj tus tiv thaiv lossis tus capacitor nrog tus nqi tshwj xeeb ntawd. Qee zaum lawv tsis txawm ua ib feem nrog tus nqi tshwj xeeb ntawd! Hloov chaw lossis tso tseg rau qee yam uas tsawg dua li qhov zoo, Kuv txiav txim siab sau ib qhov program los saib txhua qhov ua tau ntawm cov tshuaj tiv thaiv (txhua qhov muaj peev xwm ua tau thiab seb lawv nyob hauv koob lossis sib luag) thiab rov qab ua ke zoo tshaj plaws.

Thaum tsim cov phiaj xwm rau kuv lub cev ua ib feem ntawm kuv Kev Sib Tw ntawm Cov Pab Pawg Qhia Ntawv, Kuv yuav tsum tau sim tes xam qhov zoo tshaj plaws ua ke ntawm cov khoom siv hluav taws xob kom ua tiav qhov tshwj xeeb. Cov txheej txheem no tsis txaus ntseeg kawg thiab thaum kawg kuv tsuas yog tso tseg thiab mus nrog cov khoom sib txuas ua ke uas ua rau muaj ntau npaum li cas ntawm lub suab nrov. Tam sim no nrog daim ntawv thov web no, Kuv tuaj yeem tsim kuv lub cev rau qhov tshwj xeeb zaus thiab qhib nws mus rau cov ntawv sau ntawm cov keyboard! Cov kab zauv hauv qab no yog siv los laij cov zaus tshwj xeeb thiab tau tham hauv lwm qhov Kev Qhia Ua Haujlwm.

f = 1 / (0.693 × C × (R1 + 2 × R2))

Siv qhov kev ua zauv no qhov twg R1 = 100 kOhm thiab R2 = 10 kOhm, Kuv suav tias 27.33 nF capacitor yuav tsim A4 ntawv (zaus 440 Hz). Siv kuv qhov program, Kuv muaj peev xwm los xam qhov muaj peev xwm sib npaug hauv.001 nF (ntau tsawg dua qhov ua siab ntev ntawm tus qauv ntsuas) uas kuv tuaj yeem tsim siv cov capacitors Kuv twb tau pw ib puag ncig. Cov txiaj ntsig tau tshwm sim thiab teeb tsa tau piav qhia hauv qab no. Tam sim no kuv muaj peev xwm ua tau ntau dua thiab muaj txiaj ntsig zoo qhib kuv lub cev rau qhov tseeb zaus ntawm cov ntawv sau tseg. Kuv vam tias kuv tau ua qhov no los pib nrog. Kuv zaj nkauj demo ntawm lub cev tej zaum yuav muaj suab zoo dua.

Tus nqi ze tshaj: 27.329 nF Qhov txawv: 0.001 nFCapacitor Kev teeb tsa: C0 = 0.068 nF || C1 = 30 nF + C2 = 300 nF

Resistor Capacitor Sib npaug sib npaug

Rau kev siv, hauv qab no yog qhov sib npaug sib npaug rau kev sib txuas cov resistors thiab cov capacitors hauv Circuit Court.

  • Resistors hauv series (R1 + R2): Req = R1 + R2
  • Resistors nyob rau hauv parallel (R1 || R2): Req = 1/(1/R1 + 1/R2)
  • Capacitors hauv series (C1 + C2): Ceq = 1/(1/C1 + 1/C2)
  • Capacitors nyob rau hauv parallel (C1 || C2): Ceq = C1 + C2

Kauj ruam 2: Cov tswv yim

Cov tswv yim
Cov tswv yim

Muaj 4 lub tswv yim koj yuav tsum tau muab:

  1. Txawm hais tias koj tab tom suav tus nqi rau tus tiv thaiv lossis tus capacitor.
  2. Lub hom phiaj tsis kam lossis tus nqi peev txheej thiab chav nyob.
  3. Tus naj npawb siab tshaj plaws ntawm cov khoom koj xav siv kom ua tiav lub hom phiaj tus nqi (piv txwv li kuv tsis xav siv ntau dua 3 tus tiv thaiv kom ua tiav kuv lub hom phiaj tiv taus tus nqi).
  4. Cov npe ntawm qhov tseem ceeb rau cov resistors/capacitors koj tam sim no muaj. Cov txiaj ntsig no yuav tsum nyob hauv tib chav raws li koj lub hom phiaj (piv txwv li yog tias koj lub hom phiaj tus nqi yog 110 nF, tag nrho koj cov txiaj ntsig yuav tsum tau muab hauv nF).

Kauj Ruam 3: Qhov tshwm sim

Qhov tshwm sim
Qhov tshwm sim

Koj yuav tau txais 3 qhov txiaj ntsig rau koj qhov txiaj ntsig:

  1. Tus nqi ze tshaj - qhov muaj peev xwm tiv taus/muaj peev xwm tshaj plaws uas koj tuaj yeem ua tiav nrog koj qhov ntsuas.
  2. Qhov sib txawv - nyob deb li cas ntawm koj tus nqi ze tshaj yog los ntawm koj lub hom phiaj.
  3. Resistor/Capacitor Configuration - cov npe ntawm qhov tseem ceeb ntawm cov resistors/capacitors siv thiab lawv teeb tsa.

Kauj Ruam 4: Nkag Siab Koj Li Qhov tshwm sim

Nkag Siab Koj Qhov tshwm sim
Nkag Siab Koj Qhov tshwm sim
Nkag Siab Koj Qhov tshwm sim
Nkag Siab Koj Qhov tshwm sim

Cov txheej txheem teeb tsa siv tus qauv cim. "+" txhais tau tias cov khoom sib xyaw ua ke thiab "||" txhais tau tias cov khoom sib dhos ua ke. Cov neeg ua haujlwm muaj qhov sib npaug ua ntej thiab sab laug-rau-txoj cai koom nrog lub ntsiab lus koj pab pawg ua ke pib los ntawm sab laug thiab txav mus rau sab xis.

Piv txwv li, ua tibzoo saib cov txiaj ntsig hauv qab no:

Resistor Configuration: R0 = 15 Ohms + R1 = 470 Ohms || R2 = 3300 Ohms + R3 = 15000 Ohms

Yog tias koj ua raws cov lus qhia tau hais los saum toj no, koj tuaj yeem pom tias qhov no zoo ib yam li cov kab zauv hauv qab no thiab cov duab saum toj no.

((R0+R1) || R2)+R3

Kauj Ruam 5: Ntau Yam Haujlwm

Yog xav paub ntau ntxiv, mus saib kuv nplooj ntawv:

  • https://dargen.io/
  • https://github.com/mjdargen
  • https://www.instructables.com/member/mjdargen/

Kauj ruam 6: Source Code

Txhawm rau saib qhov chaws, mus ntsib Github chaw cia khoom lossis saib JavaScript hauv qab no.

/* --------------------------------------------------------------- */

/* r/c calculator scripting*//* --------------------------------------- -------------------------*/ var ze_val; // ze tus nqi kom deb li ze ze_diff = 1000000.00; // sib txawv ntawm tus nqi thiab lub hom phiaj var ze = ; // array nthuav dav qhov tseem ceeb ntawm cov khoom sib txawv ser_par_config = ; // array nthuav qhia serial/parallel var outputStr = ""; muaj nuj nqi calculatorClick () {// tshem tawm cov txiaj ntsig thoob ntiaj teb rau txhua qhov nyem tshiab ze_val = 0; close_diff = 1000000.00; ze tshaj = ; ser_par_config = ; var resultDisplay = document.getElementById ("resultRow"); var exampleDisplay = document.getElementById ("exampleRow"); var calcOutput = document.getElementById ("calcOutput"); var targetTextObj = document.getElementById ('targetText'); var numCompTextObj = document.getElementById ('numCompText'); var compValsTextObj = document.getElementById ('compValsText'); var phiaj = parseFloat (targetTextObj.value); var numComp = parseInt (numCompTextObj.value); var compValsStr = compValsTextObj.value; var cov = ; compVals [0] = ""; var kuv = 0; var errFlag = 0; // yuam kev hauv kev txheeb xyuas lub hom phiaj tus nqi yog (isNaN (lub hom phiaj)) {outputStr = "Txheeb xyuas qhov yuam kev 'Lub Hom Phiaj' cov tswv yim!"} // yuam kev hauv kev txheeb xyuas tus lej ntawm cov khoom siv ntxiv yog (isNaN (numComp)) {outputStr = "Kev ua yuam kev 'Number of Components' input! "} // else if no error in target or numComp else if (! IsNaN (target) &&! IsNaN (numComp)) {while (compValsStr.indexOf (", ")! = -1) {var comma = compValsStr.indexOf (","); var newInt = parseFloat (compValsStr.substring (0, comma)); // yuam kev hauv kev txheeb xyuas cov npe tus nqi, teeb tus chij yog (isNaN (newInt)) {errFlag = 1; tawg; } compValsStr = compValsStr.substring (comma+1, compValsStr.length); compVals [kuv] = newInt; kuv ++; } var newInt = parseFloat (compValsStr); // yuam kev hauv kev txheeb xyuas cov npe tus nqi, teeb tus chij yog (isNaN (newInt)) {errFlag = 1; } compVals [kuv] = newInt; if (errFlag == 0) {if (document.getElementById ("resRadio"). kos) {resistor (phiaj, numComp, compVals); } lwm yog (document.getElementById ("capRadio"). kos) {capacitor (phiaj, numComp, compVals); }} // yuam kev hauv kev txheeb xyuas cov khoom tivthaiv tus nqi teev lwm tus {outputStr = "Yuam kev tshawb xyuas 'Cheeb Tsam Qhov Tseem Ceeb' cov tswv yim!"}} calcOutput.innerHTML = outputStr; resultDisplay.style.display = "thaiv"; exampleDisplay.style.display = "flex"; // nqes mus rau qhov tshwm sim window.scrollTo (0, exampleDisplay.scrollHeight); } / * Retrieves thiab luam tawm qhov zoo tshaj tiv thaiv teeb tsa * phiaj - phiaj tiv nqi * numComp - tag nrho cov neeg tawm tsam tso cai siv kom ua tiav lub hom phiaj val * compVals - array ntawm resistor qhov tseem ceeb * / ua haujlwm resistor (phiaj, numComp, compVals) { // ntev ntawm qhov tsis kam qhov tseem ceeb var num_res = compVals.length; // khiav los ntawm txhua qhov ua tau ntawm cov khoom siv rau (var i = 1; i <= numComp; i ++) {var data = ; resCombination (compVals, num_res, i, 0, data, phiaj); } var units = document.getElementById ("selected_unit"). tus nqi; // luam tawm cov txiaj ntsig outputStr = "Tus nqi ze tshaj:" + ze_val.toFixed (3) + "" + units + ""; outputStr + = "Qhov txawv:" + ze_diff.toFixed (3) + "" + units + ""; outputStr += "Kev teeb tsa resistor:"; rau (var i = 0; kuv <numComp; kuv ++) {yog (kuv <ze.length) {outputStr + = "R" + i + "=" + ze tshaj + "" + units + ""; yog (kuv+1 <ze.length) {yog (ser_par_config [i+1]) outputStr+= "||"; lwm qhov outputStr + = " +"; }} lwm qhov tawg; }} /* Xeem qhov ua ke zoo tshaj plaws ntawm cov tiv thaiv kom ua tiav lub hom phiaj tus nqi. * res - input array ntawm resistor qhov tseem ceeb * num_res - qhov loj ntawm input input ntawm resistor qhov tseem ceeb * num_comb - tus naj npawb ntawm resistors pub * index - index ntawm comb * comb - array ntawm tam sim no ua ke * phiaj - lub hom phiaj tus nqi * Tsis muaj tus nqi rov qab - hla tam sim no ua ke zoo tshaj plaws rau ntiaj teb cov txiaj ntsig */ muaj nuj nqi resCombination (res, num_res, num_comb, index, comb, phiaj) {// tam sim no ua ke yog ua tiav yog (index == num_comb) {var ser_par_size = Math.pow (2, num_comb); // 2^(naj npawb ntawm cov khoom siv) var ser_par = ; // bool array specifying serial lossis parallel rau txhua qhov tivthaiv var calc; // suav sib npaug tsis kam tus nqi // kauj ruam los ntawm txhua qhov ua tau series/parallel teeb tsa ntawm kev sib xyaw tam sim no rau (var j = 0; j k) & 1; } // ua qhov kev suav rau ua ke raws series/parallel combo rau (var k = 0; k <num_comb; k ++) {// thawj tus lej, tsuas yog ntxiv yog (k == 0) calc = comb [k]; // xoom txhais tau tias series, ntxiv qhov tsis kam ua lwm yam yog (! ser_par [k]) calc += comb [k]; // ib qho txhais tau tias yog sib npaug, rov qab ntawm qhov sib npaug ntawm lwm yam yog (ser_par [k]) calc = (calc*comb [k])/(calc+comb [k]); } // txheeb xyuas seb qhov sib txawv tsawg dua qhov zoo tshaj yav dhau los yog (Math.abs (calc - phiaj) <ze tshaj plaws_diff) {// nws tsawg dua, yog li hloov kho thoob ntiaj teb cov txiaj ntsig ze tshaj plaws_val = calc; close_diff = Math.abs (calc - phiaj); // meej rau xoom rau (var k = 0; k <num_comb; k ++) {ze [k] = 0; } // hloov kho tus nqi ze tshaj & series/kab ntawv sib luag rau (var k = 0; k <num_comb; k ++) {ze [k] = comb [k]; ser_par_config [k] = ser_par [k]; }}} rov qab 0; } // rov hu dua thiab hloov qhov ntsuas nrog txhua qhov ua tau rau (var i = 0; i = num_comb-index; i ++) {comb [index] = res ; resCombination (res, num_res, num_comb, index+1, comb, phiaj); }} / * Retrieves thiab luam tawm qhov zoo tshaj plaws kev teeb tsa lub peev xwm * lub hom phiaj - lub hom phiaj lub peev txheej * numComp - tag nrho cov peev txheej tso cai siv los ua kom tiav lub hom phiaj val * compVals - array ntawm tus nqi capacitor * / ua haujlwm capacitor (phiaj, numComp, compVals) {// ntev ntawm qhov muaj peev xwm muaj nuj nqis var num_cap = compVals.length; // khiav los ntawm txhua qhov ua tau ntawm cov khoom siv rau (var i = 1; i <= numComp; i ++) {var data = ; capCombination (compVals, num_cap, i, 0, cov ntaub ntawv, lub hom phiaj); } var units = document.getElementById ("selected_unit"). tus nqi; // luam tawm cov txiaj ntsig outputStr = "Tus nqi ze tshaj:" + ze_val.toFixed (3) + "" + units + ""; outputStr + = "Qhov txawv:" + ze_diff.toFixed (3) + "" + units + ""; outputStr += "Capacitor Configuration:"; rau (var i = 0; kuv <numComp; kuv ++) {yog (kuv <ze.length) {outputStr + = "C" + i + "=" + ze tshaj + "" + units + ""; yog (kuv+1 <ze.length) {yog (ser_par_config [i+1]) outputStr+= "||"; lwm qhov outputStr + = " +"; }} lwm qhov tawg; }} /* Xeem qhov ua tau zoo tshaj plaws ntawm cov capacitors kom ua tiav lub hom phiaj tus nqi. * cap - input array ntawm tus nqi capacitor * num_cap - qhov loj ntawm cov tswv yim array ntawm tus nqi capacitor * num_comb - tus lej capacitors tso cai * index - index ntawm comb * comb - array ntawm tam sim no ua ke * phiaj - lub hom phiaj tus nqi * Tsis muaj tus nqi rov qab - dhau tam sim no kev sib xyaw ua ke zoo tshaj plaws rau ntiaj teb cov txiaj ntsig */ ua haujlwm capCombination (cap, num_cap, num_comb, index, comb, phiaj) {// tam sim no kev sib xyaw ua tiav yog (index == num_comb) {var ser_par_size = Math.pow (2, num_comb); // 2^(naj npawb ntawm cov khoom siv) var ser_par = ; // bool array specifying serial lossis parallel rau txhua qhov tivthaiv var calc; // xam qhov sib npaug ntawm qhov muaj peev xwm // kauj ruam dhau ntawm txhua qhov ua tau/teeb tsa teeb tsa ntawm kev sib xyaw tam sim no rau (var j = 0; j k) & 1; } // ua qhov kev suav rau ua ke raws series/parallel combo rau (var k = 0; k

Pom zoo: