USB Charger: Components

The Big Picture

Your charger acts as a USB upstream device that supplies power to a downstream device being charged. In order for it to be functional and reliable, your charger needs to:

  • Provide physical power connectors. The output needs to be a USB-A female receptacle, and the input should be able to connect to wires from a battery holder.

  • We want to convert a 3 AA battery DC supply (3.6V - 4.6V) to a 5V DC supply. The output load is unknown and may change over time (i.e. your phone chooses how much current to draw by effectively changing the output "resistance").

  • Indicate to the downstream device that it is a "dedicated charging port (DCP)". If you don't, your device will charge slowly.

  • Protect itself and the downstream device (device being charged) against high voltage transients and voltage reverse polarity.

  • Protect both the input and output from short circuit conditions.

  • Minimize cost. It's always optimal to design a cheaper product with equal performance, if possible.

Specifications

The following is a summary of the general specs and design requirements.

  • Input voltage of 3.6V to 4.8V (3 AA).

  • Output 1x USB charging port compliant with USB Battery Charging 1.2.

  • Green LED indicating that the charger is powered.

  • Some form of protection circuitry as mentioned in The Big Picture. More on this later in the lab.

  • Relatively small form factor and be mechanically capable of attaching to a 3 AA battery housing.

  • Minimize cost.


Choosing Parts


Abstract Schematic (block diagram) of USB Charger

With the general specs in mind, it is time to "build" a circuit. Luckily, a high-level schematic diagram following the general specs has been already created for you, but the parts needed to implement it have yet to be chosen. Your job is to:

  • Find out what is avaliable: search DigiKey. For other projects, Mouser and online part search engines such as Octopart may be useful.
  • Pick parts following the order below. As you do this, create a Bill of Materials (BOM). A BOM is a spreadsheet or table with the quantity, value*, Manufacturer part number, distributor (e.g. Digikey) part number, cost, and other information about the parts you decide to use. For this BOM, please use this template!

*The "Value" column in datasheets usually refers to passive values, such as the resistance of a resistor or the capacitance of a capacitor. Feel free to leave it blank for other kinds of components, or use it however you'd like. The "Reference Designator" column refers to the annotated symbol reference, feel free to leave it blank until the schematic has been finished.

A note on packaging

We recommend selecting the Packaging filter while searching for components in this lab, which is not the form factor the component comes in (that is called Package/Case). Packaging is how the distributor organizes and ships your components; Tape and Reel, Digi-Reel, Tape and Box all have minimum quantities in the thousands and should be avoided (they are types of packaging that allow for components to be fed into machines for assembly). For hobbyists, Cut Tape for small parts and Bulk/Tube/Strip (typical for larger parts) are much better. You may see other packaging names; search the internet to find out more!


Suggested Packaging (not Package/Case!) filters

Reel of components

Understanding USB

A USB Type-A female receptacle has 4 pins:

Pin Name What's it for?
1 VBUS Put ~5V here
2 D- Charger detection
3 D+ Charger detection
4 GND Put ground here

example of a USB Type-A female receptacle (VCC = VBUS)

Digikey: USB Receptacle

  1. What component are we looking for? A USB-A receptacle, which is a type of connector. This means we need to head to the Connectors, Interconnects section and look for the correct category. Click on the category and it should take you to a list of all of the parts in that category.

  2. Now we are at the results page. There should be approximately 3,000 products to choose from and 19 categories to filter the selection by (that's a lot).

  3. As a preliminary step, check our standard filters: In-Stock, Datasheet, and Exclude Marketplace ("Marketplace" components are sold by third parties often with long lead times and high shipping costs). Part Status: Active is also good to include, ensuring you don't use discontinued parts.

Note: Due to the global parts shortage, we will be lenient about out-of-stock parts for this lab. Of course, for your project you must only choose in-stock parts. You should be able to find in-stock components, though.

  1. It turns out we mostly only care about two categories, connector type and gender.

  2. Select the correct connector type and gender filter (Hint: if you're unsure look above again to see what type of part we are looking for).

  3. Now we should have narrowed down our search to around 275 results, but how do we select the final component? Try filtering by current rating * (see earlier in this lab) and the mounting type. We want a "right angle connector" which allows us to plug in parallel to the board (see image above), as opposed to a "vertical connector", which sticks out normal to the board.

  4. Keep in mind that one of our specifications is minimum cost. So from here we can find the 'Unit Price USD' column and if you click the up-arrow underneath, it will sort all of the results by cost.

  5. You should now have your final USB-A receptacle chosen. Click on its DigiKey part number for more information on the component and fill out the appropriate columns in your BOM.

*Feel free to set the current rating to 2A for now, you'll calculate the current rating below.


Digikey connectors

USB Charging Spec

Read Section 4.4 "Dedicated Charging Port" in the USB Battery Charging Specification, Revision 1.2. Make sure to pay attention to the third paragraph in part 4.4.1 "Required Operating Ranges."
Answer the following questions:

  1. What is the allowable range of output (VBUS) voltages from your charger?

  2. What is the maximum value of I_DEVCHG? Hint: Look at Table 5-2

    • Therefore, how much current must your charger be able to supply without shutting down if your charger output must stay above 2V? Hint: Look at Figure 4-2
  3. If a device is drawing 0.25A, what is the minimum voltage the charger can output? Hint: Look at Figure 4-2

  4. Your charger should connect the D+ and D- pins to indicate that it is a charging port. These pins can be connected in a variety of ways, but we'll simply short them together. See Figure 2 in this application note for details on ways to configure this.

Reverse Polarity Protection

There are many ways to protect a circuit from being connected in reverse. One recommendation is to use a Schottky diode. A schottky diode is a special kind of diode with a low forward voltage, which is important for minimizing wasted energy (remember, P=IV, and an ideal diode would have V=0).

When choosing a protection diode, it is important to look at the diode's type, current rating, forward voltage, and DC reverse voltage.

First, navigate to the diodes:


Navigating to Diodes on Digikey

Now check our standard filters: In-Stock, Datasheet, Part Status: Active, and Exclude Marketplace.

Select the Schottky type (ignore the "Reverse polarity" category, those are irrelevant specialty parts)

Our requirment for forward voltage here is no more than 400mV at 3A. This means that at 3A going into the regulator, we'll experience a 0.4V drop across the diode (at lower currents, this will be less). This drop is actually quite problematic, but we'll ignore it for later parts of the lab (fuse sizing) for convenience.

You should be able to find a reasonable diode now sorting by cost and making sure the package is hand-solderable.

Add the diode to your BOM.

Keep in mind that there are more solutions that what we've listed here with respect to reverse polarity protection; you may want to explore using a FET for higher-efficiency designs, for example.

Fuse

To protect the switching regulator from large transient voltage spikes or dead shorts, we recommend using a polyfuse, aka PTC resettable fuse. This device heats up when high currents pass through it, increasing in resistance and thus effectively "opening" the circuit. After some time, the polyfuse will cool down and allow current to flow again.

To start, navigate to the PTC resettable fuse category:


Navigating to Fuses on Digikey

As always, we'll need to filter things down a bit.

After selecting the Active, In-Stock, Datasheet, and Exclude Marketplace filters, we have about 2,000 parts.

Fuses have two major parameters:

  • Hold current (Ih): the maximum sustained current for which the fuse is guaranteed not to trip. For us, this requires a bit of math.

    • Our regulator can output 1.5A out at 5V. Assuming the regulator has an 80% efficiency, use this power conservation equation to calculate the needed current on the input side: V_in * I_in * efficiency = V_out * I_out.

      Hint: in the worst (max input current) case, the input voltage is our minimum, 3.6V.

  • Trip current (It): Let's set a maximum trip current of 5A; anything higher risks serious damage to our circuitry. You should see about 30 parts that fit these criteria. Choose based on package and cost.

Light-Emitting Diodes (LEDs)

LEDs are typically not covered in great detail in lower-division classes. As the name implies, LEDs are a type of diode, a semiconductor device. Like other diodes, LEDs have a highly nonlinear relationship between voltage and current! Unlike resistors, they do not obey Ohm's law (V=IR, where V/I = constant R). Instead, you can think of them as having a highly variable resistance (V/I slope).

In the plot below, we can see that applying 1.5V to the LED will cause almost no current to flow; however, applying more than 2.3 or 2.4V will instantly burn out the LED (infinite current causes things to heat up rapidly).


Disturbingly non-linear V-I plot

Since we can't (cheaply) provide precisely 2.2V, we generally use a resistor in series with the LED to "drop" the remainder of the voltage from a typical (5V or 3.3V) supply in a stable manner. Without this, even slight variations in voltage would easily destroy the LED, as the current would spike!!


Simple LED circuit with a series resistor

In order to use an LED, we will follow this procedure:

  1. Pick a desired current. This corresponds to the brightness; while every LED is a little different, for an indicator around 10-15 mA should be visible (more can be painful to look at).
  2. Find the forward voltage at the current. In DigiKey, manufacturers typically use "test currents" of around 10-20 mA to calculate the "nominal forward voltage" listed in the search filters. In reality, the forward voltage will differ based on how much current is running through the LED (see above)!
  3. Figure out what size resistor we need in series with the LED to ensure exactly the desired current will run through the LED with the given supply.

As an example using the graph above and a supply of 5V:

  1. We pick 10mA.
  2. The forward voltage appears to be around 2.2V at 10mA.
  3. If we have a 5V supply and a drop of 2.2V across the LED, there will be 2.8V across the resistor in series with the LED. Using V=IR, we need a resistance of R=2.8V/0.010A = 280 Ohms!

We will start with the LED Indication - Discrete category; there are several categories of LEDs, but this one works well for indicators and has many parts.

Choose the standard general filters (In-Stock, etc.).

Pick using your newfound knowledge about forward voltage and test current, and confirm your choice by checking the datasheet. We also require that your chosed LED have a SMD footprint, not through-hole. Be sure to also choose an appropriate resistor near the value you calculated earlier with an SMD footprint too (we recommend choosing either 0805 or 0603 (imperial) SMD sizes for both the LED and resistor, but you'll notice LEDs often come in larger sizes too).

Switching Regulator

The switching regulator has been decided as the voltage conversion method. Your job is to find an appropriate switching regulator for this application.

  • Output voltage: 5V. Must be able to be set up to output 5V. This means adjustable output types are ok so long as the necessary feedback network for a 5V output is implemented.
  • Output Current: Must be able to output 1.5A, which is the desired USB charging current. Technically, the spec allows for significant voltage "droop" at 1.5A, or even chargers that drop below 2V before sourcing 1.5A. However, the behavior of switching regulators exceeding their max current limits is not always consistent.
  • Input Voltage: 3.6V to 4.8V. Switching Regulators will have a defined input range. Most likely the only limit you will need to worry about is the lower limit of 3.6V as the upper limit will probably be much higher.
  • Switching Frequency: above 100kHz. The non-DC frequency content of the regulator output is beyond the scope of this course, but there's plenty to explore here if you're interested.

We have two options that we have chosen for you that will meet all the above requirements and have the ability to output more current than we have set as the requirement above:

  • LTC3872
  • TPS61023

You are also free to look for other regulators that meet the above requirements. Search up these parts and take a quick look at their info pages on Digikey. We will hint that one of these will be easier to use for this lab than the other, so we recommend looking at both parts' datasheets.

Passives

Like we talked about in lecture, many ICs will have accompanying passives associated with that component. This will generally be in the "Application Circuit" section of the IC datasheet. Some datasheets may even include recommended passives (including part numbers) to use. To answer the below questions, skim and look through the entire datasheet for the regulator you chose.

For the the LTC3872 part we listed above, the example circuit on the first page is a good reference for what we want to build. For the TPS61023, the 12th page is what you want to look at.

Depending on your answers to the above (mainly the regulator you chose and the USB connection between D+ and D-), you'll need some passive components like resistors, capacitors, and inductors. For each component:

  • What value(s) do you need?
  • In what form factor?
  • With what kind of component tolerances?
  • With what kind of component parasitics? A parasitic is a property of a component that is non-ideal, e.g. the resistance of a non-ideal inductor or the capacitance of a non-ideal resistor. For this lab, this is really only important for the inductor (DC Resistance, DCR) and output capacitor (Equivalent Series Resistance, ESR) for the regulator. The datasheets will explain about these.

Once these questions have been answered for each passive needed, add them to your BOM. As always, when searching on Digikey, remember to apply the standard filters:

In-Stock, Datasheet, Part Status: Active, and Exclude Marketplace.


Some tips for finding passives:

Resistors and Capacitors

A lot of the time if you are looking for general resistors and capacitors (nothing that needs high power dissipation or ultra high-precision/stability), once you find one value of a component it's easy to keep finding other values from the same family. Here's an example for a resistor:

Let's say you are looking for a 1kohm resistor in an 0603 package and find this part, the RC0603JR-131KL. Notice that in Digikey that this part is from the RC_L family and that if you click on that you are directed to all the parts in the family. This can make sorting down parts in Digikey much faster. Also note that the footprint and value are in the part name (0603 and 131K, respectively, though the value may be confusing for this particular part); if you just change the right sections of the part name many times you'll just get the part you are looking for immediately (and Digikey search will often suggest the right part number even if you type it wrong).

Inductors

Inductors are a lot less commonly used than resistors and capacitors, but you'll almost always find one in a switching power circuit, such as our application here. You'll want to search in Fixed Inductors:


Fixed Inductors category on Digikey

The three important search factors for inductors being used for this power application are the inductor value (L, in Henries), saturation current, and DCResistance. Follow the recommendations in the datasheet for the part you've chosen for each of these factors (they cover the math, but for a more thorough understanding of calculating inductor requirements, take EE 113 Power Electronics!). For example, the TPS61023 recommends using an inductor with 1 uH value, 9.0 A saturation current, and a DCR of sub 15 mOhm (ideally, DCR is 0, so the general idea you want is to minimize the DCR in the inductor you find). As for footprint, inductors are really just packages of coiled wire, so unlike resistors and capacitors, it is more common to find inductors in weird, non-standardized packages described by their dimensions. For this lab, try to find an inductor around 4mm x 4mm (there are a lot of very close dimensions, try searching with all of them).


Lots of ~4mmx4mm inductors...

Lab Checkoff

Make sure you have...

  • Answers to the USB Charging Spec questions
  • A BOM with:
    • USB receptacle
    • Fuse for overcurrent protection
    • Schottky diode for reverse polarity protection
    • SMD indicator LED and resistor
    • Switching regulator (DC-DC power conversion)
    • Additional components/passives related to the switching regulator (capacitors, resistors, indutors, possibly a transistor)
    • You do not need to worry about input power from the batteries (we will use a standard pin header)