HI All, im trying to create a simple circuit that will trigger a relay for 1 second (or thereabouts) when the mains power goes out (or comes back..)
the relay will trigger a wifi connected momentary switch and send an alert to my phone.
this will be very useful, as power often goes out here, usually just after weve left on holiday, and we come back to a rancid fridge.
given an alert i can ask the neighbours to reset the circuit breaker etc.
i have a ups with a 12v output that will be powering this circuit, plus the wifi switch and my router.
i found the basic circuit i was looking for here:
http://discuss.littlebits.cc/t/how-...ulse-when-the-input-is-a-constant-on/23894/41
which, assuming it works, would be an ideal starting point, as i have all the components.
the mains sensing part i took from an earlier project i discussed here, which i currently have in use. an ac optoisolator with a 220k resistor to bring the mains level down. id like to reuse this as i have a few of the optoisolators left over.
anyway, long story short, i took the suggested 555 circuit into ltspice, and modified it to include the optoisolator portion of my earlier circuit.
surprise! it doesnt work.
i get zero on the output for the first circa 2 seconds, then it goes high and stays there. doesnt seem to be affected by the input state change at all.
as you can tell im a noob!
attached, a screengrab of the ltspice circuit, and the ltspice file.
any help most appreciated!
thanks, Robin.
the relay will trigger a wifi connected momentary switch and send an alert to my phone.
this will be very useful, as power often goes out here, usually just after weve left on holiday, and we come back to a rancid fridge.
given an alert i can ask the neighbours to reset the circuit breaker etc.
i have a ups with a 12v output that will be powering this circuit, plus the wifi switch and my router.
i found the basic circuit i was looking for here:
http://discuss.littlebits.cc/t/how-...ulse-when-the-input-is-a-constant-on/23894/41
which, assuming it works, would be an ideal starting point, as i have all the components.
the mains sensing part i took from an earlier project i discussed here, which i currently have in use. an ac optoisolator with a 220k resistor to bring the mains level down. id like to reuse this as i have a few of the optoisolators left over.
anyway, long story short, i took the suggested 555 circuit into ltspice, and modified it to include the optoisolator portion of my earlier circuit.
surprise! it doesnt work.
i get zero on the output for the first circa 2 seconds, then it goes high and stays there. doesnt seem to be affected by the input state change at all.
as you can tell im a noob!
attached, a screengrab of the ltspice circuit, and the ltspice file.
any help most appreciated!
thanks, Robin.
Attachments
-
58.4 KB Views: 14
-
3.5 KB Views: 4