This project is developed as part of the OAMK DIN22SP group for the company Teknoware based in Oulu, Finland. The project aims to simulate industrial communication protocols (e.g., CIP, TRDP) for controlling lighting systems in trains.
The purpose of this project is to develop a web-based simulator that helps in testing and simulating the lighting control scenarios in trains. It emulates communication between the Central Train Computer (CTC) and Remote Device (RD) through different industrial protocols, allowing operators to control and monitor train lighting systems.
- Protocol Simulator: Simulates communication between the CTC and RD using different protocols (CIP, TRDP).
- Dynamic UI: The UI changes based on the protocol selected by the user.
- Lighting Control: The system allows users to simulate lighting control commands for different areas (e.g., first-class, second-class).
- Backend Communication: The backend processes protocol-specific commands and sends simulated responses to the frontend.
- Shovan Das
Third-year IT student at OAMK, Finland
Project for Teknoware, Oulu, Finland
- Frontend: React, JavaScript, Bootstrap
- Backend: Node.js, Express
- Protocols: CIP, TRDP (as examples)
The Raspberry Pi will serve as the Remote Device (RD) that receives lighting control commands from the Central Train Computer (CTC) and sends responses back.
- Raspberry Pi (any model with Ethernet port or Wi-Fi support)
- Ethernet cable or Wi-Fi adapter
- External LED strips (optional) for lighting demonstration
- Power supply for Raspberry Pi
-
Install Raspberry Pi OS
- Download and install Raspberry Pi OS on an SD card.
- Insert the SD card into the Raspberry Pi and boot it up.
-
Connect to Network
- Connect the Raspberry Pi to the same network as your CTC.
-
Install Required Software
- Install Node.js on the Raspberry Pi:
sudo apt update sudo apt install nodejs npm
- Install Node.js on the Raspberry Pi:
-
Clone Repository on Raspberry Pi
- Clone the repository for the backend server:
git clone <repository-url> cd train-lighting-simulator/backend
- Clone the repository for the backend server:
-
Configure Raspberry Pi for RD Role
- Modify the backend server code to handle protocol-specific messages and simulate responses.
- Optionally, connect external LED strips to GPIO pins and control them with PWM.
-
Test Communication
- Send protocol messages from the frontend and observe the responses from the Raspberry Pi.
-
Run the RD Backend Server
- Start the backend server to listen for protocol messages:
npm start
- Start the backend server to listen for protocol messages:
-
Clone the repository:
git clone <repository-url> cd train-lighting-simulator/frontend
-
Install dependencies:
npm install
-
Run the development server:
npm start
-
Access the application at
http://localhost:3000
.
-
Clone the repository:
git clone <repository-url> cd train-lighting-simulator/backend
-
Install dependencies:
npm install
-
Run the backend server:
npm start
-
Access the server at
http://localhost:5000
.
This project is licensed under the MIT License.