HOPE Lab 3: USB Charger Part 1

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 a battery holder on the PCB

  • We want to convert a 3 AA battery DC supply to a 5V DC supply. The output load is unknown and may change over time.

  • 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. The former can occur while starting the vehicle and during normal operation, and the latter when replacing the battery or due to user error.

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

  • Minimize cost. It's always optimal to design a cheaper product while balancing the trade-offs of quality and cost.


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 switched on

  • 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

our USB charger circuit

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 part distributors such as Digi-Key and Mouser. Feel free also to use online part search engines such as Octopart
  • Pick parts according to the listed details below. For all parts chosen, make sure to check their datasheet!
  • Create a Bill of Materials. A BOM is a spreadsheet or table with the quantity, value, Manufacturer part number, distributor part number, cost, and other information about the parts you decide to use. For this BOM, please use the info categories mentioned in the previous sentence.

The "Value" mentioned above for datasheets usually refers to passive values, such as the resistance value 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.

sample BOM

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)

How to search on DigiKey

  1. Let's take a look at the steps required to narrow down your search when starting from scratch. First go to the DigiKey website.

  2. 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.

  3. 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). So before it becomes too overwhelming, let's break it down and see what we really care about. It turns out we really only care about two categories, connector type and gender.

  4. 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). Also remember to check the 'In Stock' option under Stock Status. Now click 'Apply Filters.'

  5. Now we should have narrowed down our search to around 275 results, but how do we select the final component? 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.

  6. You should now have your final USB-A receptacle chosen. Click on it's Digi-Key part number for more information on the component and fill out the appropriate columns in your BOM.

Digikey connectors

USB Charging Passives

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. In the third paragraph of part 4.4.1, which current line must the load curve cross?

  3. What is the value of I_DEVCHG?

    • Therefore, how much current must your charger be able to supply without shutting down if your charger must support more than 2V? 1.5A
  4. How should your charger connect the D+ and D- pins to indicate that it is a charging port? 200 Ohms.

Switching Regulator

The switching regulator had been decided as the voltage conversion method.

  • 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 safely output 0.5A, which is the minimum USB charging current. We are running the converter on the edge of its limit; normally you want some derating so that the output current max is at least 2x 0.5A, or 1A.
  • Input Voltage: 3.6V to 4.8V. Switching Regulators will have a defined input range.
  • Switching Frequency: above 100kHz

Reverse Polarity Protection

There are many ways to protect a circuit from being connected in reverse. One recommendation is to use a Schottky diode. Remember that more complex designs will most likely cost more, and that your time isn't free!

To be automotive-rated under ISO 16750-2 standards, the reverse protection needs to withstand 14V of reverse voltage for at least 60 seconds. According to ISO 7637-2 standard automotive devices also have to be able to withstand short ~150ns pulses of approximately -100V. This second case is unimportant as diodes can recover from short pulses beyond their reverse breakdown voltage.

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

There are many ways to protect a circuit from being connected in reverse. Another recommendation is to use a PMOS since we are in a battery constrained environment and the power loss in a diode (since diodes have a voltage drop) can be very detrimental to battery life.

How it works: https://hackaday.com/2011/12/06/reverse-voltage-protection-with-a-p-fet/

When choosing a PMOS, it needs to have a Vgs rated for the battery voltage, and similarly for the Vds.

PMOS polarity protection


To protect the switching regulator from large transient voltage spikes, we recommend using a polyfuse, that is, a self-resetting fuse.

  • Current Hold: 2A. This is the maximum current such that the fuse will not trip.
  • Current Trip: Less than 4A. This is the minimum current such that the fuse will definitely trip.
  • Rated Voltage: At least the input voltage for the charger



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.

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 (like ESR)?

Once all of these questions have been answered for each passive needed, please
add the passives to your BOM.

Schematic Drawing

Now that you've blocked out your system and picked your parts, you're ready to start drawing the schematic. Open KiCad and draw a schematic for your USB charger.

Many parts, including R, C, and L, come in the _Small varieties, which simply are smaller, more compact symbols, and may help make your schematic look neater.

Feel free to use these resources for standard component designators and common component symbols

For any schematic design, it is a good idea to start with the core components/submodule in the circuit. In the case of our phone charger, what is the core submodule/component?

Schematic Symbols

You might notice that KiCad's symbol libraries may not have all the parts you
want to use. For each symbol that is missing, you can do one of three options described below.

For this lab, please use option A for your regulator IC and option B for the USB-A receptacle.

A. Create a symbol yourself from the datasheet (it will help to have the component datasheet open and ready to go before starting). Follow along in these slides from the lecture.

B. Download, import, and check a symbol from an online service

  1. Go to the DigiKey website and download the DigiKey library.

  2. In KiCad go to the 'Symbol library editor' application and click Preferences → Manage Symbol Libraries → the Global Libraries tab → Browse Libraries... and go to the location where the DigiKey library was downloaded. Go into the digikey-symbols folder and select all of the .lib folders.

  3. Once the library has been added find the correct library that contains the USB-A connector.

  4. It is EXTREMELY important that you verify that the USB-A connector symbol matches the datasheet

    • Oftentimes, component libraries downloaded from the internet are
      incorrect and it is your job as the designer to verify that the symbol
      is what you want.


Make sure to keep your schematic and your BOM intact for future lab assignments.

For the actual checkoff:

  • Describe how your turned the provided project specs and diagram into your KiCAD schematic
  • Show your BOM to an instructor and walk through your part choosing process. The instructor may ask to look at the datasheets, so please have them ready in your BOM
  • Compare the part symbol you made and the one you imported to their respective datasheets. Did you have to make these symbols if we did not explicitly ask you to?
  • Make schematic look like the block diagram using the single-page schematic blocking method as talked about in the Design Abstraction lecture. Walkthrough how the individual components fullfil the abstracted version's block functions.

Next Steps

After completing your schematic, you should be almost ready to continue onto the board layout. Assign footprints according to the parts you selected.

Cannot find the footprint you need? You can make you own or import one from online. (note that the page has broken image links at the moment)

You should note that we have not given any kind of considerations for the layout. Though, maybe there are some things you can already start to think about, such as the fact that this PCB will be paired with 3 AA batteries.

You can move on to starting your layout, but note that you may be required to change things next week!