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.
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.
A USB Type-A female receptacle has 4 pins:
|Pin||Name||What it's for|
|1||VBUS||Put ~5V here|
|4||GND||Put ground here|
How to search on DigiKey
Let's take a look at the steps required to narrow down your search when starting from scratch. First go to the DigiKey website.
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.
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.
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.'
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.
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.
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:
What is the allowable range of output (VBUS) voltages from your charger?
In the third paragraph of part 4.4.1, which current line must the load curve cross?
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
How should your charger connect the D+ and D- pins to indicate that it is a charging port? 200 Ohms.
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 [^rpp] ways to protect a circuit from being connected in
reverse. You have been recommended 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 [^iso1] standards, the reverse protection needs to withstand 14V of reverse voltage for at least 60 seconds. According to ISO 7637-2 standard [^iso2] 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. You have been recommended 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.
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.
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, keeping in mind the schematic best practices we talked about in lecture.
Here are some common symbols and their symbol names in KiCad:
|Component Type||Reference Designator|
|Integrated Circuit (ICs)||U|
Many parts, including R, C, and L, come in the
_Small varieties, which simply are smaller, more compact symbols.
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?
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 today's 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). You've already learned how to do this last lab, so this should be a breeze!
PCB ECAD libraries are collections of component representations, essentially. In KiCAD, there are two kinds of libraries: symbol and footprint. Symbol libraries are for the representations of the components that would go into a schematic, while footprint libraries contain the physical pad representations of the components that would go on the board itself. Simple reasons for this separation: many components, standard component packaging, and same component, avaliable in different packaging.
B. Download, import, and check a symbol from an online service
Go to the DigiKey website and download the DigiKey library.
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.
Once the library has been added find the correct library that contains the USB-A connector.
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.
- Oftentimes, component libraries downloaded from the internet are
Your fellow engineers use your schematic to try to understand not only how your design works, but also your design intent. Follow the schematic conventions discussed in lecture.
Ask yourself: If a stranger were to read your schematic, would they be able to follow what's going on? Follow the guidelines discussed in lecture to turn your circuit diagrams from last lab into a KiCAD schematic.
Run ERC and make sure there are no ERC errors. Electrical Rules Checker, or ERC, is a handy tool in most PCB EDA programs that sanity checks your circuit for electrical errors. Things like not connected pins, pins flagged as power not getting power, and multiple output pins driving one wire are caught and flagged by the ERC. One common issue is getting power errors, where you have a wire connected to a power input pin but there is no power source pin on the same wire. To fix this, you need to add power flags to the wire, and they can be found like a normal schematic symbol.
Fill out the fields in the title block, if you'd like.
Submit a lab checkoff on the bCourses site. You will need to submit a pdf printout of your schematic and your BOM.
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.
- Show your schematic to an instructor.