How to detect low battery in battery powered F683 circuit


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Quote Originally Posted by tekart View Post
    Remember I only have the one A/D input to work with in my very simple circuit.
    In that case you need a pic12f1822 or similar with an internal vref. The internal vref will work with the adc or comparator module.

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Connect one end of diode to ground, other to pic input and pull up resistor. Just like in schematic on page 8.
    They suggesting to connect diode to ground thru mosfet to minimize current consumption. When mosfet is turned on, there is about 0,6V on pic input, and that voltage won't change.
    You do not need to use mosfet, you can connect diode to ground permanently, or connect to output pin.

  3. #3
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Quote Originally Posted by pedja089 View Post
    Connect one end of diode to ground, other to pic input and pull up resistor. Just like in schematic on page 8.
    They suggesting to connect diode to ground thru mosfet to minimize current consumption. When mosfet is turned on, there is about 0,6V on pic input, and that voltage won't change.
    You do not need to use mosfet, you can connect diode to ground permanently, or connect to output pin.
    Yeah, I get the hardware side now - but how to implement this on the F683 with no Vref and one A/D? Am I missing something?
    "Do or do not, there is no try" Yoda

  4. #4
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    You are missing...
    There is Vref on every pic with ADC.
    http://ww1.microchip.com/downloads/e...oc/41211d_.pdf Page 63 Bit VCFG(bit 6 of ADCON0)

  5. #5
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    OK, I see that now. So how do I select between the IO pin and the Vref source in code? No idea how that is done...
    Still don't see how the resistor - diod junction will provide me with a reading that represents the changing Vbatt...
    Last edited by tekart; - 27th October 2014 at 19:11.
    "Do or do not, there is no try" Yoda

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    I think the confusion between you and pedja089. The first way you need two external pins from the ADC or comparator.
    One of the pins is tied to an external vref source and the other is your analog input. There is no voltage reference in the 683
    VCFG bit or ADCON0.6 either connects the ADC vref(input) to VDD internally or connects it to and external (pin) reference you provide. .
    The second way only one external pin is needed. (pic12F1822) has an internal reference diode which can be configured to be the vref source for the adc or comparator.

  7. #7
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Mark, thank you for clarifying. I thought it was something like that but my inexperience with internal voltage references left me confused. I have ordered some F1822 chips to experiment with.

    So would you mind clarifying for me how I would go about using the single pin to take advantage of the internal reference diode. Do I understand correctly that this diode would replace the external diode we have been discussing, so all I would need is a pull-up resistor on the ADC pin? I still don't see how that would give me a reading that would very since I would still just be reading the voltage drop of the reference diode. Forgive me for being dense about this but I still don't get it.
    "Do or do not, there is no try" Yoda

  8. #8
    Join Date
    Sep 2008
    Location
    Maine, USA
    Posts
    81


    Did you find this post helpful? Yes | No

    Default Re: How to detect low battery in battery powered F683 circuit

    Quote Originally Posted by mark_s View Post
    In that case you need a pic12f1822 or similar with an internal vref. The internal vref will work with the adc or comparator module.
    OK, now that is helpful. I was not aware of an 8-pin chip with all those features and at a good price too! Now I'll just have to learn how to configure the internal Vref to get the results I need. Another slog through data sheets that can take hours!
    "Do or do not, there is no try" Yoda

Similar Threads

  1. How can a battery powered PIC turn itself off?
    By tekart in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th August 2012, 10:44
  2. Replies: 13
    Last Post: - 22nd January 2012, 04:48
  3. Battery powered applications
    By NavMicroSystems in forum Off Topic
    Replies: 7
    Last Post: - 22nd June 2009, 07:12
  4. 12F683 battery powered remote - energy consumption question
    By silentwol in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th April 2007, 13:23
  5. Battery Powered Need Help!
    By scottl in forum Off Topic
    Replies: 1
    Last Post: - 29th March 2006, 09:52

Members who have read this thread : 0

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