How to Build a USB-powered Device

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.

USB-powered devices

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.

USB port

When a USB device plugs into the USB port, the USB port outputs approximately 5 volts. This means that 5 volts travels from the computer's USB port through the USB and into the electronic device which consumes it. This is DC voltage. USB ports output DC voltage, not AC. All USBs (of all different specs) output 5V from their ports. What changes for the different specs is the maximum current that the port can handle. USB 1.0 and 2.0 specs are capable of handling (outputting) 500mA of current, while USB 3.0 spec is capable of handling (outputting) 900mA of current.

Power is a product of voltage x current (P= VI). Therefore, the maximum power that a USB port can output changes from USB 1.0 and 2.0 specs to USB 3.0 spec. Again, USB 1.0 and 2.0 specs are capable of delivering 5V at a maximum of 500mA. This means that USB 1.0 and 2.0 specs can handle power up to 2.5V (5V * 500mA= 2.5W). USB 3.0 spec has increased capability in terms of the current it can handle. Therefore, USB 3.0 spec can handle current up to 900mA. So, it can handle 4.5W of power.

When determining whether a USB is a good or suitable way to power a device, the most important thing is examining the power consumption of the device the USB will power.

Why is power so important when powering a device by USB?

The reason is because by choosing that you want a USB to power a device, you must know whether it is sufficient or insufficient for powering the device.

If the power from the USB is too low, the device cannot be powered on.

If the power consumed from the USB is too great, USB port can be damaged.

If the voltage rating of the device is lower than the 5V that the USB port outputs, the device can be damaged.

So let's go over all scenarios now below in more depth. p id="para1">Let's say a device needs 12V in order to operate. Well, the USB only supplies 5V. So it would be insufficient for powering the device, and the device will not turn on.

Now let's say a device is rated for 5V and it needs 200mA, the USB works perfectly, because any USB can supply 5V and 200mA of current.

Now let's say a device needs 5V and 1.5A of current. This equals a power consumption of 7.5W. This is what the device needs in order to power on. Know that power is constant to a device. It will need to consume whatever power it is rated for in order to work. So in the case above again, its power rating is 7.5W. Let's say we plug this into any USB spec. It will take the 5V that the USB supplies and pull out from the USB port 1.5A to get the 7.5W it needs to operate. However, this exceeds the maximum current that the USB port can handle. Thus, plugging this device into a USB port runs the risk of damaging and possibly destroying the USB port. This is why a designer must be calculated in choosing a USB to power on a device.

If a device is rated at a voltage lower than the 5V that the USB outputs, this runs the risk of damaging the device. This is why if you use a device that is rated for lower than 5V, you should some type of voltage regulator in order to limit the voltage (in order to not damage the device).

So knowing the power requirements of the device is crucial to knowing whether a USB is compatible to powering it.

Using a USB to power a device that has a higher power rating than the USB runs the risk of damaging the USB port.

Using a USB to power a device that has a lower voltage rating than the 5V supplied from the USB (without voltage regulation) runs the risk of damaging the device.

Internal Construction and Wiring of a USB

A USB port is a port that has 4 internal connections:

USB port wiring

Port Number Description
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, or that the 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:

USB wiring

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 some electronic device, it would be connected like this:

USB powering a motor

And this is how you can create USB-powered device.

HTML Comment Box is loading comments...