Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to turn on/off devices when the computer starts/shutdown by using USB port

Status
Not open for further replies.
This circuit is so simple. It turns on/off devices that plug in to the outlet.
All you need is
**broken link removed**
A USB Cord (any type should work)
Some thing to cut-and-slice the USB Cord.
**broken link removed**
A 5VDC relay with contact rated at 125VAC
A Case so you don't get shocked.

Just be vary carefull. I will not be responsible for you getting shocked, computer getting fried or blowing a fuse.

Here are the pin wiring.
**broken link removed****broken link removed** We will only use Type A Connector.
**broken link removed**

Now wire Pin 1 on the relay to Live wire on the Power cord.
Now wire Pin 2 on the relay to Live wire on the Power Outlet( NEMA 15-5 Connector)
Now take pin 1(sometimes the red wire) from the USB cord to Pin 3 on the relay.
Now take pin 4(sometimes the black wire) from the USB cord to pin 4 on the relay.
Now take the other 2 unused wires from the POWER CORD and hook them up to the NEMA 15-5 Connector.

Now drill holes in the case to put your cords and connectors in.
Now plugin your device such as( Monitor,Printer, External Drives, etc) to test it, and the USB cord into the computer. Now it should turn on the device when you start the computer and turn off the device when you shutdown the computer.

I have not gotten the parts yet i will edit the post when i get them. to tell you if they work. So please no bad feedback.
 
Last edited:
The power cable is 14 gauge stranded which is impossible to safely connect to the tiny pins on this relay in the 0.2" available clearance.

This relay is only rated at 500mA which is not enough for most monitors, printers, and external drives.
 
You will find out that the relay rating is too small when it either blows up or won't turn off.

Or you can read the data sheet first.
 
Little reed relays like that will not survive long with 120VAC loads. Mains projects are not suitable for noobs and can cause all sorts of grief.
 
Yes it is difficult to find a 5V relay on the surplus market that can safely switch AC mains.

I would spend the extra few dollars and use a solid state relay. At ALL Electronics, the only one I find is for 1A; better but not enough for CRTs and lasers. Maybe good for LCD monitors, disc boxes, and inkjet printers.
 
Sorry but I don't think this is a very good project.

If you want to save power then buy an extension lead which turns the other sockets off when it detects your computer has been turned off. This has the advantage of not requiring a USB port or having to play with dangerous mains electricity.
**broken link removed**

I'm sure they sell a similar thing in the US.
 
I think I'll get one of these. When I turn off my computer, it takes forever for all the updates to download. I hate sitting there waiting, so I can trun off the power strip and disconnect all the peripherals.

Shoot, it says out of stock. I'm back to DIY
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top