Pulse on closed circuit and on open again. (converting toggle switch to momentary)

Thread Starter

Samson_1

Joined Nov 8, 2017
4
Hey guys.. New to this forum. I'm really hoping someone can help me.
My experience level ranges from beginner to advanced. Depending on the topic. So bare with me. Im an electrician btw.

Long story short, I have a Sonoff (wifi relay for home automation). It has an on board momentary push button switch that can be used to manually turn the output on or off (under 5v I believe). I wish to use this behind a light switch,but keep the light switch to override the sonoff. The problem is the light switch is a standard on off switch. While I could use a different switch I'm trying to find a way to keep the original in place. So I need something that when I close the switch it closes for less than a second across the existing momentary. I'm thinking a 555 ic is going to be on the cards but while I have great soldering skills, I haven't done any work previously with ICs. Any help would be amazing!

Thanks.
Sam
 

Thread Starter

Samson_1

Joined Nov 8, 2017
4
Apologies for my babbling.. Basically I currently have a push button switch.. I need to replace it with a toggle switch but not provide a constant circuit. It needs to close the circuit briefly (like 1s) upon closing, and again on opening20171109_151057.jpg
 

crutschow

Joined Mar 14, 2008
34,283
What power do you have available for the circuit?

You could generate that pulse with an XOR gate pulse-doubler circuit that controls a transistor driving a relay.
 

Thread Starter

Samson_1

Joined Nov 8, 2017
4
Pretty sure it's a 3.3 or 5v circuit. I'll do some googling of XOR gate pulse doublers.. As I said I've got no experience in gates and I still, but can mostly read circuits so I'll have a crack. Thanks for your help crutschow!
 

crutschow

Joined Mar 14, 2008
34,283
Here's the LT spice simulation of the circuit I suggested.
The relay coil rating must be whatever the power supply voltage is. Its contacts are not shown.
Power and ground to U1 are not shown.
The six unused inputs in the U1 package must be grounded.

upload_2017-11-8_21-4-17.png
 

dendad

Joined Feb 20, 2016
4,451
On the SonOff, I'm pretty shure the push button will switch to 0V so the transistor could just go in parallel with it, no relay or diode required. And it is 3.3V powered.
This is a pretty good project. The SonOffs are a neat box, and cheap too. You will end up with a manual and WiFi light switch.

If you need confirmation of that I can have a look in the morning. It is well past my bed time here.
 

LesJones

Joined Jan 8, 2017
4,174
If the switch is as drawn in the right hand diagram in post #3 it is a SPDT switch. Does it have 3 terminals ? If it does then two capacitors and a few resistors may be able to generate a pulse when the switch common makes contact with either of the contacts. I think the first thing to establish is the voltage across the push button when it is open and the current through it when it is closed. We will then have something to base our design on.

Les.
 

AnalogKid

Joined Aug 1, 2013
10,986
A 1 K switch pullup means the circuit must sink about 3 mA to produce a logic 0 at the uC input. Not a problem for any small NPN transistor. Actually, the output of the CMOS gate (or the other unused gates in parallel) might be able to drive it directly. Are either R9 or R21 populated?

ak
 

dendad

Joined Feb 20, 2016
4,451
I think a transistor will be better than just the gate output. If driven straight from the gate, the pushbutton will not be usable as it would short the gate out when pushed.
R9 is missing and R21 is installed in the pictures I've found on line. I could pop the lid on one of mine to check if needed.
 

Atorjmen

Joined Apr 18, 2018
1
Hey guys.. New to this forum. I'm really hoping someone can help me.
My experience level ranges from beginner to advanced. Depending on the topic. So bare with me. Im an electrician btw.

Long story short, I have a Sonoff (wifi relay for home automation). It has an on board momentary push button switch that can be used to manually turn the output on or off (under 5v I believe). I wish to use this behind a light switch,but keep the light switch to override the sonoff. The problem is the light switch is a standard on off switch. While I could use a different switch I'm trying to find a way to keep the original in place. So I need something that when I close the switch it closes for less than a second across the existing momentary. I'm thinking a 555 ic is going to be on the cards but while I have great soldering skills, I haven't done any work previously with ICs. Any help would be amazing!

Thanks.
Sam
Hi Sam, have finally found a solution ?... Thanks in advance
 
FYI, here is the SonOff circuit.
I'm looking for the exact solution. Converting a one pole switch into a pulse switch either direction open or closed. If switch closes 100 ms pulseor if switch opens 100 ms pulse.

There is a small add on that seems to work on YouTube but its expensive and will cost more then to buy the actual smart switch. Here is the picture of the add-on but Im having trouble figuring out the circuit diagram.

I believe allot of people is looking for a hardware solution to use the original flash.

Thanks in advance.


Screenshot_20181127-010605_jeffreymarasigan.jpg


Mods Note:
Please don't use the .png file when the file including the normal picture and it will be too much colors causes too large file size, when it converted to the .jpg file then the file size reduced from 576,411 Bytes to 111,674 Bytes.
 
See post #7.
I saw that but have anybody tested it. I have a sonoff switch with 4 outputs and I am planning to use the above circuit for the same. Also I am not planning to use the relay but transistor will act as a momentary switch.

Also there is a circuit at below link which is used for sonoff switch
https://lebhile-com.shopclues.com/e...4-ch-channel-wifi-iot-switch..-140218216.html
But the IC number is removed so don't know which IC has been used.
If I can make a circuit like this it will be very good for my application.
 
Top