User Tools

Site Tools


dccpp:dccpp-en

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dccpp:dccpp-en [2019/08/07 09:37] – [Options] vt601dccpp:dccpp-en [2023/09/05 18:13] (current) – [Options] rjversluis
Line 1: Line 1:
-====== Arduino DCC++ ======+====== DCC++ (EX)======
 [[:english#command_stations|{{  :interface.png}}]][[:english|{{  :rocrail-logo-35.png}}]] [[:english#command_stations|{{  :interface.png}}]][[:english|{{  :rocrail-logo-35.png}}]]
-[[:english|Content]] -> **[[:english#command_stations|Command Stations]]** -> **DCC++**   +[[:english|Content]] -> **[[:english#command_stations|Command Stations]]** -> **DCC++ (EX)**   
-  * **[[:dccpp:dccpp-en|DCC++]]** +  * [[[:dccpp:dccpp-signal-en|Signal Setup Example]]
-    * [[[:dccpp:dccpp-signal-en|Signal Setup Example]] +
- \\ +
-[[https://sites.google.com/site/dccppsite/home|{{https://sites.google.com/site/dccppsite/_/rsrc/1451687023590/config/customLogo.gif?500}}]]\\ +
-[[https://sites.google.com/site/dccppsite/the-system|{{https://sites.google.com/site/dccppsite/_/rsrc/1452828457679/the-system/Screen%20Shot%202016-01-14%20at%2010.19.59%20PM.png?500}}]]\\ +
  \\  \\
  
Line 18: Line 13:
   * DCC stationary decoder support.   * DCC stationary decoder support.
   * 2A Booster power.   * 2A Booster power.
- \\ 
-====DCC++ Setup==== 
-| {{:dccpp:uno.jpg?0x200}} | {{:dccpp:plus.png}} | {{:dccpp:motorshield.jpg?0x200}} | {{:dccpp:equals.png}} | {{:dccpp:dccpp-logo.png}} | \\ 
- \\ 
-  - Install the **[[#install_the_firmware|Firmware]]**. 
-  - Wiring the motor shield: {{:dccpp:dccpp-motorshieldpinmappings.pdf}} 
- 
  \\  \\
  
Line 33: Line 21:
  
  \\  \\
 +===== **Support announcement** =====
 +Please consider that this is a real DIY project.\\
 +It is not supported by Rocrail nor GCA.\\
 +Just start with this modules if you are able to do some Arduino\\
 +programming yourself.\\
 +
  
  
Line 38: Line 32:
 =====General Setup===== =====General Setup=====
 The DCC++ library in Rocrail is **dccpp**.\\ The DCC++ library in Rocrail is **dccpp**.\\
-{{:dccpp:dccpp-setup-en.png}}\\+{{:dccpp:dccpp-setup-en.png?800}}\\
  
 ====Sub-Library==== ====Sub-Library====
 ===Serial-USB=== ===Serial-USB===
-The baud rate is fixed at **115200**.\\ +The baud rate is set default to **115200**.\\ 
-The only thing to setup is to choose the right virtual serial port.\\+:!: Some serial device drivers do not support CTS, hardware handshake, in that case CTS should be set unchecked.\\ 
 + 
 ===TCP/IP=== ===TCP/IP===
 A TCP/IP connection can be used if the Arduino features an Ethernet Shield.\\ A TCP/IP connection can be used if the Arduino features an Ethernet Shield.\\
 The TCP/IP Port is fixed at **2560**.\\ The TCP/IP Port is fixed at **2560**.\\
  
-The **Config.h** source must be modified and recompile for using the Ethernet Shield: 
-<code C> 
-///////////////////////////////////////////////////////////////////////////////////// 
-// 
-// DEFINE COMMUNICATIONS INTERFACE TYPE 
-// 
-//  0 = Built-in Serial Port 
-//  1 = Arduino Ethernet/SD Card Shield 
- 
-#define COMM_TYPE   0 
-</code> 
-Example of a connection response with ethernet: 
-<code> 
-20160315.083459.796 r9999I dccpprea ODCCPP   0772 evaluate message: <iDCC++ BASE STATION FOR ARDUINO MEGA / ARDUINO MOTOR SHIELD: BUILD Mar 15 2016 08:31:58> 
-20160315.083459.806 r9999I dccpprea ODCCPP   0772 evaluate message: <N1: 192.168.100.153> 
-</code> 
  
  
Line 72: Line 52:
 The number of slots is default 12. If using the MEGA it can be increased in the DCC++ sources.\\ The number of slots is default 12. If using the MEGA it can be increased in the DCC++ sources.\\
 __The number of slots must be less or equal to the number of registers set in the DCC++ sources.__\\ __The number of slots must be less or equal to the number of registers set in the DCC++ sources.__\\
-| [[https://github.com/DccPlusPlus/BaseStation/issues/4|DCC++ comment:]] \\ //You can increase the number of registers to greater than 12, especially if running on he Mega, not sure what the max would be, but I'm guessing about 50.//\\ | 
-The number of slots, registers, can be changed in the **Config.h line 24**: 
-<code C> 
-// DEFINE NUMBER OF MAIN TRACK REGISTER 
- 
-#define MAX_MAIN_REGISTERS 12 
-</code> 
 ===Slot Purge Time=== ===Slot Purge Time===
 The minimal idle time in seconds before a slot ist purged.\\ The minimal idle time in seconds before a slot ist purged.\\
 +Purging is disabled if set to zero.\\
  
 ===Sensor off delay=== ===Sensor off delay===
Line 96: Line 70:
 Swap the turnout and straight commands.\\ Swap the turnout and straight commands.\\
  
-===Reduce IDs=== +===Join=== 
-Reduce the generated switch and output IDs to 16. (0...15) Default is 256.\\ +Use the JOIN command instead of MAIN in case of power ON.\\ 
-This option allows usage of an Arduino Uno with more than 45 devices addressed on DCC.\\+See the DCC++ documentation for more details.\\
  
-====Serial device check==== +===4 byte accessory commands==
-Some Windows configurations will crash at Rocrail server startup if the following option is not set:\\ +Uses 4 bytes in case of the ''<a address port gate on/off>'' command.\\ 
-  * __**[[:rocrailini-controller-en#no_device_check_at_startup|No device check at startup]]**__+Without this option: ''<a address port gate>''\\ 
 +See the DCC++ documentation for more details.\\ 
 + 
 +===DTR=== 
 +Determine the serial DTR level on startup. None is default.\\ 
 +Only used for incompatible DCC++ boards.\\ 
 +===RTS=== 
 +Determine the serial RTS level on startup. None is default.\\ 
 +Only used for incompatible DCC++ boards.\\
  
  
  \\  \\
 +
 +
 +
 +
  
 =====I/O Setup===== =====I/O Setup=====
Line 132: Line 118:
 A new query is automatically issued.\\  A new query is automatically issued.\\ 
  
-====Opties====+====Options====
 ===Output=== ===Output===
 ^ Option ^ Bit ^ Value ^ ^ Option ^ Bit ^ Value ^
Line 139: Line 125:
 | Initial |  2 | 0 = state of pin set to INACTIVE upon power-up or when first created \\ 1 = state of pin set to ACTIVE upon power-up or when first created | \\ | Initial |  2 | 0 = state of pin set to INACTIVE upon power-up or when first created \\ 1 = state of pin set to ACTIVE upon power-up or when first created | \\
  
-===Sensor===+===Input (Sensor)===
 ^ Option ^ Bit ^ Value ^ ^ Option ^ Bit ^ Value ^
 | Pull-up |  0 | 1 = use internal pull-up resistor for the pin \\ 0 = don't use internal pull-up resistor for the pin | | Pull-up |  0 | 1 = use internal pull-up resistor for the pin \\ 0 = don't use internal pull-up resistor for the pin |
  
- \\+Usually no manual settings are required here. Rocrail automatically defines Arduino pins as input or output pins as soon as the pins of such a DCC++ CS are used for triggering sensors, turnouts or signals. For input pins, the option "Invert / Pull-up" is activated by default, i.e. the internal pull-up resistor is used.  
 + 
 +Manual intervention is required, only in the case that other options than the default ones are to be used at startup. It is generally recommended that you first create all objects in the plan with the desired pins. Then Rocrail should be restarted and all commands of objects that use output pins should be executed once; because at startup all used input pins and, when executing a command, all output pins are created from Rocrail in the DCC++ CS temporarily. After that, all used pins are listed at "Query" and the options can be changed directly. __At the end don't forget to save!__ 
 + 
 +When changing the option "Invert / Pull-up", the following must also be observed: For outputs, the "Invert" setting here is only valid when starting Rocrail. To ensure that the outputs for turnouts or signals are always used inverted, the value in the field "Parameter" on the "Interface" tab of these objects must be set to "1" \\
  
 =====Addressing===== =====Addressing=====
Line 221: Line 211:
  
 =====Programming Track===== =====Programming Track=====
-The rail power must be set to on before using the **P**rogramming **T**rack.\\ +The rail power must be set to off before using the **P**rogramming **T**rack.\\
-Do not forget to add the required jumper wire on the Motor Shield.\\ +
  
  \\  \\
-=====Install the Firmware===== 
-{{ :dccpp:basestation-de.png?500}} 
-  - Install the Arduino Software (IDE) 
-    * https://www.arduino.cc/en/Main/Software 
-  - Download the latest **DCC++ Base Station** release and unzip the sources: 
-    * https://github.com/DccPlusPlus/BaseStation/archive/1.2.1.zip 
-  - Open with the Arduino IDE the following file, found in the DCCpp_Uno directory: 
-    * **DCCpp_Uno.ino** 
-  - Select the Arduino target, the one used, in the Arduino IDE: 
-    * Tools -> Board -> Arduino/Genuino UNO or MEGA 
-  - Select the USB Port: 
-    * Tools -> Port -> COMx or /dev/tty* or /dev/cu* 
-  - Write the DCC++ Firmware in the Arduino: 
-    * Sketch -> Upload 
- 
-====HEX File==== 
-  * {{:dccpp:dccpp-hex-1.2.1.zip}} 2A 
- 
- \\ 
- 
 =====Trouble Shooting===== =====Trouble Shooting=====
 ====Loco stops at max.speed==== ====Loco stops at max.speed====
 Set the number of __**[[:loc-int-en#decoder_steps|Decoder steps]]**__ to **126** instead of 128 on the Interface tab of the loco properties.\\ Set the number of __**[[:loc-int-en#decoder_steps|Decoder steps]]**__ to **126** instead of 128 on the Interface tab of the loco properties.\\
- 
-====Ethernet Compile Error==== 
-If the following compile error occurs: 
-<code> 
-In file included from /Users/rob/Projects/Arduino/BaseStation-1.2.1/DCCpp_Uno/DCCpp_Uno.ino:179:0: 
-sketch/Comm.h:11:28: fatal error: Ethernet.h: No such file or directory 
-   #include ETHERNET_LIBRARY 
-                            ^ 
-compilation terminated. 
-exit status 1 
-Error compiling. 
-</code> 
-Change line 11 in Comm.h: 
-from 
-<code C> 
-  #include ETHERNET_LIBRARY 
-</code> 
-to 
-<code C> 
-  #include <Ethernet.h> 
-</code> 
  
  
  \\  \\
-====Windows crash after Rocrail start==== 
-Some Windows configurations will crash at Rocrail server startup if the Arduino is connected by USB and the following option is not set:\\ 
-  * __**[[:rocrailini-controller-en#no_device_check_at_startup|No device check at startup]]**__ 
- 
- 
- 
- \\ 
- 
-=====Max. Current===== 
-In file ''CurrentMonitor.h'' the max. current can be changed on line 16:  
-  #define  CURRENT_SAMPLE_MAX         300 
- 
-^ according to \\ Trainboard.com ^^ math. \\ correct ^ 
-^ Value ^ Max. current ^ Value ^  
-|  300  |  800 mA  |  270  | 
-|  600  |  1600 mA  |  540  | 
-|  750  |  2000 mA  |  675  | 
-These values apply to the  __**[[https://www.arduino.cc/en/Main/ArduinoMotorShieldR3|Arduino Motor Shield R3]]**__ with a Current sensing of ''1.65 V / A''.\\ 
-The Current sensing of other Motor shield types may vary, especially if its max. current is > 2 A.\\ 
-See for more information: __**[[http://www.trainboard.com/highball/index.php?threads/dcc-hardware-motor-shields.90314/#post-960418|Trainboard.com]]**__  
-{{  http://www.trainboard.com/highball/data/attachments/171/171670-95fce61ebb745f799c8472bf81c9e6ad.jpg}} \\ 
-| :!: **Important Note:** There are Motor shields with Driver chips LM298 which are so mounted that the heat __can't__ pass over to the Board surface. \\ The picture shows that in this assembly, it may possible to push a Paper strip under the chip. \\ At full load (2 A) for a unit with this lack can't the heat dissipate and the chip get inevitably to hot and will be destroyed. \\ See: **[[http://www.trainboard.com/highball/index.php?threads/dcc-hardware-motor-shields.90314/page-8#post-974529|Trainboard.com]]** | 
- 
- \\ 
- 
 =====Links===== =====Links=====
-  * **[[https://sites.google.com/site/dccppsite/home|Project Home Page]]** +  * https://dcc-ex.com/reference/software/command-reference.html#
-  * **[[https://github.com/DccPlusPlus/BaseStation|Sources at GitHub]]** +
-  * **[[https://github.com/DccPlusPlus/BaseStation/wiki/Commands-for-DCCpp-BaseStation|DCC++ Commands]]** +
-  * **[[https://github.com/DccPlusPlus/Documentation|Motor Shield Documentation]]** {{:dccpp:dccpp-motorshieldpinmappings.pdf}} +
-  * **[[https://sourceforge.net/p/ardurail/wiki/Home/|Ardurail]]** (Märklin-Motorola compatible)+
dccpp/dccpp-en.1565163448.txt.gz · Last modified: 2019/08/07 09:37 by vt601