• AVR Freaks

Helpful ReplyHot!PIN pull-up while sleep consume to much power

Author
dezso
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2012/02/03 14:33:42
  • Location: 0
  • Status: offline
2020/01/17 17:51:47 (permalink)
0

PIN pull-up while sleep consume to much power

PIC12F635 sleep current 0.3uA but if i enable pull-up on GP2 what I need for Reed Switch (one pin tied to GND) current consumption is 280uA
The 2xCR32 battery will last little over a month vs 3-4 year at 0.3uA
The hardware is a GE magnetic door sensor what I attempting re-program for my needs (11 of them)
My question is how to detect GP2 pin change at the lowest power consumption ?
Thinking about to wake up the chip every 500mS, enable pull-up and check GP2 state, turn off pull-up and sleep again, certainly will be less current in overall but is there a better way?
 
Thanks 
#1
PStechPaul
Super Member
  • Total Posts : 2506
  • Reward points : 0
  • Joined: 2006/06/27 16:11:32
  • Location: Cockeysville, MD, USA
  • Status: offline
Re: PIN pull-up while sleep consume to much power 2020/01/17 19:58:27 (permalink) ☄ Helpfulby dezso 2020/01/19 23:15:25
+1 (1)
Perhaps you could use an external pull-up of 100k (30 uA) to 600k (5 uA). The GPIO pins have a typical leakage of 0.1 uA and maximum 1 uA, so that should be enough to establish a reliable logic high voltage. Using the WDT to wake up will draw nominally 2 uA but possibly as high as 19 uA at 3.0V. A PIC12LF1822 or similar device might save even more power, but the weak pull-up is still typically 100 uA. The leakage current of GPIO inputs is only 125 nA maximum, so a 1 Meg pullup (3 uA) would surely work.

 
#2
dezso
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2012/02/03 14:33:42
  • Location: 0
  • Status: offline
Re: PIN pull-up while sleep consume to much power 2020/01/19 12:21:28 (permalink)
0
Thanks Paul, trying to make no modification to the PCB even tough there is a VCC test pad close to the Reed Switch so a 1206 res could reach the pin, wake up the chip every 500mS, enable pull-up and check GP2 state, turn off pull-up and sleep again got it down 1.6 uA
PLVD, this module also consume a lot of power 24 uA, comparator pins not configured so it cannot check the battery.
There is a HIGH-PRECISION VOLTAGE DETECTOR S-1000 Series (2.2 V) on the PCB connected to MCLR what will reset the chip, how did the device use be able to report low battery state ? Once the batt dip below 2.2V the S-1000 it will just keep cycling the PIC, I think is to late to use PLVD compare  VCC to VREF and report it.
Any suggestion
Thanks
 
#3
malaugh
Super Member
  • Total Posts : 407
  • Reward points : 0
  • Joined: 2011/03/31 14:04:42
  • Location: San Diego
  • Status: offline
Re: PIN pull-up while sleep consume to much power 2020/01/19 20:32:03 (permalink) ☄ Helpfulby dezso 2020/01/19 23:15:22
+1 (1)
We have similar problems with sleep on our projects. The solution is to disable the pull-up and drive the pin high during sleep, and switch it back when the CPU wakes up
#4
dezso
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2012/02/03 14:33:42
  • Location: 0
  • Status: offline
Re: PIN pull-up while sleep consume to much power 2020/01/19 23:25:05 (permalink)
0
I really wanted to use interrupt on pin change, enabling pull-up for a few cycle to check pin state does work but it still waking up the chip 2x a second for no reason other than check the pin.
Any input on how to check battery voltage and not use 25 uA for the PLVD?
#5
dezso
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2012/02/03 14:33:42
  • Location: 0
  • Status: offline
Re: PIN pull-up while sleep consume to much power 2020/01/22 12:18:22 (permalink)
0
me
There is a HIGH-PRECISION VOLTAGE DETECTOR S-1000 Series (2.2 V) on the PCB connected to MCLR what will reset the chip, how did the device use be able to report low battery state ? Once the batt dip below 2.2V the S-1000 it will just keep cycling the PIC, I think is to late to use PLVD compare  VCC to VREF and report it.

Figured it out wink: wink
GP3 setup as IO not MCLR, so when the batt drop to 2.1V it will pull it down (S-1000C22-N4T1G) 
 
#6
Jump to:
© 2020 APG vNext Commercial Version 4.5