Steve Mssikker Arduino for Model Rilroders Ornge Book Protocol 2 Full Description November 28
Tble of contents Dontors Documenttion Kit V.4-8 Pge 2 I wnt to tke the time to sincerely thnk you for your dontion to my site www.rduinorilwycontrol.com As you know, I strted this cmpign to bring bck the fun nd simplicity of rilrod modeling. Thnks gin for your generosity nd support! Sincerely, Steve Mssikker Tble of contents Introduce 3 Android Apps 5 How it works 6 Trin Control 7 Lyout Control 8 Automtion nd Scripts Recommended I2C byte commnds 2
Introduce Dontors Documenttion Kit V.4-8 Pge 3 The protocol commnds consist of only four chrcters, the lst chrcter is lwys "". The first symbol is the device type, the second symbol is the device identifier (number), the third symbol is the device sttus. A few exmples: the commnd to set the speed of the locomotive is equl to for plyer A hs the form "", switching of the junction D to the position stright "jd" An interesting point, there re lot of good mterils on the Internet bout the design on the bsis of Arduino. Much smller progrms for Android using Bluetooth for control. And, prt from simple exmples, there re prcticlly no posts how to tie together Android nd Arduino. The problem in the rules of dt trnsmission. For this purpose, number of good protocols hve been invented, for exmple the FIRMATA, which is included in the Arduino IDE collection of exmples, but it is for this project tht it is possible to mke the protocol simpler nd more flexible. In rilwy model, there is not lot of dt flow nd the speed of pssing the tem is lso not very importnt. Therefore, you cn use very simpliest URB protocol. And you cn chnge this protocol nd expnd it yourself. If you hve turntble on the lyout, then dding set of commnds strting with the "t" (Turntble) symbol, you cn control the riltble position in degrees multiple of ten "t34" (rotte the riltble to the position of 34 degrees). I will lso grdully dd new commnds to this protocol. This type of commnd is prsing by sketch, which is bsed on the exmple of Seril Event from Arduino IDE. For testing nd djusting your lyout devices you cn type these commnds directly into the terminl of Arduino IDE.
Dontors Documenttion Kit V.4-8 Pge 4 Why do you need it I think we lost control. Simple nd understndble mnipultions with the nlogue trnsformer hndle nd switches of junctions, when it is lwys cler wht hppens with your trins nd trcks, chnged to plurlity of digitl boxes in which mgic hppens. And this is very boring nd expensive mgic - it is incomprehensible nd constntly requires even more boxes. If you try to understnd DCC systems, it becomes very quickly cler tht this is very bd copy of industril digitl buses like CANbus nd others, nd the soſtwre is mixture of code written in vriety of objective progrmming lnguges, primrily Jv. I do not insist on my project, I just declre tht ll these digitl systems re too redundnt for modeller. I just tried to give you control over your hobbies. With the URB project, you only need to turn on the power your lyout, like old times. And not need computers :)
Android Apps Arduino Trin Junior Arduino Trin DNT Dontors Documenttion Kit V.4-8 Pge 5 Arduino Trin DUO Turnouts nd Lyout control Trin control Lights nd Ger Run scenrios Operting principles App Protocol 2
How it work Dontors Documenttion Kit V.4-8 Pge 6 A typicl exmple of switching the junction Point-motor Commnd Prsing Route Prsing I/O opertion Switch A j String Commnd Arduino Sketch Address 3 Commnd 3 Byte Locl Arduino Sketch Servo pins Android App Commnd URB Locl URB #3 A typicl exmple of switching junction, nd using feedbck for synchronous indiction of the position of the junction on both devices of plyers Only for Arduino Trin DUO nd DNT Commnd Point-motor j Switch A j feedbck Android App Plyer A Switch A Commnd j j feedbck String Prsing Commnd Arduino Sketch Route Address 3 Commnd 3 Byte Prsing Locl Arduino Sketch I/O opertion Servo pins Android App Plyer B Commnd URB Locl URB #3
Trin Control Dontors Documenttion Kit V.4-8 Pge 7 Direction D Only for Arduino Trin DUO nd DNT Select Plyer Plyer A Plyer B Relese R Direction D Commnd Complete d r Direction D Commnd Complete b d r Stop S d s b d s Forwrd F Bckwrd B d f d b b d f b d b Throttle Only for Arduino Trin DUO nd DNT Plyer A Speed Commnd Complete 2 3 4 5 6 7 8 9 Plyer B b b Only for Arduino Trin DUO nd DNT
Lyout Control Dontors Documenttion Kit V.4-8 Pge 8 Junctions (Turnouts) J NAME POSITION Commnd Complete Arduino Trin Junior, b, c, d Arduino Trin DUO, b, c, d, e, f, g, h, i, j, k, l, m, n, o Arduino Trin DNT, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y Position Switch A Arduino Trin Junior j j Switch A Switch B - Stright - Brnch Arduino Trin DUO nd DNT j d j d j o j o Switch A position BRANCH Switch A position STRAIGHT Switch D position BRANCH Switch D position STRAIGHT Switch O position BRANCH Switch O position STRAIGHT 4 5 25 Arduino Trin Junior Arduino Trin DUO Arduino Trin DNT j y j y Switch Y position BRANCH Switch Y position STRAIGHT Stright Brnch Set Defult position DEFAULT POSITON Feedbck position Only for Arduino Trin DUO nd DNT 9 9 9 y y
Dontors Documenttion Kit V.4-8 Pge 9 Lights & Gers l Arduino Trin Junior LIGHTS TOGGLE Arduino Trin Junior NAME STATE Commnd Complete Arduino Trin DUO Lights - 9 Gers - 3 Rndom Arduino Trin DNT Lights - 4 Gers - 2 Rndom - Rndom l l l d l d LIGHT Chnnel OFF LIGHT Chnnel ON LIGHT Chnnel 4 OFF LIGHT Chnnel 4 ON 4 9 Junior Arduino Trin DNT Arduino Trin DUO Arduino Trin DUO nd DNT l h l h LIGHT Chnnel 9 OFF LIGHT Chnnel 9 ON Only for Arduino Trin DUO nd DNT g l r l r RANDOM OFF RANDOM ON g g GEARS Chnnel OFF GEARS Chnnel ON l - l - g - ALL LIGHTS OFF ALL LIGHTS ON ALL GEARS OFF g c g c GEARS Chnnel 3 OFF GEARS Chnnel 3 ON
Automtion & Scripts Dontors Documenttion Kit V.4-8 Pge Custom toggle c Script button s CUSTOM TOGGLE NAME STATE Commnd Complete Script NUMBER Commnd Complete Arduino Trin Junior Arduino Trin DUO Arduino Trin DNT c c Plyer B Only for Arduino Trin DUO nd DNT c b c b AUTORUN AUTORUN 2 Arduino Trin DUO s s 2 Settings Only for Arduino Trin DUO nd DNT s Feedbck Arm mode ON Feedbck ON Settings Commnd Complete s j s j UNBLOCK Servo Point-motor BLOCK Servo Point-motor (defult) See servo point-motor documenttion DISABLE / ENABLE Feedbck Junctions Positions See GREEN BOOK Sensors ON s s s s ENABLE Lyout Sensors (defult) DISABLE Lyout Sensors
Dontors Documenttion Kit V.4-8 Pge Relese Feedbck (if Sensors ON) See Interlocking nd other new fetures from Dontors Are + Sound AWS Arduino Trin Junior ws Arduino Trin DUO nd DNT Plyer A Plyer B ws bws Arduino Trin Junior Arduino Trin DUO nd DNT Plyer A Plyer B + Sound AWS + Set Throttle to wd wd bwd Used first symbols of Protocol 2: A, B, C, G, J, L, S, 9 Free first symbols for your Protocol customition: D, E, F, H, I, K, M, N, O, P, Q, R, T, U, W, X, Y,, 2, 3, 4, 5, 6, 7, 8 The forbidden symbol of Protocol 2: Z
Recommended I2C byte commnds Dontors Documenttion Kit V.4-8 Pge 2 99 Soſtwre Reset URB 3 3 Junction # on URB I/O S - position stright Junction # on URB I/O S - position brnch 32 33 Junction # on URB I/O S2 - position stright Junction # on URB I/O S2 - position brnch 34 35 Junction # on URB I/O S3 - position stright Junction # on URB I/O S3 - position brnch Etc.