The tiny board is totally self-contained by still have a fear of "reverse voltage application". The applied voltage (taken from rail) is directly connected 3.3 V LDO and Motor driver and reverse voltage may destroy the circuit. Indeed this issue can be easily solved by diode bridge insertion between board and rail. By insertion of diode, we don't need to consider the direction of train (polarity applied to board) and just the train will work by "detected information" and "program inside ATmega328". Ease of use is very important for this kind of board!!