Working Beta Version Update for README, including the blog-post

This commit is contained in:
2026-03-15 16:08:58 +01:00
parent b66ee7f50e
commit 53bbb1c55c

View File

@ -1,12 +1,90 @@
# DenshaBekutoru - Model Train Direction Sensor # 電車ベクトル (DenshaBekutoru)
Get **direction** and **speed** from motor power signals. ## Model Train Direction Sensor
Target use case: **model trains**.
- Detects polarity (+/) to identify train direction DenshaBekutoru is a small controller board for brick-built model locomotives.
- Measures pulse width to calculate speed (% of maximum)
- Implemented with optocouplers and a state machine
- As small as possible, but I hope no SMD (beginner friendly)
Project is in an early stage. Currently running tests on target hardware. The target use case is: read the motor power signals, detect the current driving direction, and switch the headlights accordingly. The software is also prepared to derive speed information from the motor signal behaviour.
More information and documentation will follow.
This project is built around one practical problem: the motor is driven from an H-bridge, so the signal is noisy, polarity changes are not “clean logic”, and inductive spikes make direct evaluation difficult.
## What it does
- detects train direction from the motor power signal
- evaluates two processed motor-side signals via analogue inputs
- switches the front / rear lights according to direction
- keeps the last valid direction if the train stops or the signal becomes unclear
- is designed as small as possible for installation in brick-built locomotives
## Technical approach
The current version is built around:
- optocoupler-based input isolation and signal conditioning
- Arduino Pro Mini 5V as controller
- software averaging of analogue inputs
- startup calibration to adapt to different controllers and builds
- threshold + hysteresis logic
- simple state machine with direction memory
- PWM-capable output pins for possible later LED dimming
The main idea is not to read one raw signal and react immediately.
The idea is to turn a noisy motor signal into a stable direction decision.
## Current status
**Version 2 (beta) is built and working.**
Current state:
- [x] schematic finished
- [x] PCB finished
- [x] firmware finished for the current beta state
- [x] three PCBs built and tested
- [x] first boards handed over for real-life testing in a model railway club
- [ ] Feedback and what to improve
## Design goals
- as small as possible
- beginner-friendly where possible
- no SMD if it can reasonably be avoided
- easy to reproduce later as a DIY kit
- modular PCB concept with main section, future-option section, and test section
## Repository content
Typical content of this repository:
- `KiCad/` schematic and PCB files
- `firmware/` Arduino test and controller software
- documentation and pictures will be added step by step
## Project status note
This is still a beta project.
The current hardware and software already work, but testing on real locomotives is still ongoing.
The next version will depend on real-life feedback from actual use.
Possible next steps:
- verify behaviour with different motor controllers
- check robustness in real train builds
- improve wiring / connector handling
- finalise optional features like LED dimming
- prepare a first “official” DIY kit version
## Blog / documentation
- Project overview: https://togo-lab.io/?p=223
- Hardware description: https://togo-lab.io/?p=233
- Software description: https://togo-lab.io/?p=243
## Short summary
DenshaBekutoru is a small Arduino-based direction sensor for brick-built model trains.
It reads the noisy motor signal from an H-bridge-driven setup, isolates and evaluates it, and switches the headlights automatically.
The current beta version is working and now entering real-life testing.