Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27

Thread: Registers, C++

  1. #21
    Join Date
    Jun 2008
    Posts
    11
    [QUOTE=enhzflep;1379893]
    Value that I need this is capacity of the battery. Battery connects to the power supply, not to line. Maybe you know address of register that I must use?

  2. #22
    Join Date
    Oct 2006
    Location
    Melbourne
    Posts
    743
    Capacity of the battery (A/h), or voltage (V)? (they're very different)
    Also, what voltage is the battery, and to which line(chip pin) is it connected.
    I mean, is it a backup battery? Is it the main power supply of the device? Is it always on, is it connected via a relay when the main power fails, etc, etc.
    I am guessing that it is connected to the "Power Supply Voltage (5V)" line - top of p114, listed under Specifications, and is always connected?

    What type of battery is it is also an important question. Different chemistries have different output voltage VS power-remaining graphs, and directly impact upon how useful any reading of the battery voltage is. Carbon Zinc batteries for example, decrease gradually in voltage until they reach their end-point. NiCd & NiMh on the other hand, offer a much flatter graph, not decreasing in voltage until they're virtually dead. Lithium batteries provide for an even flatter graph and consequently an even shorter time between providing full-voltage and being fully flat. Lead-Acid batteries exhibit different behavior again.

    Remaining capacity (A/h) would be a far more useful metric to determine the amount of time a battery will continue to supply power for. However, I was unable to find any mention of a current sensing ability in the chip, which is required for this task. The way that this is measured requires the use of reasonably bulky components, components that would be far larger that the chip itself - you may find that the ability to measure available supply current of a battery is simply not available.

    If you can, find out what the voltage is and get back to me.

    S

  3. #23
    Join Date
    Jun 2008
    Posts
    11

    Smile

    [QUOTE=enhzflep;1380663]
    Hello,
    Sorry for my long time absence. I want to be precise : I need capacity of the battery (mAh). I send scheme of the system with description
    Please change the suffix of the file from *.txt to *.tif
    Attached Files Attached Files

  4. #24
    Join Date
    Oct 2006
    Location
    Melbourne
    Posts
    743
    Aha!

    Now I follow you. You wanna measure the remaining battery capacity of the Li-Ion that's connected to an embedded pc.
    This thing right?
    http://axiomtek.com/products/ViewProduct.asp?view=411

    Ooh - this may prove to be tricky mate. Though, I have an idea - Do you need the microphone port, or is it available? Ever heard of soundcard based CROs?

    See, what I'm thinking of is a small piece of external hardware that consists of a current sensor. (essentially a 1.0 Ohm resistor) We very briefly short-circuit the battery through the resistor & measure the voltage-drop across the resistor. We can scale this voltage down to fit within the range of the soundcard input. We then use the soundcard as an oscilloscope. After we've got the voltage drop across the 1Ohm resistor, we can calculate the current since V = IR, & We know that I = 1, we can measure the battery V using the Winbond chip & finally we can calculate the current, I.

    Now, after all that we can look at a discharge graph of Li-Ion batteries to determine the capacity based on the current it can supply. Li-Ion batteries have a rather flat discharge curve, and this battery is quite high in capacity so just measuring the voltage is a little pointless. (much like a pressure gauge on on an LPG bottle - the pressure doesn't go down until all of the liquid has evaporated and the bottle is virtually empty)


    I'm a little busy for the few days, but I'll work on it & get back to you in the next few days. I hope there's a better solution than the one I propose above. I'll ask some of my colleagues & see what we can come up with.
    This will certainly be an interesting exercise.


    [EDIT] Here's a few links that look like they discuss the method I speak of:

    http://www.freepatentsonline.com/7015822.html
    http://www.google.com.au/search?hl=e...h+a+pc&spell=1


    S.
    Last edited by enhzflep; 06-24-2008 at 08:06 AM.

  5. #25
    Join Date
    Jun 2008
    Posts
    11
    [QUOTE=enhzflep;1382586]
    Thank you very mach

  6. #26
    Join Date
    Jun 2008
    Posts
    11
    [QUOTE=enhzflep;1382586]
    I successed to access to sm bus with regesteres of winbond. I can't access via sm bus to battery.

  7. #27
    Join Date
    Oct 2006
    Location
    Melbourne
    Posts
    743
    Hi Yanol,

    glad to hear you've accessed the SM bus, bit of a nuisance that the battery is hard to read.


    Wow, what a busy week it's been. Over this time I've thrown the idea around with the guys at work, and we've come to the conclusion that the method mentioned in one of the patents I linked would be best.

    However, there still remains the problem of measuring current drain. Without knowing more about the system, I'd be inclined to think that all of the axillary analogue inputs of the WinBond chip are either (a) used or (b) not accessible.

    This problem with measuring voltages & current drain sends us in circles, and means you may have to seriously assess the viability of some extra hardware & software to use the sound-card as an oscilloscope.

    While I think of it, I seem to recall seeing mention of using a Hall-Effect sensor as a way to measure the current - This may well provide not only an easier-to-implement solution, but one that's cheaper & more reliable to boot.

    Wonder if you can buy a cheap multimeter with usb interface......?

    Anyway, if you could post the code you used to access the SMB, and the results you got I might be able to help some more.

    S.

Page 3 of 3 FirstFirst 123

Posting Permissions

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