Hacking a device to turn itself off - Page 1
Forum section: electronics / projects

author: con-f-use
author_rank: Unknown
timestamp: January 23, 2014, 08:08:31 pm
content: I'm looking to improve my design.So I'm hacking a household appliance to switch itself off. Prototyping, I used a solid state relay to switch the appliance and a microcontroller to tap into the status leds of said device. At a certain combination of status leds, the micro cuts power to the appliance. To power the microcontroller itself I used a separate 5V supply. That works well, but now I found a 5V rail in the device that I could use to supply the micro.The problem with that of course: In order for that 5V rail to power the micro the SSR has to power the device on it's own for a short while (<0.5s). Then the 5V rail of the device comes online and supplies the micro. The micro in turn holds the SSR in on-state until the shut-off condition is met. Once the condition is met the SSR will turn off, the 5V rail will go offline, the micro will be off and all should come on again, if I pull the plug and put it back in.So what simple circuit could I use to have the SSR in on-state for a short time, when the power cord connects? The SSR is aSharp S202S01. What's the best/easiest way to do that?

author: cellularmitosis
author_rank: Unknown
timestamp: January 23, 2014, 09:44:34 pm
content: obligatory youtube link:https://www.youtube.com/results?search_query=the%20most%20useless%20machine%20ever

author: kolbep
author_rank: Frequent Contributor
timestamp: January 23, 2014, 10:03:40 pm
content: Put a normally open momentary switch across the mt1 and mt2 terminals of the ssr (the mains side). When pushed, it will short the output.a brief push will be long enough to bring up the 5v rail, and make the micro's first priority to enable the ssr output.

author: dannyf
author_rank: Super Contributor
timestamp: January 23, 2014, 10:27:23 pm
content: Use relays.

author: con-f-use
author_rank: Unknown
timestamp: January 23, 2014, 10:54:22 pm
content: Quote from: cellularmitosis on January 23, 2014, 09:44:34 pmPretty much like that, just less useless.Quote from: dannyf on January 23, 2014, 10:27:23 pmA latching relay would be a solution, but I don't have any at home.Quote from: kolbep on January 23, 2014, 10:03:40 pmI'm stupid.

author: peter.mitchell
author_rank: Super Contributor
timestamp: January 24, 2014, 06:35:33 am
content: Diode OR the control input to the SSR, connect one of the diodes to the micro for control, then, for the other diode connect it to a normally open momentary switch, put two 3v coin cells in series on the switch, and then to the other side of the SSR.This will last until the batteries go flat; which will be a very very long time (in the order of 5-10 years).The batteries will toggle the SSR when power is off, the 5v supply will come up, the diode OR will prevent the 5v rail and the coin cells fighting each other, once the 5v rail is up, release the button, the coin cell is now completely disconnected from the circuit.There are other options, for "infinite lifespan" but they require me to know how long it takes for the 5v rail to come up.Eg, you could wrap a bit of insulated wire around the incoming insulated mains line (with some tape in between for safety) to create a terrible low power transformer, rectify with diode + capacitor for storage of charge, then use momentary NO switch to turn SSR on.The size of the cap would depend on how long it takes the 5v rail to come up.This is all under the assumption you don't want to use a mains rated switch.

author: con-f-use
author_rank: Unknown
timestamp: January 27, 2014, 02:34:54 pm
content: Thank you for even more ideas. You can keep them coming. After all there's always room for improvement. As to the time: I can say for certain, that the time lag between mains connect and +5V is less 0.1 seconds. Id guess it just a few power-cycles the all capacitors in the supply are loaded.Using a mains rated switch as I'm doing now kills two birds with one stone for me: This way I can overwrite the micro if I want the device to stay on no matter what. I still can't believe I was that stupid not to think of it. I tend to over-complicate things.