Short button pins when voltage drops to 0

Thread Starter

cdt88

Joined Jan 7, 2023
7
Hi! First of all I want to state that I'm a complete beginner to electronics.

What I'm trying to do: Get a notification on my phone when someone presses my doorbell

How am I trying to do it?: I bought this Tuya Wi-Fi 2 channels relay switch. One of the channels allow me to open the door remotely, and my intention is to be able to activate the second one when someone presses the doorbell so I get a notification on the app. In order to do that, I have to simulate a Manual Switch press to activate the relay (if voltage is applied directly to the relay app status doesn't update).
What this switch do is short 3.3v to ground for a split of a second (if pressed for more than 3 seconds it factory reset the settings)
Relay.jpeg
Voltage reading on my video door-phone wires:
  • Stand-by: 4.2 V
  • On doorbell press: 0 V
  • When open electric lock button is pressed: 14 V
I have common ground between the video door phone and the relay

TLDR: I need to simulate a quick switch press shorting the 2 pins (3.3v & GND) when I get 0 V from video door-phone (doorbell pressed)
 

Attachments

MrChips

Joined Oct 2, 2009
30,708
Welcome to AAC!

You can convert a long button press into a short pulse using an RC differentiator circuit.
You can clean up the signal using a transistor or an IC to drive a relay.

1673535212157.png

You can also generate a short pulse using a 555-timer circuit configured as a monostable multivibrator circuit.

1673535294107.png


You might be able to use the output directly or you could drive a mechanical relay.

Hope this information is helpful to you.
Buena suerte!
 

Thread Starter

cdt88

Joined Jan 7, 2023
7
Welcome to AAC!

You can convert a long button press into a short pulse using an RC differentiator circuit.
You can clean up the signal using a transistor or an IC to drive a relay.

View attachment 285098

You can also generate a short pulse using a 555-timer circuit configured as a monostable multivibrator circuit.

View attachment 285100


You might be able to use the output directly or you could drive a mechanical relay.

Hope this information is helpful to you.
Buena suerte!
Thanks for the answer. I'm going to dig a little further on the RC differentiator circuit and came back for help if neccesary. Thanks again!
 

crutschow

Joined Mar 14, 2008
34,282
Manual Switch 1 & 2 activate each relay on single press and reset settings / RF pairing if are pressed for more than 3 seconds.
OK, thanks.
I need to simulate a quick switch press shorting the 2 pins (3.3v & GND) when I get 0 V from video door-phone (doorbell pressed)
So why do you need a pulse shorter then the time the doorbell button is pressed?
 
Last edited:

Thread Starter

cdt88

Joined Jan 7, 2023
7
So why do you need a pulse shorter then the time the doorbell button is pressed?
As long as the 3.3 and GND pins are shorted for less than 3 seconds it's fine. It could be perfectly the same duration as the doorbell button press But I can't attach directly the 2 cables from the video door phone because when the open lock button is pressed voltage surges to 14v and probably would fry something.
 

MisterBill2

Joined Jan 23, 2018
18,169
Is that a two-way communications board? One channel to unlock the door when you send a command from your phone. OK, that is not hard. But then to get a notification on the phone when the doorbell is pressed is communication in the opposite direction. At least I think that is what the TS stated. That will require sending a message in the opposite direction.
Or do I have it totally wrong??
 

Thread Starter

cdt88

Joined Jan 7, 2023
7
Is that a two-way communications board? One channel to unlock the door when you send a command from your phone. OK, that is not hard. But then to get a notification on the phone when the doorbell is pressed is communication in the opposite direction. At least I think that is what the TS stated. That will require sending a message in the opposite direction.
Or do I have it totally wrong??
Yes, it has two-way communications. When you press the manual switch on the board you get a notification on the app that the relay is on/off.
Maybe the solution to my problem is simpler than I originally thought, I just put a diode + a resistor on the +3.3v button pin and connected it to bench power supply with common ground to test it. The diode prevents the 4.2v / 14v from the intercom to reach the 3.3v pin and when the voltage drops to 0v (doorbell press) and raises up again, the switch turn on/off correctly.
Haven't tried it on the video door phone yet, but it worked on the bench. Tomorrow I'm going to give it a try.
 

sghioto

Joined Dec 31, 2017
5,379
cdt88
Are you saying the diode resistor combo dropped the voltage down to 4.2 volts? Will you still need to shorten the signal from the doorbell?
 

Thread Starter

cdt88

Joined Jan 7, 2023
7
cdt88
Are you saying the diode resistor combo dropped the voltage down to 4.2 volts? Will you still need to shorten the signal from the doorbell?
The diode prevents the 14.2v (when electric lock button is pressed) or 4.2v (stand-by voltage) to reach the 3.3v pin, but allows the 3.3v to travel in the oposite direction when voltage drops to 0v (doorbell button pressed). Something like image below:
esquema foro.png

As long as nobody keeps the button pressed for more than 3 seconds I won't need to shorten the signal. But again, I'm a complete beginner and haven't tested on the phone yet.
 

MisterBill2

Joined Jan 23, 2018
18,169
To provide just a momentary pulse, you can add a capacitor in series with the diode and resistor. I suggest a 0.1 mFd rated at least 25 volts as a starting value. If the pulse is not long enough add a second capacitor in parallel with the first one.
 

MisterBill2

Joined Jan 23, 2018
18,169
Consider that both sides of the capacitor will be connected to voltage sources that are not open circuits, it seems that the capacitor charge developed while the button is pressed will be removed fairly soon after the button is released. But a one megohm resistor across the capacitor will not do any damage to the performance.
 

sghioto

Joined Dec 31, 2017
5,379
To provide just a momentary pulse, you can add a capacitor in series with the diode and resistor. I suggest a 0.1 mFd rated at least 25 volts as a starting value. If the pulse is not long enough add a second capacitor in parallel with the first one.
I tried using a 474nf cap and 470K resistor as described but the results were intermittent with my setup, the TS may have better results with his.
This simple 2 transistor inverter worked reliably.
1673634418187.png
 
Top