Use Cases: PCB Design & Assembly , Node Cluster Setup , Signaling Systems , Train Detection , Automation Deployment
POD Card Assembly Guide
Table of contents
Introduction
See the How to Use Assembly Guides for detailed instructions.
The Position Occupancy Detector Card (POD Card), in synergy with the LCC Fusion Node Card, provides detection of the LCC Fusion Project system, facilitating precise detection of trains (locomotives and cars) within specified track positions. This integration is pivotal for automating track occupancy detection, a core feature in advanced model railroad setups.
Upon detecting a train at a position, the POD Card generates an LCC event, signaling the occupancy status. This event is captured by the LCC Node, which, depending on the setup, could trigger various responses such as activating the PWM Card. This activation allows for nuanced control over railroad signals and other trackside functionalities, enhancing the realism and operational efficiency of the model railroad environment.
Unlike the BOD Card detection of a train vy current, the POD Card uses photo sensors to detect changes in lightness as a train passes over a track position. This method doesn’t required current limiting resistors in wheelsets and also enables persise positioning of trains during spotting operations. Train direction can also be detected by detecting two seperate locations near each other to determine the order (direction) of detection.
flowchart LR;
can["CAN Network"];
subgraph layout ["Train Layout"];
direction LR;
b["Optical Sensors (2x)"] --> |"Digital Output<br/>(high/low)"| bb[POD Breakout Board];
bb --> |"Digital Input <br/> (high/low)"| c["POD Card (16x)"];
c -->|"GPIO Output<br/> (high/low)"| n[Node Card];
n -->|"LCC Event<br/>(on/off)"| can;
end;
classDef lSalmonStyle fill:#FFA07A,stroke:#333,stroke-width:2px,font-size:24px;
class c lSalmonStyle;
classDef lightGrayStyle fill:#d3d3d3,stroke:#333,stroke-width:2px,font-size:24px;
class layout lightGrayStyle;
- jumper_caps - not defined
- lcc_event_id - not defined
- lcc_fusion_node_bus - not defined
- lcc_fusion_node_card - not defined
For other terms, please refer to the full Terminology Guide.
Assembly and Component Placement
This section combines both the component specifications and the assembly instructions to ensure a smooth assembly process. Below is a comprehensive list of components, their placement on the PCB, and orientation details to assist you during assembly.
High-Level Steps for Assembly:
- PCB for the card can be ordered from any PCB fabricator using these Gerber Files.
- Clean PCB with alcohol to remove residue. See Cleaning_PCB for details.
- See also: Soldering Tips
- PCB Components - listing of components used for PCB assembly
- PCB Parts - listing of parts used for PCB assembly
Below is a list of the PCB components used for this card (see diagram before reference):
Component Identifier | Count | Type | Value | Package | Purpose | Orientation |
---|---|---|---|---|---|---|
Capacitors | Â | Â | Â | Â | Â | Â |
C1 - C16 | 16 | Capacitor-Ceramic | 1uF, 50 V | 1206 X7R | Smooths signal from phototransistors for improved detection | None |
C17 | 1 | Capacitor-Ceramic | 0.1uF, 50 V | 1206 X7R | Conditions/filters the current for the IC (U1) | None |
Diodes | Â | Â | Â | Â | Â | Â |
D9 | 1 | ESD Diode | PESD1CAN | SOT-23 SMD | I2C data bus electrostatic discharge (ESD) protection | Fits only one way |
Filters & Noise Suppression | Â | Â | Â | Â | Â | Â |
FB1, FB2 | 2 | Ferrite Bead | BLM31PG121SN1L | 1206 SMD | I2C Data Line Noise Suppression Ferrite Beads | None |
Connectors | Â | Â | Â | Â | Â | Â |
J1 - J4 | 4 | RJ45 Socket | 8P8C | PTH | Network cable (CAT5/6) connection to POD Breakout Boards | Fits only one way |
Resistors | Â | Â | Â | Â | Â | Â |
R1, R3, R4, R6, R7, R9, R10, R12, R13, R15, R16, R18, R19, R21, R22, R24 | 15 | Resistor | 10kΩ | 1206 SMD | Sets reference voltage and current through phototransistors | None |
R2, R5, R8, R11, R14, R17, R20, R23 | 8 | Resistor | 5.6kΩ | 1206 SMD | Sets reference voltage and current through phototransistors | None |
R25 | 1 | Resistor | 10kΩ | 1206 SMD | Limits current to MCP23017 Reset pin (normal operation) | None |
R26 - R32 | 7 | Resistor | 1kΩ | 1206 SMD | Limits current to status LEDs | None |
R33 - R36 | 4 | Resistor | 10kΩ | 1206 SMD | Limits current to SW1 and MCP23017 for I2C address configuration | None |
Selectors & Indicators | Â | Â | Â | Â | Â | Â |
JP1, JP2 | 2 | Male Header | 3P, 0.1” | PTH | COMM BUS selection (I2C hardware bus) for either BUS A or BUS B. Must match configuration in LCC Node CDI setup | None |
SH1, SH2 | 2 | Jumper Cap | 2.54mm | N/A | Used with I2C Bus and Vcc selections. Recommend tall caps for ease of use | None |
LED1 - LED8 | 8 | LED | Red | 1206 SMD | Position occupancy indicators (ON means detection) | Reference back of LED, position cathode towards PCB right edge![]() |
SW1 | 1 | DIP / Slide Switch | 3P, 2.54mm | PTH | COMM ADDR selection (I2C address offset 0-7). Configures address for MCP23017 for CDI setup | Position switch for ON setting to PCB top edge |
ICs | Â | Â | Â | Â | Â | Â |
U1-U4 | 4 | Voltage Comparator | LM393 | DIP-8 PTH | Voltage comparator to detect differences in phototransistors | Position IC’s corner dimple (pin 1) towards PCB bottom/left edges |
U5 | 1 | I/O Expander | MCP23017 | SSOP28 SMD | I/O Expander using I2C to detect 8 pairs of sensors | Position IC’s indent towards PCB bottom edge |
Tools Required
For a list of recommended tools, refer to List of recommended tools.
Safety Precautions
- See Safety Precautions.
Testing and Verification
Configure the POD Card:
-
Select the
COMM BUS
by positioning (2) Jumper Caps on eitherA
orB
male header pins (JP1, JP2) -
Select the
COMM ADDRESS
switch (SW1) by sliding each of the 3 switches to either theON
orOFF
position. Setting a switch to ON increments the address by 1, 2, or 4 for an address range of 0 to 7. Up to 8 devices can then be configured forA
and 8 forB
.
The following test and verifications of the card should be performed after a through inspection of the card’s soldering. Check all of the PTH component pins and SMD pads. Make sure there are no solder bridges between pins and pads.
Visual Inspection
-
Initial Check: Examine the board for any obvious issues like missing components, solder bridges, or components that are misaligned or not fully seated.
-
Solder Joint Inspection: Use a magnifying glass or a microscope to inspect solder joints. Look for cold solder joints, insufficient or excessive solder, or any shorts between pads.
-
Component Orientation: the IC’s are correctly oriented according to the PCB silkscreen or schematic.
Connectivity Testing
Continuity Check: Use a multimeter in continuity mode to check for shorts between power rails and ground, and to ensure there are no open circuits in critical connections.
Power-Up Tests
- Assembly a tested to the LCC Fusion Node Card.
- Apply Power to the Power Module and verify the following:
- Check for Hot Components: Feel for components that are overheating, which could indicate a problem like a short circuit or incorrect component.
Functional Testing
Functional testing of the card can be performed after completing the power-up testing. Testing consists of testing network communiations, followed by the sensing of a train over a phototransistor.
HW Communications Testing
Communications testing verifies the LCC Node can communicate with the POD Card’s I2C IC via the Node Bus Hub connections. This is performed using the LCC Fusion Node Card’s testing firmware and a serial monitor.
-
Insert the POD Card into a Node Bus Hub along with a LCC Fusion Node Card.
-
Install LCC Fusion Project firmware that includes serial monitor for testing.
-
Verify that the I2C connection between the LCC Fusion Node Card and the POD Card work.
See Testing I2C Cards for details on how to test the communications for a I2C enabled card.
MCP IC Testing
After hardware communication has been established, to verify the MCP IC, use the Node’s serial monitor to simulate an input from each of card’s input pins as follows:
- In the serial monitor’s input, enter
M
for the LCC Node’s serial monitor Main Menu. - Select
[1] Node Management
and[1] Device Testing Management
- Select
[5] Simlulate MCP Device Input
- From the list of MCP devices, select the device # for the POD Card being tested
- Enter the number for the pin to tested.
- Using the JMRI Event Monitor, verify the correct Event ID was issued.
Position Occupancy Detection Testing
After validating the LCC Fusion Node Card can communicate (find) the POD Card, test each of the POD Card positions.
Position occupancy detection verification is performed using a POD Breakout Board with a pair of phototransistors (PT204) position between the rails and next to the rails.
- Connect a network cable (CAT5/6) to one of the POD Card’s RJ45 connector.
- Connect the other end of the network cable to (1) POD Breakout Board.
- Setup the POD Breakout Board
- Connect a PT204 to the
POSITION 1
BETWEEN RAILS
connector - Connect a PT204 to the
POSITION 1
TRACK SIDE
connector
- Connect a PT204 to the
- Configure each of the card’s device lines using an LCC CDI Configuration Tool
- Open an LCC Event Monitoring tool (e.g. JMRI Event Monitoring tool).
- Test each the POD sensor, cover of the two PT204 sensors, simulating a train passing over it.
- Further test the sensitivity by placing one of the PT204 between the track rails with the 2nd PT204 next to the track.
- Repeat testing for all (8) POD Card PODs
Troubleshooting
- See I2C Trouble Shooting.
Appendences
Specifications
Specifications for the card include:
Characteristic | Value |
---|---|
Maximum POD Detections | 8 |
Maximum POD Breakout Board | 4 |
Maximum Cards per LCC Fusion Node Cluster | 161 |
- The LCC Fusion Node Cluster supports up to 16 cards, distributed across two I2C hardware buses, with a maximum of 8 cards per bus.
- Note: This total includes all cards using the I2C address range of
0x20
(MCP23017 IC).
- Note: This total includes all cards using the I2C address range of
How It Works
The following outlines the flow of activity for the POD Card:
- Phototransistor Pair:
- Two PT204 phototransistors work together to detect absence of light when a train is present. One phototransistors is placed between the rails and a second one is positioned next to the track.
- Comparator Operation:
- A LM2903 comparator compares the voltage from the phototransistors (based on light detection) with a reference voltage set by the resistor network.
- The output of each comparator will change state depending on the light levels detected by the phototransistors.
- Output to MCP23017:
- When the PT204 detects a train (blocking or reflecting light), the comparator output changes. The MCP23017 sees this as a LOW state due to the comparator pulling the output low. If no train is detected, the comparator output remains high, and the MCP23017 reads this as HIGH due to its internal pull-up resistors.
- Resistor Network:
- The resistors set the reference voltage and current through the phototransistors.
- These resistors ensure that the comparator has a baseline to compare against the signal from the PT204s.
System Flow:
- Default State: With no train present, the phototransistor allows current to flow, keeping the comparator’s output in a default state (likely HIGH, depending on the MCP23017 pull-ups).
- Train Present: When a train blocks the light or reflects it differently, the phototransistor’s current changes, causing the comparator to output a LOW signal, which is then read by the MCP23017 as LOW (train detected).
This configuration provides a simple and reliable way of detecting a train’s presence using light and feeding that signal into a digital I/O expander like the MCP23017.
Protection
To ensure the reliable operation and longevity of your POD Card, several protection components have been integrated. These components safeguard the POD Card from overcurrent, voltage spikes, and electrical noise. Below is a brief overview of each protection element and its role:
Protected Component | Protection Component | Function | Specifications | Location |
---|---|---|---|---|
LEDs | 1K ohm Resistor | Limits current to LED to create about 15% brightness | Value: 1k ohms | Between the voltage comparator output and LED anode |
MCP23017 | Decoupling Capacitor 0.1 µF | Filters out high-frequency noise and transient voltage spikes from the power supply, ensuring a stable voltage for the MCP23017. | Value: 0.1 µF | Across Vcc and GND near the MCP23017 |
I2C Lines from LCC Fusion Node Bus Hub | Ferrite Bead BLM31PG121SN1L | Provides high-frequency noise suppression on the I2C lines. | Impedance: 120 ohms at 100 MHz | In series with the SDA and SCL lines of the I2C bus |
I2C Lines from LCC Fusion Node Bus Hub | ESD Protection Diode PESD1CAN | Protects the I2C lines from electrostatic discharge and voltage spikes. | Reverse Stand-off Voltage (Vr): 24 V Clamping Voltage (Vc): 40 V |
Across the SDA and SCL lines from the card’s edge connector to GND, near the MCP23017. |
Summary
These protection components work together to safeguard the POD Card from various electrical faults. The TVS diode clamps high-voltage spikes, the current limiting resistors control the current flow, and the decoupling capacitor filters out noise. The ferrite bead suppresses high-frequency noise on the I2C lines, and the ESD protection diode protects the I2C lines from electrostatic discharge and voltage spikes. Together, they ensure the POD Card operates reliably in a potentially harsh electrical environment.
References
- I2C GPIO Mapping (POD Card)
The POD Card detects the presence of a train using pairs of PT205 phototransistors — one placed under the track, the other beside the track. When a train blocks light, the LM393 comparator output goes LOW. The comparator outputs for each sensor pair are read by the MCP23017. There are 4x RJ45 connectors, where RJ45 assignments are the same for each and setting a pair of GPIO pins.
RJ45 Lines | Function | MCP23017 Pin | GPIO Line | Direction | Pull-up | Logic Levels | Purpose | Notes |
---|---|---|---|---|---|---|---|---|
L1/L2 | Track 1 (under) | — | — | — | — | — | Sensor input | Phototransistor under track |
L3/L4 | Track Side 1 | GPA0 | GP1 | Input | Enabled | LOW = Detected | Train detected on Sensor 1 | Comparator output (PT205 under < side) |
L5/L6 | Track 2 (under) | — | — | — | — | — | Sensor input | Phototransistor under track |
L7/L8 | Track Side 2 | GPA1 | GP2 | Input | Enabled | LOW = Detected | Train detected on Sensor 2 | Comparator output (PT205 under < side) |