USB power and debug signals on micro USB connector

S

Stef

Guest
For a handheld device, powered by a Li-ion cell, I need a charge power
input. Most standard chips for charging and powering the device are
meant for USB power or simular. Since the current standard charging
connector for mobile phones is a micro USB connector, it seems best to
use that. It means you can use a lot of standard chargers. Agreed?

For the device, I also need a serial debug connection. It is OK to have
the 3V3 UART connection on an internal header. This means the device
must be opened for debugging and maybe a slot must be made in the
enclosure for longer test sessions with enclosure.

But is it possible and/or advisable to use the spare pins on the micro
USB connector to bring out the 3V3 UART signals? It would save a header
and make debugging in the enclosure a lot simpler. But it must not
lead to damage to the device and or (windows/linux/mac) PC when the
device is plugged in to a PC. There must not be any strange behaviour on
the PC and preferably there must not be any detection by the OS of USB
activity.

You could ofcourse use a real USB/serial connection, but that would
mean adding an FTDI chip or a big software effort on the DSP (which has
USB hardware). It would also mean every PC user has acces to the debug
channel, I'm not sure we want that.

So putting the 3V3 UART signals (TX/RX only) on the micro USB and use
a special breakout box (possibly with FTDI chip) for debugging seems the
most practical solution for now. Any arguments against it? Any
experiences with such a setup? And which signal on which pin for least
chance on damage and strange behaviour? I know some USB chargers have
shorts or resistors on the datalines, so at least a few protection
resistors on the device side are required.


--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

To the systems programmer, users and applications serve only to provide a
test load.
 
In comp.arch.fpga,
Stef <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote:
Sorry , wrong group!

I'll re-post in comp.arch.embedded


--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

For most men life is a search for the proper manila envelope in which to
get themselves filed.
-- Clifton Fadiman
 
In comp.arch.fpga,
glen herrmannsfeldt <gah@ugcs.caltech.edu> wrote:
Stef <stef33d@yahooi-n-v-a-l-i-d.com.invalid> wrote:
Sorry, I meant to post this to comp.arch.embedded.
Re-posted it there, I'll try to cancel it here.
If you can, put any replies over there. But I'll keep reading here
for any replies.

For a handheld device, powered by a Li-ion cell, I need a charge power
input. Most standard chips for charging and powering the device are
meant for USB power or simular. Since the current standard charging
connector for mobile phones is a micro USB connector, it seems best to
use that. It means you can use a lot of standard chargers. Agreed?

For the device, I also need a serial debug connection. It is OK to have
the 3V3 UART connection on an internal header. This means the device
must be opened for debugging and maybe a slot must be made in the
enclosure for longer test sessions with enclosure.

You mean USB and serial at the same time?
No, I just need the USB for power. I want to use the 'spare' lines
for serial.

It seems usual for USB mouse to also work as a PS/2 mouse with
the same lines and a connector/adaptor. But it is one or the other.

But is it possible and/or advisable to use the spare pins on the micro
USB connector to bring out the 3V3 UART signals? It would save a header
and make debugging in the enclosure a lot simpler. But it must not
lead to damage to the device and or (windows/linux/mac) PC when the
device is plugged in to a PC. There must not be any strange behaviour on
the PC and preferably there must not be any detection by the OS of USB
activity.

I think you should be at least 5V safe. The way to do that with 3V3
lines is well known, especially for slow signals. (I think you only
need resistors.)
Protecting my device is probably the the easiest problem. But how to keep
the PC from sensing there is anything on the USB and emiting a 'connect
sound' for instance?

You could ofcourse use a real USB/serial connection, but that would
mean adding an FTDI chip or a big software effort on the DSP (which has
USB hardware). It would also mean every PC user has acces to the debug
channel, I'm not sure we want that.

So putting the 3V3 UART signals (TX/RX only) on the micro USB and use
a special breakout box (possibly with FTDI chip) for debugging seems the
most practical solution for now. Any arguments against it?
Any experiences with such a setup? And which signal on which pin
for least chance on damage and strange behaviour?

I believe it is current limiting resistors, as long as the
signals aren't too fast.

Guess that will work.


I know some USB chargers have shorts or resistors on the
datalines, so at least a few protection
resistors on the device side are required.

As I understand it, USB devices requiring more than the default
Icc are supposed to negotiate with the host. That is hard to
do when the host is just a power adaptor, so there seem to be
conventions for the voltages on the data lines that allow devices
to pull more current. That is, for example, how iPod chargers work.

You might also want to do that.
There is an 'apple convention' for signalling power need. The only
other 'standard' I know is for USB chargers. They should have D+ and
D- shorted to signal the device it can draw 1A?

My worry is not about the power. It is OK if my device does not charge
(properly) when connected to a PC. The user should use the specified
charger. It may be 'nice to have' to allow for charging from a PC. So
it is worth to look in to this a little. But I will not implement the
proper USB negotiation, as I do not have USB device software running.
But maybe with some sensing it is possible to limit the power draw to
only 100mA when connected to a PC.


--
Stef (remove caps, dashes and .invalid from e-mail address to reply by mail)

This night methinks is but the daylight sick.
-- William Shakespeare, "The Merchant of Venice"
 
Stef <stef33d@yahooi-n-v-a-l-i-d.com.invalid> wrote:

For a handheld device, powered by a Li-ion cell, I need a charge power
input. Most standard chips for charging and powering the device are
meant for USB power or simular. Since the current standard charging
connector for mobile phones is a micro USB connector, it seems best to
use that. It means you can use a lot of standard chargers. Agreed?

For the device, I also need a serial debug connection. It is OK to have
the 3V3 UART connection on an internal header. This means the device
must be opened for debugging and maybe a slot must be made in the
enclosure for longer test sessions with enclosure.
You mean USB and serial at the same time?

It seems usual for USB mouse to also work as a PS/2 mouse with
the same lines and a connector/adaptor. But it is one or the other.

But is it possible and/or advisable to use the spare pins on the micro
USB connector to bring out the 3V3 UART signals? It would save a header
and make debugging in the enclosure a lot simpler. But it must not
lead to damage to the device and or (windows/linux/mac) PC when the
device is plugged in to a PC. There must not be any strange behaviour on
the PC and preferably there must not be any detection by the OS of USB
activity.
I think you should be at least 5V safe. The way to do that with 3V3
lines is well known, especially for slow signals. (I think you only
need resistors.)

You could ofcourse use a real USB/serial connection, but that would
mean adding an FTDI chip or a big software effort on the DSP (which has
USB hardware). It would also mean every PC user has acces to the debug
channel, I'm not sure we want that.

So putting the 3V3 UART signals (TX/RX only) on the micro USB and use
a special breakout box (possibly with FTDI chip) for debugging seems the
most practical solution for now. Any arguments against it?
Any experiences with such a setup? And which signal on which pin
for least chance on damage and strange behaviour?
I believe it is current limiting resistors, as long as the
signals aren't too fast.

I know some USB chargers have shorts or resistors on the
datalines, so at least a few protection
resistors on the device side are required.
As I understand it, USB devices requiring more than the default
Icc are supposed to negotiate with the host. That is hard to
do when the host is just a power adaptor, so there seem to be
conventions for the voltages on the data lines that allow devices
to pull more current. That is, for example, how iPod chargers work.

You might also want to do that.

-- glen
 

Welcome to EDABoard.com

Sponsor

Back
Top