The widely available 28BY J-48 stepmotor is fantastic for all kinds of movements,
you surely like to have on your model railroad.
Mostly, this motor is controlled with an Arduino board, but to achieve exactly what you desire,
a certain skill in programming is needed.
And besides that, using an Arduino wiil usually result in 2 or 3 different boards, connected together with wires.
It can be much more convenient with GCA202.
In this design, all is placed on one board, and it can be connected as interface with GCA50(0), GCA185, CAN-GC2 and GCA_PI02.
This implies also, that the motor can be switched on and off in Rocrail, i.e. using actions.
Two inputs (via Optio-couplers) are used for commanding forward or reverse rotation.
For future expansion, two feed-back outputs (also with Opto-coupler isolation) are implemented.
|PCB drawing in gerber files|
|The pc-board and parts positions|
|The bill of materials|
The unit needs 5V dc for power approx 200 mA maximum,
1) Connect it to connector V5 (+ / - are indicated on board).
- In this case two jumpers should be placed in position closest to V5.
2) Supply from CAN-GC2, GCA50(0), GCA185, or GCA_PI02.
- Connect 10 Pin PSK connector from CAN-GC2 etc, to J2,
- J1 can be used to connect next interface board like GCA173,GCA93, GCA77, etc.
- Of this next board, only port 5 - 8 will pass through.
- Place jumpers closest to Diode D1.
- Due to the needed current, it is advisable to only connect 1 x GCA202 to CAN-GC2 etc.
- There is option for more, in that case ask Peter.
If no commmand control is needed, it is best to remove Optocoupler, and connect
pin 15 and 16 together for clockwise rotation OR Pin 14 and 15 for counterclockwise rotation.
If external command control is desired: > Port 1 starts clockwise- and Port 2 starts counterclockwise rotation (0=V = OFF, 5V = ON.
P1 is used to set the rotation speed.
Turn left for slower, turn right for faster rotation.
Minimum speed is 0.4 RPM.
The maximum speed of ca 16 RPM is defined by the motor itself.
Port 3 & 4 are used for feed-back the functions.
In simple setup not needed, but very useful if this unit is used in automated setups.
You have a railroad bridge that is opened every now and then, either manual or automatic.
In that case you will need feed-back to check if the bridge is down and ready for passing the train again.
Here you just use a microswitch in the bridge, which disables the signal to GCA202.
The feed-back (port 3 = fwd, port 4 = rev) will shut off when switch contacts are opened.
Depending on the type of used communication system, there might be a delay before the feed-back is responding at the start of the motor.
If that is the case , be sure to make some kind of delay in the controlling program, before the feed-back is checked.
When motor is in stop mode, led will lit normally.
When motor is activated, led wil flash according motor speed.
But with high speed it will flash with approx 130Hz, so not visible.
This page shows how simple a stepmotor driver can be.
The standard firmware as given on this page, is probably only a start.
Firmware can easily be altered to create a stepmotor that makes a predefined amount of steps.
Even two different amount of steps in same direction,
Also here, the feed-back signals can be used to inform Rocrail that motor 'has finished its task'.
What ever is desired…. plenty of options!
Let me show your creation with this board in these pages !