User Tools

Site Tools


can-gca1e-en

CAN-GC1e CANBUS-Ethernet Interface with 3Amp power supply

The CANBUS Ethernet interface

  • This module features an Ethernet interface, which solves most common problems with COM-ports and USB configurations.
  • The circuit is mounted on a professional, double sided PCB with silk mask.
  • DB9 connectors are used because of their toughness.
  • The DB9 connectors are supplying 12V power for the CANBUS network.
  • This computer interface has, like all other CAN-GCA modules, a jumper for terminating the CAN data line with 120Ω.
  • The board features an ICSP connector for (re-)programming the CPU.
  • Check http://www.phgiling.net for boards and Kits.



Features

  • Max. 4 concurrently TCP/IP connections.
  • Default IP-Address 192.168.0.200
  • Default TCP port 5550
  • Connection timeout after 100 seconds idle.
  • FLiM Setup for Node number, IP address, service port, MAC address, network mask, CANID and idle watch dog.
  • Compatible 12VDC connector. (J5)
  • PC protocol is compatible with CANRS and CANUSB.
  • Ethernet galvanic isolated from CAN


PCB V1.4


LEDs

LED# Function Aspect Remark
1 5V continuous
2 3V3 continuous
3 Ethernet activity random flashing
4 Running continuous
4 Learning mode 500ms blinking Activated by push button or Rocrail setup.
4 Error One shot long DIM Ethernet or CAN Queue full. Socket not ready.
4 Disconnect One shot DIM A client, e.g. Rocrail server, has disconnected.
4 Read/Write variable One shot short DIM During setup with FLiM.
5 CAN activity random flashing


Connectors

Name Function
ICSP1 PIC Programmer.
PB1 Node number setup button
J1 Power connection.
J2, J3 CAN-GC connector
J4 Ethernet connection.
J5 CAN with 12V connection.
JP1 CAN termination.


Jumper settings

Jumper Set removed remark
JP1 120 Ohm terminator on CAN line no terminator on Can-line Only 2 far ends of total communication line should be terminated with 120 Ohm.
JP2 xx no use unused, only for test/ debug situations

Power supply

On J1 a power supply of 10-20 V AC or 15-24V DC can be connected.
For DC supplies: Polarity is irrelevant.
Minimum capacity should be 30 VA.


Adjusting supply for CAN

Supply for all CAN-GCx units should be standard 12V.
This can be adjusted with POT1, to be measured on J5 pt 1 & 4.
It might be necessary to set a higher voltage, special for use with CAN-GC3 programming track.
Some decoders may need a higher voltage to enable a correct reading.
Voltage is adjustable between ca 12 and 18,5Volt.

Firmware programming and reset to the defaults

The best way to program the firmware into the chip, is leaving the eeprom blanc, i.e. all 0xFF.
In that case , the standard IP-number, Netmask and Mac are set as below.
Reset to these values is also possible by pressing the button on CAN-GC1e while powering up.

Setup

The CAN-GC1e can only be configured over Ethernet.

The usual way is to connect CAN-GC1e to your home network.
A direct link will mostly work too but computer network TCP/IP address should be set to the same network range of 192.168.0.x.
REMARK: Best is to set it to 192.168.0.101, which is most certainly not yet used for any other device in the ethernet network.

The default IP address of the CAN-GC1e is 192.168.0.200. Make sure the PC is also in the same network range of 192.168.0.x before trying to connect.( See above )
Your PC usually will get its IP4 address autmatically from your home router.
This might be different from 192.168.0.x.
In that case, write down the IP4 number where your PC is running on.
If it is not listed, see in Help menu of Rocrail, there it will show.
Change the automatic IP4 address in the PC network settings to manual and set IP4 address to 192.168.0.101 and subaddress to 255.255.255.0
Now Rocrail should have connection with CAN-GC1e. Please note that sometimes it helps here to restart Rocrail and CAN-GC1e.
To change the IPadress in the CAN-GC1e, follow this procedure :
After connection is established, type in the IP-address you wrote down from the pc-settings and change the last of
the four numbers to a different one between 1 and 255 as shown in example above.
Then press button on CAN-GC1e, causing the leds on the board flashing.
Press SetAll button in Rocrail screen.
New address is now stored in EEprom on CAN-GC1e.
It will only be active after restart CAN-GC1e.

Now change IP-address in Rocrail settings command station, and shut down Rocrail.
Do not forget also to shut down CAN-GC1e.

Put PC-Network settings back to automatic IP Address.
Start Rocrail again and connection with CAN-GC1e should be OK,

If for any reason you like to go back to standard IP-Number 192.168.0.200, all you have to do is restart CAN-GC1e with button on GC1e pressed.

For those who like to set this IP number directly into memory of the chip, you will need programmer which can handle PIC18F2585.
The IP numbers are stored hexadecimal in &H305 to &H308.

Ethernet

All Ethernet settings are written into EEProm and will be activated after a re-power on except for the "Idle time watch dog".

IP Addressing

The default setting of the Interface’s IP address is 192.168.0.200 with the service port 5550.
You may have to set your PC Ethernet connection to this address range, 192.168.0.x, in order to be able to access the Interface.

Net Mask

Default is 255.255.255.0 which will do for all home and club networks.

MAC Address

The default MAC address, which is not an official one, can be changed if it conflicts with an existing one in the network.

Note: The CAN-GC1e must have a valid MAC-Address. Otherwise, some routers or access points may refuse a connection to that device! In some cases the connection can be possible over LAN-Cable, but not over WLAN from the same router. 00-00-00-00-00-00 is not a valid address.

Idle time watch dog

The idle time watch dog disconnects a client if it did not send anything within a period of 100 seconds.
This is to avoid zombie connections which will unnecessary occupy a TCP/IP resource.
Disable this option if sniffer software is connected.

Rocrail sends every 2 seconds, in case no other command has been send, a keep alive message to the CAN-GC1e.
This message is not broadcasted to CAN and serves only for resetting the idle timer in the CAN-GC1e for this connection.

Track power off at idle

The idle watch dog must be activated for this option.
Useful for running in automatic mode to turn off the power if the client has turned idle.

Command Ack

:!: Use this option only in case of data loss.

Activates the command acknowledgment of each received command on the Ethernet side.
This handshake prevents loss of commands due buffer overflow. (10/100MBit → 125kBit)

CANBUS

CANID

Unique ID in the CANBUS network.
The CANID is not used from the ASCII Frames because more then one PCs can connect using different IDs.


Multiple Connections

The CAN-GC1e Firmware supports up to 4 concurrently connections.
Keep in mind that commands send from one connection to CANBUS are not broadcasted to the other connections.
This is the normal behaviour because all commands send by a CANBUS node are not seen by this node itself.
Only packets coming from other nodes in the network are broadcasted to all connections.


Network

WLAN/WiFi

:!: Strongly discouraged and not supported is the use of a wireless connection between the Rocrail server and the CAN-GC1e.

Bandwidth

Avoid streaming data like VoIP on the same network segment; CAN-GC1e will stop service after too many retries.


Hardware Files

Harware info

Power for CAN-GC3 programming track

The standard 12V, coming from CAN-GC1e , is used for programming track as well.
It should be adjusted before connecting other CAN devices.
Though many programmers often also work with no more that 12V,
it seems that some decoders have a bit of a problem with that.
To solve that, a higher Voltage will be the solution.
The Pot1 regulator on CAN-GC1e can be set to max 18V, but I advise not to that if not need.e.
With 18V all connected CAN devices will have to radiate more heat, which is not adviceable for energy reasons/
Without these programming needs, the voltage can be reduced to 10V minimum, making it all more energy economic.
Voltage can be measured at the pins +12V and GND on J5.


Trouble Shooting

Not all CAN messages are processed

Replace C18, and if needed also C3, if not all CAN messages are processed.
The CPU will stop responding if C18 is very bad.

can-gca1e-en.txt · Last modified: 2022/01/29 16:53 by phg