USB Power Injector

USB Power Injector allows for a way to power up USB 2.0 devices from a lab power supply, while allowing data transfer from host to device.

Similar projects worth following
When powering devices from a standard USB 2.0 port, either from a PC or from a standard USB hub, you never have the niceties that an adjustable lab style power supply has. During development that means you can’t set precise voltage and current limits. In the best case scenario, that means you can’t test under/over voltage protections. In the worst case, you run excessive current trough your device and you don’t even know that’s happened.
USB hubs tend to have overcurrent protection, but most don’t send the overcurrent event to the operating system.
That can cause confusion and loss of time for a hardware engineer during development or to testing personnel during production.

This project allows a way to conveniently power a USB2.0 device from a lab power supply and thus avoiding the problems described above.

Schematic Description


The schematic for this project is quite simple. 

There are two USB connectors. USB A - for a connection to the device under test and USB B - for a connection to the host. The two USB connectors are connected with a differential pair as denoted by D_P and D_N.

The USB A connector gets its power from the two 4mm banana jacks - one black and one red, in order to denote polarity. This allows the device under test to be powered from an external lab power supply with just 2 standard banana to cables, like the once showed in the photo.

Banana to Banana Cables

PCB Description

PCB Layout

The layout is equally simple. In order to route the USB traces at 90ohms impedance, the JLC7628 stack up was used. The traces were routed with a spacing of 0.127mm and width 0.2mm, as per JLC's impedance calculator. Layers 2 and 3 are ground plains.
Yes, this board work just fine as a 2 layer board, since the traces are short, but 4 layer boars are cheap and i wanted to get the required 90ohms impedance, as specified in the USB2.0 standard. 

I designed the silk screen to be as descriptive as possible for anyone using the board. It describes both the power path and the data path.

Full KiCad files for the project.

x-zip-compressed - 832.81 kB - 08/20/2022 at 19:17


  • 1 × PCB Electronic Components / Misc. Electronic Components
  • 1 × USB A Connector
  • 1 × USB B Connector
  • 1 × Red Banana Jack
  • 1 × Black Banana Jack

  • Exiting news and a cool experiment.

    Nikola Manolov10/06/2022 at 08:57 0 comments

    First of all the exciting news.

    I'm extremely happy to announce that I have started a CrowdSupply campaign in order to get the USB Power Injector to people who would find it useful. If you are interested feel free to check it out at CrowdSupply. Now to the experiment

    Fast dynamic current measurements

    Photo of the setup.

    For some measurements using just an amp meter to capture current draw may be insufficient. Let’s say we are trying to capture the maximum current drawn by a Wi-Fi module while it’s making a HTTP request.  Let us explore this exact task using a module with ESP8266 Wi-Fi enabled microcontroller, Micsig CP2100B current probe and a scope. 

    The module is programmed to make an HTTP request every second.

    Capture 1 at 100uS / division
    Capture 1 at 100uS / division
    Capture 2 at 100uS / division
    Capture 2 at 100uS / division
    Capture 3 at 500mS/division.
    Capture 3 at 500mS / division.

    As we can clearly see, capturing the maximum current draw is trivial. As well as capturing how often and for how long the transmitter is turned on. This could be of great help when developing battery powered devices, where minimizing the power draw is paramount. Since the USB Power Injector uses standard 4mm banana plugs, it would be equally easy to use a different kind of current probe. For example it would easily interface with popular uCurrent Gold developed by Dave Jones. 

  • Testing a product’s voltage range

    Nikola Manolov10/01/2022 at 20:00 0 comments

    According to the USB 2.0 standard, the USB Vbus voltage can range from 4.4V to 5.5V. A USB Device needs to be able to work in at least that range and probably lower due to the voltage drop in the cables. With the USB Power Injector, that test is trivial.

    For this test I have selected three devices:

    - The Arduino Nano. On it the VBus is connected directly to the Atmega328.

    Arduino Nano — Arduino Official Store

    - STM32F429 Discovery Development Kit. On it VBus goes trough a 3.3V low drop linear regulator before going to the STM microcontroller.

    STM32F429I-DISC1 STMicroelectronics | Development Boards, Kits, Programmers  | DigiKey

    - A USB powered single board computer I developed for work. Unfortunately, I can't go in to details on it, but it uses DC-DC convertors that drive the main processor.

    The Arduino and the single board computer will be idling in an infinite loop. The STM Discovery will be running the default demo application.

    All three board will be tested at different voltages in order to determine if they are function correctly. While I’m at it, I’m going to measure the current consumption of each device at each voltage in order to compare each power supply scheme characteristics.

    Current Draw Table
    Current Draw Table

    All three devices worked in the voltage range from 4.4 to 5.5V. As is usual for boards powered by linear regulators, the supply current for the STM discovery stays more or less constant, regardless of the voltage. Likewise, the DC-DC convertor powered single board computer keeps the power draw constant, regardless of the supply voltage. Since the Atmega328a was not powered by a constant voltage, its current and power draw had a clear rising trend, if we increased the voltage. Knowing the behaviour of common power supply schemes can help us track problems in products we are developing, if we are not observing them due to a failure in a component or an error in the design. 

  • Basic usage and slow dynamic current measurement.

    Nikola Manolov09/23/2022 at 11:42 0 comments

    Experiment Block Diagram
    Experiment Block Diagram

    In the first test we are going to explore a basic use case for the USB Power Injector. As shown in the video, we have an Arduino Nano connected to a PC running the Arduino IDE. At the same time, the Nano is powered by a benchtop PSU and we can set its supply voltage and a protective current limit. This setup allows for full control of the Arduino, both in terms of how we power it and how we communicate with it. A new firmware can be uploaded, as shown in the video (I change the blink time). It also allows for communication via the virtual COM port.

    This setup also allows for some slow dynamic power measurements. A milliamp meter is connected in series with the Arduino, in order to measure the supply current more accurately. When the Arduino LED is off, the board draws 27.2mA and when it’s on it drawn 32.5mA. This functionality can be quite useful to roughly determine what state a board is. For example, if a wireless transmitter is off, the product under test will draw less current. For general purpose development work I usually skip the amp meter and just use the amp meter embedded in the power supply. 

View all 3 project logs

Enjoy this project?



modemjunki wrote 10/06/2022 at 17:30 point

Hello Nikola,

What value is used for C1 and C2?

  Are you sure? yes | no

Nikola Manolov wrote 10/07/2022 at 07:04 point

Hello modemjunki,

TLDR - I left C1 and C2 intentionally as Not Fitted.

Detailed explanation of the reasoning -
If you add more capacitance to the input of a device, you can make that device perform better. If a device has been designed poorly and would need more input capacitance, the caps on the Power Injector could mask that problem.
I added then in the schematic in case someone uses really long power cables and wants to compensate the cable inductance with a bit of capacitance on the board.

I hope that answers your question. If you have any others, feel free to ask.
Have a nice day.

  Are you sure? yes | no

modemjunki wrote 10/07/2022 at 13:38 point

Thank you for the clarification!

  Are you sure? yes | no

drcyberg wrote 09/24/2022 at 05:12 point

Hi Nikola!

On your project missing from schematics galvanic isolations ;-)

  Are you sure? yes | no

Nikola Manolov wrote 09/24/2022 at 07:51 point

Hi drcyberg!

Thank you for your comment. While I was designing it, I did consider galvanic isolation. My reasons to exclude it were the following 

- Most lab power supplies are not main earth referenced, so the probability of ground loop problems is small. 

- Simplicity. That way its only passive components.

- Modularity. Since it uses standard USB cables, one can very easily add an external isolator. 

I'm thinking of a later version with galvanic isulation, when some of the next generation USB isolators are in stock. I'm referring to Analog Device ADUM3165 and TI ISOUSB211. Older single chip solutions, like the ADUM3160, tend to not be user friendly, due to the jumpers. 

Have a great day.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates