I'm just wondering how I would go about getting the normal 5vdc that comes out of the Arduino analog/digital pins to a 0vdc signal? I wanting to mimic a push button (momentary switch) so that it acts as if I am pushing a button on a remote.

I'm sure I could use a resister of some value in order to get it down to 0vdc but I am unsure of that value nor am I sure that's the best way to go about doing something like this.

Any help would be great! Thanks!


Would using a TLP592A work doing it this way:

enter image description here

  • \$\begingroup\$ Just set an output pin low (logic 0) \$\endgroup\$ Dec 6, 2014 at 20:29
  • \$\begingroup\$ @PeterBennett Just because you set the output to low doesn't mean it will be 0 vdc. \$\endgroup\$
    – StealthRT
    Dec 6, 2014 at 20:42
  • 1
    \$\begingroup\$ If you really want 0.0 volts, you'll have to drive a relay with an output pin, then the relay contacts will be the same as a switch connected to ground. \$\endgroup\$ Dec 6, 2014 at 20:46
  • \$\begingroup\$ I agree with the above - use the nIO pin to drive a transistor that turns on or off a relay. The relay contact acts just like a momentary switch and is isolated from the relay coil. \$\endgroup\$
    – Andy aka
    Dec 6, 2014 at 21:33
  • \$\begingroup\$ I'd rather get away without needing to use a relay. \$\endgroup\$
    – StealthRT
    Dec 6, 2014 at 22:05

1 Answer 1


What interface you will need depends on the circuit of the remote. If the switch shares a common ground with the Arduino then you might get away with just connecting directly to it. However for safety I would use a diode or transistor to provide an 'open collector' output. The circuit below shows how both a diode and transistor would be wired (choose one or the other, not both!).

enter image description here

Some remotes have their switches connected to battery positive, perhaps to make the transmitter turn on whenever a button is pressed. Others have buttons arranged in a matrix of rows and columns, so both ends of the switch may be floating. In these cases you can use an opto-coupler or PhotoMOS 'relay' (opto-coupler with FET output).

The circuit below shows how to use an opto-coupler. Note that the opto-coupler's output is polarity conscious, so you may have to swap pins 4 and 5 to get it working.

enter image description here

  • \$\begingroup\$ Please check my updated original post and see if I have this connected correctly. \$\endgroup\$
    – StealthRT
    Dec 7, 2014 at 2:58
  • \$\begingroup\$ Disconnect the wire going from pin 4 to Arduino Ground, and make a connection from pin 4 to pin 6. If it acts like the switch is permanently on then swap the wires going to the switch. And you need a resistor in series with pin 1 or 2 to limit current going through the LED. \$\endgroup\$ Dec 7, 2014 at 6:57
  • \$\begingroup\$ Would a 330ohm resister work for pin 1 then? \$\endgroup\$
    – StealthRT
    Dec 7, 2014 at 21:01
  • \$\begingroup\$ Yes. A 330 Ohm resistor should set LED current to ~10mA. \$\endgroup\$ Dec 7, 2014 at 22:33
  • \$\begingroup\$ Bruce, the +5V is the Arduino 5vdc pin, correct? And the 330ohms is connected to one of the digital pins on the Arduino, correct? And i also bought the 4N25 instead of the 4N37-will that work with this? \$\endgroup\$
    – StealthRT
    Dec 15, 2014 at 4:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.