Lithium Ion battery


Closed Thread
Results 1 to 6 of 6
  1. #1

    Default Lithium Ion battery

    Does anyone have any experience with accessing the “fuel gage” on Lithium Ion batteries and point me to were I can find a easy to understand description of how to read the Status Of Charge (SOC) of a such battery using the I2C interface?
    All I want to do is use a PIC (any PIC), read this particular piece of information from a smart battery and display it on a LED system and eventually alarm the user when the SOC is below a certain level. What I’m missing is what should the PIC say and what answer should I expect from the battery.
    I tried the SMBus.org but they expect you to be a member and pay all kind of fees.
    I also did Google and this forum search and didn’t get any satisfactory results.
    Any input will be appreciated.
    Regards,
    Nick

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Hi Nick,

    Check this post and ask PEU how he made it.

    http://www.picbasic.co.uk/forum/showthread.php?t=4782


    ---------------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi Sayzer,
    Thank you for your input.
    My project has to do with a battery which has the built in fuel gage.BTW it can be any 3.6V- 14.4V battery.
    From what I understand reading voltage only on this kind of batteries is not accurate especially when your load fluctuates. The built in fuel gage takes in account a lot of factors (charge/discharge current, cells and pack voltages, temperature, age …) which can influence the “real” remaining charge and compensates for that.
    What I want to do is to use this information already available and more precise then anything I can built and hopefully with a PIC 12Fxxx and a bi-color LED to identify five 20 % steps (green, umber, red and blinking green, umber, red).
    It is also my understanding that the smart batteries come in two flavors when you try to communicate with them:
    - 1 wire interface
    - I2C interface
    My flavor is the I2C and what I’m looking for is some info on how to talk to the battery (what to say, what address to read and who says what and when).
    Thanks again and I’m sure with this forum resources we can get somewhere.
    Regards,
    Nick

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I was hopping this topic will attract more interested hobbyists considering that the information which might surface here can be applied to a lot more projects where battery monitor is needed, not to mention a smart charger.
    Many of the new smart batteries used with newer electronic devices can be used for hobbyist applications offering small size and high capacity.
    I did find a little more information in this matter.
    The SMbus interface used lets a master communicate to a battery pack using one of the three protocols:
    - Write Word
    - Read Word
    - Read Block
    To read from a slave the master will have to do this:
    - Sends a start bit
    - Sends the battery address (1 byte = first 7 bits are the address and last one specifies if is a Read or Write operation: 0 for Write and 1 for Read). 0 first time
    - Waits for a Acknowledge bit from the battery
    - Sends a command code (1 byte)
    - Waits for acknowledge bit
    - Sends a Start bit
    - Sends the battery address (1 byte = first 7 bits are the address and last one specifies if is a Read or Write operation: 0 for Write and 1 for Read). 1 this time
    - Waits for Acknowledge bit
    - Shifts first data byte in
    - Sends Acknowledge bit
    - Shifts second data byte in
    - Sends a Not Acknowledge bit and a Stop bit to end the transfer.
    If anybody can add some more specifics to this it will be more than helpful to me. What I need is a possible map of how the info is stored in the battery, how a Start, Acknowledge, Not Acknowledge and Stop condition looks like.

    I refuse to think that I’m on a “Dead End” situation especially when none of the “Big Guns” didn’t get involved yet.

    Best Regards to all

    Nick

  5. #5
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Nicmus
    . ....how a Start, Acknowledge, Not Acknowledge and Stop condition looks like.
    Nick,
    From your discription, this sounds like an I2C compatible interface, so the Start, Ack, etc, can be found in the I2C bus specs, or just use the I2C in PBP and don't worry about it

    Quote Originally Posted by Nicmus
    . Sends the battery address (1 byte = first 7 bits are the address ....
    ....What I need is a possible map of how the info is stored in the battery...
    This is where the rubber meets the road. You certianly will need to do some research to get this address, and it's a show stopper. Then, once you've got the address, you are correct in needing the memory map to get any usefull info from the battery.

    BTW, have you heard the rescent reports of exploding Li-ion batteries (particularly laptop batteries)?. They can be a bit finicky when it come to care and feeding. Here is an articale I came across on Tom's Hardware last week about Why they explode. Pretty simplistic, but it does raise the question: Do you really want to mess with this if you don't have all the info you need? Maybe the status reader, but probably not the charger unless you are sure you know what your doing.

    Sorry I don't have any real useful information to help you out.
    Steve

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Thank you Steve.
    I confirmed that we are indeed dealing with I2C bus and the I2C specs should apply.
    Indirectly you answered an other question for me which was related with the PBP’s I2C and if it can handle something like this.
    As soon as I get my parts I will try both: the PBP built in I2C and built my own subroutines for each condition and call them in a main program. I’m not sure if the built in I2C commands are flexible enough for this application.
    I am aware of the news on Li-ion battery but at this time I’m only trying to read info from the battery and let the charging part to the professionals.
    What I was trying to relay in my other posts is the fact that with only $1.00 you can monitor your battery level and take advantage of a large selection of small form factor / high capacity smart batteries (not necessarily Li-ion) to use in your projects. All I want at this time is the peace of mind that my project will never run the batteries dead and I have an advance warning when the batteries are low. I also want to put some of my "almost never used" smart batteries to do something more useful than collecting dust.
    I will do some more digging and post the results.
    Any other input is more then appreciated.

    Best Regards to all PIC enthusiasts.

    Nick

Similar Threads

  1. Of battery discharge curves
    By ardhuru in forum General
    Replies: 0
    Last Post: - 21st January 2009, 16:24
  2. Low battery signal from an RTC
    By ardhuru in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th March 2008, 17:13
  3. Battery pack cell reader
    By steiner in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th March 2008, 06:41
  4. Replies: 1
    Last Post: - 20th December 2005, 03:56
  5. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts