Semiconductor that allows flow based on existence of power from other source (switch)

Status
Not open for further replies.

steppinthrax

Diamond Member
Jul 17, 2006
3,990
6
81
Here's the deal. I have an external 2.5" usb hard drive. It has a 5V DC adapter that plugs into the USB drive. The drive connects into my Wii. Unfortunately the Wii doesn't provide enough amperage to drive the external USB drive. Therefore the adapter has to be plunged into the drive. However if the adapter is plunged into the drive the drive remains on forever, even after the Wii has powered down and is not in use. The drive doesn't power down based on the lack of activity across the USB.

I want to build a circuit that detects the electrical flow coming out from the USB cable and then allows power to flow from the adapter to the drive. So essentially every time the Wii is on the adapter is powering the drive. Once the Wii turns off the voltage drop is detected on the USB cable, which opens the circuit on the adapter. I believe a relay will do this, but I think that will take way too much power. The USB I believe is like 5 volts and the adapter is another 5.
 

Matthiasa

Diamond Member
May 4, 2009
5,755
23
81
Depending on if you can directly access certian pins you could just use a comparator to turn on or off a transistor based on if there is a voltage on the usb power pin or not.
Well if the HD isn't to sensitive to voltage drop. (I'm not exactly sure how sensitive they actually are)
If it is a properly rated buffer should work as well.
 
Last edited:
May 11, 2008
22,551
1,471
126
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. :cool:
 
Last edited:
May 11, 2008
22,551
1,471
126
A picture of my humble work :

slave_switch.png
 
May 11, 2008
22,551
1,471
126
Last edited:

PottedMeat

Lifer
Apr 17, 2002
12,363
475
126
assuming that your external drive is a laptop drive (2.5"), the maximum current draw should be about 1Amp, so the switch will have to handle at least that much.

i'd try a DC solid state relay. you turn a little diode on which turns on a mosfet switch. you could use a electromagnetic relay but then you'd have to handle the high voltage spike on the wii when it turns off with a diode.

you will have to put a break in the +5V USB power wire.

something like this:
http://search.digikey.com/us/en/products/CPC1708J/CLA279-ND/1277134
+ a resistor

when the usb cable is connected you want to turn on the diode in the relay, so for this particular relay it needs about 1.3V at 15mA. So ( +5V(USB Power) - 1.3V ) / 0.015A = 246 Ohms ( whatever's convenient ).

the mosfet side of the relay would be put between the external adapter and the drive.
 
May 11, 2008
22,551
1,471
126
One more thing about the delayed slave_switch schematic :

I should add that i use a 230V AC multi socket as output.
I bought a black plastic version, because it fitted with all the black cables i have.

621116_six_Way_Multi_socket.jpg



This way all my needed auxiliary adapters, monitor, sound and printer are all powered up or shut down by a single button. And i have remote control in the sense that i can turn it off from a distance.

Feel free to reproduce or sell a build and tested version to others if you want or can. It will reduce energy usage and reduce downtime because of spikes on the net while the equipment is off. Reducing energy wasting makes me happy. ^_^.

Important :
Always keep a distance of at least 10mm between live(230V or 120 Volt) parts.
Always keep a distance of at least 20mm between live(230V or 120 Volt) parts and low voltage parts.
These values are not the real legal limits but are rules of thumb to be save.

Always use a plastic casing to put the circuit in, never use a metal one.
Always isolate all live connections with heat shrinking tube, glue from the glue gun or isolation tape.
Always measure first that the proper connections are made and that short circuits do not exist before powering on.
Always when in doubt, ask someone with more electronic knowledge for clarification about details you may not understand.
 
Last edited:
May 11, 2008
22,551
1,471
126
OP might consider a powered USB hub.


I am wondering if the USB standard allows for such a feature where the hub powers down the device. I know suspend commands are send. But i am not entirely sure the hub has to disable the power. I do know that all devices must be able to go into suspend mode. Something this drive does not seem to do for reasons i do not know. Maybe mass storage devices are allowed to draw more current in suspend mode.

This is about the suspend mode for USB devices and hubs.
further 7ms to shutdown the device and draw no more than the designated suspend current and thus must be
only drawing the rated suspend current from the bus 10mS after bus activity stopped. In order to maintain
connected to a suspended hub or host, the device must still provide power to its pull up speed selection
resistors during suspend.
USB has a start of frame packet or keep alive sent periodically on the bus. This prevents an idle bus from
entering suspend mode in the absence of data.
• A high speed bus will have micro-frames sent every 125.0 μs ±62.5 ns.
• A full speed bus will have a frame sent down each 1.000 ms ±500 ns.
• A low speed bus will have a keep alive which is a EOP (End of Packet) every 1ms only in the absence
of any low speed data.
The term "Global Suspend" is used when the entire USB bus enters suspend mode collectively. However
selected devices can be suspended by sending a command to the hub that the device is connected too. This is
referred to as a "Selective Suspend."
The device will resume operation when it receives any non idle signalling. If a device has remote wakeup
enabled then it may signal to the host to resume from suspen

It can also be that the USB to IDE/SATA controller responds correctly but that there is no command given to the HDD to power down. Or that the HDD does not recognize the command.

Anyway, the hub itself will then continue to stay powered. The problem is not solved.


P.S. :
I updated the schematic for those interested.
 
Last edited:

PsiStar

Golden Member
Dec 21, 2005
1,184
0
76
I am wondering if the USB standard allows for such a feature where the hub powers down the device. I know suspend commands are send. But i am not entirely sure the hub has to disable the power. I do know that all devices must be able to go into suspend mode. Something this drive does not seem to do for reasons i do not know. Maybe mass storage devices are allowed to draw more current in suspend mode.

This is about the suspend mode for USB devices and hubs.


It can also be that the USB to IDE/SATA controller responds correctly but that there is no command given to the HDD to power down. Or that the HDD does not recognize the command.

Anyway, the hub itself will then continue to stay powered. The problem is not solved.


P.S. :
I updated the schematic for those interested.
I think you are right.

Master/slave power strips ... plug the Wii into the master & it will control the slave outlets ...
 
Status
Not open for further replies.