Cov txheej txheem:

Yooj Yim Automated Model Railroad Loop Nrog Yard Siding: 11 Kauj Ruam
Yooj Yim Automated Model Railroad Loop Nrog Yard Siding: 11 Kauj Ruam

Video: Yooj Yim Automated Model Railroad Loop Nrog Yard Siding: 11 Kauj Ruam

Video: Yooj Yim Automated Model Railroad Loop Nrog Yard Siding: 11 Kauj Ruam
Video: Начало → Изучайте английский → Освойте ВСЕ ОСНОВЫ АНГЛИЙСКОГО ЯЗЫКА, которые вам НУЖНО знать! 2024, Hlis ntuj nqeg
Anonim
Yooj Yim Automated Model Railroad Loop Nrog Yard Siding
Yooj Yim Automated Model Railroad Loop Nrog Yard Siding

Qhov haujlwm no yog kho dua tshiab ntawm ib qho ntawm kuv cov haujlwm yav dhau los. Qhov no siv Arduino microcontroller, qhov zoo qhib qhov chaw tsim qauv, kom siv tus qauv tsheb ciav hlau qauv. Cov txheej txheem suav nrog ib lub voj voos yooj yim thiab ib lub tiaj tiaj ua ceg tawm ntawm nws mus rau lub tsev tsheb ciav hlau. Arduino microcontroller tau txais kev tawm tswv yim los ntawm ob txoj kab 'hnov' tau teeb tsa ntawm ob qhov chaw ntawm kev teeb tsa kom ua tiav cov haujlwm tshwj xeeb thaum lub tsheb ciav hlau hla lawv.

Yog li, yam tsis muaj ado ntxiv, cia pib!

Kauj ruam 1: Saib Video

Image
Image

Saib cov vis dis aus saum toj no kom nkag siab tias txoj haujlwm no ua haujlwm li cas.

Kauj Ruam 2: Tau Txais Txhua Qhov thiab Khoom

Program lub Arduino Board
Program lub Arduino Board

Rau qhov haujlwm no, koj yuav xav tau:

  • Ib lub Arduino microcontroller board sib xws nrog Adafruit lub cev muaj zog tiv thaiv v2
  • Adafruit lub cev muaj zog tsav tsheb thaiv v2 (Kawm paub ntau ntxiv txog nws ntawm no)
  • Cov ntaub thaiv npog nthuav dav (Yeem tab sis pom zoo kom nthuav dav lub zog thiab tus pin txuas rau cov ntsuas.)
  • Ob txoj kab 'sensored'
  • Ob pawg ntawm 3 tus txiv neej rau poj niam jumper xov hlau (Txhawm rau txuas cov kab 'hnov' rau Arduino board.)
  • 4 tus txiv neej rau txiv neej jumper xov hlau (2 txhua rau txuas lub zog khiav thiab cov neeg tawm mus rau lub tshuab tiv thaiv lub qhov hluav taws xob qhov tso tawm.)
  • 12-volt DC lub zog siv hluav taws xob nrog lub peev xwm tam sim no tsawg kawg 1A (1000mA)
  • Ib qho USB tsim nyog (Txhawm rau txuas Arduino board rau lub khoos phis tawj.)
  • Lub khoos phis tawj (Txhawm rau program Arduino microcontroller.)

Kauj Ruam 3: Program Arduino Board

Nco ntsoov tias koj muaj Adafruit lub tshuab tsav lub cev v2 lub tsev qiv ntawv teeb tsa hauv koj li IDE. Mus dhau Arduino code kom tau txais lub tswv yim ntawm nws ua haujlwm li cas thiab koj tuaj yeem hloov kho nws li cas yav tom ntej los sim nrog kev teeb tsa.

Txuas Arduino lub rooj tsavxwm rau koj lub khoos phis tawj thiab xa cov ntawv txuas Arduino txuas rau nws.

Kauj Ruam 4: Ua Qhov Txheej Txheem Xeem

Ua ib qho Kev Ntsuas Txheej Txheem
Ua ib qho Kev Ntsuas Txheej Txheem

Nyem rau ntawm daim duab saum toj no ua ntej mus txuas ntxiv kom tau txais cov ntaub ntawv ntau ntxiv txog kev teeb tsa. Ua kom ntseeg tau tias txhua txoj kev tsheb nqaj hlau tau ua kom raug thiab txoj kev tsheb ciav hlau tau raug ntxuav kom tiv thaiv lub tsheb ciav hlau los ntawm kev poob thiab/lossis nres.

Kauj Ruam 5: Txhim Kho Lub Cev Tsav Tsheb ntawm Arduino Board

Txhim Kho Lub Cev Tsav Tsheb ntawm Arduino Board
Txhim Kho Lub Cev Tsav Tsheb ntawm Arduino Board

Txhim kho daim ntaub thaiv kom zoo ntawm Arduino pawg thawj coj los ntawm kev teeb tsa tus pin ntawm daim ntaub thaiv nrog lub taub hau ntawm Arduino board. Ua nws maj mam thiab xyuas kom tsis muaj tus pin ntawm daim ntaub thaiv tau khoov.

Kauj Ruam 6: Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Cev Tsav Tsheb

Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Cev Tsav Tsheb
Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Cev Tsav Tsheb
Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Tshuab Tsav Tsheb
Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Tshuab Tsav Tsheb
Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Tshuab Tsav Tsheb
Txuas Cov Hluav Taws Xob Hluav Taws Xob thiab Cov Hluav Taws Xob Hluav Taws Xob mus rau Lub Tshuab Tsav Tsheb

Txuas cov kab hluav taws xob tso tawm ntawm cov ntaub thaiv npog cim ua M1 rau cov kab hluav taws xob khiav thiab cov cim ua M4 rau cov xov tooj cua. Nco ntsoov tias kev teeb tsa tau sib xws nrog tsuas yog ob lub xaim solenoid hom tig rov los.

Kauj Ruam 7: Txuas qhov 'sensored' Tracks rau Arduino Board

Txuas qhov 'sensored' Tracks rau Arduino Board
Txuas qhov 'sensored' Tracks rau Arduino Board
Txuas qhov 'sensored' Tracks rau Arduino Board
Txuas qhov 'sensored' Tracks rau Arduino Board
Txuas qhov 'sensored' Tracks rau Arduino Board
Txuas qhov 'sensored' Tracks rau Arduino Board

Txhim kho daim npog nthuav dav ntawm lub cev tiv thaiv kab mob thiab txuas txhua lub sensor GND thiab VCC tus pin rau GND thiab +5-volt headers ntawm daim ntaub thaiv. Tom qab ntawd ua tus pin txuas hauv qab no:

  • Txuas tus pin tso tawm ntawm thawj lub sensor mus rau tus lej nkag A0 ntawm Arduino board.
  • Txuas tus pin tso tawm ntawm lub ntsuas thib ob mus rau tus lej nkag A1 ntawm Arduino board.

Kauj Ruam 8: Muab Lub Tsheb ciav hlau tso rau ntawm Siding

Muab lub tsheb ciav hlau tso rau ntawm Siding
Muab lub tsheb ciav hlau tso rau ntawm Siding

Muab lub tsheb ciav hlau tso rau ntawm qhov chaw kom npaj rau qhov kev xeem khiav. Kev siv cov cuab yeej rerailer tau pom zoo kom ntseeg tau tias lub tsheb ciav hlau thiab cov khoom txav tau muab tso rau ntawm txoj kev kom tiv thaiv kev poob.

Kauj Ruam 9: Txuas Arduino Board rau Lub Hwj Chim

Txuas Arduino Board rau Lub Hwj Chim
Txuas Arduino Board rau Lub Hwj Chim

Txuas lub 12-volt DC lub zog los rau Arduino pawg thawj coj los ntawm lub hwj chim lub dav hlau thaiv ntawm lub cev tiv thaiv kab mob lossis poj niam chim chim txuas ntawm Arduino board. Ua ntej tig lub hwj chim, xyuas kom txhua qhov kev sib txuas xov txuas tau ua kom raug thiab tsis muaj ib qho twg xoob.

Kauj Ruam 10: Qhib Lub Hwj Chim thiab Saib Koj Cov Tsheb ciav hlau Mus

Tom qab tig lub zog yog tias cov neeg siv hluav taws xob hloov pauv txoj hauv kev tsis raug lossis lub tsheb ciav hlau pib txav mus rau qhov tsis ncaj ncees lawm, thim rov qab qhov tsis sib xws ntawm cov xov tooj sib txuas nrog lub tshuab tiv thaiv lub qhov hluav taws xob tso tawm.

Kauj Ruam 11: Dab Tsi Ntxiv?

Yog tias koj tau mus txog qhov deb no, koj yuav xav so me ntsis thiab txaus siab rau koj txoj haujlwm. Tab sis yog tias koj xav ua ntau yam ntxiv koj tuaj yeem sim hloov kho Arduino code thiab sim nrog teeb tsa los ua qee yam tshiab. Txawm koj ua dab tsi, txhua qhov zoo tshaj plaws!

Pom zoo: