Skip to content

004 Block & Spot detection demo

johnmholmes edited this page Jul 28, 2024 · 19 revisions

Introduction

The Arduino block / Spot detection demo plank.

This demo plank has 5 different sensor types, and is used to demonstrate block detection and spot detection on a model railway. Coding is the work of Steve Lomax and can be found in the Block Detection folder of this repository.

IMG_3829

The plank uses an Arduino Mega and Geek Robot motor shield running DCC-EX for a command station. We also have an Arduino Nano which is running Steve's sketch.

Steve currently has two versions of code which is explained in two YouTube videos which can be found via these links :-

To be added after 26th June 2024.

DCC-EX Install EEPROM Update

To be able to add the sensors using JMRI I need to enable the EEPROM during the DCC-EX software install. I also wanted to add a few extra features to assist us moving forward. This short 2 minute video shows the steps required when using the automatic installer.

https://youtu.be/N-erNIl9ydo

Block Sensors Types.

  1. A MERG (model electronic railway group) pocket money kit 7.
  2. A drop diode detector circuit created by Steve.
  3. A Current detector module.
  4. A infrared detector.
  5. A reed switch.

PMK7 Kit.

Details of this kit can be found in this short presentation video which was shown at the 26th June 2024 zoom meeting. https://youtu.be/dyPc-JG-Rmg

  1. This is only available as a paid up member of MERG.
  2. It takes it's power from the track and offers two forms of indicating triggering.

Pros & Cons

pmk7 pros   cons

Screenshot 2024-07-27 131555

Diode Drop

This is a Vero board device Steve has made from a number of components

Pros & Cons

diode drop

dd 2

Current Transformer Module

This is a commercial available unit which is designed for higher amperages than used on model railway layouts.

Pros & Cons

CT Module

CT 2

ct3

Spot Detection Sensor Types

We are using two types of sensors for the demonstration plank.

spot 1

spot 2

Reflective Infrared

ir 1

Magnetic Reed Switch

magnet reed

Why Use Arduino

why arduino

Arduino Sketches

There are two version for this demo, Steve has created two videos that go into the details behind them.

Easier to understand.

https://youtu.be/3_JpFIeWxik

Better approach

https://youtu.be/rIj8A1HA_ug

JMRI Control

We used JMRI to add the sensor logic from the Arduino Nano to the DCC-EX command station. This can be seen in the following short video.

https://youtu.be/wjMLjxub-TQ