Cov txheej txheem:

Ntsuas Kub Los Ntawm PT100 Siv Arduino: 6 Cov Kauj Ruam (nrog Duab)
Ntsuas Kub Los Ntawm PT100 Siv Arduino: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntsuas Kub Los Ntawm PT100 Siv Arduino: 6 Cov Kauj Ruam (nrog Duab)

Video: Ntsuas Kub Los Ntawm PT100 Siv Arduino: 6 Cov Kauj Ruam (nrog Duab)
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Ntsuas Kub Los Ntawm PT100 Siv Arduino
Ntsuas Kub Los Ntawm PT100 Siv Arduino

PT100 yog lub ntsuas ntsuas kub tsis kam (RTD) uas hloov nws qhov kev tiv thaiv nyob ntawm nws qhov kub ib puag ncig, nws tau siv dav rau cov txheej txheem kev lag luam nrog kev ua haujlwm qeeb thiab qhov sib txawv ntawm qhov kub thiab txias. Nws tau siv rau cov txheej txheem qeeb qeeb vim tias RTDs muaj lub sijhawm teb qeeb (uas kuv tham ntau ntxiv txog tom qab) tab sis yog qhov tseeb thiab muaj qis qis dhau sijhawm. Dab tsi kuv yuav qhia koj hauv Phau Ntawv Qhia no yuav tsis ua raws li cov txheej txheem kev lag luam tab sis nws yuav nthuav koj mus rau lwm txoj hauv kev los ntsuas qhov ntsuas kub dua li siv LM35 uas ntau tus nyiam ua haujlwm yuav paub thiab kev tshawb fawb Circuit Court pom tuaj yeem siv rau lwm qhov kev ntsuas.

Kauj Ruam 1: Cheeb Tsam

1x PT100 (Ob Hlau)

1x Arduino (Txhua Tus Qauv)

3x 741 Kev Ua Haujlwm Amplifiers (LM741 lossis UA 741)

1 x 80ohm Resistor

2x 3.9kohms Resistors

2x 3.3kohms Resistors

2x 8.2kohms Resistors

2 x 47 kohms Resistors

1 x 5 kohms Potentiometer

1x Ob Qhov Chaw Siv Hluav Taws Xob lossis 8x 1.5V AA Roj Teeb

Kuv tab tom siv ob lub xaim PT100, peb thiab plaub lub xaim PT100s yuav muaj qhov sib txawv sib txawv. Qhov ntsuas tus nqi rau feem ntau ntawm cov no tsis tas yuav yog qhov zoo ib yam li saum toj no tab sis yog tias muaj ib khub resistors piv txwv li 3.9Kohms, yog tias koj pauv lawv rau qhov hais 5k, koj yuav tsum sib pauv ob qho rau 5k li ntawd yuav tsum zoo ib yam. Thaum peb tau txais Circuit Court Kuv yuav hais qhov cuam tshuam ntawm kev xaiv qhov sib txawv. Txog kev ua haujlwm lub zog (op amps) koj tuaj yeem siv lwm cov op amps tab sis cov no yog cov uas kuv tau siv.

Kauj Ruam 2: Choj Pob Zeb

Wheatstone Choj
Wheatstone Choj
Wheatstone Choj
Wheatstone Choj
Wheatstone Choj
Wheatstone Choj

Kuv thawj zaug yuav tsum tham txog cov mis kom tau txais qhov kub los ntawm qhov tsis kam rau PT100 ua ntej kuv tham txog thawj feem ntawm Circuit, cov qauv rau qhov tsis kam yog raws li hauv qab no:

Duab
Duab

qhov twg Rx yog PT100 tsis kam, R0 yog PT100 tsis kam ntawm 0 degrees C, α yog qhov kub tsis kam coefficient thiab T yog qhov kub.

Duab
Duab

R0 yog 100ohms li qhov no yog PT100, yog tias nws yog PT1000, R0 yuav yog 1000ohms. α yog 0.00385 ohms/degrees C coj los ntawm cov ntawv teev npe. Kuj tseem muaj cov mis ntau dua uas tuaj yeem pom ntawm no tab sis cov mis saum toj no yuav ua rau txoj haujlwm no. Yog tias peb hloov tus qauv peb tuaj yeem suav qhov ntsuas kub rau qhov ua rau tsis kam:

Duab
Duab

Cia peb hais tias peb xav ntsuas qee yam uas yuav muaj qhov kub thiab txias ntawm -51.85 txog 130 degrees C thiab peb tso PT100 rau hauv Circuit Court uas qhia hauv daim duab 1. Siv kab zauv saum toj no thiab qhov sib npaug rau qhov hluav taws xob tawm ntawm qhov faib hluav taws xob (pom hauv daim duab thawj) peb tuaj yeem suav qhov voltage ntau. Hauv qab ntawm qhov ntau T = -51.85 (80ohms)

Duab
Duab

thiab ntawm 130 degrees (150ohms):

Duab
Duab

Qhov no yuav muab ntau yam ntawm 0.1187V thiab DC offset ntawm 0.142 vim tias peb paub peb qhov kub yuav tsis poob qis dua -51.85 degrees C, qhov no yuav txo qhov kev nkag siab ntawm qhov peb mob siab txog (80 txog 130ohms) thaum peb ua kom lub zog no nce ntxiv. Txhawm rau tshem tawm qhov DC offset thiab nce peb qhov kev nkag siab peb tuaj yeem siv tus choj Wheatstone uas tau qhia hauv daim duab thib ob.

Qhov tso tawm ntawm qhov faib hluav taws xob thib ob (Vb-) yuav raug rho tawm los ntawm thawj qhov faib hluav taws xob faib tawm (Vb+) siv lub zog sib txawv sib txawv tom qab. Cov qauv rau kev tsim tawm ntawm tus choj tsuas yog ob qhov faib hluav taws xob:

Duab
Duab

Qhov hluav taws xob tawm rau PT100 yog 80ohms thiab siv lwm qhov txiaj ntsig hauv daim duab:

Duab
Duab

thiab rau Pt100 ua 150ohms:

Duab
Duab

Los ntawm kev siv Wheatstone peb tshem tawm DC offset thiab nce qhov rhiab heev tom qab ua kom nrov nrov. Tam sim no peb paub tias Wheatstone choj ua haujlwm li cas peb tuaj yeem tham txog vim li cas peb siv 80ohms thiab 3.3kohms. 80ohms yog hom piav qhia los ntawm cov qauv saum toj no, xaiv tus nqi no (peb yuav hu qhov no offset resistor Roff) kom qis hauv qab ntawm koj qhov kub lossis zoo dua, me ntsis qis dua hauv qab ntawm koj li, yog tias qhov no tau siv rau kev tswj hwm kev tswj hwm qhov kub lossis qee yam zoo li ntawd, koj yuav xav paub tias qhov kub tau qis qis dua koj qhov kub li cas. Yog li yog -51.85C yog hauv qab ntawm koj qhov ntau, siv 74.975 ohms (-65 degrees C) rau koj Roff.

Kuv tau xaiv 3.3k rau R1 thiab R3 rau ob qho laj thawj, txhawm rau txwv tam sim no thiab nce qhov ncaj ncees ntawm cov zis. Raws li PT100 hloov pauv vim qhov kub, hla ntau dhau tam sim no los ntawm nws yuav muab kev nyeem tsis raug vim yog cua sov rau tus kheej yog li kuv tau xaiv qhov siab tshaj tam sim no ntawm 5-10mA. Thaum PT100 yog 80ohms tam sim no yog 1.775mA thiaj li nyab xeeb hauv qab qhov ntau. Koj txo qis qhov kev tiv thaiv kom ua rau muaj kev nkag siab tab sis qhov no tuaj yeem muaj qhov tsis zoo ntawm txoj kab ncaj ncees, raws li peb yuav siv qhov sib npaug ntawm kab tom qab (y = mx+c) muaj qhov tsis-tawm cov kab tawm yuav qhia qhov tsis raug. Daim duab thib peb muaj daim duab ntawm tus choj tsim tawm siv cov sib txawv sab saum toj resistors, cov kab khoom yog qhov tso tawm tiag tiag thiab kab kab yog qhov kwv yees kwv yees. Koj tuaj yeem pom hauv daim duab xiav tsaus (R1 & R3 = 200ohms) muab qhov ntau qhov hluav taws xob ntau tab sis cov zis yog qhov tsawg tshaj plaws tawm. Lub teeb xiav (R1 & R3 = 3.3kohms) muab qhov tsawg tshaj plaws qhov hluav taws xob ntau tab sis cov kab dotted thiab cov kab khoom tau sib tshooj ua ke qhia nws txoj kab ncaj nraim yog qhov zoo heev.

Xav tias hloov pauv cov txiaj ntsig no kom haum rau koj daim ntawv thov, kuj yog tias koj hloov qhov hluav taws xob, xyuas kom tseeb tias tam sim no tsis tau siab dhau.

Kauj Ruam 3: Kev nthuav dav

Kev nthuav dav
Kev nthuav dav
Kev nthuav dav
Kev nthuav dav

Hauv theem kawg, peb pom cov txiaj ntsig ntawm ob qhov faib hluav taws xob faib tawm yog 0 txog 0.1187 tab sis peb tsis tau tham txog yuav rho tawm cov hluav taws xob no li cas. Txhawm rau ua qhov no peb yuav xav tau qhov sib txawv amp uas yuav rho tawm ib qho tswv yim los ntawm lwm qhov thiab nthuav tawm qhov no los ntawm kev nce ntawm amp. Lub Circuit Court rau qhov sib txawv amp tau qhia hauv daim duab thawj. Koj pub Vb+ rau hauv cov tswv yim hloov pauv thiab Vb- hauv qhov tsis hloov pauv thiab cov zis yuav yog Vb+- Vb- nrog qhov nce ntawm ib qho piv txwv tsis muaj kev hloov pauv tab sis los ntawm kev ntxiv cov resistors uas qhia hauv daim duab peb ntxiv qhov nce ntawm 5.731. Qhov tau txais yog muab los ntawm:

Duab
Duab

Ra yog R5 & R7 thiab Rb yog R6 & R8, qhov hluav taws xob tawm tau muab los ntawm:

Duab
Duab

Muaj ob qhov teeb meem nrog tsuas yog txuas lub amp no rau qhov tso tawm ntawm tus choj, cov txiaj ntsig thauj khoom thiab hloov pauv qhov nce. Hloov pauv qhov nce ntawm amp xav kom koj hloov tsawg kawg ob tus tiv thaiv raws li ob khub ntawm tus tiv thaiv yuav tsum zoo ib yam, yog li muaj ob lub lauj kaub uas yuav tsum muaj tus nqi zoo ib yam yuav ua rau tsis txaus siab yog li peb yuav siv qee yam hu ua ntsuas qhov ntsuas uas kuv tham txog hauv qab no. Cov txiaj ntsig kev thauj khoom yog cov tswv yim tawm tsam rau hauv amp cuam tshuam rau qhov poob qis thoob plaws PT100, peb xav kom qhov hluav taws xob hla PT100 tsis hloov pauv thiab ua qhov no peb tuaj yeem xaiv qhov loj heev resistors rau cov tswv yim tiv thaiv kom thiaj li ua tau zoo ntawm PT100 thiab cov tswv yim tawm tsam ze rau PT100 tsis kam tab sis qhov no tuaj yeem ua teeb meem nrog lub suab nrov thiab qhov hluav taws xob tso tawm uas kuv tsis mus. Tsuas yog xaiv qhov nruab nrab hauv Kohms ntau tab sis raws li kuv tau hais, muaj qhov tiv thaiv me me tsis zoo ib yam yog li peb yuav hloov pauv Circuit me ntsis.

Hauv daim duab thib ob, peb muaj qhov tsim tawm ntawm tus choj txuas nrog lub ntsuas hluav taws xob uas ua rau lub suab tsis sib xws kom cais ob qhov sib luag ntawm cov kab hluav taws xob (tus choj thiab kev ua kom nrov) ntxiv rau tso cai siv los ua kom nrov ntxiv los ntawm kev hloov pauv ib lub zog xwb (Rov qab). Qhov nce ntawm qhov ntsuas qhov ntsuas tau muab los ntawm:

Duab
Duab

qhov twg Rc yog ob qho 3.9k resistor saum toj thiab hauv qab lub lauj kaub.

Los ntawm kev txo Rgain, kev ua kom nrov nrov nce ntxiv. Tom qab ntawd ntawm taw tes Va thiab Vb (ua kom nrov Vb+ thiab Vb-), nws tsuas yog qhov sib txawv amp zoo ib yam ua ntej thiab tag nrho cov txiaj ntsig ntawm Circuit Court tsuas yog nce tau ua ke.

Duab
Duab

Txhawm rau xaiv koj qhov txiaj ntsig koj xav ua qee yam zoo li peb tau ua ua ntej nrog Roff, peb yuav tsum xaiv qhov kev tiv thaiv tsuas yog siab tshaj koj qhov kub nyob hauv koj li tsuas yog thaum nws dhau mus. Vim tias peb tab tom siv Arduino uas muaj 5V adc, qhov siab tshaj plaws ntawm lub Circuit Court yuav tsum yog 5V ntawm qhov kub tshaj plaws uas koj tau xaiv. Cia peb xaiv 150ohms raws li kev tiv thaiv siab tshaj plaws thiab tus choj voltage un-amplified yog 0.1187V, qhov peb xav tau yog 42.185 (5/0.1187)

Cia peb hais tias peb khaws Ra, Rb thiab Rc li 8.2k, 47k thiab 3.9k, peb tsuas yog xav nrhiav tus nqi rau lub lauj kaub Rgain:

Duab
Duab

Yog li kom tau txais tag nrho 5 volts tawm ntawm qhov ntsuas kub peb tab tom siv, hloov tus nqi Rgain rau 1.226k. Cov zis hluav taws xob tawm los ntawm qhov sib txawv amp tau muab los ntawm:

Kauj Ruam 4: Ua kom lub Circuit Court

Ua kom muaj zog hauv Circuit
Ua kom muaj zog hauv Circuit
Ua kom muaj zog hauv Circuit
Ua kom muaj zog hauv Circuit
Ua kom muaj zog hauv Circuit
Ua kom muaj zog hauv Circuit

Qhov no yog cov kauj ruam kawg ntawm lub Circuit Court, koj yuav tau pom Vcc+ thiab Vcc- ntawm op amp circuits, qhov no yog vim lawv xav tau ob qho tib si qhov zoo thiab qhov tsis zoo ua haujlwm kom raug, koj tuaj yeem tau txais ib txoj kev tsheb nqaj hlau op-amps tab sis kuv txiav txim siab siv cov amp no raws li qhov kuv tau dag ib ncig. Yog li peb yuav muab +6V thiab -6V, muaj peb txoj hauv kev peb tuaj yeem ua qhov no. Thawj qhov tau pom hauv thawj daim duab uas peb yuav tsum muaj ob lub zog siv lossis ob lub qhov tso tawm los ntawm ib qho khoom siv hluav taws xob, muaj ob qho ntawm 6V thiab muaj ib qho txiaj ntsig zoo txuas nrog qhov tsis zoo ntawm lwm qhov. 6V ntawm cov khoom siv sab saum toj yuav yog peb +6V, qhov zoo ntawm cov khoom hauv qab yog GND thiab qhov tsis zoo ntawm cov khoom hauv qab yog -6V. Tsuas yog txuas nws zoo li qhov no yog GNDs ntawm Ob Qhov Kev Pabcuam tau sib cais lossis nws yuav ua rau koj lub hwj chim puas tsuaj. Txhua qhov khoom siv hluav taws xob ua lag luam yuav tau cais GNDs tab sis yog tias koj xav tshuaj xyuas, siv lub ntsuas ntsuas txuas mus ntxiv ntawm koj lub multimeter, yog tias nws nrov nrov, tsis txhob siv qhov teeb tsa no thiab siv ib qho ntxiv. Ntawm kuv cov khoom siv hauv tsev, kuv tshuab lub fuse ua qhov no.

Hauv daim duab thib ob yog teeb tsa thib ob uas peb tuaj yeem muaj, nws xav tau ib qho khoom siv kom muaj qhov hluav taws xob ob zaug ntawm lwm qhov tab sis yuav tsis ua kom puas yog tias GNDs txuas nrog. Peb muaj ob qho khoom siv, ib qho ntawm 12V thiab lwm yam ntawm 6V. 12V yuav ua raws li peb +6V, 6V tawm ntawm qhov khoom thib ob yuav ua raws li GND thiab ob qhov GNDs tiag tiag ntawm cov khoom siv yuav ua raws li -6V.

Qhov teeb tsa zaum kawg no yog rau cov khoom siv hluav taws xob nrog tsuas yog ib qho tso tawm, nws siv lub suab tsis zoo ntawm qhov nce 1 los tsim lub ntiaj teb virtual los ntawm kev hla ib nrab ntawm qhov muab hluav taws xob los ntawm qhov tsis zoo amp. Tom qab ntawd 12V yuav ua raws li +6V thiab qhov tseeb GND lub davhlau ya nyob twg yuav yog -6V.

Yog tias koj xav siv roj teeb, Kuv xav qhia thawj qhov teeb tsa tab sis teeb meem nrog roj teeb yog tias qhov hluav taws xob yuav poob thaum lawv pib tuag thiab qhov hluav taws xob tawm ntawm tus choj yuav poob ib yam, muab qhov ntsuas kub tsis raug. Koj tuaj yeem nyeem tau qhov hluav taws xob los ntawm cov roj teeb thiab suav nrog lawv hauv kev suav lossis siv tus tswj hwm thiab ntau lub roj teeb. Thaum kawg, nws nyob ntawm koj.

Kauj Ruam 5: Tag Nrho Circuit thiab Code

Tag nrho Circuit thiab Code
Tag nrho Circuit thiab Code
Tag nrho Circuit thiab Code
Tag nrho Circuit thiab Code
Tag nrho Circuit thiab Code
Tag nrho Circuit thiab Code

Tag nrho cov Circuit tau qhia saum toj no thiab nws tau ua hauv Autodesk qhov tshiab Circuits.io uas tso cai rau koj tsim cov kab hluav taws xob ntawm daim phiaj, hloov daim duab hluav taws xob (qhia hauv daim duab 2) thiab daim duab qhia chaw PCB thiab qhov zoo tshaj plaws, cia koj sim qhov Circuit Court los ntawm lub khob cij thiab tseem tuaj yeem tsim kho Arduino thiab txuas nws hauv hom qhob cij, ntxiv mus rau nplooj ntawv yog qhov simulation thiab koj tuaj yeem ua si ib puag ncig nrog ob lub lauj kaub. Yog tias koj xav theej tawm cov Circuit thiab muab tso rau hauv koj tus kheej qhov txiaj ntsig, koj tuaj yeem pom qhov Circuit Court ntawm no. Thawj lub lauj kaub yog 70ohms thiab hauv kab nrog 80ohm resistor uas simulates PT100 nrog thaj tsam ntawm 80-150ohms, lub lauj kaub thib ob yog qhov nce ntawm qhov ntsuas qhov ntsuas. Tu siab kuv tau siv lub tsev qiv ntawv kuv rub tawm rau kuv tus lej, yog li Arduino tsis suav nrog hauv Circuit hauv qab no tab sis tsuas muaj ob txoj xov ntxiv uas koj xav tau txuas. Yog tias koj xis nyob dua nrog LTspice, Kuv suav nrog asc cov ntaub ntawv nrog hauv Circuit Court.

Txuas A0 tus pin rau qhov tso tawm ntawm amp sib txawv

Txuas GND ntawm Arduino mus rau GND ntawm Circuit (TSIS YOG -6V)

Thiab qhov ntawd yog qhov ua tiav, tam sim no mus rau qhov chaws. Ua ntej kuv tau hais tias peb yuav siv tus qauv y = mx+c, tam sim no peb tab tom yuav suav m (txoj kab nqes) thiab c (qhov offset). Hauv Arduino, peb yuav tau nyeem qhov hluav taws xob tab sis qhov ntsuas cua sov xav tau peb kom paub qhov ua haujlwm ntawm PT100 yog li txoj hauv kev peb tuaj yeem ua qhov no yog los ntawm kev hloov Serial.println (temp) nrog Serial.println (V) thiab sau cov voltage thiab tsis kam ntawm ob qhov kub thiab txias. Thaum ua qhov kev xeem no tawm ntawm PT100 ib leeg rau me ntsis, zoo li ib feeb lossis ob thiab nyob deb ntawm cov khoom siv cua sov (hnub ci, kiv cua laptop, koj lub cev, thiab lwm yam).

Thawj qhov uas peb tuaj yeem ua tau yog chav sov, thaum koj muaj lub xov tooj txuas nrog thiab ua haujlwm, sau qhov ntsuas hluav taws xob (Vt1) nyeem los ntawm Arduino ntawm tus lej saib thiab tshem tawm PT100 sai thiab sau nws qhov tsis kam (Rt1), tsis txhob tso koj txhais tes rau ntawm qhov kev sojntsuam thaum sib txuas vim qhov no yuav hloov qhov tsis kam. Txog qhov ntsuas kub thib ob, peb tuaj yeem tso cov tshuaj soj ntsuam hauv dej khov lossis dej kub (ceev faj yog tias siv dej kub) thiab rov ua qhov peb tau ua ua ntej pom Vt2 thiab Rt2. Tsuas yog tom qab koj tso qhov kev sojntsuam rau hauv cov dej tos ib pliag lossis ob zaug rau qhov tsis kam mus daws. Yog tias koj txaus siab rau lub sijhawm teb ntawm PT100, sau qhov hluav taws xob tawm ntawm cov saib xyuas txhua txhua 2 vib nas this lossis ntau dua thiab peb tuaj yeem kos kab teeb los ntawm qhov no thiab kuv yuav piav qhia nws tom qab. Siv ob qhov hluav taws xob thiab kev tawm tsam, peb tuaj yeem suav qhov nqes hav raws li hauv qab no:

Duab
Duab

Rt1 thiab Rt2 yog qhov tiv thaiv ntawm ob qhov kub thiab tib yam nws muaj tseeb rau qhov hluav taws xob Vt1 thiab Vt2. Los ntawm txoj kab nqes hav thiab ib qho ntawm ob kab ntawm cov ntsiab lus koj tau sau tseg peb tuaj yeem suav qhov offset:

Duab
Duab

C yuav tsum ze rau koj Roff tiag, Los ntawm kuv qhov kev sim kuv tau suav cov txiaj ntsig no:

Duab
Duab

Los ntawm qhov tsis kam no peb tuaj yeem pom peb qhov ntsuas kub siv cov mis uas peb muaj thaum pib:

Duab
Duab

Thiab qhov ntawd yog nws, tus lej rau Arduino yog hauv qab no, yog tias koj muaj teeb meem, tsuas yog tawm lus thiab kuv yuav sim pab.

Tsis muaj cov duab ntawm Circuit uas kuv tau ua raws li kuv tau ua rau ib pliag dhau los thiab tsis muaj PT100 ntxiv rau kev rov ua dua thiab sim tab sis koj tsuas yog yuav tsum ntseeg kuv tias nws ua haujlwm. Tsis muaj ntau txog PT100 ntawm Cov Ntawv Qhia uas kuv pom yog li ntawd yog vim li cas kuv thiaj ua qhov no ible.

Hauv cov kauj ruam tom ntej kuv yuav tham txog lub sijhawm teb ntawm PT100 thiab yog tias koj tsis txaus siab rau kev ua lej, thaum koj ntsuas qhov ntsuas kub hloov pauv, cia PT100 daws ib pliag lossis ntau dua ua ntej nyeem ntawv.

Yog tias koj xav pom lwm txoj haujlwm uas kuv tau ua, mus ntsib kuv

Blog: Roboroblog

YouTube Channel: Roboro

Los yog saib kuv lwm Cov Lus Qhia: ntawm no

Yog tias HTML cuam tshuam nrog cov cai hauv qab no, cov cai tau txuas nrog

* Txoj cai no suav qhov ntsuas kub siv PT100

* Sau los ntawm Roboro * Github: <a href = "https://github.com/RonanB96/Read-Temp-From-PT100-… <a href =" https://github.com/RonanB96/Read-Temp- Los ntawm-PT100-… <a href = "https://github.com/RonanB96/Read-Temp-From-PT100- … >>>>>>>>> * Circuit: <a href=" href="https://github.com/RonanB96/Read-Temp-From-PT100-… <a href=" https://github.com/ronanb96/read-temp-from-pt100-…="">>>>>>>>>> * Blog: <a href=" href="https://github.com/RonanB96/Read-Temp-From-PT100-… <a href=" https://github.com/ronanb96/read-temp-from-pt100-…="">>>>>>>>>> * Instrustable Post: <a href=" href="https://github.com/RonanB96/Read-Temp-From-PT100-… <a href=" https://github.com/ronanb96/read-temp-from-pt100-…="">>>>>>>>>> * */ //You'll need to download this timer library from here //https://www.doctormonk.com/search?q=timer #include "Timer.h" // Define Variables float V; float temp; float Rx; // Variables to convert voltage to resistance float C = 79.489; float slope = 14.187; // Variables to convert resistance to temp float R0 = 100.0; float alpha = 0.00385; int Vin = A0; // Vin is Analog Pin A0 Timer t; // Define Timer object

void setup() {

Serial.begin(9600); // Set Baudrate at 9600 pinMode(Vin, INPUT); // Make Vin Input t.every(100, takeReading); // Take Reading Every 100ms } void loop() { t.update(); // Update Timer } void takeReading(){ // Bits to Voltage V = (analogRead(Vin)/1023.0)*5.0; // (bits/2^n-1)*Vmax // Voltage to resistance Rx = V*slope+C; //y=mx+c // Resistance to Temperature temp= (Rx/R0-1.0)/alpha; // from Rx = R0(1+alpha*X) // Uncommect to convet celsius to fehrenheit // temp = temp*1.8+32; Serial.println(temp); }

Step 6: Time Response of PT100

Lub Sijhawm Teb ntawm PT100
Lub Sijhawm Teb ntawm PT100

Yog li kuv tau hais tias PT100 muaj qhov teb qeeb tab sis peb tuaj yeem tau txais tus qauv rau qhov ntsuas kub tam sim no los ntawm PT100 txhua lub sijhawm t. Cov lus teb ntawm PT100 yog thawj qhov lus teb uas tuaj yeem sau hauv Laplace cov ntsiab lus piv txwv li hloov ua haujlwm, xws li:

Duab
Duab

qhov twg tau (τ) yog lub sijhawm tsis tu ncua, K yog qhov tau txais ntawm qhov system thiab s yog Laplace tus neeg teb xov tooj uas tuaj yeem sau ua jω qhov twg ω yog zaus.

Lub sijhawm tas li qhia koj ntev npaum li cas nws yuav siv thawj qhov kev txiav txim los daws nws tus nqi tshiab thiab txoj cai lossis tus ntiv tes xoo yog 5*tau yog ntev npaum li cas nws yuav siv sijhawm los daws qhov xwm txheej tshiab. Qhov nce K qhia koj ntau npaum li cas cov tswv yim yuav nthuav tawm. Nrog rau PT100, qhov nce yog ntau npaum li cas qhov kev tawm tsam hloov pauv los ntawm qhov hloov pauv kub, los ntawm kev xaiv ob qhov txiaj ntsig tsis raug los ntawm cov ntawv no, Kuv tau txais qhov nce ntawm 0.3856 ohm/C.

Ua ntej kuv hais tias koj tuaj yeem kaw qhov hluav taws xob txhua txhua 2s tom qab koj tso qhov kev sojntsuam rau hauv cov kua, kub lossis txias, los ntawm qhov no peb tuaj yeem suav lub sijhawm tas li ntawm qhov system. Ua ntej koj yuav tsum txheeb xyuas qhov twg pib qhov pib thiab qhov kawg, qhov pib taw tes yog qhov hluav taws xob ua ntej koj tso qhov kev sojntsuam rau hauv cov kua thiab qhov kawg taw tes yog thaum nws daws teeb meem. Tom ntej rho tawm lawv thiab qhov ntawd yog qhov hloov pauv ntawm cov kauj ruam, qhov kev sim uas koj tau ua yog hloov pauv ib qib uas yog qhov hloov pauv tam sim ntawd hauv cov kab ke, cov kauj ruam ua kom sov. Tam sim no ntawm koj daim duab mus rau 63.2% ntawm qhov hloov pauv hluav taws xob thiab lub sijhawm no yog lub sijhawm tas li.

Duab
Duab

Yog tias koj ntsaws tus nqi ntawd rau hauv kev hloov pauv, koj tom qab ntawd muaj cov qauv piav qhia cov lus teb ntawm lub tshuab tab sis qhov ntawd tsis yog qhov peb xav tau tam sim no, peb xav tau qhov ntsuas kub tiag tiag ntawm lub sijhawm t rau ib qib hauv qhov kub kom peb thiaj li mus yuav tsum ua qhov hloov pauv Laplace hloov pauv ntawm ib qib mus rau hauv kab ke. Kev hloov pauv ua haujlwm ntawm thawj qhov kev txiav txim nrog cov tswv yim ntawm cov kauj ruam yog raws li hauv qab no:

Duab
Duab

Qhov twg Ks yog qib loj piv txwv li qhov sib txawv ntawm qhov kub thiab txias. Yog li cia peb hais qhov kev sojntsuam tau teeb tsa ntawm 20 degrees C, muab tso rau hauv dej ntawm 30 degrees C thiab qhov kev sojntsuam muaj sijhawm tsis tu ncua ntawm 8s, kev hloov pauv ua haujlwm thiab lub sijhawm sau tus lej yog raws li hauv qab no:

Duab
Duab

Qhov δ (t) tsuas yog txhais tau tias yog qhov ua tsis tau zoo piv txwv li DC offset ntawm 20 degrees C hauv qhov no, koj tsuas tuaj yeem sau 20 hauv koj qhov sib npaug thaum xam qhov no. Nov yog tus txheej txheem sib npaug rau kauj ruam mus rau thawj qhov kev txiav txim:

Duab
Duab

Cov lus saum toj no suav qhov ntsuas kub ntawm lub sijhawm t tab sis qhov no yuav ua haujlwm rau qhov hluav taws xob vim lawv sib piv rau ib leeg, koj tsuas yog xav tau qhov pib thiab xaus tus nqi, lub sijhawm tas li thiab qhov loj me. Lub vev xaib hu ua Symbolab yog qhov zoo rau kev tshuaj xyuas yog tias koj lej ua tau yog, nws tuaj yeem ua Laplace, kev koom ua ke, kev sib txawv thiab ntau yam ntxiv thiab nws muab rau koj txhua kauj ruam raws txoj kev. Kev hloov pauv Laplace hloov pauv qhov saum toj no tuaj yeem pom ntawm no.

Pom zoo: