User Tools

Site Tools


GCA136 4 servo interface with feed-back

gca136_pict01.jpg ContentHardwareGCA

By Peter Giling and Ewout Prangsma


This board is replacing MGV81, MGV84 and MGV84s.
Mainly because there was a wish to have a possibility for easier configuration, the GCA136 was created.
GCA136 does not have relays for switching turnout frogs, or - centers in two rail systems.
If those relays are needed, GCA137 can be placed on top of it.
The firmware already contains the commands for relay switching, so no alterations are needed, after GCA137 is installed.
Rocrail contains a special configuration tool :
Except for the connections to the frogs, no extra connection is to be made.
Connectors bottom side GCA137 and top side of GCA136 connect together.
With ICSP1 it is possible to program the chip ' in circuit' .


  • 4 servo's will run simultaneously
  • Configuration parameters : Left angle, right angle, speed and definition of relay-position (ON or OFF).
  • Programmable from Rocrail via Loco/I-O(GCA50) or CANBUS(CAN-GC2), no extra connections to be made
  • No further sneeking under your train-layout while adjusting servo.
  • All parameters are stored in on-chip eeprom.

The real thing..

GCA136 only…… …..and with the sandwich board GCA137

Remarks on construction

To make the fuse F1 low enough to fit under board GCA137, it is necessary to straighten the wires of the fuse.
In that way it wil sink deeper into the printed circuit.
Spacers between GCA136 and GCA137 need to be 12mm long.
Installation of SB1 is only needed if GCA137 will be used.
In that case before soldering SB1: put both connectors together and insert then in GCA136.
Fix GCA137 on top with 12mm spacers. After that, solder SB1 on GCA136 and J2 on GCA137.
In that way they match exactly.

Different makes of relays cause sometimes a problem, where relays do not respond.
This can easily be solved by using wire bridges instead of D1 and D2.

Mounting options for servo motor

A nice mounting support is available from
Sideways or in line movement is possible
The set contains all that is needed, incl. servomotor
see GCA servo support ServoSet

The hardware

The schematic V1.3
The printed circuit V1.3 and parts positions
N.B. Self made pc-boards are not supported!


Previous firmware 2009

Power supply

The board needs a separate supply, to be connected to J5.
Ac or dc is possible, polarity not important.

Power type minimum maximum min current
dc 9 Volt 12 Volt 1 Amp
ac 8 Volt 16 Volt 1 Amp

Cable to GCA50(0) / CAN-GC2 / GCA_PI02 / WIO_01

Remarks on configuration / adjust each servo with GCA50, CAN-GC2 or GCA_PI02

As previously mentioned, GCA136 can be configured by Rocrail.

This can be done only, when GCA136 is connected to GCA50 / CAN-GC2 or GCA_PI02.
The program to configure is described here:
Before using it, the GCA50/CAN-GC2/GCA_PI02 needs correct setting of the connected out- and inputs.
For table of connections see table below.
For GCA50, outputs to servo should be programmed as 'Switch' with C2 marked.
Inputs should be programmed as sensor.
Important note:

After changing settings in GCA50 it is important to power off and on GCA50, before outputs are active!

example for GCA50 settings


Important note:

After changing settings in MGV50/CAN-GC2 it is important to power off and on MGV50/CAN-GC2, before outputs are active!

example for CAN-GC2 settings

example for GCA_PI02 settings

RocNet node settings for GCA_PI02 GCA136 Programming box settings

Terminal connections used between GCA136 and GCA50 / CAN-GC2 / GCA_PI02

Servo - Output

1 J5 J4 I/O1 1
2 J5 J4 I/O1 2
3 J5 J4 I/O1 3
4 J5 J4 I/O1 4
9 J6 J3 I/O2 1
10 J6 J3 I/O2 2
11 J6 J3 I/O2 3
12 J6 J3 I/O2 4
17 I/O3 1
18 I/O3 2
19 I/O3 3
20 I/O3 4
25 I/O4 1
26 I/O4 2
27 I/O4 3
28 I/O4 4


feed-back of
5 J5 J4 I/O1 1
6 J5 J4 I/O1 2
7 J5 J4 I/O1 3
8 J5 J4 I/O1 4
13 J6 J3 I/O2 1
14 J6 J3 I/O2 2
15 J6 J3 I/O2 3
16 J6 J3 I/O2 4
21 I/O3 1
22 I/O3 2
23 I/O3 3
24 I/O3 4
29 I/O4 1
30 I/O4 2
31 I/O4 3
32 I/O4 4

Remarks on programming GCA136 with RocNet :

Due to a serious difference in timing with Raspbery Pi running RocNet,
it might happen that programming will not start the first time after initiation.
In that case, just restart programming.

Remarks on using GCA50 / GCA136 combination directly with Intellibox(2)

When GCA50 / GCA136 combination is directly programmed through Intellibox(2) instead of GCA85 or GCA101, it
is necessary in Rocrail to set 'turnout aknowledge' OFF in IB configuration.

GCA50/CAN-GC2 configuration for special Railroadcrossing with GCA136

GCA136 can be used for Railroadcrossing.
A special firmware is to be programmed in PIC processor of GCA136.:Special barrier program for GCA136
GCA50/CAN-GC2 needs following setup :
Instead of solid outputs of port 1 to 4 (or 9-12) the pulse-out should be used.
This is the same setting as used for coil-driven turnouts.
Be sure to program CAN-GC2 outputs with 'single gate' activated.
It is also possible to command the railroadcrossing drive with feed/back points.
In that case you should program ports 1 TO 4 (or 9 TO 12) as block detection outputs.
Ports 1(9) and 3(11) to the same adress as the feed-backs that should close the barriers,
and 2(10) and 4(12) to the same adress as the feed-backs that must open the barriers.
Using only one couple of ports (1,3 OR 2,4) is of course also OK.
In this case the barriers are always activated, whenever a train is passing, also in manual control of trains.

Programming with Rocrail and GCA50 or CAN-GC2

Something extra >> Railroad crossing

One nice extra feature of GCA136 is the possibility to use it for barriers on railroadcrossing.
Also bridges can run with almost the same software.
In the example program below, the program is adapted to German situation.
It starts with yellow light for 2 seconds, then red light for 5 seconds.
After that the red light stays on and the first two servo's will run closing the right hand barriers (traffic direction!)
Run time barriers will be approx 4 seconds and software is set to use 90 degrees of servo angle.
After these barriers have been closed, the left barriers will close (servo 3 and 4).
The whole process starts reverse opening all barriers in one loop.

Orange leds should be connected to pin 7 and 8 of J6, common anode, no resistor needed.
Red leds should be connected to pin 9 and 10 of J6 , common anode, no resistor needed.
Servo 1 and 2 are right barriers, servo 3 and 4 are left barriers.
To make this railroad crossing control adaptable to double railroad tracks, we need 4 inputs, either from GCA50 or direct.
The GCA50 or CAN-GC2 outputs connected to this board (either 1..4 or 9..12) needs to be programmed as pulse, when used from software control.
But a better feature is to connect this crossing controller to the sensors you will be using inside LocoNet with the GCA50 or CAN-GC2.
Four sensors are of course needed, but the position of those could be anywhere.
In that case, the GCA50 or CAN-GC2 output, connected to crossing controller, should be programmed as block output.
See example below.

Activation Table
Port nr MGV50 J5 (J6) function GCA136 input
Port 1 (9) Track 1 activate 1
Port 2 (10) Track 2 activate 2
Port 3 (11) Track 1 deactivate 3
Port 4 (12) Track 2 deactivate 4

For direct control, pushbuttons are needed.
Input 1 and 2 are to activate the barriers and leds.
Input 3 and 4 are to open up the barriers again.
When input 1 is activated, reset is only possible with input 3.
When input 2 is activated, reset is only possible with input 4.
This means that when one train activated the crossing signals and deactivates it when passed over, a second train on the other track can also activate the crossing.
In this case only the last train, passing its reset position, will free the crossing.

In real world two more contacts should be needed, but that is a bit overdone, so we skip that.
GCA136 can be used as stand alone without GCA50.
In that case extra 5 Volt power needs to be connected to pin1 (+) and pin 2(-) of J6.

For this purpose no additional GCA137 is needed.
The adjust program is not applied it this feature.

mgv136-en.txt · Last modified: 2023/01/02 21:07 by phg