Cov txheej txheem:

Arduino Traffic Light: 3 Kauj Ruam (nrog Duab)
Arduino Traffic Light: 3 Kauj Ruam (nrog Duab)

Video: Arduino Traffic Light: 3 Kauj Ruam (nrog Duab)

Video: Arduino Traffic Light: 3 Kauj Ruam (nrog Duab)
Video: Bus Accident of Bhama and Ganesh on Highway 2024, Kaum ib hlis
Anonim
Arduino Tsheb Teeb
Arduino Tsheb Teeb

Cov lus qhia no yog muab los ntawm: Arduino-Traffic-Light-Simulator

Kuv tau siv daim duab los ntawm cov lus qhia no, los tsim teeb pom kev sib cais. Kuv tau hloov cov hauv qab no:

  • Qhov rau LEDs me dua, rau 5mm LEDs (hloov 10mm LEDs).
  • Ntxiv lub platform me me, yog li lub teeb pom kev tuaj yeem sawv ntawm nws tus kheej.
  • Hloov cov duab, yog li nws tuaj yeem siv rau cov khoom siv nrog tuab ntawm 4 hli (tsis yog 3 hli).

Nco tseg ntawm tus nqi: Txij li 5mm LEDs pheej yig dua 10mm LEDs thiab 4mm plywood yog pheej yig dua 3mm acrylic, qhov no yog 'pob nyiaj siv' version ntawm lub teeb pom kev.

Lub teeb pom kev tuaj yeem txuas nrog (thiab tawm chav kawm nrog) ib lub microcontroller (xws li Arduino UNO).

Nrog ntau ua tsaug @ pcvnes rau qhov qhia tau zoo heev thiab meej! Kuv txaus siab heev uas txawm tias muaj cov lus qhia (lesmateriaal) hauv Dutch!

Kauj Ruam 1: Cov Npe thiab Cov Cuab Yeej

Cov Npe thiab Cov Cuab Yeej
Cov Npe thiab Cov Cuab Yeej

Cov hauv qab no xav tau:

  • 1 liab LED, 5 hli
  • 1 daj (lossis txiv kab ntxwv) LED, 5 hli
  • 1 ntsuab LED, 5 hli
  • ib daim plywood, tuab 4 hli. Qhov loj yog li 11 cm x 12 cm. Los yog acrylic lossis lwm yam khoom siv uas tuaj yeem txiav nrog lub lasercutter, ntev li qhov tuab yog 4 hli.
  • 4 jumper xov hlau:

    • liab, daj, ntsuab xaim, 10 cm
    • ib qho dub, 15 lossis 20 cmI tau siv cov xov hlau uas sib haum nrog cov xim ntawm LEDs, yog tias koj tsis quav ntsej txog xim, 2 lub xov hlau txuas yuav txaus, vim tias lawv tau txiav ib nrab.
  • 3 tus tiv thaiv, 330 ohm
  • me ntsis seem hlau (3 cm lossis ntau dua)

Txhawm rau qhib lub teeb pom kev, thiab txhawm rau teeb tsa nws, koj kuj xav tau lub microcontroller (xws li Arduino UNO) thiab 4 jumper xov txuas txuas lub teeb pom kev mus rau koj lub microcontroller. Qhov no tsis suav nrog hauv cov lus qhia no.

Cov cuab yeej hauv qab no xav tau:

  • lub laser txiav (saib cov kauj ruam tom ntej yog tias koj tsis muaj)
  • ib qho hlau txuas (thiab me ntsis ntawm cov kab laug sab laug)
  • ib yam dab tsi los hle cov hlua jumper nrog (Kuv siv rab riam ntse (stanleymes) rau qhov no)
  • ntoo kua nplaum

Kauj Ruam 2: Txiav Tawm Qhov

Txiav Tawm Qhov
Txiav Tawm Qhov

Txiav tawm qhov nrog lasercutter. Lub hauv paus (xwmfab nrog lub qhov zoo li tus ntoo khaub lig) yuav tsum tau txiav tawm ob zaug.

Kuv tau siv lub tshuab txiav laser los ntawm kuv lub zos FabLab.

Txhawm rau nrhiav FabLab ze rau koj, mus ntsib:

Kuv xav tias koj tseem tuaj yeem luam daim duab rau ntawm ib daim ntawv, lo rau plywood thiab siv tes (fret) pom, thiab tho qhov. Los yog tseem siv cov ntawv tawv tawv. Kuv tsis tau sim nws li.

Kauj Ruam 3: Sib Sau Ua Ke

Sib Sau Ua Ke
Sib Sau Ua Ke

Sib sau ua ntu, raws li tau piav qhia hauv theem 3 ntawm cov lus qhia no:

Vim tias LEDs me dua tom qab qhia thawj, koj yuav tsis tuaj yeem txuas txhua lub LEDs yam tsis muaj ib qho xaim ntxiv. Kuv xav tau ib daim hlau ntawm 2, 5 cm (los ntawm lub teeb liab liab mus rau ib qho ntawm cov tiv thaiv) yog li kuv tau siv ib daim hlau tso tseg los ntawm lwm qhov haujlwm. Yog tias koj tsis muaj xov hlau seem, koj tseem tuaj yeem siv daim ntawv kaw (ceg ntawm LED, tus tiv thaiv, thiab lwm yam), qhov no kuj ua haujlwm zoo.

Vim tias kuv tsis muaj cuab yeej muab 4 dupont pins kawg ntawm xaim, kuv tau txiav 4 jumper xov hlau nyob ib nrab. Seem qhov kawg ntawm txhua cov xaim. Cov laug ib nrab ntawm cov xov hlau txuas mus rau qhov kawg ntawm txhua tus tiv thaiv (liab hlau ntawm tus tiv thaiv uas muaj lub teeb liab, daj rau daj, ntsuab rau ntsuab). Tom qab ntawd muab lub xaim dub txuas rau lub ntsuab LED, qhov anode (rho tawm lossis luv) tus pin.

Sau ntawv/ lus qhia:

  • Jumper xov hlau tuaj yeem yog txiv neej lossis poj niam. Cov txiv neej raug pom zoo yog tias koj npaj yuav txuas koj lub teeb pom kev mus rau lub khob cij lossis Arduino UNO. Poj niam yog tias koj npaj yuav txuas rau Arduino Nano lossis Attiny 85.
  • Nws yog qhov yooj yim tshaj plaws los txuas cov LEDs, cov xov hlau thiab cov tiv thaiv, ua ntej muab cov khoom sib dhos ua ke.
  • Vim tias koj tsuas xav tau ib nrab ntawm ib qho xaim rau 1 lub teeb pom kev, koj tuaj yeem siv 4 daim hlau xaim tso rau qhov teeb pom kev thib ob.
  • Thawj thawj zaug, Kuv muab cov xov hlau txuas rau ntoo kom muaj zog ntxiv, qhov no yog lub tswv yim tsis zoo. Cov xov hlau tsis nyob hauv qhov chaw, thiab nws yooj yim ua rau lawv puas tsuaj. Qhov thib ob, Kuv tau siv cov kua nplaum kub tso, qhov no ua haujlwm tau zoo dua.

Pom zoo: