Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

aaron9589/block-detection-poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

block-detection-poc

Introduction

This repo contains a couple of resources around a POC I did for block detection for DCC in a model railway. Its quite rough, but my plan is to expand it into a workable system for my railway.

It is cobbled together from a couple of different resources, however this repo (and associated website) is primarily where I drew a lot of the inspiration from.

Diagram

diagram

Overview

  • An ESP8266 is used to collect sensor data. Reason for using this board is primarily for the builtin wifi, and the small form factor. An Analog multiplexer will be used to expand the list of analog inputs from 1 to 16. The multiplexer channel is switched using 4 digital outputs.
  • The inputs are sampled and for each input, occupancy is determined. Based on this, a message is sent via an MQTT Topic to a broker, which is connected to JMRI.
  • Within JMRI, CATS is used for the signalling system. Currently CATS uses the JMRI turnout table for all of its devices, so the occupancy data is sent to a /trains/turnouts/CATS-ID topic.

The POC

  • Only collects data from the A0 sensor on the board
  • The occupancy logic is fairly simplistic - it doesn't use the dynamic detection method that is used in the source repo. Since my block is only 30cm, I expect larger blocks will require the improved approach where an object stores per-sensor sensitvities described here.

Components Used

Useful Links

  • TheNScaler Blog that has a lot of useful info on block detection experiments using Arduino
  • CATS101 A YouTube Playlist that is a collection of clinics getting started with CATS and JMRI

I will update this repo as I start implementing it on the layout, so hopefully the code will get a bit better over time as I get to grips with Arduino Programming.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages