Cov txheej txheem:

Kev Ntsuas Kub Siv XinaBox thiab Thermistor: 8 Kauj Ruam
Kev Ntsuas Kub Siv XinaBox thiab Thermistor: 8 Kauj Ruam

Video: Kev Ntsuas Kub Siv XinaBox thiab Thermistor: 8 Kauj Ruam

Video: Kev Ntsuas Kub Siv XinaBox thiab Thermistor: 8 Kauj Ruam
Video: QHIA QHOV TSEEB - KUB VAJ LOOG TSUA NEW MUSIC VIDEO 2022 2024, Kaum ib hlis
Anonim
Kev Ntsuas Kub Siv XinaBox thiab Thermistor
Kev Ntsuas Kub Siv XinaBox thiab Thermistor

Ntsuas qhov ntsuas kub ntawm cov kua uas siv cov lus sib piv xChip los ntawm XinaBox thiab cov ntsuas cua sov.

Kauj Ruam 1: Yam Khoom Siv Hauv Txoj Haujlwm no

Cov khoom siv kho vajtse

  • XinaBox SX02 x 1 xChip analog input sensor nrog ADC
  • XinaBox CC01 x 1 xChip version ntawm Arduino Uno raws li ATmega328P
  • Resistor 10k ohm x 1 10k resistor rau qhov faib hluav taws xob network
  • Thermistor Probe x 1 10k ntawm 25 ° C NTC cov dej tsis ntsuas dej ntsuas kub
  • XinaBox IP01 x 1 xChip USB Programmer raws FT232R Los ntawm FTDI Txwv
  • XinaBox OD01 x 1 xChip 128x64 Pixel OLED Display
  • XinaBox XC10 x 4 xChip npav txuas
  • XinaBox PU01 x 1 xChip USB (Hom A) Cov Khoom Siv Hluav Taws Xob
  • 5V USB Lub Hwj Huam Fais X 1 Lub Hwj Huam Power Bank lossis zoo sib xws

Software apps thiab cov kev pabcuam online

Arduino IDE Cov

Cov cuab yeej siv tes thiab tshuab tsim

Flathead Screwdriver Kom nruj lossis xoob cov ntsia hlau dav dav clamp

Kauj ruam 2: Zaj dab neeg

Taw qhia

Kuv xav ntsuas qhov ntsuas kub ntawm cov kua los ntawm kev tsim lub ntsuas sov yooj yim. Los ntawm kev siv XinaBox xChips Kuv tuaj yeem ua tiav qhov no nrog kev txheeb ze yooj yim. Kuv siv SX02 cov lus qhia sib piv xChip uas lees txais 0 - 3.3V, CC01 xChip raws li tawm ntawm ATmega328P thiab OD01 OLED zaub xChip los saib kuv qhov ntsuas kub.

Thermistor ntsuas kub ntawm cov dej hauv iav

Kauj Ruam 3: Rub Cov Ntaub Ntawv Tsim Nyog

Koj yuav xav tau cov tsev qiv ntawv thiab software hauv qab no:

  • xSX0X- Lub tsev qiv ntawv Analogue input sensor
  • xOD01 - OLED lub tsev qiv ntawv tso saib
  • Arduino IDE - Kev txhim kho ib puag ncig

Nyem rau qhov no kom pom yuav ua li cas rau nruab cov tsev qiv ntawv.

Thaum koj tau teeb tsa Arduino IDE, qhib nws thiab xaiv "Arduino Pro lossis Pro Mini" ua lub rooj tsavxwm txhawm rau rub koj cov haujlwm rau. Kuj tseem ua kom ntseeg tau tias xaiv ATmega328P (5V, 16MHz). Saib duab hauv qab no.

Xaiv Arduino Pro lossis Pro Mini board thiab ATmega328P (5V, 16MHz) processor

Kauj ruam 4: Sib sau ua ke

Nyem tus programmer xChip, IP01, thiab ATmega328P raws CC01 xChip ua ke siv XC10 tsheb npav txuas raws li qhia hauv qab no. Txhawm rau rub mus rau CC01 koj yuav tsum tso cov hloov pauv hauv 'A' thiab 'DCE' txoj haujlwm feem.

IP01 thiab CC01 nyem ua ke

Tom ntej no, coj koj 10kΩ resistor thiab ntsia hlau ib kawg hauv lub davhlau ya nyob twg cim "IN" thiab lwm qhov kawg hauv av davhlau ya nyob twg, "GND", ntawm SX02. Coj cov coj mus rau qhov ntsuas kub ntawm lub ntsuas cua thiab ntswj ib qho kawg hauv Vcc, "3.3V", thiab lwm qhov kawg hauv "IN" davhlau ya nyob twg. Saib cov duab hauv qab no.

SX02 kev sib txuas

Tam sim no ua ke OD01 thiab SX02 nrog CC01 los ntawm kev nyem lawv ua ke siv XC10 tsheb npav txuas. Saib hauv qab no. Cov xim nyiaj hauv daim duab yog lub ntsuas cua sov.

Ua kom tiav chav rau kev ua haujlwm

Kauj Ruam 5: Txoj Haujlwm

Ntxig chav nyob rau hauv USB chaw nres nkoj ntawm koj lub computer. Rub tawm lossis luam thiab muab cov cai hauv qab no tso rau hauv koj li Arduino IDE. Sau thiab xa cov cai rau koj pawg thawj coj. Thaum rub tawm koj qhov program yuav tsum pib ua haujlwm. Yog tias koj sojntsuam nyob ntawm chav sov, koj yuav tsum ntsuas ± 25 ° C ntawm OLED zaub raws li qhia hauv qab no.

Tom qab rub tawm saib xyuas chav sov ntawm OLED zaub

Kauj Ruam 6: Cov Ntsuas Kub Ntsuas

Tshem tawm chav tsev ntawm koj lub computer. Sib cais chav tsev thiab rov qab siv nws PU01 dua li IP01. Tam sim no coj koj 5V USB lub zog nqa hluav taws xob xws li lub txhab nyiaj hluav taws xob lossis zoo sib xws thiab ntxig qhov sib dhos tshiab rau hauv. Tam sim no koj muaj koj tus kheej lub ntsuas cua txias txias nrog qhov raug zoo. Saib daim duab npog kom pom nws ua haujlwm. Kuv ntsuas dej kub hauv ib khob. Cov duab hauv qab no qhia koj chav ua tiav.

Ua kom tiav chav tsev suav nrog CC01, OD01, SX02 thiab PU02.

Kauj Ruam 7: Xaus

Txoj haujlwm no tau siv sijhawm 10 feeb los sib sau ua ke thiab lwm 20 feeb rau txoj haujlwm. tsuas yog ib qho kev tiv thaiv uas yuav tsum tau muaj yog tus tiv thaiv. XChips tsuas yog nyem ua ke ua rau nws yooj yim heev.

Kauj ruam 8: Code

ThermTemp_Display.ino Arduino Tshawb nrhiav thermistors txhawm rau nkag siab cov lej hauv cov cai.

#suav nrog // suav nrog cov tsev qiv ntawv tseem ceeb rau xCHIPs

#include // suav nrog cov tswv yim analog nkag lub tsev qiv ntawv #suav nrog // suav nrog OLED cov tsev qiv ntawv nthuav qhia #suav nrog // suav cov lej ua haujlwm #txhais C_Kelvin 273.15 // rau kev hloov pauv los ntawm kelvin mus rau Celsius #define series_res 10000 // tus nqi ntawm cov khoom tiv thaiv hauv ohms #define B 3950 // B parameter rau thermistor #define room_tempK 298.15 // chav sov hauv kelvin #define room_res 10000 // tsis kam ntawm chav sov hauv ohms #define vcc 3.3 // muab hluav taws xob xSX01 SX01 (0x55); // teeb tsa qhov chaw nyob i2c ntab voltage; // sib txawv uas muaj qhov ntsuas hluav taws xob (0 - 3.3V) ntab therm_res; // thermistor tsis kam ntab act_tempK; // qhov kub thiab txias kelvin ntab act_tempC; // qhov ntsuas kub tiag tiag hauv Celsius tsis muaj dab tsi teeb tsa () {// muab koj cov cai teeb tsa ntawm no, kom khiav ib zaug: // pib qhov hloov pauv rau 0 voltage = 0; therm_res = 0; act_tempK = 0; act_tempC = 0; // pib kev sib txuas lus txuas Serial.begin (115200); // pib i2c kev sib txuas lus Wire.begin (); // pib lub analog input sensor SX01.begin (); // pib OLED zaub OLED.begin (); // clear display OD01.clear (); // ncua rau normalize ncua (1000); } void loop () {// muab koj tus lej tseem ceeb ntawm no, kom rov ua dua: // nyeem qhov hluav taws xob SX01.poll (); // khaws lub volatge voltage = SX01.getVoltage (); // xam cov thermistor tsis kam therm_res = ((vcc * series_res) / voltage) - series_res; // xam qhov tseeb qhov kub thiab txias hauv kelvin act_tempK = (room_tempK * B) / (B + room_tempK * cav (therm_res / room_res)); // hloov kelvin mus rau Celsius act_tempC = act_tempK - C_Kelvin; // luam tawm kub ntawm OLED zaub // phau ntawv ua qauv los tso rau hauv nruab nrab OD01.set2X (); OD01.println (""); OD01.println (""); OD01.print (""); OD01.print (act_tempC); OD01.print ("C"); OD01.println (""); ncua (2000); // hloov tshiab tso tawm txhua 2 vib nas this}

Pom zoo: