The circuit has been working fine all day but again about 8PM it started acting up. Nothing in the house changed at that time so it must be something external interfering (neighbour's TV or something).
I've managed to get my Oscope connected at the circuit end and the results are actually quite surprising. The line stays almost completely flat with very minor fluctuations just like you'd expect for an input being held to ground by 8M total of wire. The strange part is that every few seconds I see a huge spike that varies from 0.4V to over 2V. This is definitely enough to cause the problem (I believe anything over 0.8V is classed as high).
I've attached 2 screenshots to show the kind of spikes I'm seeing. One with the switch closed (grounded) and one with the switch open (pulled up). Long wire or not I don't think I should be seeing spikes like this.
I have some triac optoisolators laying around. Would I be able to use those to isolate the switch? I'm thinking to MacGyver something onto the back of the box and use a 5V supply to drive the opto's LED through the switch. Would these fluctuations still cause a problem though?
For the cap/resistor. Should the 10-100nF cap be at the circuit end and by "outside of the cap" do you mean anywhere along the wire but not between the cap and the PIC?




Bookmarks