New library to read Arduino VCC supply level without resistors for battery powered sensor nodes that do not use a voltage regulator but connect directly to the batteries ;-)


  • Mod

    I'd like to share my little experience with the 3.2V LiFePO4 AA batteries ad they are a very good solution since a single battery can be used and be directly measured through VCC without requiring any voltage divider or booster



  • @Yveaux I know about that fluctuation, but for my use in a scene controller I would be happy just to know the battery is low. I have it running with a multi-button, were I have click, duble-click and click and hold, I only check battery at one click, because of its fluctuation, but if you use it more than 4 times e a short period that fluctuation is noted, and that is why a added to the 10% increase a 10% decrease gap on battery sent information. Thanks



  • @Nca78 said in New library to read Arduino VCC supply level without resistors for battery powered sensor nodes that do not use a voltage regulator but connect directly to the batteries 😉:

    @andredts said in New library to read Arduino VCC supply level without resistors for battery powered sensor nodes that do not use a voltage regulator but connect directly to the batteries 😉:

    @Yveaux Thanks, that was exactly the insight I was looking, for my door sensor with 2aa battery, your way worked great. For a scene controller with a CR2032 a had to not send also decreases greater then 10%, but hey, 10 steps is more enough.

    For having consistent measurements with a CR2032 you should measure voltage as first action after waking up from sleep.
    I keep the value in a variable and process it after "action" message of the node.

    If possible, run at 1Mhz on internal oscillator so the power consumption of the atmega stays very low (around 1mA instead of 3 at 8MHz/3V).

    Hi, I do read the battery first thing after wake up, my problem was when a had various click too close together. It`s good now that I only send battery values that a 10% higher or lower than my last stored value. I will take a look on the 1Mhz bootloader. Thanks


  • Mod

    @andredts you could make an average of the last 3-4 reads before sending the battery value


  • Mod

    is it normal that just swapping a pro mini I am getting a voltage reading difference of 0.12V from same node?


  • Mod

    @gohan the internal reference is specified to be 1.0 to 1.2 V (see "29.5 System and Reset Characteristics" in the datasheet)

    So the voltage will vary between different chips.


  • Mod

    Btw, what is the maximum voltage that you can read with this vcc library?



  • Hi guys, I plan to use a battery powered temperature sensor - 2xAAA batteries i.e. 3V plus a cheap thermistor with a series resistor. I think I shall use the internal 1.1V reference with a resistor divider like 1Meg and 470K to measure the battery level.
    But ... I think I can use two Arduino pins configured as outputs (one output would be HIGH and another would be LOW) to connect the resistor divider instead of connecting the divider directly to VCC and GND - this way the resistor divider would draw current only when the sensor is awake and thus saving power. It would be more simple than using an external transistor to enable the resistor divider.
    Same goes for the temperature measurement, use another pair of pins configured as outputs to connect the thermistor and the series resistor.
    I have tested this idea using the Nodemanager "setPowerPins" function, I can easily measure temperature this way and draw current only when the sensor is awake. After making the measurements all outputs are set LOW (no resistor divider can draw current) then I put sensor to sleep.
    What is your opinion? Is there any "weakness" in this idea?


  • Mod

    @iahim67 I'm missing what your request has to do with the vcc library



  • @gohan sorry, my bad, nothing to do with vcc library ... just realized that vcc lib allows me to measure vcc without resistor divider:-)


 

289
Online

7.5k
Users

8.3k
Topics

89.8k
Posts