the mosFETs source and drain are connected to an external optocoupler of another circuit.
The red and green LED's only switch depending on what the SS441A is doing. if a magnet gets close, the red led lights and the green turns off.
The CNTRL wire has nothing to do with the LED's coming on or off. The control wire is only there to make the switch act as normally open or normally closed.
I tried taking out U3 as you said and connecting the D2 and R4 like you said. It doesn't work as intended. Now the switch will operate as normally open (unless the cntrl wire is grounded, then it will act as normally closed). I only want the cntrl wire connected to ground IF i want the switch to perform normally open. Otherwise, leaving it unconnected (default) makes the switch perform as normally closed, or rather, turns mosfet on, allowing current to sink to ground through drain and source.
The mosFET I am using is a enhanced Logic one. It will turn on with a 3.3v or 5v logic input. On the breadboard, I connected a 12 volt supply and ground on the source/drain of the mosfet. it switches just fine.
I am not sure what you mean by TVS diodes. I have not used those yet. I think the mosFET I am using has them built in?
http://www.mouser.com/ds/2/302/2N7002BK-353610.pdfA capacitor to ground on the control wire input into U4? Will another 0.1uF work fine for that?
IF I leave R5 as 4k7, and put a 100 in series with the control wire, will that work okay? Simulation shows 1.04mA flowing through the control wire when it is connected to ground, 104.17mV going to the input of U4. When the cntrl wire is NOT connected, simulation shows the full 5v going to U4 input.
"Reducing the value of R5 the CNTRL input pull up makes it less sensitive to picked up noise on the cable. Adding the pull down R7 just makes it worse. "
So I would want more mA flowing through the CNTRL wire to reduce noise? If I make R5 1k, then 4.55mA flows through the wire, instead of the 1.04mA when R5 is 4K7.
Will these TVS Diode work? From a quick read, it looks like I need one with operating voltage of 5 volts, and for break down voltage of 10%-15% above that (5.7v). This one has a peak surge current of 1A.
http://www.onsemi.com/pub_link/Collateral/ESD9B-D.PDFThe TVS Diode just gets connected between the ground and supply of the circuit, correct?