User Tools

Site Tools


can-gca2g-en

Differences

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


Previous revision
can-gca2g-en [2025/04/03 13:06] (current) – [The schematic] phg
Line 1: Line 1:
 +====== CAN-GC2G Multi functional I/O node for CANBUS ======
 +[[english|{{  rocrail-logo-35.png}}]]
 +[[:english|Content]] -> [[:hardware-en|Hardware]] -> [[:hardware-en#gca-cbus|CANBUS]]
 +  * [[:cbus:overview-en|CAN-GC Overview]]
 +  * [[:can-gca1-en|CAN-GC1]] | [[:can-gca1e-en|CAN-GC1e]] | [[:can-gcln-en|CAN-GCLN]] | [[:can-gca2-en|CAN-GC2]] | **[[:can-gca2G-en|CAN-GC2G]]** |  [[:can-gc3-en|CAN-GC3]] | [[:can-gc4-en|CAN-GC4]] | [[:can-gca5-en|CAN-GC5]] | [[:can-gc6-en|CAN-GC6]] | [[:can-gc7-en|CAN-GC7]] | [[:can-gc8-en|CAN-GC8]]
 +    * [[:cbus:can-gca2-firmware|Firmware]]
 +    * [[:english#interfaces|Interfaces]]
 +
 + \\
 +
 +^Copyright Peter Giling^
 +
 +=====Firmware Copyright=====
 +Copyright(c) MERG and Rocrail.\\
 +Commercial use is prohibited.\\
 +|  {{:gca:can-gc2g_pict_02.jpg?300}}|
 + \\
 +The CAN-GC2G is an alternative to the CAN-GC2 with integrated drivers, useable as a complet unit without \\
 +extra drivers, running on the CANBUS open source CAN standard. \\
 +This unit enables direct connection of the following peropheral: 
 +  * 2 x Turnout output for single coil units.
 +  * 8 x Low impedance input for Hall sensors or reed contact
 +  * 3 or more free configurable I/O ports
 +  * High current switch for reverse loop control
 +
 +
 +
 + \\
 +
 +
 +===== The pcboard =====
 + 
 +|   {{:can-gc2g_pict_03.jpg?400}}   |
 +
 +A jumper makes it possible to set terminator on the last board in the CANBUS chain.\\
 +This jumper connects a 120 Ohm resistor to the Merg CBUS.\\
 +The base for creation this board is to make use of CBUS easier for garden railroad.\\
 +It does basically not need anything else to control 2 turnouts with single 24V coil\\
 +Any other voltage up to 24V dc is possible.\\
 +Further more 8 inputs are pre conditioned for use with Hall sensor or reed contact,\\
 +and addionally there is place and control for two relays with 10Amp contacts to be able to reverse the rail power inside a reverse loop.\\
 +These relays will be controlled by Rocrail, direct control via reed contact or Hall sensor is also optional.\\
 +Power, as available in Merg CBUS-cable, is only used for supply of CANBUS board itself.\\
 +The reverse loop relays and the outputs for turnout need 24 V by standard.\\
 +Adaption to lower voltage needs different 10Amp relays.\\
 +As a standard recommandation for all CAN systems, connection and disconnection of cables is not possible while system is running.\\
 +Cable connection is done in the same way as standard with Merg CBUS, by screw terminals\\
 +Extra supply connection for 24V is also available.\\
 +Specially for outside use in humid weather conditions a heating resistor is also situated at the back side of the board.\\
 +A few degrees warmer inside the box, compared to outside conditions, will do miracles for the board.\\
 +However is advisable to be sure the box where this board is placed, is very seriously closed and IP66 waterproof.\\
 +\\
 +\\
 +
 +===== The schematic =====
 +The principle of this board is equal to CAN-GC2. It uses the same firmware.\\
 +IC1 is main processor, taking care for all ports.\\
 +IC2 is the CAN driver, that takes care for correct handling of the CBUS.\\
 +IC3 is the same processor as used on GCA173 and GCA179, with almost the same firmware.\\
 +IN1.. In8 connections can be used for Hall sensors or reed contacts.\\
 +The impedance is speciall kept as low as 470 Ohm , to suppress distorsion on longer (<3m) lines.\\
 +The fimware in IC3 will make sure that also short pulses specially with reed contacts,\\ 
 +create a solid contact info to IC1.\\
 +Ports 9..12 have a double function.\\
 +Initially they are connected to the outputs of IC3 for IN5..In8.\\
 +But is also possible to use them as output ports.\\
 +To avoid conflicts between IC1 and IC3, when both are cionfigured as output, resistors R12.. R15 will\\
 +protect these ports.
 +When port is configured as output, IC3 will not have any incfluence on that port.\\
 +Turnout 1 and 2 are switched by relays K1..K4.\\
 +The type of the motors of these turnouts are of single coil type.\\
 +Combination of relay 1 & 2 , -or 3 & 4-, will switch +/- or -/+ depending on desired direction of turnout.\\
 +Pulse length can be programmed as with CAN-GC2.\\
 +VDR1 and VDR2 are very important, and will suppress inductive fly-back from the turnout coil, to avoid distorsion into th total system.\\
 +\\
 +Reverse loop switch can be used to reverse the rail power in a loop, when needed.\\
 +Always 1 of two relays will be switched ON.\\
 +Rocrail can be programmed in routes (commands) to set the correct polarisation.\\
 +It is also possible to use two inputs IN7 & IN8 to set these polarisation with reed contacts or hall sensors.\\
 +This is specially nice if you want to control you trains manually,\\
 +and do not have to worry about correct polarisation by entering or leaving the reverse loop.\\
 +These feature needs different firmware for IC3.\\
 +If you are intersted in that option, ask [[peter@phgiling.net|Peter]].\\
 +
 +
 +
 +
 +
 +===== The hardware =====
 +
 +|  {{:gca:can-gc2g_sch.pdf|The schematics}}  |
 +|  {{:can-gc2g_pcb.pdf|The pcboard and parts positions}}  |
 +|  {{:gca:can-gc2g_parts.pdf|The partslist}}  |
 +|  {{:can-gc2g_gerber.zip|Gerber files}}  |
 +^ N.B. Only complete ordered kits will be supported! ^
 +\\
 +
 +=====Connections=====
 +CanBus is a 4 wire cable, where both CAN+ and CAN- lines shopuld be twisted all over the full length.\\
 +The best cable for that purpose is a a widely available CAT5 cable.\\
 +Shield is Ok but for up to 200 mtrs not needed.\\
 +Connections on CAN-GC2G and CAN-GC1e are identical\\
 +Two more terminals, indicated as POWER2, are for the 24V dc to be used for turnouts and reverse loop relays.\\
 +This 24 V can be feeded over the same CAT5 cable with a twisted pair.
 +Ground of Power 1 and power 2  should be linked.\\
 +This means that , unkless special precaution is made on CAN-GC1e, it is NOT possible\\
 +to supply CAN-GC1e and power 2 with the same power supply.\\ 
 +
 + \\
 +
 +===== Configuration of ports =====
 +Though the firmware of this CAN-GC2G is equal to CAN-GC2, it has a number of pre-defined ports.\\
 +Adresses for turnouts should be in following order\\ 
 +^  Port #  ^  Function  ^  Input/Output  ^  pulse/switch  ^  Connection  ^  Remarks  ^
 +|  1  |  Turnout 1a  |  output  |  Pulse  | Turnout 1  |   |
 +|  2  |  Turnout 1b  |  output  |  Pulse  | Turnout 1  |   |
 +|  3  |  Turnout 2a  |  output  |  Pulse  | Turnout 2  |   |
 +|  4  |  Turnout 2b  |  output  |  Pulse  | Turnout 2  |   |
 +|  5  |  Sensor 1  |  input/block  |  x  |  IN1  |  |
 +|  6  |  Sensor 2  |  input/block  |  x  |  IN2  |  |
 +|  7  |  Sensor 3  |  input/block  |  x  |  IN3  |  |
 +|  8  |  Sensor 4  |  input/block  |  x  |  IN4  |  |
 +|  9  |  Sensor 5  |  input/block  |  x  |  IN5  |  also as free I/O at J3 pin3  |
 +|  10  |  Sensor 6  |  input/block  |  x  |  IN6  |  also as free I/O at J3 pin4  |
 +|  11  |  Sensor 7  |  input/block  |  x  |  IN7  |  also as free I/O at J3 pin5  |
 +|  12  |  Sensor 8  |  input/block  |  x  |  IN8  |  also as free I/O at J3 pin6  |
 +|  13  |  Free I/O  |  input/output  |  free  |  J3 pin 7  |  |
 +|  14  |  Free I/O  |  input/output  |  free  |  J3 pin 8  |  |
 +|  15  |  Free I/O  |  input/output  |  free  |  J3 pin 9  |  |
 +|  16  |  reverse loop switch  |  output  |  switch*     Reverse loop  \\  or J3 pin 10  |  If relays K5 and K6 are not installed, \\  port 16 is open like Port 15.  |
 +
 +\\
 +*  Port 16 should be programmed as single output for use with reverse loop.
 +\\
 +\\
 +
 +===== Led functions =====
 +^  L1*  ^   L2  ^  L3*  ^
 +|  Can bus activity  |  Programming activated  |  Unit running  |  
 +
 +*  leds are blinking  
 +
 +
 +===== PB1 functions =====
 +^ PB1 ^ Function ^
 +| After power on |  Switch to learn mode for setting a node number.  \\  A second push will leave this mode.  |
 + \\
 +
 +
 + 
 +
 +===== Connector J3 10pin header =====
 +
 +^ LocoIO port ^ Pin #  ^
 +|  +5V  |  1  |
 +|  GND  |  2  |
 +|  9  |  3  |
 +|  10  |  4  |
 +|  11  |  5  |
 +|  12  |  6  |
 +|  13  |  7  |
 +|  14  |  8  |
 +|  15  |  9  |
 +|  16  |  10  |
 +===== Direct connection of leds to outputs=====
 +[[http://wiki.rocrail.net/doku.php?id=mgv-overview-en#direct_connection_of_led_s|Led connection]]
 +\\
 +===== Reed switches and hall sensors =====
 +Read switches and hall sensors can be used as feed-back sensors.\\
 +They will be connected to IN1 to IN8, which numbers correspondent to I/O Port 5.. I/O Port 12.\\
 +Reed contacs are connected to point **-** & **s** on each connector.\\
 +The CAN-GC2G provides an extra processor, to be able to time all -even very short- pulses from reed-contact\\
 +to a reasonable longer pulse, to enable the CAN processor to read this info correctly.\\
 +Input impedance is kept low, to limit distorsions on longer lines (Max 3 meters) form the sensors.\\
 +
 +
 + 
 +
 +===== Setup =====
 +
 +
 +====Reset EEPROM====
 +Hold down the button at power on to reset/initialize the EEPROM with following settings:
 +  * port 1-8 switch with address 1-8
 +  * port 9-16 block with address 9-16
 +The same can be achieved by sending a **[[:cbus:flim-en#clear_all|Clear]]** command.\\
 +
 +====Set====
 +Set the first found change. This button must be pushed multiple if more then one port or setting is changed.\\
 +The sequence of change check is:
 +  - Ports
 +  - Node configuration
 +  - SoD
 +
 +====Set all====
 +Set all ports and options.\\
 +
 +====Save output state====
 +Write the output state in EEPROM after detecting a **power off command** on the CANBUS.\\
 +The outputs will be restored after the [[:can-gca2G-en|CAN-GC2G]] is powered on.\\
 +
 +====Short events====
 +Ignore the event node number and compare the event number only.\\
 +
 +====Long events====
 +For long events the BUS variable on the interface tab of sensors, switches and other objects is used to address the module its node number.\\
 +The address variable is equal to the one used with short events.\\
 +
 +
 +====SoD====
 +**"Start of Day"**\\
 +The [[:can-gca2-en|CAN-GC2]] will report the status of every input after receiving an accessory command with this address. (Short event)\\
 +The SoD address should be the same as set for the __**[[:cbus-en#sod|Controller]]**__ and can be tested with the **SoD** button.\\
 +
 +====Node Nr.====
 +For outputs with long events only.\\
 +Inputs will use the **[[:cbus:flim-en#node_number|CAN-GC2]]** node number for events.
 +
 +====Port types====
 +^ Type ^^ Description ^ Recommendation ^
 +| **IN** | Input | Normal input port. | Push buttons, feedback of servos/points and hall sensors. |
 +| **BK** | Block | Input with a 2 seconds delayed off. (±50ms) | Occupancy detectors. |
 +| **SW** | Switch | Continuous output. | Single coil switch drivers like servos. |
 +| **PU** | Pulse | Output with x ms activation time. (±50ms) | Note: A [[:switch-int-en#switch_time|software timed off]] is not possible with CANBUS; It is realized in the hardware. | \\
 +
 +====Pulse time====
 +Activation time for pulse type outputs.\\
 +
 +====Inv====
 +Inverts the port.\\
 + \\
 +
 +====Test====
 +Every port has a test button in which also the current state is displayed as a "1" or "0".\\
 +The state is only updated after pushing a test button.\\
 +
 + \\
 +====Usage====
 +Shows the Rocrail object ID which is linked to this port.\\
 +
 + \\
 +
 +
 +
 +=====Node Variables=====
 +^ NV# ^ Purpose ^
 +|  1  | General configuration |
 +|  2...17  | Port configuration |
 +|  18  | CAN ID |