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.

Disconnected AUXVCC2

I have an application that uses auxvcc1 and auxvcc2 for back-up purposes, in auxvcc1 is connected a supercap, and auxvcc2 is connected a battery.

And in my system the battery is not mandatory, is optional to the user. And the program should take different actions when it detects that a battery is connected or not.

My problem is that when the battery is disconnected I get unstable result, as I expected since the family guide states the any unused auxvcc should be connected to ground, and when the battery is not available this pin will be in high impedance (floating).

So my question is if someone have any suggestion in how to manage this, when the battery is disconnected I measured auxvcc2 and the voltage was 0.6V, but the flag AUX2OK keeps switching on and off.

Thank you very much,

Best Regards,

Leandro

  • Sorry if I might be a bit terse, this is the fourth time I have typed this due to having a new laptop with 'fantastic' trackpad.

    Is this a case of floating input being affected by voltage field due to stray things for example mains wiring in the wall?

    Are you sure you are not influencing your measurement by connection of your measuring equipment?  Most of these tend to 'pull down', meaning that if you were measuring (say) the voltage at one end of a 1M resistor whilst the other end is connected to 10 V supply, and your meter had infinite internal resistance, you'd measure 10 V, but with a resistance meter having internal resistance 0 ohms (a rubbish and pointless voltage meter) you'd measure 0 volts, and with a 1M internal resistance meter you would measure 5 V. 

    The point being that the resistance of the measuring instrument affects the measurement itself.  Are you causing it to switch?

    To manage the situation, determine the electrical conditions if no battery is fitted and the electrical conditions if a battery, of whatever state of discharge, is fitted.  Write down and analyse.

    There are perhaps two strategies here: 1) recognising that no battery is fitted, and 2) proving that no battery is fitted.
     
    In 1, you attempt to determine by software if the user has left out the battery.
    In 2, your software attempts to prove that no battery is fitted by the user - even a flat (discharged) one.

    I would recommend 2 because it is perhaps easier and can check if, having run the software and found that there is no battery, is perhaps more able to cope with the situation where one is suddenly fitted, by repeated checking.

    Can you detect presence/absence of the battery by, for example, a microswitch?  Or two contacts on the same terminal (plus or minus) that give a short when the battery is fitted?  This might allow you to 'prove' that no battery is present, or alternatively that something resembling a battery is fitted.

    For 'determining' whether it is fitted or not, you'll probably have to measure the 'battery' voltage and check if it is stable, as it would be from a proper battery (although a stable result does not guarantee that a battery is present).  This is why I think it is perhaps better to prove that no battery is present by, for example, a separate switch activated by the presence or absence of the battery.  Although this might require a little extra hardware, you will be more sure.

    Food for thought?

  • Hello Tony,

    Thanks for your reply, regarding the measurement equipment, that actually does happen, when I connect the voltmeter to the auxvcc2 pin, the problem of instability disappear, because the voltmeter has an internal resistance of around a 10M ohm which act as a pull down resistor.

    The problem only happen when there is nothing connected to the pin.

    Regarding the micro switch that is not a possibility because I don´t have any i/o pin left, my current idea is exactly to the same as the voltmeter does, so I connected a 10 M ohm resister between the auxvcc 2 to ground, the down side of this approach is that the battery consumption increase by 300 nA, but I made a few calculation and the life of the battery will decrease in two year which for my application is ok (from 21 years to 19 years).

    I was wondering if there was some other approach via software which didn´t have to use a lot of processing, because the way that I would like to use to detect the battery is after an aux drop interrupt, because the system is in low power mode, and didn´t have any additional consumption in energy. Since there little information on application that really uses the aux system in the internet, so I was wondering if anyone came across this problem.

    When the system is working in full performance I use the method you suggest to prove that the battery is ok.

    Thanks

  • Leandro Pereira said:
    the family guide states the any unused auxvcc should be connected to ground

    Wild guess - what if you try connecting auxvcc1 and auxvcc2 together using resistor, not necessarily 10M but whatever.. for example 100k.

  • Ilmars’ suggestion isn’t bad. But I’d go a step further: Add a diode followed by a series resistor between auxvcc1, and auxvcc2. If the line supply is available, the resistor will limit the charging current into the battery to a harmless amount. If the supply is gone, the diode will prevent the battery from being discharged by the (depleted) supercap’s internal discharge leakage. So pick a diode with minimum reverse current.

**Attention** This is a public forum