Cov txheej txheem:

IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller: 6 Kauj Ruam
IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller: 6 Kauj Ruam

Video: IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller: 6 Kauj Ruam

Video: IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller: 6 Kauj Ruam
Video: how to make Motion detection light on off PIR sensor project #howto 2024, Kaum ib hlis
Anonim
IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller
IR Obstacle Sensor Tsis Siv Arduino lossis Ib Lub Microcontroller

Hauv txoj haujlwm no peb yuav ua lub teeb meem yooj yim ntsuas tsis siv lub microcontroller

Kauj Ruam 1: Txog Txoj Haujlwm no

Image
Image

Hauv txoj haujlwm no peb tab tom yuav ua Obstacle sensor yam tsis muaj Kev Pabcuam ntawm Microcontroller. Obstacle sensor muaj ntau yam siv. txij li peb tsis siv ib lub microcontroller, yog li qhov haujlwm no tseem pheej yig dua.

Qhov tseem ceeb tshaj plaws peb tuaj yeem txuas ntxiv txoj haujlwm no rau Hluav Taws tswb ceeb toom thiab lwm yam. Peb tsuas yog yuav tsum ua yog hloov lub ntsuas.

Kauj Ruam 2: Txhawm rau Ua Txoj Haujlwm no, Peb Yuav Tsum Muaj Cov Hauv Qab No

1. Breadboard (1*1)

2. IR sensor (1*1)

3. NPN transistor (1*1)

4. Resistor (300ohm, 10k ohm)

5. Buzzer (1*1)

6. Coj (1*1)

7. 9v DC roj teeb

8. Jumper xov hlau

Kauj Ruam 3: Ua haujlwm ntawm IR Sensor

Daim duab sib txuas
Daim duab sib txuas

Hauv IR sensor muaj peb tus pin, Vcc, Gnd thiab Tawm.

Tawm tus pin xa cov logic siab (+5V) thaum IR pom ib qho Obstacle thiab Nws xa Logic Tsawg (0V) thaum tsis pom ib qho teeb meem.

Txhawm rau siv IR sensor peb txuas Vcc ntawm lub ntsuas mus rau lub davhlau ya nyob twg zoo ntawm lub roj teeb, thiab Gnd tus pin ntawm lub ntsuas mus rau lub davhlau ya nyob twg tsis zoo lossis hauv av ntawm lub roj teeb.

Kauj Ruam 4: Kev teeb tsa Circuit

Kauj Ruam 1: Txuas lub davhlau ya nyob twg zoo ntawm lub roj teeb mus rau Kev Qhia Zoo ntawm BreadBoard thiab Lub davhlau ya nyob twg tsis zoo ntawm lub roj teeb mus rau txoj kev tsheb nqaj hlau tsis zoo. Kev tsheb nqaj hlau zoo thiab tsis zoo yog kab saum toj thiab hauv qab ntawm Breadboard.

Kauj Ruam-2: Nqa NPN transistor thiab muab tso rau ntawm lub khob cij. ua tibzoo saib ntawm transistor thiab sau tseg tias tus pin twg yog lub hauv paus, emitter thiab tus pin sau

Kauj Ruam-3: txuas emiiter ntawm transistor rau hauv av lossis tsis zoo tsheb nqaj hlau ntawm lub khob cij qhov twg tsis zoo ntawm lub roj teeb txuas nrog

Kauj Ruam-4: Txuas Vcc tus pin ntawm IR sensor mus rau Rail zoo, Gnd tus pin mus rau txoj kev tsheb nqaj hlau tsis zoo. Txuas tus pin ntawm Sensor mus rau lub hauv paus ntawm Transistor tab sis nyob nruab nrab ntawm lub hauv paus thiab Tawm tus pin ntawm sensor txuas tsis kam ntawm tus nqi 10K. rau qhov no qhov kawg ntawm kev tiv thaiv yog txuas nrog Base ntawm transistor thiab qhov kawg thib ob ntawm resistor txuas nrog OUT tus pin ntawm sensor.

Kauj Ruam-5: Coj tus coj, Coj 330ohm (330-10000hm) resistor. Txuas tus pin ANODE tus pin rau ib kawg ntawm tus tiv thaiv. Txuas ob Qhov kawg ntawm Resistor rau Txoj Kev Zoo ntawm Breadboard. thiab cathode tus pin ntawm Led rau tus sau ntawm transistor.

zoo sib xws Txuas qhov zoo ntawm Buzzer rau txoj kev tsheb nqaj hlau zoo, thiab sab tsis zoo rau tus neeg nqa khoom ntawm lub rooj noj mov.

Kauj Ruam 5: Daim Duab Sib Txuas

Daim duab sib txuas
Daim duab sib txuas

Nco tseg: Hauv Daim Duab qhia pom peb txuas tus pin zoo ntawm lub roj teeb rau vcc ntawm lub sensor thiab Gnd tus pin ntawm lub sensor rau tus pin tsis zoo ntawm lub roj teeb, thiab peb txuas nrog tus sau ntawm transistor rau Vcc cais. Tab sis Ntawm lub khob cij txuas txhua tus pin zoo rau txoj kev tsheb nqaj hlau zoo thiab tsis zoo lossis tus pin hauv av rau lub tsheb ciav hlau tsis zoo kom peb yuav tsum siv roj teeb nkaus xwb.

Kuv tau txuas nrog emmiter nrog resistor. koj tuaj yeem hla cov kauj ruam no txuas ncaj qha hauv av rau emitter.

Kauj Ruam 6:

Nov yog kuv thawj zaug. yog li thov tawm tswv yim hais mav thiab xa koj cov lus tawm tswv yim.

Pom zoo: