Train locating

(top)

(Aug 2020) Pushing ahead with automation of train movements, I reach the limit of the 13 experimental trainLocaters (reed and Hall). I face these issues:

I explored Optical Train Tracking (OTT, which is a form of TOTI, see below) but don't expect to have that working soon.

So I considered installing TOTIs interfaced to the traction wiring. (a) this will require less additional wiring, (b) current detection will work even for a stationary loco with my "alternate" traction pulses. Track districts (apart from reversing ones) are powered on one rail and the other rail always returns to traction 0V. So I explored designs with two back-to-back diodes inserted in the 0V return, with an eye on construction time and cost.

Eventually I ditched all the op-amps, 555s and even the two diodes - and ended up with this. Each TOTI has 6 components costing less than (Far East) £1. Its open-collector output will drive a logic input that contains a pull-up resistor. It doesn't need a power supply. The capacitor is optional that "stretches" the indication from (my) alternating pulses in a stationary loco.

N.B. On I2C, as well as MCP23017, consider PCA9685, PCF8574AN, PCF8574 & PCF8574A, TCA9548A.

First steps in using computer vision. I have put a camera with fisheye lens overhead. That might do some procesing using opencv. Data would then be sent back the the automation on the laptop using USB.

Here openCV experimentally tracks a moving train from the side using the laptop's own camera.

Electroics-lab TTGO ESP32 T-Camera

The factory firmware appears to be:
2019-04 Github LilyGO / ESP32-Camera
branched from
2019-01 Github lewisxhe / ESP32-Camera-Arduino
2020-05 Github espressif / arduino-esp32 (esp_camera.h)
2020-03 Github espressif / esp32-camera ( esp32-camera.h)
2020-03 Github lewisxhe / esp32-camera-series
2019-06 Github lewisxhe / esp32-camera-screen
2019-04 Github LilyGO / ESP32-Camera0
2019-01 Github LilyGO / esp32-camera-bme280

This promising image was captured over WiFi on day one with the as-supplied firmware in ESP32 WROVER TTGO fisheye T-camera.
Lighting on the right-hand side is poor. A 7-coach train is on the far side. ... ....

This was taken, as an inital test of concept, using an iphone with a clip-on 160deg fisheye - which seems to be of poor quality ... ...