• AVR Freaks

Hot!PIC10F200 as voltage monitor...

Author
dpaulsen
New Member
  • Total Posts : 2
  • Reward points : 0
  • Joined: 2019/11/07 09:16:07
  • Location: 0
  • Status: offline
2019/11/08 06:33:46 (permalink)
0

PIC10F200 as voltage monitor...

I suspect this will meet with some level of disapproval, but let me explain:
 
I am, in effect, trying to use a super cheap PIC10F200 as an intelligent voltage monitor.  The 10F200 is spec-ed with an operating range of 2-5 volts.  The system in question needs to know when voltage drops below 2 volts.  In a nutshell, I’m using the 10F200 as a sacrificial component.  That is, when it dies from under voltage, its outputs will go low, and that can be observed elsewhere and acted upon.   This actually works well enough, although empirically I’m finding several 10F200 samples all go belly up closer to 1.5 volts that the published 2 volts.  That cut off is a bit on the low side for my application, but still usable.
 
What doesn’t pass muster, however, is as the 10F200 remains alive it (again empirically) seems to be drawing around 100 uA (versus published < 175 uA).  To reduce this, I have tried putting the 10F200 in sleep/standby mode.  The 10F200 should be drawing on the order of 100 nA, which would be grand, but my ancient and venerable Fluke DMM can’t measure it (time for an upgrade...?).  I can, however, measure that in sleep mode the 10F200 seems to stay alive down to the 0.5-0.7 volt range, and that simply won’t do.
 
So.  I guess my question here is whether anyone has had any experience (or documentation exists) with PIC’s entering the death zone in general or the 10F200 in particular?  
 
Defense #1:  Yeah, I know!  This is kind of uncool using a PIC (or any micro) in this manner, but in my defense I note that this is a patch for a long standing design.  If we were starting over, we’d do it very differently.  But we aren’t, so here I am….
 
Defense #2:  So why not, you asks, simply use a voltage monitor IC?  There are, after all, scads of them out there and they are not that much more (yes more!) expensive than the 10F200.  Well, those are all ICs with their own operating voltages.  Curiously, I can’t identify any documentation on how they behave below their minimum operating voltage.  With the PIC, I feel comfortable (and feel free to challenge me here) that when it dies for lack of oxygen – I mean “voltage” – it’s I/O pins will reliable end up low.  If that’s a questionable assumption I’d welcome criticism.
 
Well, there you go.  Anyone have an opinion…?
#1

9 Replies Related Threads

    mbrowning
    USNA79
    • Total Posts : 1552
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: online
    Re: PIC10F200 as voltage monitor... 2019/11/08 10:07:17 (permalink)
    +1 (1)
    Are you adding a chip to the circuit, or are you trying to kludge a solution from devices already there?
     
    In general you can't rely on what any device does when you operate it out of it's specified operating range. What 1 or 10 or 100 chips do does not tell you what the next one does, so you're just gambling.
     
    IO going low on low VDD? I think that is not guaranteed at all.
     
    The PIC10F204/6 have a comparator with a 0.6V bandgap on the neg input, so with a couple resistors you have a true voltage monitor using the comparator output. PIC10LF320 goes down to 1.8V operation and has a true BOR function and an ADC that so with a little code you can have a more flexible and possibly precise result.
     
    The true BOR (or ADC) on 10FLF320 would be what I would want - you aren't guaranteed what happens below 1.8V at some point, but you have a reliable setpoint.

    Go Navy! Beat Army!
    #2
    egan.fryazino
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/10/29 09:25:17
    • Location: 0
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/08 10:34:20 (permalink)
    0
    dpaulsen
    Anyone have an opinion…? - you need to use op amp. you can use builtin into pic10 comparator with internal voltage refrence and divided input voltage.
     
    op amp based solution will be cheaper and more reliable.
    #3
    NorthGuy
    Super Member
    • Total Posts : 5733
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/08 10:43:42 (permalink)
    +1 (1)
    The internal comparator against internal voltage reference lets you set any trigger point (but you'll need a voltage divider). But the voltage reference consumes current too. If MCU dies, the output goes tri-state, so you need a pull-down.
    #4
    dan1138
    Super Member
    • Total Posts : 3259
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/08 13:35:50 (permalink)
    +1 (1)
    @dpaulsen,
     
    I suggest that the PIC10F200 is perhaps the worst possible controller for your intended application for this reason:
     
    The PIC10F200 design does not included a VDD brown-out-detect circuit.
     
    The data sheet recommends an external transistor circuit to pull MCLRn high when VDD is at a valid level.
     
    In my view this controller cannot be made to perform the action you need within firmware alone.
    #5
    PStechPaul
    Super Member
    • Total Posts : 2429
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/09 01:27:05 (permalink)
    +1 (1)
    The 10F200 is only marginally cheaper than the much more capable 10F320 and even many 8 pin 12F devices. Last time I checked, there are many devices well under $1, and the 10F200 was about 50 cents. Maybe a huge volume and extremely cost-sensitive application might justify saving a few pennies. And the advice given already is spot on.

     
    #6
    rpg7
    Super Member
    • Total Posts : 1386
    • Reward points : 0
    • Joined: 2003/11/07 12:47:35
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/09 02:32:55 (permalink)
    0
    PICs that I have used can consume much higher than anticipated current when power is applied slowly. I think using a PIC is a really bad idea.
    I'd recommend using something like the MCP131x or MCP132x.
    #7
    dpaulsen
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2019/11/07 09:16:07
    • Location: 0
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/11 11:40:48 (permalink)
    0
    Thanks all for your comments, and yes you are all quite right:  Using a PIC (or any micro, for that matter) is a kludge solution, one about with even I, as an admitted non-hardware engineer, am harboring grave doubts.  If I may, I would like to provide some problem details in hopes there might be some relatively easy solution.
     
    We have a legacy system which uses a super-cap to power some critical peripherals, particularly non-volatile SRAM.  We have observed that extended unpowered intervals, yielding a shallow super-cap Vcc decay curve down towards the 0.5-0.8 volt range, can result in the unreliable SRAM behavior when normal (5 volt) operating voltage is restored.  We don’t expect data retention, of course, but the system will not boot until the SRAM Vcc either decays outside this danger zone – or the SRAM is just replaced (for expediency).
     
    People are generally skeptical of this behavior, but I am quite confident in the analysis.  In fact, a smattering of battery backed up systems folk have suspiciously asked how to reset RAM chips, suggesting the problem is not unique.
     
    Since our SRAM standby data retention is only warranted down to 2 volts and I know the very gradual super-cap decay below that can result in problems, I’d really like to install a switch which completely cuts off SRAM Vcc below a fixed level.  It seems like a voltage monitor/detector would fill this requirement, but I am concerned that as an electrically powered ICs themselves with their own voltage operating range, behavior outside that range is undefined and therefore subject to suspicion, just as would a PIC or other micro outside its voltage operating range.  (Actually, Linear/Analog Devices LTC2903 is touted to have near zero volts behavior engineered in, but it’s a unique – and pricey – solution.)
     
    From my ignorant-of-the-details perspective, it seems a cheap micro might squeak by this conundrum.  If the micro is programmed with a non-default high output when running, then when it is starved for voltage, the chances of its pin remaining an output and high are highly unlikely.   
     
    Unlikely, yes, but very much shy of that 100% assurance level that would be preferred.
     
    Seems like this ought to be problem that has been faced before.  I’m surprised there doesn’t appear to be a nice, neat, canned solution.  Or is there….?
     
    #8
    Gerald1
    Super Member
    • Total Posts : 339
    • Reward points : 0
    • Joined: 2009/05/12 06:50:37
    • Location: Wien, Austria
    • Status: online
    Re: PIC10F200 as voltage monitor... 2019/11/11 13:13:26 (permalink)
    +1 (1)
    dpaulsen
    .....
     
    ......Seems like this ought to be problem that has been faced before.  I’m surprised there doesn’t appear to be a nice, neat, canned solution.  Or is there….?
     


    Well, there may be a solution: Window discriminator TCA965(B) from Siemens, or from Infinion, anno 1998.
    http://www.datasheetcatalog.com/datasheets_pdf/T/C/A/9/TCA965B.shtml
     
    The TCA965 is not a fastest device, but it can help in your application.
    This device is very old, so you may build the window discriminator with an fast double window comparator e.g. from Analog Devices and a few parts of logic devices.
    http://www.datasheetcatalog.com/datasheets_pdf/A/D/1/3/AD1317.shtml
     
    So in similar....
    Best Regards
    Gerald
    ---

    SG
    ---
    Daily the PC greets:
    "Press Enter!"; "Coward!"
    ---

    #9
    dan1138
    Super Member
    • Total Posts : 3259
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: PIC10F200 as voltage monitor... 2019/11/11 14:16:37 (permalink)
    +1 (1)
    dpaulsen
    We have a legacy system which uses a super-cap to power some critical peripherals, particularly non-volatile SRAM.  We have observed that extended unpowered intervals, yielding a shallow super-cap Vcc decay curve down towards the 0.5-0.8 volt range, can result in the unreliable SRAM behavior when normal (5 volt) operating voltage is restored.  We don’t expect data retention, of course, but the system will not boot until the SRAM Vcc either decays outside this danger zone – or the SRAM is just replaced (for expediency).

    This does not appear to be a problem with the hardware design unless you have some proof of a latch-up on the SRAM inputs or outputs.
     
    What you have described seems more like the SRAM integrity check not being robust and allowing the system to crash with a broken configuration.
     
    #10
    Jump to:
    © 2019 APG vNext Commercial Version 4.5