Keeping the USB chip on although no power is fed through USB?

23 Oct 2012

Hi!

I have an mbed system in which I am sending the data from the mbed to a host computer and then plotting and logging it using LabView. I would like to be able to send data to the host, while not using power supplied by the host computer through the USB cable. I have a USB cable into which I have inserted a manual switch in the 5 V line, but left the other wires as they were. I have connected this modified USB cable to the normal mbed micro USB connector.

My problem is that the mbed turns of the USB chip when I cut the 5 V power supply to the mbed, although the data cables are still connected. This turns off the data transmission to the host. The mbed has a separate power supply so it keeps running. I have tried to turn on the USB chip in my code at initialisation of the system, but the USB chip still turns off when the cable switch turns off the 5 V line.

I would like to know if it is possible to get the mbed USB chip to stay on although no power is fed through the micro USB connector? I would also like to know if it is possible to use the micro USB connector for sending data to the host although no power is provided through it? Or do I have to use the USB D+ / USB D- connectors for this instead?

Thank you in advance!

-Axel

30 Oct 2012

Anyone?

Thank you!

-Axel

30 Oct 2012

The I/F chip as such is still powered when the mbed is receiving external power, but the usb port on the I/F chip is disabled when it does not detect the 5V. In case you want to avoid drawing power from the host (why?) you can cut the power wire, but you still need to provide 5V to the mbed micro USB connector. Your external mbed power supply could take care of that. The easy alternative is to use an external powersupply that is higher than 5V. The internal circuitry of mbed will draw (most of the) power from the highest voltage (USB 5V or Vin).

The second alternative is to use the USB D+ / USB D- connectors and running usb serial device code on the mbed LPC1768. Power for mbed would be provided by your external supply.

31 Oct 2012

Dear Wim,

Thank you for your reply and the information!

I am building an application which powers itself using a fuel cell and some other components. It looks bad in a demo if a self-powered device takes power from the host, no matter how small the power from the host is. However, for a demo I still need to show the voltages, currents, and powers in the system, which I do most clearly and conveniently by plotting them on the host computer. The 4 row LCD display that I have attached to the mbed is not too good at showing large amounts of measurements :)

The external power supply does provide 5V to the Vin, but still the USB turns itself off. If I understand you correctly you suggest that I will cut the cable from the host, but wire a 5V cable from the Vin to the USB connector so it still gets 5V, but from the power supply, not the host. Alternatively use the USB D+ / USB D- pins. Have I understood you correctly?

If you know, what does turning the USB peripheral on/off do when there is not 5V connected to the USB connector? Does it turn the I/F chip on/off or does it do anything?

Regards,

- Axel

31 Oct 2012

Axel Kohonen wrote:

The external power supply does provide 5V to the Vin, but still the USB turns itself off. If I understand you correctly you suggest that I will cut the cable from the host, but wire a 5V cable from the Vin to the USB connector so it still gets 5V, but from the power supply, not the host. Alternatively use the USB D+ / USB D- pins. Have I understood you correctly?

Correct

Axel Kohonen wrote:

If you know, what does turning the USB peripheral on/off do when there is not 5V connected to the USB connector? Does it turn the I/F chip on/off or does it do anything?

The mbed datasheet shows that both the interface chip (magic chip) and the LPC1768 are powered from the same 3V3. That powersource is derived either from Vin or from the Host USB interface 5V. So the I/F chip is powered and operating as long as the LPC1768 is powered. However, it seems that the USB port hardware of the interface chip is disabled when it does not detect a voltage on its VBUS input pin. That pin is connected to the 5V USB powersource. So you have to fool the USB port hardware into assuming it is connected to the host by somehow providing 5V to the USB connector.

Note that you can disable the I/F chip and the ethernet chip using software calls. This will reduce the overall powerconsumption of mbed. Obviously you loose the USB host serial port and local filesystem capability and you dont have ethernet anymore. The USB D+/D- or even one of the other serialports on the LPC1768 itself would still be available for your I/O needs.

31 Oct 2012

Dear Wim,

Thank you very much for the information. I will try to fool the USB port by inserting 5V at the VU pin. If that does not work I will insert 5V to the USB itself or use the USB D+ / USB D- pins.

Regards,

- Axel

31 Oct 2012

Hi again!

It is not possible to input 5V to the VU pin to get the USB communication with the host to start. On the other hand it works well to insert 5V to the USB-cable to the mbed, while not taking the 5V from the host, rather from the external power supply. The communication to the host still works fine.

- Axel

31 Oct 2012

Axel Kohonen wrote:

It is not possible to input 5V to the VU pin to get the USB communication with the host to start. On the other hand it works well to insert 5V to the USB-cable to the mbed, while not taking the 5V from the host, rather from the external power supply. The communication to the host still works fine.

That is what I expected. Note that you should not feed 5V into the VU pin. This is an output pin rather than an input. The pin also does not connect directly to the VBUS input of the interface chip (see schematic), consequently the I/F chip will not be fooled to think that USB is active and host com does not work.