Richard,
On 10 Nov 2019, at 6:39 PM, Richard_vanRaay via Groups.Io <richard_vanraay@...> wrote:
Track detection in sensors on JMRI is working on my panel. Would it be possible to use this to send a signal to a dcc decoder or a relay or an Arduino?
Now you're thinking on a better track. (This topic started on the NCE DCC list.)
I'm sure it's not difficult to make JMRI send accessory decoder commands to turn on when any track is occupied and turn off when all are unoccupied. I'll leave that explanation to the PanelPro experts.
For hardware, I suggest a cheap NCE Light-It decoder. Configure it as a DCC Accessory decoder and it activates three LED outputs when ON. Instead of a normal LED, connect the internal LED of a cheap optocoupler chip and connect the optocoupler output to pull down an Arduino pin.
Better still, use a dual optocoupler chip, one coupler connected to the Y output and the Arduino, the other to the R output and your MP3 player. Leave the onboard White LED connected as a visual indicator.
Cheap and easy, but it looks like the minimum quantity for a Light-It is a 3 pack for ~$24. Even with that quantity and the optocouplers you'll have change out of $30 and you can find another use for the two spare Light-Its.
Dave in Australia