I want an arduino to simulate button presses on a PCB that is analogous to one that would be found inside a TV remote control. This is easy with mechanical relays but how can this be done without relays and instead use, say, transistors? Since a button would simply jumper two contact points on a board I am not sure if a transistor could do this without unintentionally pulling the switch input high or low.
If you have knowledge of the PCB: use FETs. If you have not, well ...
Use optocouplers.
DrDiettrich:
Use optocouplers.
If I am unsure of which way the current flows between the button contacts when they are shorted, could I instead use a triac? Pardon my ignorance but when I look at the diagram for an optocoupler layout vs a triac, it seems the only real difference is an extra photodiode placed in reverse position of the other diode so current can flow both ways so it's functional for AC as well.
More simply put, even though a triac is designed for AC can it be used for DC current as well?
A triac only can be turned on, not off. It turns itself off when the current falls below its minimum (holding) current. That's why usually AC is required to turn off the current regularly, at zero crossing. If OTOH the voltage or current is very low, like through a switch, the triac may have problems in turning on.
Can you find opto-triacs that may work in your circuits?
Perhaps it's easier to decide, assisted by a DMM: if DC is used to check the switch then an opto coupler can be used. If AC is used to check the switch then an opto triac seems required. The undecided can use reed relays.
Thanks, I think a reed relay would be perfect for this application.
DrDiettrich:
The undecided can use reed relays.
Question about the reed relays: can the relay inputs for a 5v relay be connected directly to arduino I/O pin and Gnd, so that when the I/O goes high it closes the relay, and low it goes open? Are any other components required to control the reed relay with an arduino or is it really that simple? I see diagrams on the internet showing this but I'd like to get confirmation this is a safe way to do it.
Side note: most diagrams show a diode placed between input pin and ground but do not specify what type of diode. I have 1N4001 1N4004 1N4007 on hand, if a diode is needed are either of these acceptable?
See the reed relay datasheets. 40mA are acceptable only for a short period.
A freewheel diode is always required over the relay coil, sometimes already integrated into the relay.
moses1592:
If I am unsure of which way the current flows between the button contacts when they are shorted, could I instead use a triac?
No.
What you want is a 74HC4066.
The ground to your Arduino must be common to the negative on the TV remote which we presume uses 3 V in batteries. And you must ensure the Arduino and the 74HC4066 is always powered when the remote is, which may be tricky!