I honestly can't think of anything. It only seems to happen in the kitchen but that side of the house isn't joined to a neighbour. I've tried unplugging the fridge as that's the only electrical thing near it but that didn't help.
I've got some UV fluorescent tubes near the wire and turning these lights on or off does affect it but once they are on they don't seem to be making it any worse. I've been testing with them off though just to be sure. There's no neon signs or anything near here. We do live very close to the sub station and generally get over 250V to the house but I designed the circuit to cope with that.
I had another circuit running in previous years that had a longer wire to the same switch. It also used 10K resistors but it was a PIC18 that ran at 5V and I never had a problem. Not sure if it's due to 5V being less susceptible to the spikes or if they just weren't there before.
I've just checked the Oscope again and it looks like the spikes are still there this morning. It must have been a fluke that it worked fine yesterday.
I'm starting to think that a software solution might work. Now I've seen the spikes on the Oscope I can see they don't last very long. I could program a routine that starts counting every time an input changes state. The counter must reach a certain value before the input is classed as changed and if the state changes back then the counter is reset. Thankfully this circuit does almost nothing other than monitor the inputs so I've got plenty of clock cycles to waste.
Bookmarks