Monitor supply voltage of chip?


Closed Thread
Results 1 to 17 of 17

Hybrid View

  1. #1
    Join Date
    Jan 2015
    Posts
    45

    Unhappy Monitor supply voltage of chip?

    Hi everyone, I need some help with monitoring battery supply voltage to the chip. I am supplying the pic (12f683) with a 3.7v 18650 battery. Basically I want to trigger a comparator interrupt when the voltage hits the 2.8v mark, which will then put the pic into low power mode (sleep/nap).

    My problem is that as the supply voltage is coming from the same battery that I want to monitor the voltage from, I cant seem to find a way to use comparator or adc. This is because the voltage reference (supply voltage) is dropping at the same rate as the pin that I will be reading from, it doesn't matter if I use a divider or not, I just cant find a way.

    Can anyone help with this or is it impossible without a separate/fixed voltage input to the chip?

  2. #2
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    I think a fixed Vdd to the PIC set below the "low battery" level is your only recourse with this one.
    Then a simple voltage divider to monitor the battery level with the A/D to trigger sleep mode after that.

    If you're not sourcing much through the 12F1683, a small 2.?V zener is all you'll need for Vdd.
    Louie

  3. #3
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    The datasheet for the 12f683 shows that it has an internal Fixed Voltage Reference that can be used to compare against the supply voltage.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    Quote Originally Posted by Heckler View Post
    The datasheet for the 12f683 shows that it has an internal Fixed Voltage Reference that can be used to compare against the supply voltage.
    hi, Dwight,

    not really a reference for the 683 ...


    - Programmable on-chip voltage reference
    (CVREF) module (% of VDD)
    so, here it is not possible to reach the goal ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    There is more than one way to to this. All you need is fixed reference voltage.
    Eg 0,6V from diode(if you can tolerate drift about 2mV/degC), some pic have built in diode for temp. monitoring, or pic fixed reference(FVR), or voltage from some blinking LED(Do battery check when LED is on).
    So you can feed fixed voltage on ADC pin, and use Vdd as reference for ADC. If Vdd is lower than ADC result are higher and reverse.
    Some pic have FVR on ADC multiplexer(or internal diode), so there is convenient way to do that, without loosing io pins.
    If you are using external fixed reference, you can use IO pin to turn on/off reference to minimize current draw.

  6. #6
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    Hey Robbo,

    If you decide to use the internal Fixed Voltage Reference you might want to take a look at my second post in this tread... http://www.picbasic.co.uk/forum/showthread.php?t=19035

    and read this thread also... http://www.picbasic.co.uk/forum/showthread.php?t=17321

    sorry that my post about the FVR earlier was so short but I was at work.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

  7. #7


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    have a look at AN1072. Darrel wrote a piece about the subject.

  8. #8
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    Heckler
    According to microchip's datasheet( http://ww1.microchip.com/downloads/e...oc/41211D_.pdf ) PIC12F683 doesn't have Fixed Voltage Reference.
    Last edited by pedja089; - 25th February 2016 at 08:50.

  9. #9
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Red face Re: Monitor supply voltage of chip?

    Thanks for all the replies! Yes the 12f683 doesn't have a FVR, so that's out the question. I think I am going to go with "LinkMtech's" idea and just use a 2.4v Zener to regulate the chips supply, then a divider onto a pin for reference.

    Thanks for your help.

  10. #10


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    microchip has a to92 voltage detector...... different voltages and draws 1 microamp....
    http://ww1.microchip.com/downloads/e...Doc/21434g.pdf

  11. #11
    Join Date
    Sep 2009
    Posts
    737


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    @robbo78
    That solution is not good for battery.
    With zener regulator current draw from battery is same in if pic is sleep mode as in run mode.
    If you use zener, then feed that voltage into analog pin, and then do ADC. This way current thru zener can be few uA instead few mA.

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    I don't know how wedded you are to the PIC12F683 but PIC12f617 looks similar but with a 0.6v ref but no EEPROM (although it can self write so that needn't be a show stopper).

  13. #13


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    PIC 12F1822 has FVRs and eveyrthing else you need.

  14. #14
    Join Date
    Jan 2015
    Posts
    45


    Did you find this post helpful? Yes | No

    Default Re: Monitor supply voltage of chip?

    @robbo78
    That solution is not good for battery.
    With zener regulator current draw from battery is same in if pic is sleep mode as in run mode.
    If you use zener, then feed that voltage into analog pin, and then do ADC. This way current thru zener can be few uA instead few mA.
    Good idea! I have just found this part which is a bit of a "cheat", and quite cheap? - http://www.farnell.com/datasheets/1669371.pdf

    EDIT: Just realised that "amgen" already stated this

    microchip has a to92 voltage detector...... different voltages and draws 1 microamp....
    http://ww1.microchip.com/downloads/e...Doc/21434g.pdf
    Last edited by robbo78; - 26th February 2016 at 19:06.

Similar Threads

  1. How to use the HLVD module as a low voltage monitor
    By jellis00 in forum Code Examples
    Replies: 2
    Last Post: - 11th March 2013, 19:31
  2. Voltage monitor and PWM control
    By StoneColdFuzzy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 11th May 2009, 16:11
  3. Voltage monitor for car battery
    By passion1 in forum mel PIC BASIC Pro
    Replies: 50
    Last Post: - 23rd April 2008, 21:47
  4. voltage monitor
    By aftab in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 17th August 2007, 09:57
  5. Help with DS2436 Voltage monitor
    By vladimir059@hot in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 30th October 2006, 16:39

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts