GCA136 4 servo interface with feed-back
Description
This board is replacing MGV81, MGV84 and MGV84s.
Mainly because there was a wish to have a possibily for easier configuration, the MGV136 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 : http://wiki.rocrail.net/doku.php?id=mgv-programming-en
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' .
Features
- 4 servo's will run simultaniously
- Configuration parameters : Left angle, right angle, speed and which relay should be at position
- Programmable from Rocrail via LocoNet(GCA50) or CANBUS(CAN-GC2), no extra connections to be made
- No further crawling under your train-layout while adjusting servo.
- All parameters are stored in on-chip eeprom.
Something extra >> Railroad crossover
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 MGV50 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 | MGV136 input |
| Port 1 (9) | Track 1 activate | 1 |
| Port 2 (10) | Track 2 activate | 2 |
| Port 3 (11) | Track 1 disactivate | 3 |
| Port 4 (12) | Track 2 disactivate | 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 postition, will free the crossing.
Remember in real world: DO NOT PASS UNTIL RED SIGN HAS BEEN SWITCHED OFF ! !
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.
The real thing..
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 exacly.
Mounting options for servo motor
|
|
| See http://www.rbs-modellbau.de/ | |
| |
| A nice mounting support is available from www.phgiling.net. Sideways or in line movement is possible | The set contains all that is needed, incl. servomotor see GCA servo support ServoSet |
The hardware
Firmware
Checkout the Firmware sources:
svn checkout http://mgv.googlecode.com/svn/Firmware/trunk/ firmware
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 |
|---|---|---|
| dc | 9 Volt | 16 Volt |
| ac | 8 Volt | 16 Volt |
Public shopping cart at Reichelt
https://secure.reichelt.de/index.html?;ACTION=20;LA=5010;AWKID=416912;PROVID=2084 (Rev.: 06-04-2011)
Remarks on shopping list
Please remind that you have to check this shopping list yourself, before making any order.
We can not be held responsable for missing parts or any changes in prices and stock-availability of any listed item.
For the special version MGV136 for Railroadcrossing , a PIC16F628(A) will be possible, instead of PIC16F648A
For LTV847, 2 x LTV827 is correct and available from Reichelt.
J5 could be changed to a more simple AKL 012-02
SB1 should be changed to 3 pins of BL 1X10G8 2,54
Cable to MGV50 / CAN-GC2
refer to: **Connection interfaces**
Remarks on configuration / adjust each servo with GCA50 or CAN-GC2
As previously mentioned, MGV136 can be configured by Rocrail.
This can be done only, when MGV136 is connected to MGV50 or CAN-GC2.
The program to configure is described here: http://wiki.rocrail.net/doku.php?id=mgv-programming-en.
Before using it, the MGV50/CAN-GC2 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 MGV50 it is important to power off and on MGV50, before outputs are active!
| example for GCA50 settings |
|---|
![]() |
| example for CAN-GC2 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!
Terminal connections used between GCA136 and GCA50/CAN-GC2
Servo - Output
| GCA50/CAN-GC2 port# | GCA50 Connector | CAN-GC2 Connector | GCA136 Servo# |
|---|---|---|---|
| 1 | J5 | J4 | 1 |
| 2 | J5 | J4 | 2 |
| 3 | J5 | J4 | 3 |
| 4 | J5 | J4 | 4 |
| 9 | J6 | J3 | 1 |
| 10 | J6 | J3 | 2 |
| 11 | J6 | J3 | 3 |
| 12 | J6 | J3 | 4 |
Servo-Feedback
| GCA50/CAN-GC2 port# | GCA50 Connector | CAN-GC2 Connector | GCA136 feed-back of servo# |
|---|---|---|---|
| 5 | J5 | J4 | 1 |
| 6 | J5 | J4 | 2 |
| 7 | J5 | J4 | 3 |
| 8 | J5 | J4 | 4 |
| 13 | J6 | J3 | 1 |
| 14 | J6 | J3 | 2 |
| 15 | J6 | J3 | 3 |
| 16 | J6 | J3 | 4 |
MGV50/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
Trace: » androc-intro-en » einleitung » video-tutorials-de » start-de » mgv136-en












