USB Power

d4mo

Senior member
Jun 24, 2005
588
0
0
Ok, I am considering a little project here but I need some info first, and I can't seem to find what I'm looking for on the net.

Ok USB has 4 wires. 5v..Data +...Data -....Ground. My question is this. With the 5v wire...its there power flowing through that all the time, or could a program shut the power off completly? Also with the Data + and data - is that from the Device to the Computer or can it go in reverse?

Basically I wanna build one of these http://www.gizmodo.com/gadgets/gadgets/magnetic-usb-power-strip-176470.php
I just need to know how I can turn on/off the power in the USB cable.
 

pcy

Senior member
Nov 20, 2005
260
0
0
Hi,


You can't switch the USB power on and off - it's on all the time, and it supplies the power so that the gizmo can operate.

The gizmo itself is a mains swich. The thinds you plug into the gizmo are mains powered. Even if it was the right voltage, the power required by lights etc would blow the USB power to kingdom come. The gismo is a circuit which is controlled by the computer which switches the mains power on and off.


Peter
 

Future Shock

Senior member
Aug 28, 2005
968
0
0
Please understand that the device you linked to does NOT switch the USB power on or off - it uses the USB signal to send a digital code to a controller embedded in the power strip, and the controller then uses external thrysistors (or similar) to switch the mains voltage on or off. It probably has a different control for each outlet in the strip, say code 0 turns outlet A on, code 1 turns outlet B on, code 9 turns outlet A off, code 10 turns outlet B off, etc. Embedded controllers that respond to USB are very cheap now, all that would be required is decoding the outputs of that into a set of thrysistors (or similar switching device).

However, this type of thing DOES use mains voltage, and as such requires a bit of experience to do safely. Always be extra careful when involved in such projects.

Future Shock
 

Cattlegod

Diamond Member
May 22, 2001
8,687
1
0
Is it possible to send specific binary data over the usb cable through Visual Basic? I'd be interested in reading a project that did this.
 

d4mo

Senior member
Jun 24, 2005
588
0
0
Well what I would do is get some sort relay that the USB power would trip causing the strip to turn on. The USB power wouldn't power anything other than the relay, eveything else is still powered by the wall outlet.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Originally posted by: Cattlegod
Is it possible to send specific binary data over the usb cable through Visual Basic? I'd be interested in reading a project that did this.

Some of the more popular USB receiver chips do come with free drivers which should work from Visual Basic (possibly with some modification).

E.g. the FTDI FT245R, which is basically a USB -> parallel port converter (also available in module form).
 

Kelnoen

Senior member
Sep 20, 2006
409
0
0
the way I understood it the USB standard required constant 5v 100mA and can be increased to to 500mA by request from the device.
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
I've drawn you a schematic for this project.

img128036794983587500.jpg

You get +5V to the USB port at all times when the PC is switched on, unless the PC detects a power overload.

Normally, with USB devices should go into 'standby mode' when plugged in. While in standby mode it sends data to the PC saying what the device is and how much power it needs. Windows goes through its list of what else is connected to that port, and how much power they need, to decide if that port has enough spare power for the device. If everything seems fine, Windows sends data to the device telling it to power up. If Windows thinks there will be a problem - you get a power warning error message.

However, if a device isn't power controllable, then it runs the risk of taking too much power (especially if plugged into a hub, where other devices can be taking power). Each USB port supplies 5 V at up to 0.5 A. If for some reason a port exceeds that 0.5 A then the motherboard will simply cut power to the port. This means everything connected to that port shuts down immediately (the idea of Windows asking devices to say how much power they need is to avoid this problem).

The problem with the schematic I've given is that the device is 'dumb'. Windows has no way of knowing its even connected - it just takes power. It would be important not to connect this device to a (non-powered) hub because you run the risk of overloading the port, and the power automatically being cut off.

The USB data lines are both used to send data in both directions. As we're just building a crude device, we don't need access to them. All we need is the power.

As this project uses mains voltage - appropriate experience and knowledge is needed to determine safely rated components, appropriate earthing, insulation and current ratings of the active components. If you aren't sure on the precautions needed, please don't proceed with this project.
 

Colt45

Lifer
Apr 18, 2001
19,720
1
0
The problem with markr's design is that the mains will be on as long as usb is up, you cant switch it on and off.

if you want the ability to switch it from the PC you will need a microcontroller or a usb-> parallel IC. atmel and microchip both make microcontrollers with USB support.


the easiest way to do this is lpt port, transistor, and a relay. not as pretty though.
 

Kelnoen

Senior member
Sep 20, 2006
409
0
0
IMO your better off buying one, it'll be a long process to build and test one and the hours put in will probably greatly outweigh the cost
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |