I have a heater remote that I want to press the buttons of with my Arduino. I am powering both the remote and Arduino from an external 5V source so both grounds are connected.
Currently I have tried using an NPN transistor(TIP122) and it does work but is not very reliable. It probably works 80% of the time but isn't good enough for my purpose. Sometimes nothing happens and sometimes the button is pressed twice for no reason.
I have the emitter connected to ground, collector connected to the button and the base connected to the Arduino with a 1k resistor. Are my connections OK?
I've also tried using a PNP transistor but pulling LOW instead of HIGH and LOW instead of HIGH.
The code is very simple, in the setup I have:
pinMode(4, OUTPUT); digitalWrite(4, HIGH); delay(20); digitalWrite(4, LOW);
Therefore when I restart the Arduino it should press the button, right?
I also have IRLZ44N and IRF540N, would either of these work better?