I have an F540NS mosfet which I've scavenged. I've tested the MOSFET, it works. I also have an camera for which I've removed the button contact tape and soldered one wire to ground, and one wire to positive. When you touch the wires to each other for two seconds, the camera powers on. Again, and it powers off. Camera is powered via a separate USB line. Voltage across those two button lines is 3V.
I have transistors and relays coming in the mail, but for now my goal is to use the MOSFET to connect the two button leads (+ and -) when a voltage is applied to the MOSFET gate. I'm pulling digital pin 5 high (5V) for two seconds, then setting it low again to simulate a button push.
I have a wire coming from digital pin 5 to the gate. I have the button's positive lead (soldered to center dot of button) running to source. The button's negative lead (outer contacts) to drain. I've tried running ground to the gate, or the drain, or both, and none has worked. Doing this all on an Uno. I can get it to work by having button negative connected to source, button positive to drain, and digital 5 to the gate - but this setup immediately fails when I add a second identical setup for the camera's other button running off of digital pin 3. At no point are pin 3 and pin 5 pulled high at the same time.
I am ashamed to say how many hours I've spent trying to get this to work. Arduino stuff is not new to me, but I cannot wrap my head around this.
Could someone please provide a succinct answer of what should be connected to gate, drain, source? And perhaps which of these should also be running to ground on the Uno? Why was it failing when I ran a second setup to run off of digital pin 3?