Low Voltage Detection - 16F628A


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default

    Sir, considering i am using a 16F828A, i can detect a min of 3V.

    Any idea on how to use the internal Comparator for detecting a low voltage situation.

    Thank you for your help.

    regards.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    a regular 16F628, depending of the crystal speed, is suppose to work from 3V to 5.5V. Detecting a 3V may work great or not. What i'll personnaly do is to use the 16LF628 wich work down to 2V. That's my own opinion.

    What i usually do, and some may have another opinion, is to use an LF serie and a LDO voltage regulator. This give me a stable voltage reference to compare against the battery voltage. That way it work.

    One way to do it...
    Datasheet section 9.1 use mode 101 (one comparator)
    Poll C2OUT bit of CMCON

    OR Interrupt
    Enable Comparator interrupt (see PIE1 register 4.2.2.4)
    .
    .
    .
    your code.
    .
    .
    .
    Interrupt routine
    Blink your LED
    Clear Comparator interrupt flag CMIF (PIR1 register 4.2.2.5)
    Resume Interrupt.


    Without any voltage regulator it's not impossible but you need a stable voltage reference... i remind one of my bench stupid idea in the past : use an I/O to supply a Resistor + Zener Diode for the voltage reference... worked. But as Zener diode need few mA to work properly... it's not suitable for a battery powered system... IMHO
    Last edited by mister_e; - 25th April 2006 at 04:08.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Take a look at

    Take a look at the MC34064 low voltage detector. Connect this to a port pin and check the pin to decide if you want to blink the LED

    Jerson

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Use the 16F628A's COMPARATORS, this is exactly what they can be used for...

    Many years ago, I did a Comparator tutorial on the piclist, a link to the archive where it can be found is here...

    http://list.picbasic.com/forum/messa...tml?1020960642

    By configuring the internal Voltage Reference Module (Datasheet secion 11), you can detect voltages as low as around 208mV, by using two Resistors (Potential Divider from 5v rail) as external Reference, you can get even lower. See the Datasheet (Table 17-2) for the Comparator Specification for exactly how low. Theoretically by setting the Reference to 0v you might be able to detect a positive going voltage as low as 10mV, though I haven't tried that.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking Miracle !!!

    Quote Originally Posted by Jerson
    Take a look at the MC34064 low voltage detector. Connect this to a port pin and check the pin to decide if you want to blink the LED

    Jerson
    Hi, Jerson

    As the 34064 detects 4.65v ... how do you do this kind of miracle ???

    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 " !!!
    *****************************************

  6. #6
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default No miracle here.

    Hi Alain

    Since Charudutt did not specify how low is low voltage for him, I assumed. Anyway, I have a similar app where I use 6V for supply and 4.65 is low enough for the circuit to stop operating correctly.


    Jerson

Similar Threads

  1. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  2. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  3. Problems with RC2 and RC3
    By Christopher4187 in forum General
    Replies: 11
    Last Post: - 29th May 2006, 17:19
  4. 4-line LCD Help - using PortA instead of B
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 31st March 2005, 03:14
  5. Low Voltage Detection
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th January 2005, 18:29

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