I modified the circuit and added 2 components : D6 and C6.
I have to look a bit first. Creating a schematic with a few discrete components is easy. But there are also USB power switches available with everything in one IC.
But this might be better.
This very simple schematic is mark2 of my current version i use at home. When i am done behind the pc, i power off everything. My entire pc system is fully disconnected from the net about 60 seconds later. This saves power and protects my equipment against spikes and power surges while it is off and not used. ^_^.
For those interested, here is the schematic. It should be easily adaptable to 120Volts. If required, i can modify the values for easy reading.
http://dl.dropbox.com/u/45177488/230V_slave_switchV21.pdf
How does it work :
It is very simple, when you press the momentary power switch, S1, the 230 Volt is passed on to the pc equipment and to transformer T1. The whole circuit is powered and the RCD reset circuit D3,R4,C3 will be briefly active(remember, C3 has no charge at start). This causes p-mosfet T3 to charge the capacitors C1,C4 and C5 briefly and the RDC circuit resets U1(7555) as well. When C1,C4 and C5 have enough charge, U1 will switch the output low and by use of p-mosfet T1, the relay RY1 will close the contacts and will stay powered for as long as the three capacitors C1, C4 and C5 have enough charge.
Since p - mosfet T3 is no longer conducting, capacitors C1,C4 and C5 slowly discharge over R12. It takes about 60 seconds before the voltage of C1,C4 and C5 has dropped below 4V.
A 7555 has 2 internal switching levels. 1/3*12V= 4 Volt and 2/3*12V = 8 Volt. When the charge is less then 4 Volt, the output of U1 becomes high level. When the charge is above 8 Volt, the output of U1 becomes low level. The reason for these 2 switching levels is to prevent the circuit from switching on electrical noise. It is just hysteresis added. C6 is added on the control pin as a decoupling capacitor and to make sure noisy spikes do not influence the internal trigger and threshold voltages.
The time is about 60 seconds. Why i use 3 capacitors instead of 1 is pure redundancy. If these capacitors all fail at once, strange 1 second switching may occur in rare occasions. But it was hard to generate such behavior. With three capacitors, this should never happen.
Relay RY1 must be at least a DPST relay with contacts capable of switching high currents (Typical 10A or 16A) and must be rated for 230V AC or 120V AC. Or use 2 SPST relays with the coils in parallel.
Keep it powered :
Of course, 60 seconds is not enough for computer time. There is another way to keep the circuit powered. As long as on USB connector K1 5V is present, the capacitors C1, C4 and C5 stay charged through p-mosfet T2. Thus the circuit will remain active. Pin2 of connector K1 = +5V. Pin1 of connector K1 = GND. Instead of using USB, you can also use the internal 5 Volt of the pc. Do not use the +5Vstandby because that is always present.
Optocoupler OC1 keeps the entire circuit electrically isolated. Using the OC1 together with transformer T1 is another redundancy method to protect the expensive pc equipment.
D6 is to protect the led from damage because of polarity reversal. The led inside OC1 can withstand 6Volt reverse voltage before damage occurs.
RNTC1 is purely for protection of switch S1 and to prevent blow out of the fuse F1. The small switch S1 is rated at 16A. Transient suppressor RV1 and fuse F1 are pure for protection of the entire pc circuit against spikes on the net.
I build everything (mark 1 version)inside a box and integrated it into my computer desk.
When i sit down, i press the switch. After that, i have 60 seconds to power up my pc before the circuit shuts down again.
The reason why i do this, is because i also use remote control on the pc. When it is no longer needed, i just turn it off with the remote. And i can never forget the main switch, it turns off by itself.
