• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Low Power RF & Wireless Connectivity » Low Power RF Bluetooth® Low Energy & ANT Forum » How to detect battery level while using CC2540 and TPS62730
Share
Low Power RF & Wireless Connectivity
  • Forums
  • Announcements
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS

Forums

How to detect battery level while using CC2540 and TPS62730

This question is answered
Tony Siu
Posted by Tony Siu
on Dec 08 2011 03:42 AM
Intellectual520 points

Dear All,

I am planning to design a CC2540 based application with TPS62730 as suggested by one of your design notes.

http://www.ti.com/lit/an/swra365a/swra365a.pdf However after adoping this design, I cannot measure the battery level by measuring VDD/3.

Is there any alternative suggested cuicuit for measuring the battery level?

Would it be safe to simply connect the positive pole of the battery to one of the IO pins with ADC for such purpose?

 

Regards,

 

Tony

cc2540TPS62730
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Karl T.
    Posted by Karl T.
    on Dec 08 2011 04:03 AM
    Verified Answer
    Verified by Tony Siu
    Expert3500 points

    Hi Tony,

    Connecting the battery directly to an I/O pin would not be safe, as you could expose an I/O pin to a voltage more than the supply voltage+0.3V, which would violate the Absolute Maximum Ratings. I would recommend using an external resistor divider to divide it down to be safe, and then measure that voltage with the ADC.

    Best regards,

    Karl

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • George Lin
    Posted by George Lin
    on May 11 2012 04:23 AM
    Prodigy90 points

    Hi Karl,

    In EVM  CC2541+TPS62730  reference design. Port1 pin2 was used  to control TPS62730.

    I am wondering if it possible to add  P1.2 control in function "static uint8 battMeasure( void )", set P1.2 to  LOW before ADC  measurement  and set P1.2 to High after  measurement ?

    Best regards,

    George

    ADC cc2541 tps62730
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Leo Bodnar
    Posted by Leo Bodnar
    on May 11 2012 14:47 PM
    Intellectual410 points

    Karl T.

    I would recommend using an external resistor divider to divide it down to be safe, and then measure that voltage with the ADC.

    Karl,

    Wouldn't any sensible resistor divider draw more average current than any other part of the design?  E.g. 2x 100kOhm resistors would draw 15uA.  Also, ADC input impedance is stated to be 197kOhm that calls for low impedance source.  Resistor divider has too high an impedance (unless bypassed with a cap.)

    How about using two diodes in series to drop Vbatt by 1.4V feeding it directly into an ADC pin?

    Leo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Eng351
    Posted by Eng351
    on May 13 2012 14:50 PM
    Expert2980 points

    I wouldn't use diodes as the forward drop is going to be quite unpredictable (changes with temp, diode-diode variance). Also, with only several uA of current the forward voltage drop will be much lower than 0.7V, and is going to change quite significantly with changes in current. 

    A better solution is to use a PCH fet as a high-side switch (you wont be able to connect the gate direct to an I/O pin due the Vbatt - Vcc voltage difference). Connect the PCH source to Vbatt, PCH drain to your low impedance (10k or so) divider. Connect a pull up from Vbatt to the PCH gate. You will need an NCH fet to pull the PCH gate low to make a measurement.

    I use low side switching only to reduce part count with two 470k resistors and a 1nF cap with the divider ground to an I/O pin. To disable the divider the I/O switch is set to input. Most of the time the battery voltage is higher than the VCC + 0.3 clamp voltage, so a small current flows into the I/O pin. This does not affect the overall current draw as it feeds into VCC via the internal clamp and the voltage regulator supplies less current to VCC to compensate. The 1nF cap is important as provides a low impedance for the ADC, the catch is that the divider needs to be enabled for around 1ms before the measurement to ensure its voltage has stabilised. With the above I get good voltage detection accuracy and around 4-5uA draw from the battery in sleep with RTC including regulator.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on May 13 2012 16:28 PM
    Intellectual370 points

    Thanks Eng for sharing that part of your design. 

    However, it's not still clear to me where the 470K resistors and the 1nF cap are. The drain of the PCH is connected to a voltage divider (2 10k resistors) and its middle point is connected to the ADC input.

    Now, in order to drive the PCH fet you use a NCH fet with the source connected to ground and the drain connected to the gate of the PCH. Right?

    Sorry but I can't see when the current flows through the clamp nor where to place the 470K resistors plus the 1nF cap. I'd very much appreciate if you could please clarify it.

    Regards,

    D.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Leo Bodnar
    Posted by Leo Bodnar
    on May 13 2012 16:41 PM
    Intellectual410 points

    Eng meant this typical divider with controlled pull-down.


    [BATTERY]------{R1 470K}----+----{R2 470K}----> PORT PIN CTRL

                                |

                                +-----------------> PORT PIN ADC

                                |

                               === C1 1nF 

                                |

                                GND


    Make PORT PIN CTRL output low level during measurement and output high during sleep.

    Clamping diode current flows from battery through R1 and into an ADC pin then via internal diode and into Vdd, powering the circuits in standby.  Forcing current through parasitic diodes is how typical lethal CMOS latchup is started so keep resistor values high.

    Leo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on May 13 2012 16:55 PM
    Intellectual370 points

    Thanks Leo for the answer.

    Are you sure that's what Eng was meaning?  He mentioned 10K divider and two mosfets...

    Also, if two mosfets are used I can't really see amu current flowing to the IO control pin.

    Regards

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on May 13 2012 16:59 PM
    Intellectual370 points

    Ok forget my last post. I missunderstood him, he was talking about two options and actually not using the mosfets approach. Rather, he is using your schematic...

    Thanks and sorry

    D.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on May 28 2012 14:19 PM
    Intellectual370 points

    Eng351
    I use low side switching only to reduce part count with two 470k resistors and a 1nF cap with the divider ground to an I/O pin. To disable the divider the I/O switch is set to input. Most of the time the battery voltage is higher than the VCC + 0.3 clamp voltage, so a small current flows into the I/O pin.

    Doesn't it exceed the absolute maximum rating for an I/O pin of (VDD+ 0.3V)?

    You say that the current back to VCC through the internal clamp doesn't affect the overall current draw. Does it apply also for LDO or only when using DC/DC converter? I want to read my LiPo battery voltage but would like to avoid the 2 FET and 3 resistors approach.

    Thanks!

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Leo Bodnar
    Posted by Leo Bodnar
    on May 29 2012 12:08 PM
    Intellectual410 points

    Daniel A.
    Doesn't it exceed the absolute maximum rating for an I/O pin of (VDD+ 0.3V)?

    You say that the current back to VCC through the internal clamp doesn't affect the overall current draw. Does it apply also for LDO or only when using DC/DC converter? I want to read my LiPo battery voltage but would like to avoid the 2 FET and 3 resistors approach.

    Specifying maximum i/o pin voltage as Vdd+0.3V is another way of saying "current flowing into an i/o pin should be limited to a value that causes less than 0.3V drop across parasitic/clamp diode."

    If you can control the current  you can control the voltage drop.

    Leo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on May 30 2012 10:44 AM
    Intellectual370 points

    Thanks Leo.

    I've tried to find out the characteristics of the parasitic diodes inside the CC2540 with no success. What's the typical max amount of current to not exceed the 0.3V?

    Also, in the case of using an LDO: is this current flowing to VDD through the clamp diode not affecting the overall current draw?

    Dani

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Chad Christensen
    Posted by Chad Christensen
    on Jun 25 2012 14:56 PM
    Intellectual980 points

    I'm a little late coming to this, but I'm having the same issue measuring battery voltage on the microcontroller powered by the TPS62730 regulator. I'm just starting the schematic, so I haven't had a chance to try this yet; but why can't we just power down the regulator with the ON/BYP signal, and wait a millisecond or so for output to settle up to the battery voltage (2 ohm resistance into <10uF capacitance should settle fast). Then we can take a normal ADC reading of internal Vcc.

    I'm using the CC430, so drawing <1mA across the 2ohm resistor would be <2mV error. Other uC's could draw around 5mA across 2ohm resistor for a 10mV error; but this can be compensated for in software if needed.

    Any reason I can't use this approach and save the resistors and I/O pins?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Eng351
    Posted by Eng351
    on Jun 26 2012 01:48 AM
    Expert2980 points

    Hi Daniel,

    What is really going to do damage is excessive current through the diode - if you hit 0.3V that's ok, diodes are happy to run in saturation. I do not know what the maximum current is but I would say in the order of mA. In practice if the divider resistance is high enough i.e. several hundred kilo-ohms, the maxim current will be in the order of uA. For example if the divider top resistor is 470k, Vdd = 3.0V, Vbatt = 4.2V, you will get a worst case of (4.2 - 3.0)/(470K) =  2.55uA. In practice it will be a bit less than this due to the parasitic diode forward voltage drop at that particular current (small due to low current).

    The above 2.55uA flowing into VDD via the clamp diode will sum together with the VDD supply entering the CC2540. As a net result your LDO will need supply 2.55uA less to maintain the 3.0V rail, and therefore this will not affect overall current.

    Imagine connecting a diode and high value resistor from the vbatt terminal of the regulator to the output of the regulator. The above has the same effect.

    I have achieved a battery current of 3.1uA in sleep mode with 32.768 xtal running. I have however found the voltage measurement described above requires some calibration. Even with the 1nF cap there is still some voltage drop on the divider when taking a sample. Unfortunately I was in a bit of a rush and overlooked the relatively low impedance of the ADC. On the next versions I will use a high-side switch and smaller resistor values.

    Daniel A.

    Thanks Leo.

    I've tried to find out the characteristics of the parasitic diodes inside the CC2540 with no success. What's the typical max amount of current to not exceed the 0.3V?

    Also, in the case of using an LDO: is this current flowing to VDD through the clamp diode not affecting the overall current draw?

    Dani

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Eng351
    Posted by Eng351
    on Jun 26 2012 01:57 AM
    Expert2980 points

    Hi Chad, I don't see a reason why your approach wouldn't work. The TPS62730 solution is only going to work for a 3.6V battery whereas the discussion above is related to using a LiPo rechargeable battery which is up to 4.2V.

    The LDO solution proposed is for a device which spends most of its life in sleep mode and transmits infrequently. The LDO solution trades off RF and run power efficiency for Sleep mode current / cost. 

    If anyone comes across a TPS62730 -like solution with an ultra low current LDO instead of the 2R resistor that can handle 4.2V I'm all ears :)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Daniel A.
    Posted by Daniel A.
    on Jul 23 2012 08:00 AM
    Intellectual370 points

    Leo Bodnar

    Eng meant this typical divider with controlled pull-down.


    [BATTERY]------{R1 470K}----+----{R2 470K}----> PORT PIN CTRL

                                |

                                +-----------------> PORT PIN ADC

                                |

                               === C1 1nF 

                                |

                                GND

    Sorry for getting back to this again.

    I have implemented the diagram above and after enabling the divider making PORT PIN CTRL low for 10ms and then reading on the ADC pin, I always get like 0.3V less than the actual voltage on that PIN.

    What am I doing wrong? Should I increase the capacity of C1 - and to what extent?

    Many thanks

    Daniel

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use