Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [usb]

USB is Universal Serial Bus. If your question relates to a specific chip, please mention it in your question.

83
votes
9answers
144k views

How to get more than 100mA from a USB port

I heard that the current limit for a USB port is 100mA. However, I also heard that some devices can get up to 1.8A from a port. How do you get past the 100mA limit?
48
votes
3answers
55k views

What is the ideal way to handle data pins D+ and D- on a USB power adapter to be compatible with fast charging on devices?

I have found that many USB wall chargers use a resistive voltage divider to set the D+ and D- pins to a specific voltage, usually between 2 and 3 volts. Other USB wall chargers short the D+ and D- ...
52
votes
12answers
59k views

How to connect USB Connector shield?

How should I route USB Connector shield on PCB? Should it be connected to GND plane right where USB is placed, or should the shield be isolated from GND, or should it be connected to ground through ...
35
votes
5answers
15k views

Switch between 5V power supplies?

I'm designing a board that can be powered either by USB or an ATX power supply. They can both be plugged in at the same time, independently. I'd like the ATX to provide 5V if its plugged in, but ...
6
votes
2answers
11k views

Switch between battery and USB power

Following on an earlier question I am looking for a circuit where it powers from USB when it is available and uses the battery when USB is not plugged in. I want voltage drop to be minimal, zero if ...
13
votes
5answers
8k views

How does a USB 2.0 Wall Charger negotiate current output?

I'm trying to use a mobile phone charger for my projects, and want a high current output. I have read this, however my measurements show something else. Here is a link to the Battery Charging ...
11
votes
1answer
2k views

Separating USB/MCU power buses

There are two power supply sources in the following diagram - USB and 12V. Only one power supply can be connected at the same time. I am trying to disable power to ...
3
votes
3answers
3k views

Structure of a usb 2.0 connector [duplicate]

What is the role of the outer metal connector? (the one with two square holes) Does it have a potential? Is it insulated from the 4 pins? Are the 4 pins insulated from each other?
29
votes
11answers
17k views

I'd like to learn how to make my own USB gadgets

I've been writing Linux character device drivers for other people's stuff for some time. I'd like to find a new hobby and the thought of making my own USB gizmos seems really neat. I would be ...
50
votes
2answers
20k views

In a USB cable, is it OK to swap the D+ and D- wires?

I heard that D+ and D- are differential signals, does it matter if I swap them when connecting a USB device to the computer?
184
votes
8answers
31k views

Why does USB have 4 lines instead of 3?

USB specifies 4 pins: 1. VBUS +5V 2. D- Data- 3. D+ Data+ 4. GND Ground Why is this not 3? Could the Data and Power not share a common ...
200
votes
7answers
184k views

Why was Mini USB deprecated in favor of Micro USB?

Mini USB connectors were standardized as part of USB 2.0 in 2000. In 2007, the USB Implemeters Forum standardized Micro USB connectors, deprecating Mini USB connectors four months later. Why? What ...
5
votes
4answers
5k views

Capacitor on USB cable?

I was messing around with a USB camera. I wanted to change the cable because is trimmed but as I was cutting it I saw a small thing (image below). As I was trying to cut the casing and see what it has ...
50
votes
8answers
97k views

Can an Android tablet serve as USB Host and be charged simultaneously through a single port?

A number of Android tablets are powered through the Micro B USB port but also provide USB Host support through the same port (e.g. Motorola Xoom 2, Acer A510/700). I need to be able to use USB Host ...
32
votes
10answers
55k views

How to build a USB controller having knobs, sliders, and switches

How does one go about building an interface for a USB device that allows interfacing pots, linear/log tapers, and momentary/toggle switches to a computer? If someone could give me a high-level ...
19
votes
3answers
14k views

How to limit inrush current?

I'm designing a device powered from USB. The device uses FTDI FT2232 chip for USB connection. Upon a command from a computer FT2232 chip should enable power via a MOSFET switch to rest of the circuit. ...
39
votes
2answers
12k views

Why are USB devices slower than 480 MBit/s

Motivation With a signaling rate of 480 MBit/s USB 2.0 devices should be able to transmit data with up to 60 MB/s. However today's devices seem to be limited to 30-42 MB/s while reading [Wiki:USB]. ...
25
votes
5answers
94k views

Just chopped a cable, is red power, black ground?

I've just chopped a usb to micro-b usb cable. There are 4 small wires inside Red Black White Green Isn't it universal that Red is power and black is ground?
4
votes
1answer
19k views

Wiring diagram for USB-C to USB-A cable?

I make USB cables (USB-A to Mini or Micro primarily), but don't have any experience with USB-C. I would like to create a cable that has a USB-A (2.0) connector on one end, and a USB-C connector on the ...
3
votes
2answers
11k views

Does USB Host always supply power on VBUS?

I know a fair bit about USB, but for some reasons I am not able to answer this question myself. Does the USB Host port (let's say USB 2.0) always supply 5V on the VBUS pin? If not, how does it ...
117
votes
7answers
20k views

What measures should I take to protect the USB ports of my PC during development of a USB device?

I'm going to start developing a USB 1.1 device using a PIC microcontroller. I'm going to keep one of the USB ports of my PC connected to a bread board during this process. I don't want to destroy my ...
14
votes
2answers
13k views

USB to GPIO module

I'm working on a project which involves having users press buttons on a webpage which the server needs to send onto a microcontroller in the form of a GPIO signal. The only ports available on the ...
23
votes
8answers
37k views

How do USB charging and “smart” charging ports (e.g. Anker's PowerIQ) work?

Software engineer with a hobbyist understanding of EE here. I've noticed lately lots of claims from producers of USB battery packs that their ports are "smart" and "identify the device" to "deliver ...
25
votes
2answers
11k views

Connectorless USB on a PCB

I would like to make a board which can be plugged directly into the USB port of a computer, instead of using a separate male "USB-A" connector. I have seen this system used for very small USB memory ...
19
votes
3answers
78k views

How to transform 5V into 12V?

I would like to transform 5V 500mA (from USB power) into 12V with a few cheap components. Is this possible with the help of some generic parts (and not with the help of some expensive transformer, ...
8
votes
1answer
2k views

EMI/ESD protection for USB interface?

I'm a student making a simple Arduino-compatible board similar to the Pro Micro and am going to put a USB connector on the board. The schematic in the above link doesn't show any kind of EMI/ESD ...
10
votes
1answer
3k views

How can electromagnetic interference from a USB charger cause a capacitive touchscreen to malfunction?

Electromagnetic interference from a USB charger can cause a touchscreen on a mobile device to malfunction, with symptoms such as reduced sensitivity or spurious touches. As an example, see http://...
8
votes
1answer
3k views

USB 3.0 Hub shield connection

This is about the seemingly controversial shield to ground connection. The system is basically a body-worn intel-based computer, powered by a battery. Two USB 3.0 (or 3.1 Gen1) cables come out to a ...
2
votes
2answers
1k views

Generating high voltage (100V+) from 5V USB supply

I am using an USB port as a power supply. Is there a way I can take the weak 5V of a regular laptop USB and transform if to 100V+ while begin in the smallest package possible. I've heard of boost ...
16
votes
2answers
9k views

Does a self-powered USB device have to connect to VCC from the host port?

A self-powered USB peripheral provides its own power, so is it okay to connect just D+, D- and GND to the host port, or do you always have to connect +5V as well, then wait for the negotiation phase ...
6
votes
4answers
20k views

Building a USB charger for camping

I was looking into building a battery powered USB charger for camping. It occurred to me that car chargers are pre-built and run off 12 V. If I made a battery pack out of 8x 1.5 V batteries in series ...
7
votes
4answers
5k views

Reading data from a glucose meter

What would be the easiest way to read data from a USB glucose meter externally with a microcontroller. Not with the software that is provided. So how could I incercept the digital signals that are ...
4
votes
2answers
14k views

Arduino and Bluetooth USB dongle

Is it possible to use a mini USB Bluetooth dongle like in the following picture in order to improve my Arduino Uno, so it can comunicate with other Bluetooth devices? If it is, how can I do that?
0
votes
3answers
5k views

Powering 12V device from 5/9/12V powerbank [closed]

I recently bought the Litionite Falcon powerbank that has one of its outs designed for 5/9/12V. The 12V is at 1.5A which I thought would be enough for my 12V/0.8A camera. However, connecting the ...
89
votes
6answers
163k views

Why does micro USB 2.0 have 5 pins, when the A-type only has 4?

What is the extra, 5th, pin on micro usb 2.0 adapters for? Here is an image with the different connectors. Most of them have 5 pins, but the A-type host only has four. (source: wikimedia.org)
20
votes
4answers
5k views

USB Shield. To ground or not to ground?

I have been given a device at work to do some testing on. Basically an IC is becoming obsolete so I need to test a replacement part. Upon redoing the ESD checks, the device failed. I checked the ...
17
votes
3answers
6k views

Understanding USB Inrush Current Requirements

In relation to a previous question, I'm trying to understand the USB 2.0 requirements for inrush current. I understand the basic idea, but a few details are still unclear to me. The specification ...
13
votes
3answers
16k views

Identifying a USB charging port without enumeration

Is there a low cost and reliable way to identify a USB charging port? I plan to charge a device via the USB port. The USB Battery Charging Specification 1.1 allows 1.5A current draw when connected to ...
5
votes
3answers
5k views

Custom USB Impedance question

I'm looking at making my own USB cable for a project. The primary issue I'm having is that I'm getting a lot of capacitance in my cable between D+ and D- (400ish pF) which is enough to throw off the ...
13
votes
1answer
12k views

D+ and D- on USB

I'm making a small project which will take +5v from USB, What should I do with the D+ and D-, keep it open or short them to ground or do I have to add some components? I want to run ATMEGA168 and ...
7
votes
5answers
20k views

Sending signals to USB port using C

I want to send a simple 5V signal to the usb port. The USB cabel's insulation will be removed and connected to a relay which is connected to an electric door system. I think I should write this code ...
5
votes
3answers
5k views

Is it safe, or even possible, to draw more power from a USB port than it was designed to provide

One of the products being shown a CES is a dongle intended to let you charge a tablet from a laptop USB port that normally wouldn't work because it didn't provide enough power. The CNET writeup ...
5
votes
1answer
2k views

USB composite device driver

I am wondering if it possible to create a USB device (in following the device) composed from a custom circuit (eg arduino) and ...
4
votes
2answers
7k views

Implementing a class-compliant USB MIDI device

I'm building a device that I want to communicate with a computer using MIDI over a USB connection. There are lots of USB MIDI devices that are class-compliant and thus require no special drivers, ...
11
votes
2answers
5k views

Connecting two “USB C” hosts, what happens?

Up until USB C all the USB connectors were carefully chosen so that two hosts could not be plugged into each other. With USB C both the host and device have the same connector. With this setup it is ...
5
votes
3answers
2k views

Does USB Power Delivery handle USB cables that are not PD-aware?

I think USB-PD is still fairly new (I don't know anyone who owns a device that has it) but reading wikipedia and info sites does not make it clear what happens when you use a cable that is out of spec ...
3
votes
5answers
3k views

Powering a breadboard with USB

I've recently become quite interested in building small breadboard computers. I've been reading a site that seems to be aimed for beginners, that builds a simple breadboard computer using the 6502 and ...
3
votes
2answers
7k views

How does USB Power Delivery work with voltages above 5V without damaging 5V peripherals?

I have a Qi wireless charging pad for my phone, powered via a micro-usb port. The markings on it indicate that it will accept the typical 5V that nearly every USB port provides, or it will accept 9V ...
8
votes
1answer
4k views

7 port powered USB hub backfeeding to my PC

I just bought two 7 port usb hubs: LogiLink UA0124. Just to run into a strange situation. I did some servicing to my PC today and disconnected the main power cord from the PSU. Only to find out that ...
7
votes
2answers
3k views

How to measure the quality of a USB charging cable?

I have a set of USB cables (data and charge) and I noticed that, for a given charger, the charge time differs by cable. What would be a good way to measure the charging fitness of a USB cable? ...