(SOLVED) how to trigger a relay when voltage drops to zero ?

Thread Starter

gutfarah

Joined Jul 24, 2017
18
you can use one optocoupler . so you can use power supply with isolated ground .
My problem is the wire that I soldered to the door bell, gives me 3.6 v when the button is not pushed, when I push the button , it goes to zero and there would not be another 3.6v to feed the emitter of the PNP transistor in your diagram.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
Please check the circuit fig-08 in the right middle as showed below, relay replace Rc2 and led and another pin connects to 12V, disconnect the e of Q1 and connects to 3.6V, the values of Rb2 is depends on the current of relay.

If you wish the input could active at very low voltage then you can insert the 2.2V zener diode and reduce the values of Rb1.

Thanks for the diagrams, but as I said : My problem is the wire that I soldered to the door bell, gives me 3.6 v when the button is not pushed, when I push the button , it goes to zero and there would not be another 3.6v to feed the emitter of the Q1 in diagram #8.
 

ebeowulf17

Joined Aug 12, 2014
3,307
The relay is 12 V with it's own power supply. My problem is the different grounds....the board gets its power from POE network switch ... I think it would have been much easier if one power supply was feeding both the board and the relay ...
Is the 12V power supply already grounded? If it's floating (as many are,) you could tie its ground to the POE ground and then you have lots of circuit building options and don't need to use an opto for total isolation. As others have pointed out, multiple power supplies isn't necessarily a problem at all, as long as you can provide them a common ground reference.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
If you are referring to the wires to the door bell button, that may not be a power source.
Do you have a wiring diagram of the door bell circuit?
You are right, it seems that I don't have access to the power source of the door bell as it comes through the network switch an Ethernet cable (POE), the only 2 wires that I have access to, are the ones that I have soldered to both sides of the push button. I tried and this does not work with the LM339.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
Is the 12V power supply already grounded? If it's floating (as many are,) you could tie its ground to the POE ground and then you have lots of circuit building options and don't need to use an opto for total isolation. As others have pointed out, multiple power supplies isn't necessarily a problem at all, as long as you can provide them a common ground reference.
it is a floating one and I can tie the ground to POE ground, I can not cut off the PNP transistor with the 3.6v control input as it is lower than 12 v that I need for relay.
 

ebeowulf17

Joined Aug 12, 2014
3,307
How about this? I'm no expert, so I could've goofed something up here, but I think it makes sense, and LTspice likes it, so that's a start!
doorbell_relay_2.png
doorbell_relay_1.png
The idea here is that using MOSFETs will allow us to create a circuit that drains essentially no current from the 3.6V doorbell line (unlike the opto-isolator which needs current to operate.)

I suspect that R1 isn't needed. I can't imagine the capacitance of the MOSFET gate is enough to matter, especially if the 3.6V doorbell line is already a high impedance source. I thought I'd throw it in just in case you want to consider it.

R2 and R3 may also be unnecessary. They're to provide a weak pull-up on the gate of M1 to keep the relay inactive even if the doorbell connection is absent. I've used two resistors there to create a 3.6V pull-up instead of pulling up directly with the 12V. I'm not sure what 12V would do to the doorbell circuit, but we'd probably rather not find out!

The rest should be pretty self-explanatory, but let me know if you have any questions.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
How about this? I'm no expert, so I could've goofed something up here, but I think it makes sense, and LTspice likes it, so that's a start!
View attachment 132083
View attachment 132082
The idea here is that using MOSFETs will allow us to create a circuit that drains essentially no current from the 3.6V doorbell line (unlike the opto-isolator which needs current to operate.)

I suspect that R1 isn't needed. I can't imagine the capacitance of the MOSFET gate is enough to matter, especially if the 3.6V doorbell line is already a high impedance source. I thought I'd throw it in just in case you want to consider it.

R2 and R3 may also be unnecessary. They're to provide a weak pull-up on the gate of M1 to keep the relay inactive even if the doorbell connection is absent. I've used two resistors there to create a 3.6V pull-up instead of pulling up directly with the 12V. I'm not sure what 12V would do to the doorbell circuit, but we'd probably rather not find out!

The rest should be pretty self-explanatory, but let me know if you have any questions.
Thanks a lot, this is awesome, I will go to the local store and see what MOSFETs they have in stock, but I assume any N Channel enhancement MOSFET will do ....
 

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks a lot, this is awesome, I will go to the local store and see what MOSFETs they have in stock, but I assume any N Channel enhancement MOSFET will do ....
You definitely need logic-level MOSFETs, but otherwise I'm not aware of any specific requirements here. I hope it works as well in real life as it does in the sim!
 

ScottWang

Joined Aug 23, 2012
7,501
Thanks for the diagrams, but as I said : My problem is the wire that I soldered to the door bell, gives me 3.6 v when the button is not pushed, when I push the button , it goes to zero and there would not be another 3.6v to feed the emitter of the Q1 in diagram #8.
Connects the input through a (+)diode(-) and [this point call 3vp] a (+)100uF/10v(-) to ground, and connects the e of Q1 to the point 3vp, the b of Q1 is the same as previous posted described.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
You definitely need logic-level MOSFETs, but otherwise I'm not aware of any specific requirements here. I hope it works as well in real life as it does in the sim!
It works !!! THANKS a lot, I used different MOSFETs : IRF540N as the local store did not have the other one, I did not put the R1, R2 and R3 for now, I might add them later but I don't think I need them.

Many thanks to you and all other nice people in the forum.

Cheers.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
Thank you all for your comments , I am not an engineer and only a hobbyist, with your help not only my problem is solved but also I learned lots of new stuff.

Cheers to all.
 

ebeowulf17

Joined Aug 12, 2014
3,307
It works !!!
Congratulations! That's awesome. Good work!
THANKS a lot
I'm happy to help.
I used different MOSFETs : IRF540N as the local store did not have the other one
I'm glad it's working for now, but it looks like there's a little luck involved with that particular MOSFET. If I'm reading the datasheet correctly, the Gate Threshold Voltage is only guaranteed down to 4Vds. I don't know enough about the subtleties of MOSFET behavior to know if the performance of the specific one you got is likely to change over time, perhaps due to age, or changes in ambient temperature, etc. If you want to guarantee reliable performance, it would be a good idea to replace M1 with a different MOSFET with a lower guaranteed Gate Threshold Voltage.
VGS(th) Gate Threshold Voltage 2.0 ––– 4.0 V VDS = VGS, ID = 250μA
(the notes above are copied from the IRF540N datasheet.)
I did not put the R1, R2 and R3 for now, I might add them later but I don't think I need them.
That's just as well. I played around with the simulation a little more last night, and in at least some situations R2 and R3 could hinder performance (if the ground connection when the doorbell is pressed is high-impedance, then R2 and R3 could overpower it and hold the gate high even when the doorbell should be pulling it low.) I'd say if you have any issues with reliability (false triggers seem like the most likely failure with that borderline Gate Threshold Voltage) then you should first try a new MOSFET, and only then perhaps experiment with R2 and R3.
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
I'm glad it's working for now, but it looks like there's a little luck involved with that particular MOSFET
yes, I did not expect this one to work either, due the fact that you mentioned, and I believe this works with a higher resistance inside the M1 if my understanding of the physics of MOSFET is correct, now here is winter in Australia and the resistance might change in summer. BTW this was the one with the lowest Vth in our local store, I will order a back up MOSFET with lower Vth just in case. Thanks.
 

cmartinez

Joined Jan 17, 2007
8,783
How about this? I'm no expert, so I could've goofed something up here, but I think it makes sense, and LTspice likes it, so that's a start!
View attachment 132083
View attachment 132082
The idea here is that using MOSFETs will allow us to create a circuit that drains essentially no current from the 3.6V doorbell line (unlike the opto-isolator which needs current to operate.)

I suspect that R1 isn't needed. I can't imagine the capacitance of the MOSFET gate is enough to matter, especially if the 3.6V doorbell line is already a high impedance source. I thought I'd throw it in just in case you want to consider it.

R2 and R3 may also be unnecessary. They're to provide a weak pull-up on the gate of M1 to keep the relay inactive even if the doorbell connection is absent. I've used two resistors there to create a 3.6V pull-up instead of pulling up directly with the 12V. I'm not sure what 12V would do to the doorbell circuit, but we'd probably rather not find out!

The rest should be pretty self-explanatory, but let me know if you have any questions.
Can you post the ASC file? I see several things that could be changed to make the circuit even simpler.
 

ebeowulf17

Joined Aug 12, 2014
3,307

cmartinez

Joined Jan 17, 2007
8,783
See if this link works (best I can do from my silly phone!)

https://drive.google.com/open?id=0B21hjJ3dWyi7ZXZlWlBJc1dkZlE

I'll be interested to see what you do. I've already suggested eliminating R1, R2, & R3 and it works equally well without them. That leaves just one resistor and two MOSFETs.
Thanks. Your circuit could be much simpler if you were to use a p-mosfet instead. A single transistor would be used. Just consider the V-Doorbell in the schematic as being a normally open pushbutton.

upload_2017-8-2_19-15-53.png


Most inexpensive p-mosfets could be used for your application, such as these:

https://www.digikey.com/product-detail/en/microchip-technology/TP2104N3-G/TP2104N3-G-ND/4902384

https://www.digikey.com/product-det...45P03P4L11AKSA1/IPP45P03P4L11AKSA1-ND/2338148

https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/NDP6020P/NDP6020P-ND/1055922

Just make sure that the transistor that you choose is capable of handling 20V or more, and at least three times the amount of current drawn by the relay coil.
 

Attachments

ebeowulf17

Joined Aug 12, 2014
3,307
Thanks. Your circuit could be much simpler if you were to use a p-mosfet instead. A single transistor would be used. Just consider the V-Doorbell in the schematic as being a normally open pushbutton.



Most inexpensive p-mosfets could be used for your application, such as these:

https://www.digikey.com/product-detail/en/microchip-technology/TP2104N3-G/TP2104N3-G-ND/4902384

https://www.digikey.com/product-det...45P03P4L11AKSA1/IPP45P03P4L11AKSA1-ND/2338148

https://www.digikey.com/product-detail/en/fairchild-on-semiconductor/NDP6020P/NDP6020P-ND/1055922

Just make sure that the transistor that you choose is capable of handling 20V or more, and at least three times the amount of current drawn by the relay coil.
But the doorbell is already running at 3.6V when idle, and I strongly suspect that pulling that line up to 12V could be bad for whatever the doorbell is connected to. It sounds to me like it's the equivalent of a microcontroller input with a pull-up resistor holding it high until the button press holds it low. If it's anything like that, 12V would fry it, right?
 

Thread Starter

gutfarah

Joined Jul 24, 2017
18
But the doorbell is already running at 3.6V when idle, and I strongly suspect that pulling that line up to 12V could be bad for whatever the doorbell is connected to. It sounds to me like it's the equivalent of a microcontroller input with a pull-up resistor holding it high until the button press holds it low. If it's anything like that, 12V would fry it, right?
Actually I tried pulling the doorbell up to 12v once and it went off and shut down (probably some protection circuits inside it).
 
Top