Cov txheej txheem:

Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino: 7 Kauj Ruam
Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino: 7 Kauj Ruam

Video: Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino: 7 Kauj Ruam

Video: Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino: 7 Kauj Ruam
Video: Qhia txuas xaim hluav taws xob daim: 02 2024, Hlis ntuj nqeg
Anonim
Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino
Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino
Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino
Cov Khoom Siv Teeb Meem Siv Chaw Taws Teeb Siv Arduino

Niaj hnub no, Cov Tsim, Cov Tsim Kho xav tau Arduino rau kev txhim kho sai ntawm cov qauv ntawm cov phiaj xwm. Arduino yog lub platform siv hluav taws xob qhib raws qhov yooj yim-rau-siv-kho vajtse thiab software. Arduino muaj zej zog cov neeg siv zoo heev. Hauv txoj haujlwm no, peb yuav pom yuav ua li cas thiaj nkag siab qhov ntsuas kub thiab qhov deb. Lub hom phiaj tuaj yeem yog txhua yam zoo li lub thawv kub lossis cov dej khov nab kuab tiag tiag phab ntsa sab nraum. Yog li, nrog cov kab ke no, peb tuaj yeem txuag peb tus kheej. Thiab tseem ceeb dua, qhov no tuaj yeem pab tau rau cov neeg xiam oob khab (cov neeg dig muag).

Kauj Ruam 1: Cheeb Tsam

Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam
Cheebtsam

Rau txoj haujlwm no peb yuav xav tau cov khoom siv hauv qab no,

1. Arduino Nano

2. MLX90614 (IR Kub sensor)

3. HCSR04 (Ultrasonic sensor)

4.16x2 LCD npo

5. Breadboard

6. Txhua Hlau

Peb tuaj yeem siv ib qho Arduino board hloov chaw ntawm Arduino nano txiav txim siab tus lej cim.

Kauj Ruam 2: Ntau Txog MLX90614:

Ntau Txog MLX90614
Ntau Txog MLX90614
Ntau Txog MLX90614
Ntau Txog MLX90614

MLX90614 yog i2c raws li qhov ntsuas kub IR ua haujlwm ntawm kev ntsuas hluav taws xob cua sov.

Sab hauv, MLX90614 yog kev sib txuas ntawm ob lub cuab yeej: lub ntsuas hluav taws xob infrared ntsuas hluav taws xob thiab lub teeb pom kev zoo daim ntawv thov txheej txheem. Raws li txoj cai Stefan-Boltzman, ib yam khoom uas tsis qis dua qhov tsis muaj pes tsawg (0 ° K) tso tawm (tsis yog tib neeg-qhov muag-pom) lub teeb nyob rau hauv cov duab hluav taws xob uas yog ncaj qha piv rau nws qhov kub. Qhov tshwj xeeb infrared thermopile sab hauv MLX90614 nkag siab ntau npaum li cas lub zog hluav taws xob infrared tau tawm los ntawm cov khoom siv hauv nws qhov kev pom, thiab tsim hluav taws xob teeb liab sib piv rau qhov ntawd. Qhov hluav taws xob uas tsim los ntawm cov thermopile tau khaws los ntawm daim ntawv thov txheej txheem 17-ntsis ADC, tom qab ntawv ua ntej dhau mus rau lub microcontroller.

Kauj Ruam 3: Ntau Ntxiv Txog HCSR04 Module:

Ntxiv Txog HCSR04 Module
Ntxiv Txog HCSR04 Module
Ntxiv Txog HCSR04 Module
Ntxiv Txog HCSR04 Module

Hauv ultrasonic module HCSR04, peb yuav tsum muab lub plawv dhia rau ntawm tus pin, yog li nws yuav tsim hluav taws xob ntawm zaus 40 kHz. Tom qab tsim hluav taws xob piv txwv li 8 mem tes ntawm 40 kHz, nws ua rau tus ncha pin siab. Echo tus pin tseem nyob siab kom txog thaum nws tsis tau txais lub suab ncha rov qab.

Yog li qhov dav ntawm tus ncho tus pin yuav yog lub sijhawm rau lub suab mus rau qhov khoom thiab rov qab los. Thaum peb tau txais lub sijhawm peb tuaj yeem suav nrug, raws li peb paub lub suab nrawm. HC -SR04 tuaj yeem ntsuas txog li ntawm 2 cm - 400 cm. Ultrasonic Module yuav tsim cov nthwv dej ultrasonic uas siab dua tib neeg-kuaj pom ntau zaus, feem ntau tshaj 20, 000 Hz. Hauv peb qhov xwm txheej peb yuav kis tus zaus ntawm 40Khz.

Kauj Ruam 4: Ntau Txog 16x2 LCD:

Ntau Txog 16x2 LCD
Ntau Txog 16x2 LCD

16x2 LCD yog 16 tus cim thiab 2 kab lcd uas muaj 16 tus pin txuas. Lub LCD no xav tau cov ntaub ntawv lossis ntawv hauv ASCII hom los tso tawm. Thawj kab pib nrog 0x80 thiab kab thib ob pib nrog 0xC0 chaw nyob. LCD tuaj yeem ua haujlwm hauv 4-ntsis lossis 8-ntsis. Hauv 4 hom me me, Cov Ntaub Ntawv/Cov Lus Hais tau xa hauv Nibble Format First Nibble Siab dua thiab tom qab ntawd Nibble qis dua.

Piv txwv li, xa 0x45 Thawj 4 yuav raug xa Tom qab ntawd 5 yuav xa mus.

Muaj 3 tus tswj hwm tus pin uas yog RS, RW, E.

Yuav Siv RS li cas:

Thaum hais kom xa, ces RS = 0

Thaum Cov Ntaub Ntawv raug xa, ces RS = 1

Yuav siv RW li cas:

RW tus pin yog Nyeem/Sau.

qhov twg, RW = 0 txhais tau tias Sau Cov Ntaub Ntawv ntawm LCD

RW = 1 txhais tau tias Nyeem Cov Ntaub Ntawv los ntawm LCD

Thaum peb sau rau LCD cov lus txib/Cov Ntaub Ntawv, peb tau teeb tus pin li LOW.

Thaum peb nyeem los ntawm LCD, peb teeb tus pin li HIGH.

Hauv peb qhov xwm txheej, peb tau siv nws nyuaj rau qib LOW, vim tias peb yuav sau mus rau LCD ib txwm.

Yuav siv E (Pab kom):

Thaum peb xa cov ntaub ntawv mus rau LCD, peb tab tom muab mem tes rau lcd nrog kev pab ntawm E tus pin.

Qhov no yog qib ntws peb yuav tsum ua raws thaum xa COMMAND/DATA rau LCD.

Nram qab no yog Sequence to Follow.

Siab Nibble

Pab kom Pulse, Tus nqi RS kom raug, Raws li COMMAND/DATA

Sab Nibble

Pab kom Pulse, Tus nqi RS kom raug, Raws li COMMAND/DATA

Kauj Ruam 5: Cov Duab Ntxiv

Duab Ntxiv
Duab Ntxiv
Duab Ntxiv
Duab Ntxiv
Duab Ntxiv
Duab Ntxiv

Kauj ruam 6: Code

Thov nrhiav tus lej ntawm github:

github.com/stechiez/Arduino.git

Pom zoo: