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|{{ | ||
| + | [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ^Copyright Peter Giling^ | ||
| + | |||
| + | =====Firmware Copyright===== | ||
| + | Copyright(c) MERG and Rocrail.\\ | ||
| + | Commercial use is prohibited.\\ | ||
| + | | {{: | ||
| + | \\ | ||
| + | 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 ===== | ||
| + | |||
| + | | | ||
| + | |||
| + | 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 ===== | ||
| + | |||
| + | | {{: | ||
| + | | {{: | ||
| + | | {{: | ||
| + | | {{: | ||
| + | ^ 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 | ||
| + | | 1 | Turnout 1a | output | ||
| + | | 2 | Turnout 1b | output | ||
| + | | 3 | Turnout 2a | output | ||
| + | | 4 | Turnout 2b | output | ||
| + | | 5 | Sensor 1 | input/ | ||
| + | | 6 | Sensor 2 | input/ | ||
| + | | 7 | Sensor 3 | input/ | ||
| + | | 8 | Sensor 4 | input/ | ||
| + | | 9 | Sensor 5 | input/ | ||
| + | | 10 | Sensor 6 | input/ | ||
| + | | 11 | Sensor 7 | input/ | ||
| + | | 12 | Sensor 8 | input/ | ||
| + | | 13 | Free I/O | input/ | ||
| + | | 14 | Free I/O | input/ | ||
| + | | 15 | Free I/O | input/ | ||
| + | | 16 | reverse loop switch | ||
| + | |||
| + | \\ | ||
| + | * Port 16 should be programmed as single output for use with reverse loop. | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | ===== Led functions ===== | ||
| + | ^ L1* ^ | ||
| + | | Can bus activity | ||
| + | |||
| + | * leds are blinking | ||
| + | |||
| + | |||
| + | ===== PB1 functions ===== | ||
| + | ^ PB1 ^ Function ^ | ||
| + | | After power on | Switch to learn mode for setting a node number. | ||
| + | \\ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ===== 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:// | ||
| + | \\ | ||
| + | ===== 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/ | ||
| + | * port 1-8 switch with address 1-8 | ||
| + | * port 9-16 block with address 9-16 | ||
| + | The same can be achieved by sending a **[[: | ||
| + | |||
| + | ====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 [[: | ||
| + | |||
| + | ====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==== | ||
| + | **" | ||
| + | The [[: | ||
| + | The SoD address should be the same as set for the __**[[: | ||
| + | |||
| + | ====Node Nr.==== | ||
| + | For outputs with long events only.\\ | ||
| + | Inputs will use the **[[: | ||
| + | |||
| + | ====Port types==== | ||
| + | ^ Type ^^ Description ^ Recommendation ^ | ||
| + | | **IN** | Input | Normal input port. | Push buttons, feedback of servos/ | ||
| + | | **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 [[: | ||
| + | |||
| + | ====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 " | ||
| + | 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 | ||
| + | | 18 | CAN ID | | ||