Simulating a button switch press

Thread Starter

John Munroe

Joined Sep 9, 2018
4
I'm trying to simulate a button press on a remote by shorting the two pins on the tactile switch when an audio signal is received and float them otherwise. I thought the best way would be to use a voltage peak holder and a NPN transistor (but is it?). Here's my simulation and I don't think I'm doing it right:



It looks like I can control the voltage across R4, but is this the circuit for shorting and floating two pins? That is, can I connect the two pins across R4 to achieve the effect? My take is that when the transistor is off, there's a voltage at the collector (V(out_r4n)). If I were to connect the two pins across R4, then the downside pin would be getting a voltage when it's not supposed to. Am I missing something?

Any advice appreciated.
 

AnalogKid

Joined Aug 1, 2013
10,987
He doesn't mean simulate as in LT spice, he means to duplicate the function of pressing a button with electronic components that short together the buttons contacts without physically touching anything.

ak
 

Alec_t

Joined Sep 17, 2013
14,280
What does the tactile switch connect to? Does it short something to ground or to the +ve rail?
Perhaps a CD4066 transmission gate would do the job?
 

Thread Starter

John Munroe

Joined Sep 9, 2018
4
What does the tactile switch connect to? Does it short something to ground or to the +ve rail?
Perhaps a CD4066 transmission gate would do the job?
Yes, one terminal is connected to the positive rail and the other is to an input pin. How about a PNP transistor?
 

Alec_t

Joined Sep 17, 2013
14,280
.... but to pull the input pin up to the +ve rail a PNP would do nicely. Providing the +ve rail is no higher than the MCU supply, no additional level-shifting would be needed.
 
Top