S88 Feedback module
For the control of the trains and the signals in a model railroad, the computer has to know in wich section of track are located the trains, for that, it needs to know wich sections are occupied, this is done by occupancy detectors and the signal of these is connected to a feedback module that informs to the command station and this to the computer, the common ones are RS and S88. Also the feedback modules can be connected directly to the PC by means of GenHSI interface for the S88 or the RS2PC interface for the RS.
The DCC_Gen command station uses the S88, the signal of the occupancy detector arrives to one of the inputs of the S88 feedback module (it is connected to ground) and DCC_Gen reads it every certain time, for that this modules have a R-S flip-flop for every input.
You can connect to DCC_Gen up to 8 S88 modules (128 inputs) one module next to other, JP1 module connector connected to the JP2 connector of the next one, the first JP2 is conencted to DCC_Gen, that will be the 65-66 module number as Lenz, the next one 67-68 and so on
Here you will find different designs that I have made for S88:
S88 | S88 feedback module with 16 inputs |
Detectors | Occupancy detectors |
S88+Detectors | S88 with occupancy detectors |
GenHSI | Interface between S88 and PC (HSI protocol) |
The designs for the RS are here
I have build S88 modules like the S88 Interface web, this is the schematics with common components:
Every input goes to an R-S flip-flop (4044) to memorize the ocupation until the command station reads it, the reading is done with serials registers (4014) so it can be chained different circuits.
This is a photo of a finished PCB:
Download the design of the printed circuit board here in PDF format, if you want to know how making PCB or identifying the components you can read one of these tutorials.
Miguel Angel had written an instalation manual for S88 with DETECT-4 occupancy detectors
There are different types of detectors that you can connect to the S88 inputs, the simpliest is a reed with a magnet under the locomotive, another one is to use a optocoupler like the one I use in grade corossing detector, another one is by transistor, or others by infrared, there are more, you only have to search in internet. Here is an example how they are connected:
1- Reed is placed under the track and when passes the locomotive or a wagon with a magnet in its inferior part, the reed closes and connects input 3 to ground.
2- When a locomotive is in the isolated section of the bridge of diodes, the current flows from booster, through the motor, crosses two diodes in series of the bridge of diodes (B1) and returns to booster. In the diodes there is a voltage drop of 1,4V enough to feed the LED on the optoacoupler through a resistor (R1) the transistor on the optocoupler connects input 4 to ground.
3- In the other isolated section, when there is a locomotive, the current flows to one of the diodes (D1 or D2), the voltage drop of 0,7V feeds the transistor (T1) through the resistor (R2) and connects input 8 to ground. (through the ground of booster that this connected to the command station)
The two first isolate totally the feeding of tracks of S88 power, third no, of the last one Gonzalo has sent me a photo of how he has done, here you see four detectors, for four isolated sections of via:
Also the detection can be done using a infrared barrier, in this case when interrupting the train the beam of infrared light between the emitter and the receiver it connects to ground the input of the S88. It is necessary to arrange the emitter and the receiver faced and in diagonal to the track so that the space between wagons does not affect the detection. In internet you find several circuits of infrared barriers, Carlos Viva has sent me the photos of how he has constructed following the scheme of R.Paisley for four detection zones.
Salus has sent me this design of a S88 feedback module with 8 inputs and optocoupled occupancy detectors that can be connected in chain:
Download the manual and the design of the printed circuit board here in PDF format, if you want to know how making PCB or identifying the components you can read one of these tutorials.
Take a look to Collaborations section the contributions to this design that you have sent me.
For the control by computer and to directly connect S88 feedback modules to the PC if our command station doesn't have connection for feedback modules (Lokmaus, Lenz Compact..) or to have more feedbak inputs, we need an interface, LDT has one that permits 31 S88 modules divided in three connectors with the advantage that use his own protocol and only sends the changes in the inputs, it saves a lot of work to computer, the HSI-88.
I have made a version of interface HSI-88 with only two connectors but that uses its same protocol that you could obtain here. You have to consider the polarity of the S88 connectors and use reed or optocoupled detectors like the ones of Salus. You also have to consider in which connector is installed, S88 Left or S88 Right to put it in Windigipet, RR&Co, etc.
Download the manual and the design of the printed circuit board here in PDF format, if you want to know how making PCB or identifying the components you can read one of these tutorials.
To program the PIC use this HEX file. The PIC source code is here.