Read voltage VCC, strange measurement[solved]



  • I am using readVCC to read my battery node.
    ATMega328P-PU, like this , home made PCB, Fuses(BOD) is set to 1.8 V

    long readVcc() {
      
      // Read 1.1V reference against AVcc
      ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
      gw.wait(2); // Wait for Vref to settle
      ADCSRA |= _BV(ADSC); // Convert
      while (bit_is_set(ADCSRA,ADSC));
      result = ADCL;
      result |= ADCH<<8;
      result = 1126400L / result; // Back-calculate AVcc in mV
      //return result;
      batteryPcnt = (result - 3300) * 0.111111;
      batteryVolt = result/1000.000;
    }
    

    it is working perfect on many of my nodes but one node have low battery compared to other nodes. They all have same battery type CR123A, 3 volt battery.
    On this node the volt level is 2.4 V. It was not new when I start to use it. It was starting at 2.5V.
    Last month it gives noise/jumping measurement. Going from 2.4 down to 1.9 see below. There are no measurements between 2.4 and 1.9.
    0_1483534070436_chart.png
    From start
    0_1483534137756_chart (1).png

    Anyone seen this before or know what it can be?


  • Mod

    @flopp coincells can drain very quickly if too much power is used or if they have low capacity left.

    Is the power consumption of the node approximately the same all the time or does the node sleep?

    If it does sleep, the answer is probably that the chemistry in the battery is able to recover after a while, but the battery does not have much power left.



  • @mfalkvidd said:

    Is the power consumption of the node approximately the same all the time or does the node sleep?

    Thanks
    It is sleeping for 30 minutes. So it can be on the end of the battery life as you say.



  • @mfalkvidd

    you where right.

    This graph will talk for itself 🙂
    0_1483777894484_chart (2).png


  • Mod

    @flopp thanks for the feedback!
    Just wondering, how long did it take to get from full to this jumpy state?



  • @Yveaux
    I don't know because the battery was old when I started to use it.
    Home made pcb. Report every 30 minutes. No cap on battery.
    Take a look at this graph. This may be a new battery, don't remember. Has been running since 1/4 2016
    0_1483800257269_IMG_3616.PNG


Log in to reply
 

Suggested Topics

  • 4
  • 2
  • 274
  • 3
  • 9
  • 933

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts