This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

9V battery check with MSP430F4351, no ADC, no comparator

Hello,

3V3 power comes from 9V standard battery. It's a temperature measurement tool, 
shaped as a pistol, with a trigger. So the hardware is always powered down,
when the trigger is pressed the 9-3V3 regulator is kept on by a MSP keepalive signal
to this regulator  shutdown pin.

Ok, the problem is we need a low bat check. There's no ADC, the comparator input
is already in use. This level check should draw 5nA top, but preferably be in
shutdown mode and turned on only when the MSP wants to inquire it if everything
is shining with the battery level.

I'm wondering about using a commercial vco to do this. Since this 
is far from a new problem, I'd ask if someone could please share his/her thoughts about this?

Thanks in advance,
Xezi. 

  • I think 3V3 power comes from 9V standard battery is not a good choice. Take a look at size/Joule, weight/Joule, and cost/Joule. 9V standard battery is mostly used where you need the voltage and do not want to bother with a DC-DC converter and do not care about energy.

  • Well, yes, we were aware of this, but the 9V bat could not be changed in this particular
    design. Though we could improve the energy efiiciency, that's not of concern.  The 
    difficulty really stands in knowing the battery condition - we don't even need to know
    its voltage, only if it's still 'good' or 'bad', if needs to be replaced.

    Thank you for your reply. 

  • Bruno Marchesi said:
    the comparator input is already in use

    could you add an analogue mux/switch to it...?

     

  • Yes, an analog switch could be used, as a bit of an expensive
    solution, I believe. 
    We could do: 9V - R1  - AS input - R2 - Qs - GND
    AS stands for analog switch. 

    R1-R2 provides the voltage drop from 9V to, say, Vcc/2,
    to be read from the MSP compare pin.

    Qs base is tied to a MSP I/O pin. This way, whenever
    the MSP powers off, additional current drawing from the
    9V R1-R2 net is minimized.

    We need an analog switch with nA quiescent current,
    or a shutdown pin that gives us that condition.  Two ADG701
    appear to do the job, although I sometimes still got puzzled
    with parameters like "1nA typ/1uA max quiescent current",
    in the sense this is a 1,000 fold range. If it stays around 1nA,
    I believe this could be done.

    I still wonder if a 2x $3 part would be a good solution in this case,
    meaning if there isn't a better, more straightforward approach,
    which I really can't see right now.


    Thank you for your reply. 

  • Hi Bruno,

    Are you sure of this 5nA requirement?

    A standard 9V battery has 400mAh capacity.

    At 5nA it will drain in 100 years (0.4  /  5e-9 *24*365 =9132 years)

    Peter

  • Hi Peter,

    no, I'm not sure. The current drain and battery lifetime calculations I've made
    are not precise. I've measured the on and off state current drawings with an Agilent 34410,
    and I'd conduct tests once the product is first assembled to get better aproximations.

    The last data I've got  is 120mAh for local market 9V batteries, and
    with around 50-100nA continuous current consumption plus the
    on state usage - reaches 20-40mA, a lifetime of around 2 years.  
    We were looking to something around 5 years, which is the usual
    battery expire time, considering you've buyed it  soon enough.

    Not sure if I'm overreacting with this battery draining thing.  

    Thank you for your reply.

  • Bruno Marchesi said:
    We could do: 9V - R1  - AS input - R2 - Qs - GND

    Why not using 9V - R1 - FET - MSPin - R2 - GND?
    Teh FET is controlled by an MSP pin. Since the FET gate is a pure capacitive load, the port pin won't drive any current except during state change.
    When you raise the gate of the FET to VCC, the MSP input pin will raise from GND (through R2) to (R1*R2)/(R1+R2). If R1 and R2 are carefully chosen, this voltag eiwll be above teh high-going threshold level when the battery is still good and stay below if the battery is bad. You might want to replace R1 by an adjustable resistor, so you can trim the threshold to narrow down the threshold voltage. But if you don't need an exact trigger point, carefully chosen fixed resistors do the job fine.

    However, pick a FET with a very low gate threshold voltage, as the gate will be risen to VCC, btu the FETs drain will have to also rise above the input threshold. So the difference between drain and gate will be small. It's a tight calculation. But will drop your 'comparator' load to zero if the FET gate is pulled low.

  • Not sure if I kept up with your approach, but using 9V - R1- FET - MSP input pin - R2 - GND,
    where FET: BSH103, Rds 0.5R, vth 0.4V,

    if we initially set 3V3 on R2 with Vbat 9V, neglecting Rds, this gives us, for example,

    R1=173k and R2=100k. This leads to a minimum 'good' battery voltage of 7.21V,
    because of Vih min = 0.8Vcc 

    But, if we stretch the MSP input pin voltage to something near the absolute maximum rating of 3.6V,
    using 3.5V, we get R1=157k, R2=100k, and a minimum 'good' battery voltage of 6.79V.

    That's a good example of a tight calculation, but it could work nonetheless. I'll try it out and come back.

    I didn't catch up the importance of a low vth. This 0.4V was the lowest one I could find, anyway.

    If this was not what you meant, if you find some time and could please elaborate on it, it'd be appreciated of course.

    One more time,
    thanks for your reply. 

  • Bruno Marchesi said:
    That's a good example of a tight calculation, but it could work nonetheless

    Yes, it requires some calculation (and takign tolerances into account). Some of these things work fine, some only sometimes and others fail when worst-case tolerances are used in the calculation.

    Bruno Marchesi said:
    I didn't catch up the importance of a low vth. This 0.4V was the lowest one I could find, anyway.

    Soem FETs have up to 2.5V. 0.4V is quite good.

    The problem is that Vg needs to be by Vth above Vd. Vd, however, rises when the FET begins to switch on (as Vd is also the MSP input voltage). So Vd must be above the threshold voltage, but Vd+Vth must still be reachable by the MSP output driver (<=Vcc). If Vth is too large, it won't work. Vth must be less than the difference between positive-going threshold voltage and VCC.

  • Hi Bruno.

    To use the switched voltage divider you need 1 MSP430 output and 1 ADC input..

    You also need 3 resistors and BSH103 ( low vth nmos transistor).

    To monitor a 9V battery I would use 90kohm resistor connected to the drain of BSH103.

    The BSH103 source is connected to 10kohm resistor to ground.

    the BSH103 gate is  connected to 10kohm resistor to ground.

    The MSP430 output is connected to the gate and the ADC input to the source.

    With the output set to 0V you have just the  BSH103 leakage flowing through the divider. ( < 100nA spec = ~ 5nA typ )

    With the output set to 3V you have a 10 to 1  divider. (  BSH103 = < 1 ohm )

    So to measure the 9V battery activate the gate circuit, ADC reference, use long ADC sampling period and convert, this should take about 100us.

    The measured voltage should be 0.9V with fresh battery.


    Peter


  • Peter Dvorak said:
    To use the switched voltage divider you need 1 MSP430 output and 1 ADC input..

    The prerequisite was 'there is no ADC and the comparator is already in use'.

  • Jens-Michael: said:
    The problem is that Vg needs to be by Vth above Vd.

    Well, that kinda invalidate my previous calculations. -sigh-

    Still, maybe something like this could do the trick... 
    The mosfet pair is a single sot-563, $0.53 part.

     

    With logic low at the 'shutdown' pin, ie the N mosfet gate, P mosfet gate should be at 9V,
    thus off. 3V3 at N mos should bring P mos gate to ~0V, and for battery voltages from 9V
    till something around 6.6V, we should have 3V3 at MSP input pin. 

    With almost the same amount of parts, it could be used a $1.40 ADC with 5nA-1uA standby  current,
    I2C interface, sot-23-5 package. Maybe the circuit above still has the advantage of a near-zero standby
    current, it seems. 

  •  Hi Bruno, what we know:

     1> a Gun shaped device that measure some way temperature (no data on method)

     2> an MSP is inside (no device model)

     3> no data about how data is handled by

     4> no data about which peripheral are onboard and why 9V battery instead of 3.6 Lithium batt so it can leave MSP live forever.

     5> commercial battery, the low capacity in first line last before end date and leakage occur damaging your instrument.

     6> power cycle duty, power drawn when on

     The circuit you drawn test when battery voltage drop below threshold minus 3.3 V from Zener reference, this is an instable condition that appear when voltage dropped under 1.8 plus 3.3 so threshold drop with the supply and battery is too low voltage. Raise the upper zener to almost 5.6V.

     Upper P channel mosfet can be overdriven over max VGS with a punch through risk, better  on low side part remove N channel and substitute with a 10-100nF capacitor using it as a boostrap driver.

  • MSP430F4351 was on title... seen late sorry

     SOme trick can be done using double integration converter done just with some resistor and some free cpu pin.

     Comparator is needed, so is this pin available or shared?

     If yes two resistive divider can charge/discharge a capacitor from cpu voltage level and then evaluate time to reach threshold, this method work comparing unknown voltage to VCC of MSP, this is as  precise as VCC is stable, so it can be used till battery is not fully discharged.

     If not available and spare pin are is possible to compare unknown voltage to input gate hysteresis too, this method require continuous calibration but it can work reading few bit than from precision comparator but enough to evaluate battery voltage to one decimal.

     Problem on how to timely switch on instrument remain unsolved.

  • Bruno Marchesi said:
    Maybe the circuit above still has the advantage of a near-zero standby current, it seems. 

    Yep. it should not draw anything from the battery if not activated. (well there's a maximum port leakage current of 50nA each, and the leakage current of the FETs, if any). And you don't need to interface the ADC :)

    And the two-stage FETs are a good idea. However, the zeners won't work. First, zeners require a relatively large current for their nominal voltage. Below, the voltage drops. Besides the nonlinearity of this influence, this doesn't gove you any advantage over a plain resistor divider. And raises the costs.

  • Jens-Michael said:
      Below, the voltage drops.

    Indeed, what a... crappy... Iz/Vz curve zeners have these days... omg.
    A ZRC330 would behave a lot better, but it's $1 each.

    Jens-Michael said:
    this doesn't gove you any advantage over a plain resistor divider 

    Suppose the ZRC330 would cost $0,01. Wouldn't it give more flexibility over battery levels checking?
    I mean, we have surgically defined two resistor values, but below 6.8V the battery will always be 'bad'.
    Granted, in this case it will probably be anyways, but with voltage references we could check
    much lower values, isn't that true? 

    Jens-Michael said:
      And raises the costs.

    Back to the resistor divider then. I'll try that out and report back. 

    Thanks for your reply.

  • Roberto Romano said:
    Comparator is needed, so is this pin available or shared?

    The pin is being used. It could be shared with analog switches though. I'm afraid this approach
    could lead to more complex circuitry than that under discussion (two mosfets). 

    Roberto Romano said:
    this method require continuous calibration but it can work reading few bit than from precision comparator but enough to evaluate battery voltage to one decimal.

    We are not required to measure the battery level. It's only needed to warn the operator
    of low bat. I didn't understand your method, if you could please comment on that. 

    Thanks for your reply.

  •  

    Bruno Marchesi said:
    We are not required to measure the battery level. It's only needed to warn the operator
    of low bat. I didn't understand your method, if you could please comment on that. 

     Method is a variant of double integration made with some digital pin, an RC is connected between two MSP pin, at first two charge and discharge cycle are performed to measure time to reach lower and upper threshold from VCC, then PIN is shorted to ground and same is done with external unknown voltage, the ratio between cycles is the ratio between voltages.

     But you just need a low battery signal so your circuit is near the solution, just use capacitive drive to P mos and raise the voltage of upper zener to provide the correct threshold. Battery voltage under 7V signify battery low, so 7-1.8 -> 5.2V follow a 5.1 or 5.6 zener as the best choice. Also add a low side resistor to bypass all capacitive coupling, zener capacitance is not so low and your pin can be driven also with battery empty. Drive your gate pin and test if low voltage input respond to.

  •  A simple resistive divider instead of both zener can do the same job relying on threshold voltage, an LED instead of D1 can also do the job of visual battery good test.

     Bottom Zener must be 3.3V but no model was on library. Pmos can be FDN338P from Fairchild, low rds on low gate charge and logic voltage at a cost less than the one proposed.

  • Roberto Romano said:
    just use capacitive drive to P mos

    Why is this better than complementary mos? Or it's because it's cheaper?

    And, as Jens-Michael brought up to light, common zeners really happens
    to have an  horrendous i/v curve, so bad I'm afraid of surpassing the 
    abs max of 3.6V input pin voltage. So I would stick with R divider, which
    you already suggested too.

     

  • This may be the final call, the simulation went sweet.
    Mosfets are similar, real one will be Si1016X, $0.53.

      

    Minimum battery voltage check is 6.8V,
    standby current is (( 1nA.
    Total cost is ( $1

    Thanks for all the replies. 

  • Bruno Marchesi said:
    Minimum battery voltage check is 6.8V,
    standby current is (( 1nA.
    Total cost is ( $1

     Ok this is the better solution but just add a resistor in series to M1 drain to avoid discharge Cgs thru a low r path.

     Again try a small sc70 mosfet pair like this one if FDG6324L case is too small there are equivalent  sot23-6 cased, I suppose @ US$0.271 this chip is more cheap than discrete pair. Data sheet.

  • Roberto Romano said:
    add a resistor in series to M1 drain to avoid discharge Cgs thru a low r path.

    Mos1 should discharge through R1, Mos2 through R4. Is that incorrect?

    Marchesi said:
    Mosfets are similar, real one will be Si1016X, $0.53.

    This complementary Mos is sot-563, $0.53, the proposed FDG6324L is $0.63 unit price.

    Thanks for your reply. 

  •  From absolute maximum rating Si1016X vgs +-6V so @9V I fear it punch trough and the price difference result in a failure. The complementary mos you choosed can be used to substitute two mos, the one I proposed is a power switch so vgs max can withstand 20V vithout damage. About Cgs of P mos is discharged by M1 so low rsd on act as a discharge loop and this radiate energy and exceed gate current. The device has Rds on of 1.2Ohm so no problem with P channel stored charge but again take care of absolute max ratings.

  • Roberto Romano said:
    I fear it punch trough

    Indeed, the part was incorrectly chosen, you're right. I did not pay attention to Vgsmax. 

    After simulating with the FDG6324L, the off state current draw from the 9V bat appears to be 1.8uA.
    I'm not sure it it's reliable, but this current is too much.

     

    Roberto Romano said:
    take care of absolute max ratings

    Yeah, there are indeed some current spikes, simulation wise.

    Well, I believe I'm back to ground zero again... Unless changing Si1016X by Si1029X, Vgsmax 20V,
    that could be it. 

    Thanks for your reply.

  • Roberto,

    this is an improvement of the first circuit, based on your thoughts.
    Due to current drawings, the MOS switch was replaced by this complementary MOS,
    but now with Vgs above the 9V spec.

    There was indeed some nasty current spikes, reaching almost 2mA on Vout transitions.
    Those were reduced to ~250uA by proper R2 setting, raising from 1k to 10k. The tenfold R1/R2
    ratio is kept. Spice reports off state total consumption around 1.2nA.

    In both simulations (FDG6324 and Si1029), the models provided by respective factories
    were used.

    Finally, this may be a good answer to the problem.

    Thank you.

**Attention** This is a public forum