Cov txheej txheem:

DIY Kub Sensor Siv Ib Diode: 3 Kauj Ruam
DIY Kub Sensor Siv Ib Diode: 3 Kauj Ruam

Video: DIY Kub Sensor Siv Ib Diode: 3 Kauj Ruam

Video: DIY Kub Sensor Siv Ib Diode: 3 Kauj Ruam
Video: Часы G Shock до 100 долларов-15 лучших часов Casio G Shock до 100 дол... 2024, Kaum ib hlis
Anonim
DIY Kub Sensor Siv Ib Diode
DIY Kub Sensor Siv Ib Diode
DIY Kub Sensor Siv Ib Diode
DIY Kub Sensor Siv Ib Diode

Yog li ib qho ntawm qhov tseeb txog PN-kev sib tshuam yog tias lawv qhov kev hloov pauv mus rau qhov hloov pauv raws li qhov tam sim no dhau mus thiab mus rau qhov sib tshuam kub kuj, peb yuav siv qhov no los ua qhov ntsuas kub yooj yim yooj yim.

Qhov teeb tsa no feem ntau siv hauv ntau qhov Kev Sib Txuas Hluav Taws Xob los ntsuas nws qhov ntsuas kub sab hauv thiab ntau qhov ntsuas kub raws li lub npe LM35 uas yog raws li cov khoom no.

Yooj yim rau qhov poob qis ntawm qhov diode (uas yog ib leeg nkaus xwb PN-hlws ris) hloov pauv raws li qhov tam sim no dhau los ntawm nws hloov pauv, kuj tseem yog qhov ntsuas kub hloov pauv diode poob qis yuav hloov pauv (Raws li qhov kub nce, mus rau tom ntej) poob qis los ntawm tus nqi ntawm (1.0 milliVolts rau 2.0 milliVolts rau silicon diodes thiab 2.5 milliVolts rau germanium diodes)

Yog li los ntawm kev dhau mus tas li tam sim no los ntawm diode qhov poob qis rau pem hauv ntej yuav tsum tam sim no tsuas yog sib txawv raws li qhov ntsuas kub. Peb tsuas yog xav tau tam sim no los ntsuas qhov ntsuas hluav taws xob rau pem hauv ntej, siv qee qhov sib npaug yooj yim thiab voilà ntawm no yog koj qhov ntsuas kub !!!

Khoom siv

1 - 1n4007 diode #12 - 1 Kohm resistor #13 - Arduino board

Kauj Ruam 1: Daim duab Circuit Court

Daim duab Circuit Court
Daim duab Circuit Court

Raws li koj tuaj yeem pom hauv schematic nws yooj yim heev. los ntawm kev txuas cov diode hauv koob nrog qhov txwv tam sim no resistor thiab qhov ruaj khov qhov hluav taws xob peb tuaj yeem tau txais cov khoom siv hluav taws xob tsis tu ncua tam sim no, yog li ntsuas qhov ntsuas hluav taws xob hla lub diode tsuas yog sib txawv vim qhov hloov pauv kub. qis dhau heev uas tam sim no dhau los ntawm diode thiab ua kom pom kev sov nws tus kheej hauv lub diode, kuj tsis yog tus tiv taus siab heev yog li tam sim no dhau los tsis txaus los tswj kev sib raug zoo ntawm qhov ua ntej qhov hluav taws xob thiab qhov kub.

1 kilo Ohm resistor nrog 5V cov khoom yuav tsum ua rau 4 milliAmpere diode tam sim no uas yog tus nqi txaus rau lub hom phiaj no. Kuv (diode) = VCC / (Rseries + Rdiode)

Kauj ruam 2: Coding

Peb yuav tsum nco ntsoov tias muaj qee qhov txiaj ntsig los tweak hauv cov cai kom tau txais txiaj ntsig zoo dua li:

1 - VCC_Voltage: raws li analogRead () tus nqi nyob ntawm VCC ntawm ATmega nti ces peb yuav tsum ntxiv nws mus rau qhov sib npaug tom qab ntsuas nws ntawm pawg thawj coj saib.

2 - V_OLD_0_C: qhov hluav taws xob poob qis ntawm qhov siv diode tam sim no ntawm 4 mA thiab qhov kub ntawm 0 Celsius

3 - Kub_Coefficient: qhov ntsuas kub ntawm koj lub diode (zoo dua kom tau txais los ntawm cov ntawv teev npe) lossis koj tuaj yeem ntsuas nws siv qhov sib npaug no: Vnew - Vold = K (Tnew - Told)

qhov twg:

Vnew = tshiab ntsuas ntsuas qhov poob qis tom qab ua kom sov lub diode

Vold = ntsuas qhov ntsuas hluav taws xob ntawm qee chav sov

Tnew = qhov kub qhov twg lub diode tau rhaub rau

Qhia = qhov kub hauv chav qub uas Vold tau ntsuas ntawm

K = Kub_Coefficient (tus nqi tsis zoo sib txawv ntawm -1.0 txog -2.5 milliVolts) Thaum kawg koj tam sim no tuaj yeem tso tus lej thiab tau txais koj qhov ntsuas kub.

#define Sens_Pin A0 // PA0 rau STM32F103C8 board

ob V_OLD_0_C = 690.0; // 690 mV Forward voltage ntawm 0 Celsius ntawm 4 mA kuaj tam sim no

ob V_NEW = 0; // Tshiab rau pem hauv ntej qhov hluav taws xob ntawm chav sov ntawm 4 mA ntsuas tam sim no ob chav Kub = 0.0; // Chav xam qhov ntsuas kub ob zaug Kub_Coefficient = -1.6; //-1.6 mV hloov ib qib Celsius (-2.5 rau germanium diodes), zoo dua kom tau txais los ntawm diode cov ntaub ntawv ob npaug VCC_Voltage = 5010.0; // Qhov hluav taws xob tam sim no ntawm 5V txoj kev tsheb nqaj hlau ntawm arduino hauv milliVolts (xav tau kom raug qhov tseeb) (3300.0 rau stm32)

void teeb tsa () {

// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: pinMode (Sens_Pin, INPUT); Serial.begin (9600); }

void voj () {

// tso koj tus lej tseem ceeb ntawm no, kom rov ua dua: V_NEW = analogRead (Sens_Pin)*VCC_Voltage/1024.0; // faib los ntawm 4.0 yog tias koj siv 12 ntsis ADC Kub = ((V_NEW - V_OLD_0_C)/Kub_Coefficient);

Serial.print ("Temp =");

Serial.print (Kub); Serial.println ("C");

ncua (500);

}

Kauj Ruam 3: Tau Txais Qhov Zoo

Tau Txais Qhov Zoo
Tau Txais Qhov Zoo
Tau Txais Qhov Zoo
Tau Txais Qhov Zoo

Kuv xav tias nws raug nquahu kom muaj lub ntsuas ntsuas ntsuas ntsuas kub ib puag ncig ntawm koj thaum ua txoj haujlwm no.

koj tuaj yeem pom tias muaj qhov yuam kev pom hauv kev nyeem ntawv uas tuaj yeem nce mus rau 3 lossis 4 degrees Celsius yog li qhov yuam kev no los qhov twg los?

1 - koj yuav xav tau hloov kho qhov sib txawv uas tau hais hauv qib dhau los

2 - ADC kev daws teeb meem ntawm arduino qis dua qhov peb xav tau txhawm rau txheeb xyuas qhov sib txawv me me ntawm qhov hluav taws xob

3 - qhov ntsuas hluav taws xob siv ntawm arduino (5V) siab dhau rau qhov kev hloov pauv me me no hla lub diode

Yog li yog tias koj yuav siv qhov teeb tsa no ua qhov ntsuas kub, koj yuav tsum paub tias txawm hais tias nws pheej yig thiab siv tau, nws tsis raug tab sis nws tuaj yeem muab tswv yim zoo rau koj txog qhov ntsuas kub ntawm koj lub cev txawm tias nws nyob ntawm PCB lossis teeb tsa los ua lub cev muaj zog thiab lwm yam …

Cov lus qhia no txhais tau tias siv qhov tsawg tshaj plaws ntawm cov khoom siv tau tab sis yog tias koj xav tau qhov txiaj ntsig raug tshaj plaws los ntawm lub tswv yim no koj tuaj yeem ua qee qhov kev hloov pauv:

1 - ntxiv qee qhov kev hloov pauv thiab lim theem siv op -amps zoo li hauv qhov txuas no 2 - siv qis dua sab hauv piv txwv xws li STM32F103C8 cov laug cam nrog 3.3 Volts analog siv qhov ntsuas (saib taw tes 4) 3 - siv sab hauv 1.1 V analog siv hauv arduino tab sis nco ntsoov tias koj tsis tuaj yeem txuas ntau dua 1.1 Volt rau ib qho ntawm arduino analog pins.

koj tuaj yeem ntxiv kab no hauv kev teeb tsa muaj nuj nqi:

analogReference (sab hauv);

4 - Siv lub microcontroller uas muaj kev daws teeb meem siab dua ADC li STM32F103C8 uas muaj 12 ntsis ADC daws teeb meem Yog li hauv qhov yooj yim, qhov kev teeb tsa raws li arduino tuaj yeem muab cov ntsiab lus zoo txog koj lub cev kub tab sis tsis yog qhov txiaj ntsig raug (kwv yees li 4.88 mV/Nyeem)

STM32F103C8 teeb tsa yuav muab rau koj qhov txiaj ntsig tau zoo vim tias nws muaj 12-ntsis ADC siab dua thiab qis dua 3.3V analog siv tus nqi (kwv yees li 0.8 mV/Nyeem)

Zoo, uas yog nws !!: D

Pom zoo: