Author Topic: battery monitor with analogSelection() and 1/3 prescaling  (Read 1456 times)

mattvenn

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
battery monitor with analogSelection() and 1/3 prescaling
« on: December 17, 2014, 07:51:10 AM »
I want to measure the battery I'm using for my project.

I'm using a LiPo with that will start off at 4v and drop to around 3v. This is put into a 2.8V regulator for the rfduino.

If I'm using VDD as the ADC ref, and set

analogSelection(AIN_1_3_PS);

Does that mean that when the battery starts off at 4v I'll be reading 4/3v?
How does the prescalar stuff work? Is it a potential divider inside the rfduino?

Or will I need an external potential divider?

Thanks,
Matt

mattvenn

  • RFduino Newbie
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: battery monitor with analogSelection() and 1/3 prescaling
« Reply #1 on: December 17, 2014, 07:59:39 AM »
never mind, I found this over on the nordic semi website:
https://devzone.nordicsemi.com/question/102/what-voltage-range-can-be-measured-with-the-adc/#reply-103

I keep forgetting the rfduino is basically a nRF51822, and with its closed source libraries, often the best way to find the answers is to read the data sheet or check the nordic semi forums.