Cov txheej txheem:

Kev Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno: 4 Cov Kauj Ruam
Kev Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno: 4 Cov Kauj Ruam

Video: Kev Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno: 4 Cov Kauj Ruam

Video: Kev Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno: 4 Cov Kauj Ruam
Video: Qhia Txog Kev Siv Kev Ua Suab Rau Definite Article The 2024, Kaum ib hlis
Anonim
Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno
Nyeem Ntawv Kub Siv LM35 Kub Sensor Nrog Arduino Uno

Nyob zoo cov neeg hauv phau ntawv qhia no peb yuav kawm paub siv LM35 nrog Arduino li cas. Lm35 yog qhov ntsuas kub uas tuaj yeem nyeem qhov ntsuas kub ntawm -55 ° c txog 150 ° C. Nws yog 3 lub davhlau ya nyob twg uas muab cov khoom sib piv sib piv rau qhov kub thiab txias. Qhov kub siab dua, siab dua yog qhov tso tawm qhov hluav taws xob. Qhov tso tawm qhov hluav taws xob sib piv tuaj yeem hloov pauv mus rau digital daim ntawv siv ADC kom lub microcontroller (hauv peb cov ntaub ntawv Arduino) tuaj yeem ua nws.

Kauj Ruam 1: Yam Koj Xav Tau

Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau
Yam Koj Xav Tau

Rau cov lus qhia no koj yuav xav tau cov khoom hauv qab no: 1x Arduino uno (lossis lwm yam sib npaug) 1x LM35 TEMPERATURE SENSORJumper WireBreadboard

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas

Cov kev sib txuas tau yooj yim heev txuas txhua yam Raws li cov duab pom thiab koj yuav zoo. Peb yuav ntsuas qhov ntsuas kub ib puag ncig uas siv LM35 thiab tso tawm nws ntawm kab ntawv saib ntawm Arduino. Qhov no, LM35 cov zis tau muab rau analog pin A1 ntawm Arduino UAS. Qhov ntsuas hluav taws xob sib piv no tau hloov pauv mus rau nws daim ntawv digital thiab ua tiav kom tau txais qhov ntsuas kub.

Kauj ruam 3: Code

Code
Code

Thov luam cov cai hauv qab no & Hloov nws mus rau koj li Arduino Board: const lm35_pin = A1; / * LM35 O/P pin */void teeb () {Serial.begin (9600);} tsis muaj dab tsi voj () {int temp_adc_val; ntab temp_val; temp_adc_val = analogRead (lm35_pin); / * Nyeem Kub */ temp_val = (temp_adc_val * 4.88); / * Hloov adc tus nqi sib npaug voltage */temp_val = (temp_val/10); / * LM35 muab cov zis ntawm 10mv/° C */Serial.print ("Kub ="); Serial.print (temp_val); Serial.print ("Degree Celsius / n"); ncua (1000);} Video

Kauj Ruam 4: Kuaj Qhov Kub Kub Sensor

Kuaj Qhov Kub Sensor
Kuaj Qhov Kub Sensor

Tom qab txuas txhua yam ua ke thiab xa cov cai mus rau arduino Board, kuv tau qhib lub ntsuas saib hauv kuv lub PC thiab zoo li koj tuaj yeem pom hauv daim duab uas peb muaj peev xwm tawm qhov ntsuas kub ntawm peb cov ntawv saib.

Pom zoo: