trainMQTT project

travis_farmer

Administrator
Staff member
Thought Club
Latest code at https://github.com/travis-farmer/trainMQTT

definition of the config.ini file:
Code:
[counts]
sensor = ?
turnout = ?
light = ?
debug = ?
? = the required count value.
example: if you are defining 10 turnouts, then "turnout = 10".
if "debug = 1" then it will print debug messages to serial.

Code:
[sensor]
1 = ?a:?b
?a is the sensor ID (in JMRI).
?b is the sensor MCP pin.

Code:
[turnout]
1 = ?a:?b
?a is the turnout ID.
?b is the MCP pin.

Code:
[light]
1 = ?a:?b
?a is the light ID.
?b is the MCP pin.
 

travis_farmer

Administrator
Staff member
Thought Club
i will build my prototype on my ISA card setup, with the master Arduino and some MCP chips on the first card. each additional card will have more MCP chips as needed. i will use screw-terminals to break out the MCP pins. and likely some CAT5 cable to wire from the terminals to the device (LED, Sensor, Turnout controller).

I would like to use a LCD screen for monitoring the status. as far as enclosure, i think i will use my old wooden radio case. it should be suitable for containing the circuits and power supply. likely and old PC ATX power supply. though i will need a low-voltage lockout, so the power rise time does not crash the Arduino. just a sort of brownout-detection sort of thing. the alternative would be to use a large power-supply for track power, and just use DC to DC converters to get the needed power busses (+5V is really all i need, so far).

the turnouts will be slow-motion switch machines (slip motor). so i will need an arduino UNO with a motor driver, that will be able to control two switch machines, and provide feedback for switch position. it will only power the motor when moving the turnout, and slightly longer after the position feed back has confirmed position is as set, to allow firm position tension. feedback will also be sent back to the master controller to a sensor channel, so JMRI can confirm turnout position. will require two sensor pins per turnout.
 
Top