Solving for two resistor values in a resistor-divider network

Discussion in 'The Projects Forum' started by jerseyguy1996, Mar 23, 2011.

  1. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Well it has been a while since I really had to use algebra with any level of proficiency. This has had the unfortunate affect of causing me to forget even the basic rules of solving equations. I am attempting to work out all of the resistor values to put together a SLA battery charger using the Texas Instruments BQ2031 integrated circuit. I am having trouble figuring out how to calculate the resistor values needed for the temperature sensing circuit. I am using the appnote here:

    http://focus.ti.com/lit/an/slua017/slua017.pdf

    Page 7 and 8 discuss setting the temperature thresholds and they give two equations for solving RT1 and RT2. If my memory holds then that means I have two variables and two equations so I should be able to solve these simultaneously however I am pretty sure I broke a bunch of the rules because when I tried to substitute in my one equation into the other I ended up cancelling out the term I was trying to solve for. Can someone help me figure this out.

    Vcc is 5 volts
    Rltf is 27445 ohms at 0 degrees C
    Rhtf is 4911 ohms at 45 degrees C

    I got those numbers from using a 10K thermistor at 25 degrees celsius with a B-constant of 3380K.

    I am very new to thermistors (electronics in general) so hopefully I did those calculations correctly. This is the one I was going to use:

    http://www.mouser.com/Search/Produc...tualkey64800000virtualkey81-NXFT15XH103FA2B00
     
  2. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Anyone willing to take a crack at this? Is there information that I have left out that would be important?
     
  3. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I'm not much with math, but I plugged the formula into MS Excel and used the Solver function to get convergence with RT1 and RT2, manually plugging in values for RT1, having it solve by changing RT2 until the 1st equation evaluated to ~3, and looking at the results of the 2nd equation, adjusting RT1 until I got both to be within small fractions of % of where they needed to be.

    I came up with 4,125 Ohms for RT1, and 9,526 Ohms for RT2.

    Double-check me by going through the calculations yourself.

    Here is a calculator for figuring out resistors in parallel and series:
    http://www.qsl.net/in3otd/parallr.html

    Here is a table of standard decade resistance values:
    http://www.logwell.com/tech/components/resistor_values.html
     
  4. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Thanks for responding!

    I actually ran solver to try to work out the resistance values but this is where I am having issues.

    Based on figure 10 on page 7 of the linked pdf file (original post) it appears that the IC is measuring the voltage across the parallel resistors RT2 and RT(thermistor). Above that it states that TCO (temperature cut-off) is defined as .4*Vcc which in this case would be 2 volts. HTF (High Temperature Fault) is defined as .44*Vcc which would be 2.2 volts. LTF (Low Temperature Fault) is defined as .6*Vcc which would be 3 volts. So in my (perhaps ignorant) mind I am thinking that the resistor values have to satisfy 3 criteria. At the temperature that I want TCO to be, the voltage across the parallel resistors RT2 and RT needs to be 2 volts, at HTF 2.2 volts, and at LTF 3 volts. Using solver I find that there is not a solution that satisfies this criteria by varying the resistances of RT1 and RT2.

    Am I describing this problem accurately or am I just making it much more difficult than it needs to be. I have attached my spreadsheet with my calculations for review.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You weren't following the formulas in the datasheet on page 8.
    Imax = 0.250V/Rsns
    That gets factored in on Equation 4.
    The battery charge current is sensed by the SNS pin (7), flowing across Rsns to give that 4A limit. So, that goofs up the rest of your calculations.

    I simply plugged in equations 4 and 5, and then started out trying values for RT1, using Solver to calculate RT2 in order to get Equation 4 to equal 0.6 * Vcc = 3v (very close to it), and the values for RT1/RT2 were simultaneously used for Equation 5; if the result of Equation 5 was not 0.44 (or very close to it) I kept adjusting RT1 and solving again until it was.

    I don't know what else to tell you.

    Try fiddling with my spreadsheet, attached.
     
    jerseyguy1996 likes this.
  6. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    Here's a check on SgtWookie's work. I typed the following into Mathematica 4.1:
    Code ( (Unknown Language)):
    1.  
    2. vcc = 5;
    3. rltf = 27445;
    4. rhtf = 4911;
    5. eq4 = (vcc - 0.25)/(1 + rt1*(rt2 + rltf)/(rt2*rltf)) - 0.6*vcc;
    6. eq5 = 1/(1 + rt1*(rt2 + rhtf)/(rt2*rhtf)) - 0.44;
    7. Solve[{eq4 == 0, eq5 == 0}, {rt1, rt2}]
    8.  
    and got the answer Out[6]= {{rt1 -> 4123.47, rt2 -> 9521.07}}.
     
    jerseyguy1996 and SgtWookie like this.
  7. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Thanks, Someonesdad. I plugged your results back into the equations I'd entered into Excel, and they were better answers than I'd come up with - but I figured that 0.01% was close enough. ;)
     
  8. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Both of you this has been incredibly helpful! I am still learning how to work my way through the equations associated with electronics. Thanks!
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Keep in mind the power requirement for Rsns; you calculated 4A=.25/0.062 Ohms, so Rsns will dissipate 0.25*4A = 1 Watt power. Double that for reliability's sake, so use a 2W resistor.
     
  10. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    Thanks for the heads up on that. I definitely would not have thought of that:confused:

    Edit: As luck would have it, the one that I chose for my project list on Mouser has a 5 watt power rating:)
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I suggest that you use metal film resistors for RT1 and RT2, 1% tolerance or better.
    Mouser has quite a selection.
     
  12. jerseyguy1996

    Thread Starter Active Member

    Feb 2, 2008
    206
    9
    So far my project list includes metal film resistors with 1% tolerance throughout the charger. I am not sure if there is a cost difference but I am only making one so an extra penny per resistor ain't gonna hurt.:)
     
Loading...