MAQS power board schematic capture
Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.
Desiging the MAQS system other boards
Learning Objectives
With your first schematic drawn and reviewed, it's now time to perform schematic capture for the second board in MAQS hardware node (aka the box).
From our MAQS system diagram, we can see that the hardware is broken into three boards. We're going to now design the power board, which is a variant of the MCP738731 breakout board that you have been using.
Power management subsystem
The power management subsystem has one primary goal: deliver power to the rest of the system. But when we drill down, it gets a bit more complicated.
In order to be portable, we decided to power MAQS via a LiPo battery. A single-cell LiPo battery has a nominal voltage of 3.7V (a bit more when fully charged, and decreasing as it discharges). We want to take that voltage and convert it to the 3.3V that the rest of the system needs. In some cases it's not absolutely necessary to do so -- this voltage conversion (with a voltage regulator) takes extra parts and space and thus cost. However, we want to avoid downstream issues that can arise from a varying supplying voltage, so we'll incorporate a 3.3V regulator.
But eventually the battery will discharge, so we need a way of charging it back up. So we need some sort of integrated circuit to charge the battery. LiPo batteries can be dangerous, so specialized ICs are used to make sure the batteries charge at the right rate and to the right voltage.
But it gets even more complicated. If we're running off of the battery, and the battery gets too discharged, we'd like to be able to plug the system in, and have the system continue working, while the battery is charging. After all, when you plug your phone in to charge, you expect the phone's battery to charge and the phone to still work.
So really what we need is some magical IC (or ICs) to manage the power, directing power to/from the battery, to the system, from the wall, and so on. Sounds complicated.
Luckily, it's complicated but extremely commonly needed, and hence companies have created solutions to do this. These systems go under various interrelated name: battery management system (BMS), power management IC (PMIC), battery chargers, and so on.
We'll be using the MCP73871. This remarkable little chip (~$2!), includes "load sharing" (aka automatically directing power to the system or the battery), and battery charge management (charge the battery).
Basically, the system operates in a few different modes:
Power board functions
Now, we're mostly done, but the MCP73871 will be more than happy to send 5V to the rest of the system when under USB power, or the raw battery voltage when under battery power. So we will need to insert a regulator at the output of the MCP738731.
The regulator's job is to take whatever voltage comes in and output 3.3V, with the important caveat that the voltage coming in is >3.3V. There are basically two ways to do this: we could basically burn away the extra power and output 3.3V, or we could somehow transform the input voltage into 3.3V without losing (much) power. The first way is a linear regulator, the second uses a switching regulator. If we really cared about power efficiency, or we wanted to make a smaller voltage into a larger voltage, we could use a switching regulator. In our case, we think we'll have plenty of power for MAQS, and the linear regulators are inexpensive, small, and require very few external components.
So we'll use a linear regulator. To pick one, we need to know the range of input voltages, the desired output voltage, the current that we need to supply, and of course cost constraints, size constraints, etc. We have chosen the AP7361C-33E-13. This is one part i n the AP7361C family. The "33" means it outputs 3.3V. The "E" indicates that the package is an SOT223 (pretty easy to hand solder). It's inexpensive (~$0.50 at our quantitites), and readily in stock.
So now we can get a handle on what goes into this board:
- MCP73871, AP7361C-33E-13 (or AP7361C-33Y5-13)
- A 1x2 pin header (100mil pitch like usual) to serve as power supply input to the MCP73871
- Some connectors (enough to power the other boards in the system)
- Some status LEDs, and other external components (resistors, caps)
This board uses two nontrivial ICs with datasheets we'll have to reference for the schematic design. The MCP73871 in particular has a lot going on, so we'll break down some of the datasheet here.
Reference Circuit and Pin Descriptions
First, take a look at page 2 of the datasheet. It has a typical application circuit giving a reference design for many of the details of the schematic.
Section 3.0 starting on page 17 has a table of pin functions as well as written explanations of which pin does.
VPCC and TE For our simple MAQS system, there are a couple features of this chip we'll ignore: the voltage proportional charge control (VPCC pin, section 3.3) and the internal safety timer (TE pin, section 3.14). Read those sections of the datasheet to determine how to properly deactivate them.
SEL Pin The SEL pin (pin 3) determines the maximum output current that the MCP73871 will supply to the system and the battery charger when the board is plugged in to a power source. We'll be powering this board from a micro-USB connector, so we want this maximum current to reflect the USB specificiation.
CE Pin The CE pin (pin 17) is the "charge enable" pin. When this is high, the IC allows battery charging.
Status Pins
The MCP73871 has three output status pins that switch between a high-impedance output and a low voltage depending on the internal state of the IC. Table 5-1 on page 25 has a handy reference for what pin states correspond to the various internal states.
For our MAQS power board, we want to be able to easy tell the state of these pins for easy debugging. In your paper schematic, add status LEDs to each of these pins.
Thermistor
According to section 3.15, the MCP73871 expects a 10k negative temperature coefficient (NTC) thermistor to run between pin 5 and GND.
Many LiPo batteries have this thermistor built in and the MCP73871 uses it to monitor battery temperature and stop charging if the battery gets too hot. Our batteries don't have this built in thermistor, so we can add a normal resistor to emulate this.
Programming Pins
The MCP73871 has three "programming" pins that adjust different parameters of the battery charging cycle, these pins are creatively named PROG1, PROG2, and PROG3.
Check out this article if you'd like to learn more about LiPo battery charging. The short version is that the MCP73871 will go through a fast charging cycle which applies a relatively high constant charge current and then switches to a constant charge voltage mode.
In this IC, PROG1 is used to set the fast charge current. PROG3 is used to set the "charge complete" current. When the charger is in constant voltage mode, the charging current will decrease as the battery voltage approaches the charging voltage. When this charging current falls below a threshold set by PROG3, the IC will halt battery charging.
When charging from a USB interface, PROG2 sets the maximum current the IC will pull from the USB source. For our MAQS boards, go with the higher current draw.
It can be tricky to parse through the datasheet, so we'll highlight some important sections here:
- Section 3.8: more details about PROG1
- Section 3.9: more details about PROG2
- Section 4.3
- Section 4.5 and Equation 4-1: how to choose a value for PROG1
- Section 4.7 and Equation 4-2: how to choose a value for PROG3
For our MAQS system, choose PROG1 such that the fast charge current is 1A and choose PROG3 such that the completion current is 100mA.
You will notice our friend the BFC (Big filtering Capacitor) is gone. We don't need one in this situation because we are not charging from solar but instead from USB. If you want to learn more about solar charging and why we needed the BFC before check out this page
Linear Regulator
The MCP73871 directly outputs whatever the source voltage is, so if our battery is currently supplying 3.7V, that's what we'll get out of the OUT pin of the MCP73871. The rest of our system expect a 3.3V supply and this higher voltage might damage them. One solution to this is to add a linear regulator to our board. As mentioned above, we'll be using the AP7361C-33E-13.
This part is quite a bit simpler, take a look at page 11 of the data sheet for an example circuit.
The output of your MCP73871 should NOT go directly to the input of the linear regulator. We would like to be able to measure current flowing into our regulator. To do this, we ask that you route this current path through a set of pins that can be easily interupted. Connect the output of the MCP to one pin of 01x02 pin header (100mil pitch) and the input of the regulator to the other. This way we can place a jumper on these two pins during normal operation. We can remove this jumper and replace it with a current meter later to measure power consumption.
Add this IC into your paper schematic so that it regulates the output of the MCP73871 down to 3.3V.
Draw your schematic
You should develop a paper schematics by studying the typical application diagrams for their systems. It's important to draw on paper before transition to KiCAD.
Next, start up a new project in KiCAD and draw your schematic. Like for the prior board, make sure to run & pass your ERC.
Submitting your design
Once you are satisfied with your schematic, submit to git. Use this assignment: https://classroom.github.com/a/EqRmmr_b for the power board. (as a reminder, see the instructions from ex02/sensorboard_schematic for more details about how to set this up)
What's next
In Lab04 we'll do a few schematic reviews of these boards.
After that we'll lay out the boards in the next pset.