Cov txheej txheem:

Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino): 5 Cov Kauj Ruam
Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino): 5 Cov Kauj Ruam

Video: Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino): 5 Cov Kauj Ruam

Video: Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino): 5 Cov Kauj Ruam
Video: Hmong New Song 2019 Xy Lee feat. SuabNag Yaj - Koj Yog Kuv Lub Neej (Official MV - 4K) 2024, Hlis ntuj nqeg
Anonim
Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino)
Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino)
Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino)
Ib leeg-neeg uas ua ntawv Reaction Timer (nrog Arduino)

Hauv txoj haujlwm no, koj yuav tsim lub sijhawm tshuaj tiv thaiv uas tau siv los ntawm Arduino. Nws ua haujlwm ntawm Arduino's millis () ua haujlwm qhov twg cov txheej txheem sau tseg lub sijhawm txij li qhov haujlwm pib ua haujlwm. Koj tuaj yeem siv nws los nrhiav lub sijhawm sib txawv ntawm thaum lub teeb tig thiab lub khawm tso tawm. Txhua qhov txiaj ntsig tau muab hauv milliseconds.

Hauv qhov kev ua si, koj yuav tsum tuav lub khawm tom qab uas LED yuav qhib. Tom qab ntawd koj yuav tsum tso lub pob thaum LED tua tawm. Yog tias koj tso nws ntxov dhau li "Tshaj tawm ntxov dhau" cov ntawv tshwm ntawm LCD. Lub sijhawm koj siv los tso lub pob, koj lub sijhawm tshuaj tiv thaiv, yog qhia ntawm lub vijtsam LCD.

Khoom siv

Thov nco ntsoov tias daim duab tsis qhia tag nrho cov khoom siv xav tau rau txoj haujlwm

1) 1 x Arduino nano/Arduino Uno + Txuas cable

2) 5cm x 5cm Perfboard

3) 20 x jumper cables lossis xov hlau

4) 1 x 16x2 LCD npo (Yeem tau)

5) 1 x 100K lossis 250K potentiometer

6) 1 x 9V roj teeb + txuas txuas

7) 1 x 5mm LED

8) 1 x PTM hloov pauv ib ntus

9) 1 x 3V lossis 5V buzzer

Cov khoom feem ntau tuaj yeem yuav los ntawm amazon. Muaj ob peb ntawm cov khoom siv hluav taws xob ntawm amazon uas muab rau koj tag nrho cov khoom siv yooj yim xws li resistors, diodes, transistors, thiab lwm yam. Ib qho uas kuv tau pom los muab rau kuv bang rau kuv cov nyiaj yog muaj nyob ntawm qhov txuas no.

Kuv tus kheej muaj feem ntau ntawm cov khoom siv tam sim no raws li kuv ua ntau yam ntawm cov phiaj xwm no. Rau cov neeg tsim khoom tawm hauv Singapore, Sim Lim Tower yog qhov chaw mus yuav txhua yam khoom siv hluav taws xob. Kuv pom zoo Space electronics, Cov khoom siv hluav taws xob txuas ntxiv, lossis Hamilton cov khoom siv hluav taws xob nyob rau hauv pem teb thib 3.

Kauj Ruam 1: Npaj thiab nkag siab txog Circuitry

Feem ntau ntawm txoj haujlwm yog ua los ntawm cov cai hauv Arduino. Sib nrug los ntawm LED, buzzer, thiab PTM hloov, tsis muaj ntau yam khoom siv hluav taws xob txheem. Txawm li cas los xij, nws tseem yog ib qho tseem ceeb kom nkag siab txog qhov Circuit.

1) Ib qho kawg ntawm qhov hloov pauv PTM txuas nrog +5V thaum lwm qhov txuas nrog tus pin Arduino. Tus pin arduino tseem txuas nrog hauv av siv 10K ohm rub-down resistor. Qhov no tiv thaiv ib ntus qhov hluav taws xob los ntawm cuam tshuam rau tus pin lub xeev.

2) LED qhov anode txuas ncaj qha rau arduino. Nws tsis tas yuav tsum muaj transistor los txhawb qhov hluav taws xob rau LED. Arduino muab qhov txaus txaus tam sim no los ua lub zog LED. LED's cathode txuas nrog hauv av.

3) Thaum kawg, tib cov txheej txheem tshwm sim nrog lub buzzer tab sis rau tus pin Arduino sib txawv.

4) Cov kev sib txuas ntawm LCD thiab arduino tau hais txog hauv cov qauv qhia thiab ua kom txias.

Kauj Ruam 2: Circuit Schematics thiab Kev Tsim Kho

Circuit Schematics thiab Kev Tsim Kho
Circuit Schematics thiab Kev Tsim Kho
Circuit Schematics thiab Kev Tsim Kho
Circuit Schematics thiab Kev Tsim Kho
Circuit Schematics thiab Kev Tsim Kho
Circuit Schematics thiab Kev Tsim Kho

Muaj ob peb txoj kev xaiv yuav ua li cas tso ua ke hauv Circuit.

1) Rau cov tib neeg nkag mus rau hauv cov khoom siv hluav taws xob, Kuv xav kom siv lub khob cij los tsim lub Circuit Court. Nws yog qhov tsis tshua muaj kev cuam tshuam ntau dua li cov laug, thiab nws yuav yooj yim dua debug vim tias cov xov hlau tuaj yeem hloov kho tau yooj yim. Ua raws cov kev sib txuas uas pom ntawm cov duab fritzing.

2) Rau cov tib neeg muaj kev paub ntau dua, sim siv lub tshuab hluav taws xob txuas mus rau lub khob cij. Nws yuav nyob ruaj khov thiab kav ntev dua. Nyeem thiab ua raws schematic rau kev taw qhia.

3) Thaum kawg, koj tseem tuaj yeem xaj PCB ua ntej los ntawm SEEED. Txhua yam koj yuav tsum tau ua yog txhawm rau txhawm rau cov khoom siv. Cov ntaub ntawv Gerber tsim nyog tau txuas nrog hauv cov kauj ruam. Nov yog qhov txuas mus rau google drive nplaub tshev nrog zipped Gerber file:

Kauj Ruam 3: Arduino Code

Arduino Txoj Cai
Arduino Txoj Cai

Txoj cai yog qhov nyuaj ntawm txoj haujlwm no. Ntau yam yuav tsum tau ua nrog ib lub voj void ib leeg thiab taug kev los ntawm txhua lub sijhawm thiab rau lub voj nyob hauv tuaj yeem siv qee lub sijhawm.

Txoj cai muaj qee cov lus los pab koj ua raws. Koj tuaj yeem rub nws thiab xa nws mus rau Arduino siv USB rau mini USB cable. Koj yuav xav tau Arduino app ntawm koj lub khoos phis tawj rau qhov ntawd thiab koj yuav tuaj yeem nrhiav qhov rub tawm txuas rau nws los ntawm lub vev xaib no:

Kauj Ruam 4: Lub tsev rau Circuitry

Housing rau Circuitry
Housing rau Circuitry

1) Koj tuaj yeem muaj cov ntaub ntawv yas qub rau nws lub casing. Siv rab riam kub los txiav tawm lub qhov rau LCD thiab khawm.

2) Tsis tas li ntawd, koj tuaj yeem tshawb xyuas kuv tus lej nyiaj rau lwm qhov kev qhia uas kuv piav qhia yuav tsim lub thawv tawm ntawm laser txiav acrylic li cas. Koj yuav tuaj yeem nrhiav cov ntaub ntawv SVG rau lub tshuab txiav laser. Xwb, rau cov tib neeg uas tsis muaj kev nkag mus rau lub tshuab txiav laser, koj tuaj yeem pom lwm cov lus qhia ntxaws ntxaws txog yuav tsim lub thawv li cas ntawm cov ntoo seem

3) Thaum kawg, koj tuaj yeem tawm ntawm lub Circuit Court yam tsis muaj lub casing. Nws yuav yooj yim kho thiab hloov kho.

Kauj Ruam 5: Demoing Circuit

txuas mus rau daim vis dis aus:

Pom zoo: