I have a DCC sniffer, as described by Chris, which was built for me by a friend, and it works fine. I have often thought that it would be possible to extend its usage as, for example, an accessory decoder. On my layout, I have 10 hidden sidings each of which has an isolated section of rail which can be switched on and off to provide a "stopping" area for trains arriving in the hidden siding. At the moment, I have implemented these by using 10 Peco point motors, each having a frog switcher unit mounted on top. These are operated by a couple of ADS accessory decoders - the older ones which don't have frog switching in-built. When a train is to depart from a hidden siding, its section is switched on by the program and when the loco is clear of the isolated section, the section is switched off again, ready for the return of the train. The only problem I have is that in a small percentage of times, the switch on does not work. Although the Peco point motor has thrown, the physical contact inside the switch fails.
What I would like to do is replace these switches by micro relays activated by something like an Arduino. The relay, ideally, would be one which has the target switched off when no power is applied, and on when power is applied.
My main question about such a device is ....
Does the Arduino need to be connected to a computer via a USB cable for its operating power, or can it use the power coming in from the DCC supply like any other accessory decoder would?