Cov txheej txheem:

Automated Point to Point Model Railroad With Yard Siding: 10 Kauj Ruam (nrog Duab)
Automated Point to Point Model Railroad With Yard Siding: 10 Kauj Ruam (nrog Duab)

Video: Automated Point to Point Model Railroad With Yard Siding: 10 Kauj Ruam (nrog Duab)

Video: Automated Point to Point Model Railroad With Yard Siding: 10 Kauj Ruam (nrog Duab)
Video: Automated multi-point model railroad running two trains | Arduino based 2024, Kaum ib hlis
Anonim
Automated Point to Point Model Railroad Nrog Yard Siding
Automated Point to Point Model Railroad Nrog Yard Siding

Arduino microcontrollers qhib qhov ua tau zoo hauv kev tsim qauv kev tsheb ciav hlau, tshwj xeeb tshaj yog thaum nws los txog rau kev siv tshuab. Txoj haujlwm no yog piv txwv ntawm daim ntawv thov no. Nws yog qhov txuas ntxiv ntawm ib qho ntawm cov haujlwm yav dhau los. Txoj haujlwm no suav nrog ntawm taw tes rau taw tes qauv qauv kev tsheb ciav hlau nrog lub vaj nyob ib sab rau lub tsev tsheb ciav hlau. Txhua txoj haujlwm yog tswj los ntawm Arduino microcontroller board nrog kev pab los ntawm cov tswv yim tawm tswv yim thiab lub tsheb ciav hlau thiab kev tawm mus yog tswj los ntawm Adafruit lub cev muaj zog tiv thaiv.

Kauj ruam 1: Saib Video

Image
Image

Saib cov vis dis aus kom tau txais lub tswv yim ntawm qhov no ua haujlwm li cas. Yog li, tam sim no koj paub tias muaj dab tsi tshwm sim, cia peb pib!

Kauj Ruam 2: Tau Txais Txhua Yam

Program Arduino Microcontroller
Program Arduino Microcontroller

Nov yog yam koj yuav xav tau rau kev tsim:

  • Ib pawg Arduino sib xws nrog Adafruit lub cev muaj zog thaiv v2.3.
  • Adafruit lub cev tiv thaiv kab mob v2.3. (Nyem rau qhov no kom paub ntau ntxiv.)
  • Kev nthuav dav nthuav dav (Yeem, pom zoo kom nthuav tawm +5V thiab GND pins ntawm Arduino pawg thawj coj txhawm rau txhawm rau txuas lub ntsuas.)
  • 3 'hnov' lem.
  • 4 tus txiv neej rau txiv neej jumper xov hlau (2 txhawm rau txuas lub zog thiab lwm tus los txuas cov neeg tawm suab.)
  • 3 teeb ntawm 3 tus txiv neej rau poj niam jumper xov hlau (Tag nrho ntawm 9 xov hlau siv rau txuas 3 tus pin ntawm txhua lub sensor mus rau Arduino board thiab lub zog.)
  • 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 txuas rau Arduino board rau lub khoos phis tawj.
  • Lub khoos phis tawj los teeb tsa Arduino microcontroller.
  • Tus ntsia hlau.

Kauj Ruam 3: Program Arduino Microcontroller

Nco ntsoov tias koj muaj Adafruit lub cav thaiv lub tsev qiv ntawv teeb tsa hauv koj Arduino IDE. Koj tuaj yeem tau txais tag nrho cov ntaub ntawv hais txog kev tiv thaiv lub cev thiab cov software tsim nyog los ntawm qhov txuas no.

Kauj Ruam 4: Ua Qhov Txheej Txheem Xeem

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

Kato Unitrack yog qhov zoo rau kev teeb tsa ib ntus, tshwj xeeb yog rau lub hom phiaj sim. Nyem rau ntawm daim duab kom paub ntau ntxiv. Ua tus txheej txheem raws li qhia hauv daim duab saum toj no. Qhov ntev ntawm txoj kab hauv kab tseem ceeb (Nruab nrab ntawm cov ntsiab lus A thiab B tuaj yeem ua rau txhua qhov ntev tau.) Ua kom ntseeg tau tias txhua txoj kev tsheb nqaj hlau tau ua kom raug thiab cov kab khiav tau raug ntxuav kom raug.

Kauj Ruam 5: Txhim Kho Cov Tsav Tsheb Tsav Tsheb ntawm Arduino Board thiab Txuas Nws Kom Taug Lub Hwj Chim thiab Tawm Tawm

Txhim Kho Cov Tsav Tsheb Tsav Tsheb ntawm Arduino Board thiab Txuas Nws Kom Taug Lub Hwj Chim thiab Tawm Tawm
Txhim Kho Cov Tsav Tsheb Tsav Tsheb ntawm Arduino Board thiab Txuas Nws Kom Taug Lub Hwj Chim thiab Tawm Tawm
Txhim Kho Cov Tsav Tsheb Tsav Tsheb ntawm Arduino Board thiab Txuas Nws Kom Taug Lub Hwj Chim thiab Tawm Tawm
Txhim Kho Cov Tsav Tsheb Tsav Tsheb ntawm Arduino Board thiab Txuas Nws Kom Taug Lub Hwj Chim thiab Tawm Tawm

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.

Txuas cov pins tso tawm ntawm daim thaiv npog cim ua M4 rau txoj kab hluav taws xob khiav thiab cov cim ua M3 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 6: Txhim Kho Qhov 'sensored' Tracks

Hlau Up the 'sensored' Tracks
Hlau Up the 'sensored' Tracks
Hlau Up the 'sensored' Tracks
Hlau Up the 'sensored' Tracks
Hlau Up the 'sensored' Tracks
Hlau Up the 'sensored' Tracks

Txhim kho daim npog nthuav dav ntawm lub cev tiv thaiv kab mob thiab txuas lub ntsuas hluav taws xob 'GND thiab cov xov hluav taws xob rau GND thiab +5V txoj kab ntawm daim ntaub thaiv. Ua tus pin txuas hauv qab no:

  • Txuas cov txiaj ntsig ntawm lub ntsuas cua hauv vaj mus rau Arduino pawg thawj coj tus pin A0.
  • Txuas cov txiaj ntsig ntawm lub ntsuas pa hauv qhov taw tes A mus rau Arduino pawg thawj coj tus pin A1.
  • Txuas cov txiaj ntsig ntawm lub ntsuas hluav taws xob hauv kab ntawv B mus rau Arduino pawg thawj coj tus pin A2.

Xyuas kom tsis muaj tus pin xoob kom tsis txhob ua haujlwm tsis raug ntawm lub system.

Kauj Ruam 7: Txuas Arduino Board rau Lub Hwj Chim thiab Qhib Nws

Txuas Arduino Board rau Lub Hwj Chim thiab Qhib Nws
Txuas Arduino Board rau Lub Hwj Chim thiab Qhib Nws

Txuas 12V DC lub zog siv hluav taws xob mus rau Arduino siv lub thoob ntsaws thiab txhawb nws.

Kauj Ruam 8: Muab Koj Lub Locomotive tso rau ntawm Siding thiab swb nws hla qhov 'hnov qab' Taug Kev

Muab Koj Lub Locomotive tso rau ntawm Siding thiab swb nws hla qhov 'sensored' Track
Muab Koj Lub Locomotive tso rau ntawm Siding thiab swb nws hla qhov 'sensored' Track

Arduino pawg thawj coj tau teeb tsa kom pib ua haujlwm txheej txheem tsuas yog tom qab lub tshuab hluav taws xob tau muab tso rau hauv qhov chaw thiab nws tau txais 'paub' qhov no tsuas yog los ntawm kev tawm tswv yim los ntawm 'kev hnov qab' taug qab. Nco ntsoov koj saib cov vis dis aus, hauv thawj kauj ruam, kom nkag siab zoo dua.

Tom qab qhov 'hnov qab' taug qab pom lub locomotive, koj yuav tsum pom tias cov neeg tawm mus yuav hloov mus rau sab yog tias nws tsis yog thiab lub tsheb ciav hlau yuav pib txav mus rau tom ntej.

Yog tias cov neeg tawm mus hloov mus rau qhov tsis ncaj ncees lawm, thim rov qab qhov tsis sib xws ntawm cov xov hlau txuas qhov kev tawm mus rau lub npog ntsej muag lub cev. Ua tib yam rau kev taug qab lub zog yog tias lub tshuab hluav taws xob pib txav mus rau qhov tsis raug.

Kauj Ruam 9: Saib Koj Lub Tsheb ciav hlau Mus

Yog tias txhua yam ua tiav kom raug, koj lub tsheb ciav hlau yuav tsum pib txav los ntawm lub tshav dav hlau ntawm txoj kab tseem ceeb thiab mus raws li tau hais los saum no.

Kauj ruam 10: Ua Tam Sim No?

Tau koj lub tsheb ciav hlau khiav? Tsis txhob nres ntawm no! Sim hloov kho qhov teeb tsa kom khiav lub tsheb ciav hlau ntawm ntau cov ntsiab lus, hloov kev nrawm thiab kev txo qis ntawm lub tsheb ciav hlau, hloov kho nrog Arduino code, muaj ntau yam ua. Txhua yam zoo tshaj plaws!

Pom zoo: