Announcement

Collapse
No announcement yet.

Battery Monitoring

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Battery Monitoring

    Attached is a script for battery monitoring on a SN171 Proto Board.

    I verified it by using a programmable power supply, running the voltage up and down between 2.6 and 3.4 volts DC.

    Details on the external components required (only one IC and one 10K resistor) are in the script.

    Thanks to David Ewing for providing the circuit!
    Thanks to Brent Humphries for building it for me!
    Attached Files
    Last edited by kbanks; 06-03-2008, 09:43 AM.

  • #2
    Hi, I got confused about something.

    From the schematic, the voltage read by the ADC should always be 1V as the reference is connected to the GND. Am I wrong?
    What if we invert the 10K resistor and the reference chip?

    Tnx!
    Last edited by nicocarv; 04-04-2013, 08:27 AM.

    Comment


    • #3
      Use the attached formula to play with moving the values of R1 and R2 around
      Attached Files

      Comment


      • #4
        Originally posted by nicocarv View Post
        Hi, I got confused about something.

        From the schematic, the voltage read by the ADC should always be 1V as the reference is connected to the GND. Am I wrong?
        What if we invert the 10K resistor and the reference chip?

        Tnx!

        For the RF100, the ADC uses Vcc (system voltage) as the Vref in calculations. As such, when the system voltage drops, so too do your ADC readings (like if you are running on batteries).

        The 1V reference IC gives you what ADC reading is currently associated with a true 1V input.

        Using the formula adcValue/MaxAdc = realVolt/Vref you can simplify
        down to Vcc = 1024/readAdc(7). Now you now know the system voltage.



        Note: You can use this same 1V reference if you need to do any ADC readings when on an unknown Vcc (like if on batteries). You can then adjust the math in your script based on what you get for the known 1V reading.
        sigpic
        Proven Solutions for the Internet of Things
        www.synapse-wireless.com

        Comment


        • #5
          Of course!!! Know I see it clear. Thank you very much!!

          Comment


          • #6
            I have been trying to use the BatteryMonitor.py script to read battery voltage on an SM220. After reading this thread I think I now know why it isn't working. In my case when I read the voltage from the ADR I always get a value of 640. This makes sense since there is now an internal voltage reference of 1.6v so 1.0v is always 640, which tells me nothing about the voltage being supplied to VCC.

            Do you have any tips for me to calculate supply voltage on a newer board with an internal reference voltage?
            Last edited by KLowe; 03-28-2017, 11:12 AM.

            Comment


            • #7
              I was able to get something workable here by routing VCC into an ADC pad with a voltage divider in the middle such that if VCC is 3.6V I route 1.6V to the pad. That way if I read 1023 off the pad I know I am receiving 3.6V on VCC. I am just passing the value read off of adc back to another PC and calculating the voltage using: (refAdc/1023.0)*1.6*2.25 where 2.25 is the factor that I am stepping VCC voltage down by.

              Comment


              • #8
                The example that you are referencing is very old and the processor you have has a built-in comparator for measuring battery voltage. I would recommend using the attached file for battery measurement without requiring any external circuitry.
                Attached Files

                Comment

                X