Re: Electrical Issue: PIC input false triggering, Signal Noise suspected.
I'm not sure about the current required for the "run/stop, direction and turnout relays" but I notice you are sourcing the current instead of sinking it thru the PIC. That's bad design to me as most mosfet's even in the case of internal fet's in the PIC can sink more current than source. I would ideally use a NPN transistor for the relay drive circuits and feed them as a separate supply connection to the board where the power enters. I would also place a 10uF cap at the PIC pin's 19 & 20 along with the 100nF cap you already have. I also notice you have NO cap's for the display power circuits. I agree with Henrick that the ideal interface method is for optoIsolators on the inputs from the reed switches. If the wiring is run along side the track and the engine is running there is quite a bit of coupled energy into the inputs of the PIC as the engine is probably driven by a DC Brushed motor as well as the wheels making and breaking the circuit.
Dave Purola,
N8NTA
EN82fn
Bookmarks