I concur with
Circuit.
For DC controlled locomotives add surge suppression capacitors across the motor (almost standard on all new model locos for RFI purposes). [ such capacitors are
not to be used with DCC controlled locos however - that would introduce a whole new set of electrical interference problems].
Most new locos come with 100 nF ceramic type capacitors (usually with the marking "104") though no harm in using 220 nF as
Circuit suggests - again ceramic types. use some with at least 25Vdc or even 50 Vdc ratings.
Next, twist the pairs of positive and negative wires for each track section together and twist the track supply wires back to the control panels/power supplies.
Typically 3 or 4 turns per foot/ 300 mm will be good. Keep in mind that even the rails can act as antenna and put RFI (electrical noise) into the air and induce noise into the adjacent sensor and other control wiring.
Keep the sensor wiring at least 150 mm from the track power wiring. Again consider to twist sensor wires pairs for each sensor between the sensor and the controller / PICAXE boards.
Likewise aim to keep your controlling electronics separated from wiring and parts that can generate electrical noise that can/will be induced into adjacent sensitive control/sensor wiring and circuit boards.
Even the electrical pulses from solenoid operated points involve brief but high currents that can induce electrical noise into sensor and other input signal wiring run close to the solenoid wires.
So while it certainly appears to be a case of electrical noise emanating from the operation of the locos is the primary problem, it is worth ensuring all the wiring is done well to help avoid problems occurring at a future time.
I recall reading in one of your posts that you have relays as part of the output circuits. Those should all have suppression/"flywheeling" diodes across the relay coils to prevent over-voltages damaging the electronics driving the relays/coils/solenoids. See page 24 in
PICAXE manual 3 for the basics:
http://www.picaxe.com/docs/picaxe_manual3.pdf
If I may also make a suggestion with respect to your replies.
Rather than just use the "Reply with Quote" button and keeping the entire post (so
everything is repeated in your response, either:
(a) cut out the unnecessary test and just keep the sentence you are responding specifically to. See
Technical's post above as such an example - he has only included the single sentence he has replied about.
(b) use the "Reply" button and then you can just address the person you are responding to (e.g.
@Technical ) and provide your further information without copying/having any of the earlier post included.