How to Build a USB-powered Device
In this project, we will go over how to to build a USB-powered electronic device, which is a device which runs on power from a USB port.
You've probably seen many of these devices and they're growing and becoming more and more popular
by the year. Many people now, the vast majority, own laptops and computers which come with USB ports. It's becoming
very convenient for people to plug their electronic devices into their computers and have the device run off the power
from the computer. Common devices which are USB-powered today are phone chargers, ipod chargers, external hard drives,
even blankets come heated by USB power. Check out this link on
USB heated blankets.
Above you can see all the electronics devices which are powered by USB ports.
How to Build Your Own USB Device
So if you want to create your own electronic device powered by a USB, how do you do it?
It's actually a simple thing.
Let's go over how a USB port works in a computer and the amount of power it gives off. This will explain how the process works.
Below is a standard USB port seen in most laptops and computers.
When a USB device plugs into the USB port, the USB port outputs approximately 5 volts of power. This means that 5 volts of power travels from the computer's USB port through the USB and into the electronic device which consumes it. This is 5VDC, meaning DC voltage. USB ports output DC voltage, not AC.
So when you are designing a circuit which will be powered by USB, it must consume 5V of power or less. If it needs more voltage, then USB is not going to work. There is a case where you can let a device be powered by 2 USBs and let the voltage add in series, which will give 10 volts (we'll discuss this later in the article); however, most people and consumers are not going to want to plug into 2 USBs to power a device, so a device like this may not be liked. But they do exist on the market. That USB heated blanket I was speaking about earlier is such a device that can utilize 2 USBs. When one is plugged in, it consumes 5 volts of power. When 2 is plugged in, it consumes 10 volts of power, so that the blanket can be powered more and give out even more heat. But first we'll talk about one USB.
Back to connecting it. Now that you know that USB ports give out 5VDC of power and that the electronic device you're creating doesn't need that much power, you can use a USB to power it. If 5V is too much power, this is not a problem, you can always use a voltage regulator to regulate the voltage down to whatever desired voltage you want and then just use a heat sink to dissipate any excess heat from the circuit.
Internal Construction and Wiring of a USB
A USB port is a port that has 4 internal connections:
|1||Positive DC Voltage|
|2||D- (Data pin)|
|3||D+ (Data pin)|
|4||Ground (for DC Voltage)|
The USB port has two internal connections for the DC voltage, one for positive and the other for ground. And it also has two internal connections for data.
The data pins of a USB, you don't have to worry about. Data is only for when the computer and the USB device need to communicate data with each other. If you've ever plugged in a USB device before such as a flash drive or external hard drive, you've probably seen a pop-up come up, saying that this device is a Toshiba or Canon device. Software is now successfully installed. If you're just using a USB for power only, the only pins you need to use are the power pins, which are the two pins for positive and ground of DC voltage.
Now that you've seen and now know the internal wiring of a USB, let's go now to the USB connnection itself.
The USB, like the port, has the same 4 connections, as can be seen below:
When you connect the USB to the device which you are powering, you just have to connect (most likely, solder) pins 1 and 4 to your circuit to power it. Pin 1 is positive DC voltage and pin 4 is ground.
So if you're connecting a USB to power a 3V motor or some electronic device, it would
be connected like this:
And this is how you can create USB-powered device.