User Tools

Site Tools


can-gca2a-en

Differences

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


can-gca2a-en [2024/09/26 10:54] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== CAN-GC2a Universal 16 port I/O node for CANBUS ======
 +[[english|{{  rocrail-logo-35.png}}]]
 +{{  :arduino:gc2a-module.jpg?0x240}}
 +[[: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-gca2a-en|CAN-GC2a]]** | [[: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]]
 +    * [[:arduino:rcan-en|RCAN-Firmware]]
 +    * [[:hardware-en#extension_units|Extension units]]
 +
 + \\
 +
 +^Copyright Rob Versluis / Peter Giling^
 +
 + \\
 +
 +The CAN-GC2a is an alternative to the CAN-GC2 with the same capabilities communicating over the CANBUS. \\
 +This unit uses an Arduino Nano(Every) microcontroller board, instead of the PIC processor.\\
 +Since there is still some development going on, please keep coming back here.\\
 +Interesting features are coming up.\\
 +
 + \\
 +
 +
 +===== The Board =====
 +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 CANBUS.\\
 +White connectors at the back are compatible with all [[:mgv-overview-en|GCA(MGV)xx interfaces]].\\
 +These interfaces are mostly electrical isolated from CANBUS by optocouplers.\\
 +Power, as available in CANBUS-cable, is only used for supply of CANBUS board itself.\\
 +As a standard recommandation for all CAN systems, connection and disconnection of cables is not possible while system is running.\\
 +Using this cheap and rigid d-type connector with locking screws will avoid that connectors drop off accidently.\\
 +
 +===== Nano & Nano Every =====
 +The Nano cannot use the A6 and A7 pins as output. (Port J4-9 and J4-10)\\
 +Nano Every is able to use port 9 and 10 also as output.\\
 +Only Every is supported.\\
 +
 +
 +
 +===== X1 16MHz =====
 +Recommended is to use a 16MHz crystal for the MCP2515 operating speed.\\
 +
 +
 +
 +===== Improved supply =====
 +More and more, switching power regulators come within reach of us railroad enthousiasts.\\
 +The widely popular 7805 5V regulator can be replaced with a switching regelulator like R-78E-5.\\
 +The costs are higher, but the advantage is a far better effiency in the power part of this board.\\
 +The 1 Amp type can really 'transform' the 12-17V supply in the CAN network to 5 Volt and deliver 1 Amp continue load\\
 +without getting serously hot.\\ 
 +It is a big improvement, and the CAN-GC2a kit will contain that chip.\\
 +  
 +
 +
 +
 +===== The Arduino sketch =====
 +For source code and compiling read this chapter: **[[:arduino:rcan-en|RCAN]]**\\
 +
 +===== HEX Files =====
 +====Nano Every====
 +  * https://gitlab.com/rocrail/Arduino/-/tree/master/RCAN/build
 +===== The hardware =====
 +\\
 +^  Files  ^
 +| {{ :cbus:can-gc2a_orc_sch.pdf |The schematics}}  |
 +| {{ :cbus:can-gc2a_sch.pdf |The schematics}}  |
 +| {{ :cbus:can-gc2a_pcb.pdf |The pcboard and parts positions}}  |
 +| {{ :cbus:can-gc2a_every_parts.pdf |The partslist}}  |
 +| {{ :cbus:can-gc2a_gerber.zip |Gerber files}}  |
 +^  N.B. Only complete ordered kits will be supported!  ^
 +\\
 +
 +====Connections====
 +  * [[:cbus:overview-en#connection_cable|CAN-GC cables]]
 +  * For connection with interfaces, see instructions in propriate interface.
 +
 +
 + \\
 +
 +
 +
 +
 +
 +===== Connector J3 10 pin header =====
 +|< >|
 +^ I/O port ^ Connector Pin ^  Remark  ^
 +|  +5V  |  1  |
 +|  GND  |  2  |
 +|  1  |  3  |
 +|  2  |  4  |
 +|  3  |  5  |
 +|  4  |  6  |
 +|  5  |  7  |
 +|  6  |  8  |
 +|  7  |  9  |
 +|  8  |  10  |
 +\\
 +===== Connector J4 10 pin header =====
 +|< >|
 +^ I/O port ^ Connector Pin  ^  Remark  ^
 +|  +5V  |  1  |  |
 +|  GND  |  2  |  |
 +|  9  |  3  |  input only on the Nano Classic((Use the Nano Every))  |
 +|  10  |  4  |  input only on the Nano Classic((Use the Nano Every))  |
 +|  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.\\
 +However, since the contact information inside the CAN-GC2a is arranged so that the unit is\\
 +low sensitive for distorsions, the minimum pulse lenght should be at least 50 miliSecs to be accepted (0.05 second).\\
 +In addition to that, reed-contacts usually give more than 1 pulse when activated, known as 'contact dender'.\\
 +For this way of sensoring, a special pulse-extender will be available inside the firmware.\\
 +This option is indicated as 'BK'.\\
 +\\
 +
 +===== Hardware for CAN-GC2a =====
 +
 +Boards and complete kits are available from www.phgiling.net.\\
 +The programming of the Arduino nano itself can be done via USB port.\\
 +
 + \\
 +<html><a name="setup"/></html>
 +
 +===== Setup =====
 +{{:cbus:cbus-gc2.png}}\\
 +
 +====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-gca2a-en|CAN-GC2a]] 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-gca2a-en|CAN-GC2a]] 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-GC2a]]** 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.\\
 +
 + \\
 +
 +====LEDs====
 +The information of the LEDs is explained on the firmware page: **[[:cbus:can-gca2-firmware#leds|LEDs]]**\\
 +
 +
 + \\
 +=====Node Variables=====
 +^ NV# ^ Purpose ^
 +|  1  | General configuration |
 +|  2...17  | Port configuration |
 +|  18  | CAN ID |