I'm still struggling with the e-paper display. I am sure it is in my software; the display is changing, just not the way I want. I've set that aside for a bit and am focusing on the other parts of the design.
Voting is open for the Smarter Life Design Challenge. Please DON’T VOTE! Ok Don’t vote yet. I have been too busy to post much and I can see that I am way behind the other competitors. I have more time now and several posts will be coming in the next few days so I hope you’ll wait a few weeks to see what comes out. If you must vote now or if you want to vote for me go here.
Power Supply Requirements
I want the UnCoStat to be powered by either an external supply or batteries. I want the main controller to continue monitoring during a power outage and the remote sensors must be battery powered for portability. I plan to use Li-Ion batteries. It would probably be simpler to use AA or 9V, but I have other projects in mind and want to develop my own standard power supply circuit.
The first step in the power supply design is to identify the power needs of the major components. Here is the spreadsheet I used to determine the UnCoStat power supply requirements. I use the maximum value from the data sheet for the ICs and ignore pull-up resistors and other leakage paths in the design, unless I think might be significant. If the total current is near the maximum (or a little over) then it is necessary to look at the current draw in detail such as the peripherals in the micro and the ICs’ modes of operation.
Part | Description | Vbatt Min | Vbatt Max | Imax (mA) | Interface | Notes |
CY8C4245 | Micro | 1.8 | 5.5 | 13.8 | ||
MCP7940M | Real Time Clock | 1.8 | 5.5 | 0.4 | I2C | |
TMP100 | Temp Sensor | 2.7 | 5.5 | 0.1 | I2C | |
CC2D35S | Humidity Sensor | 2.7 | 5.5 | 0.75 | I2C | |
RFM12B | RF Link | 2.2 | 3.8 | 24 | SPI | |
EPD 4.41" | Large Display | 2.7 | 3.3 | 20 | SPI | 200mA Inrush, 16mA Typ |
S25FL208K | FLASH | 2.7 | 3.6 | 25 | SPI | |
MCP22001 | UART Bridge | 3 | 5.5 | 12 | UART | |
Total | 96.05 | mA |
Battery Suitability
Li-Ion battery normal voltage range is 2.75 – 4.2V. I originally planned to run the entire system off the battery voltage with no further regulation. The microprocessor, RTC and sensors can all operate off of battery voltage thanks to their wide voltage range. Unfortunately that’s not possible with the other components due to the maximum voltage rating. I am considering running the micro off of the battery and using a GPIO pin to enable the power supply when it needs to use the other components, but that decision will be made later.
Switching vs. Linear Power Supply
The choice between switching and linear power supplies is easy. Use a linear supply if you can. They are simpler, cheaper and less noisy. Unfortunately they don’t always work. Sometimes the power dissipation it too high and sometimes you need to create a higher voltage. In this case the battery voltage can be higher or lower than the required supply voltage so I not only need a switcher, but it must be Buck-Boost.
Linear Power Supply Design
I expect to use a switcher, but I’ll go through the analysis for a linear regulator. There are a few key factors that need to be investigated, Input Voltage, Voltage Drop, Current Capability, Power Dissipation and Thermal Rise. For this analysis I will use the 3.3V version of the Texas Instruments LM2950 in the TO-92 package (Details and Datasheet Here).
Input Voltage: I start with the Absolute Maximum Ratings (page 4 of datasheet). If anything in this table doesn’t fit my design then I know right away the part is unsuitable. In this case the voltage rating is -0.3 to +30V which is fine for a 2.75 to 4.2V battery voltage. The power dissipation and junction temperature require some calculations, so I’ll save that for later.
The next step is looking at the Recommended Operating Conditions and Electrical Characteristics tables (pages 4-6). The recommended input voltage (page 4) is 2V (or 2.3V over full temperature range) to 30V. Once again this is within the normal range of the battery so everything is fine so far.
Current Rating: The Current Limit (page 5) is typically 160mA and can be as high as 220mA. They don’t spec’ a minimum value, but since the first page says it is a 100mA regulator, I trust it will work in my design, but if my current draw is significantly higher than my initial estimate, I could be in trouble.
BTW the first page of datasheets is usually controlled by the marketing department, not engineering. Most information is typical (or even occasionally optimistic). They are not likely to tell you about any limitations of the part.
Voltage Drop: The Dropout Voltage (page 5) at 100mA is typically 380mV and can be up to 450mV at room temperature. It can be as much as 600mV across full temperature, but the UnCoStat will operate at approximately room temp, so I can use the 380/450mV values.
The Dropout Voltage means that the output voltage will always be at least 380mV (sometimes up to 450mV) lower than the input voltage. I need at least 2.7V to power everything except the USB bridge, which I am ignoring for the now (Note 1). Therefore I need at least 3.08V from the battery (2.7V output + 0.38V dropout) and it might need 3.15V (2.7V + 0.45V).
The nominal Li-Ion battery voltage is about 3.7V and they can run down to 2.75V. If the system stops working at 3.1V, I won’t get the full capacity of the battery, but it will work. The battery will have to be recharged before it is completely drained.
Note 1: By definition, the USB-UART bridge will only be used when a USB cable is plugged in. The battery will be charged from the USB connector so the voltage will be higher any time the part is operating.
Power Dissipation: Power = (Input Voltage – Output Voltage) * Current. We need to use the maximum input voltage and current and the minimum output voltage.
Maximum Input Voltage = 4.2V
Minimum Output Voltage = 3.2V (Note 2)
Maximum Output Current = 96mA
Power = (4.2 – 3.2) * 0.096 = 0.096W or 96mW
Note 2: The minimum output voltage at 100uA and room temperature is 3.267V (page 5, 3.3V version). Load regulation is 0.2% max for current from 100uA to 100mA, so there is an additional 0.0066V drop ( 0.2% * 3.3V). The output voltage can be as low as 3.201V. I use 3.2V for simplicity.
Thermal Rise: The most confusing and error prone step is calculating the temperature rise of the device. It is more difficult with surface mount components because the traces on the board play a major role in conducting heat away from the part. I am looking at the through hole TO-92 version, so the results should be pretty good.
Step one is took at the Thermal Impedance also known as ƟJA or RƟJ in the Absolute Maximum Ratings Table (page 4). Some datasheets have the value in a separate mechanical or thermal specification table. The ƟJA is specific to the package of the part, so we need to know the package code which is found in the package drawings on page 1. The TO-92 package is known as the LP Package so from the table we get ƟJA = 140°C/W. Multiply ƟJA by the power in Watts and the result is the degrees C rise.
140°C/W * 0.096W = 13.44°C
Note that this is the temperature rise and (for those of us still using neanderthal units) it is in degrees Celcius. We have to add it to the ambient temperature to find out how hot the part will be. Room Temperature is about 18-25°C.
25° + 13.4° = 38.4°C or 101°F
This is within the maximum junction temperature (they call it “virtual junction temperature”) of 150°C and it is not so hot that it would burn me if I touched it.
Results: I must admit I am a bit surprised that it would be feasible to use a linear regulator. I only went through the formal steps while writing this post. My mental assumption was that it would be borderline for both voltage and temperature rise. I am still going to proceed with the switching supply design, but will keep it in the back of my mind.
I will go through the design and selection of the battery management and switching power supply in my next blog post.