Author Topic: Power Consumption in PIC16F690  (Read 11310 times)

0 Members and 1 Guest are viewing this topic.

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Power Consumption in PIC16F690
« on: July 01, 2010, 01:21:28 pm »
Currently i'm working on mcu hobby project with pic16f690. Checking the amperage, its 2-4mA while doing nothing (infinite loop), when i send sleep command, the current is 1-2mA. I've setup the pic so it has 3 ADC input pin, another digital input pins that is normally pulled low with 10K resistor, the other unused pin is set as output (floating and not connected), timer0&1 are activated. Operating at 8MHz internal clock at 5V.

In the manual, its says, normal operation = 0.22mA, standby = 50nA @ 4 MHz, 2V. i guess the standby means sleep. So any idea on how to achieve this low current? and is my pic current consumption normal or on the high side? thanx.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

alm

  • Guest
Re: Power Consumption in PIC16F690
« Reply #1 on: July 01, 2010, 01:25:01 pm »
Do you have something else like a voltage regulator or LED drawing current? Are you sure your current measurement is accurate down to the 1mA?
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #2 on: July 01, 2010, 03:12:22 pm »
Do you have something else like a voltage regulator or LED drawing current? Are you sure your current measurement is accurate down to the 1mA?

no v.reg, no led. i'm using Uni-T DMM, can measure down to uA. In uA, it will read thousands.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

alm

  • Guest
Re: Power Consumption in PIC16F690
« Reply #3 on: July 01, 2010, 03:20:53 pm »
Can't help with the expected power consumption for a PIC, don't have experience with those. I did notice that the power consumption figures are at 4MHz, 2V. The latter might be significant, any figures for 5V? Can you lower the voltage and see what happens with the current? Can you remove the PIC and see if the consumption drops to <<1mA? If the DMM has a resolution in the uA, it should have no problems measuring 1mA.
 

Offline s3c

  • Contributor
  • Posts: 26
Re: Power Consumption in PIC16F690
« Reply #4 on: July 01, 2010, 03:41:31 pm »
This does seem a bit high, I've achieved extremely low power consumption by turning everything off before entering sleep mode, on the other hand I've had a PIC that ran at 200mA for no particular reason...
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #5 on: July 01, 2010, 04:04:00 pm »
...I did notice that the power consumption figures are at 4MHz, 2V. The latter might be significant, any figures for 5V? Can you lower the voltage and see what happens with the current?
i've compared 3V with 5V, the difference is quite insignificant, there is difference though, but not much. i've ommited the ADC/timer activation etc leave it all default to output, ie blank start. still about the same reading. ??? undocumented errata?
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

alm

  • Guest
Re: Power Consumption in PIC16F690
« Reply #6 on: July 01, 2010, 06:44:25 pm »
If you're down into the sub-microamps, things like a dirty PCB can matter, but not at 1mA. Is the power consumption figure a 'typical' figure? Typical can mean anything from 90% of our parts are better, the median or 'we once saw a part that good'. So in that case it might depend on your luck. But the small difference between power-on and sleep surprises me, a software issue that won't let is sleep properly, or some other component that draws power? I can't imagine that their process is that bad that 50nA could be ~1mA, assuming sleep and standby are the same thing. I would study the part in the datasheet about sleep modes/power saving carefully.
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Power Consumption in PIC16F690
« Reply #7 on: July 01, 2010, 08:59:39 pm »
I'm not a PIC person, but the uC's I've used have had fairly detailed directions on how to get the rated sleep current.  All floating pins should be changed to outputs for one thing.

Are you measuring the chip or the chip and regulator?

EDIT: Changed inputs to outputs.  Oops.
« Last Edit: July 02, 2010, 01:39:13 pm by TheDirty »
Mark Higgins
 

Offline safarir

  • Regular Contributor
  • *
  • Posts: 83
Re: Power Consumption in PIC16F690
« Reply #8 on: July 01, 2010, 10:45:53 pm »
Have you test with all the pin disconnect and only the pic ? With the internal clock at 8mhz, you should get between 1.30-1.65 mA at 5.0v (From the datasheet)
« Last Edit: July 01, 2010, 10:47:35 pm by safarir »
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #9 on: July 02, 2010, 05:05:31 am »
tested to run blank... not setting anything, pin not connected to anything...

sleep = ramped down slowly withing around 3-5 seconds from 200uA to 30uA and stabilize there.
infinite nop = 350-400uA

update: we have to wait several seconds more or minutes, then it will go down to 6uA in sleep mode
update: TheDirty advice seem to work, setting all pins to input (floating) will lower the current further to 0-1uA in sleep, trickling. my DMM cannot read down further, maybe it hit 50nA there sometime.

update: Set all unused pin to input in my hobby project... still 2mA usage@3V :( i think its my 7 * 10K pulldown resistor on the input pin, each seem to draw 0.3mA (V/R = 3V / 10K ohm) when connected high to Vdd... 7 x 0.3 = 2.1mA... maybe i should change to 100K pulldown ???
« Last Edit: July 02, 2010, 06:50:44 am by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #10 on: July 02, 2010, 08:14:27 am »
i've made a terrible mistake! what i'm measuring is not just the current to the mcu, but to the whole system including varistors and digital pins (pull down). the picture tells the story, Vdd is directly to battery, thats where i'm measuring. its my fault in the design (1). the pic is only using a bit from the 2mA, around 200uA, just as specified. stupid me!

now... can i use design (2) to save current during sleep? pls note the Vr is supplied from one of mcu pin. wont this affecting ADC reading accuracy? since i only turn on the Vr upon wake up and directly read the ADC and another IO pin? is using 1MOhm varistor and pulldown resistor good? or not good?
« Last Edit: July 02, 2010, 08:16:56 am by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Power Consumption in PIC16F690
« Reply #11 on: July 02, 2010, 09:11:42 am »
i've made a terrible mistake! what i'm measuring is not just the current to the mcu, but to the whole system including varistors and digital pins (pull down). the picture tells the story, Vdd is directly to battery, thats where i'm measuring. its my fault in the design (1). the pic is only using a bit from the 2mA, around 200uA, just as specified. stupid me!

now... can i use design (2) to save current during sleep? pls note the Vr is supplied from one of mcu pin. wont this affecting ADC reading accuracy? since i only turn on the Vr upon wake up and directly read the ADC and another IO pin? is using 1MOhm varistor and pulldown resistor good? or not good?


I cannot understand what you want the circuit to do... With "varistor" do you mean "potentiometer"? Which voltage are you converting? Why and where do you need pulldown? If you post a more detailed picture, it will be useful.
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline TheDirty

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: ca
Re: Power Consumption in PIC16F690
« Reply #12 on: July 02, 2010, 01:42:11 pm »
Oops, that was a typo up there.  Floating pins should be set to output.  This is due to the switching characteristics of CMOS circuits.  They will take power switching back and forth.

I meant to say change pins to output that have floating inputs.
Mark Higgins
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #13 on: July 02, 2010, 01:54:06 pm »
I cannot understand what you want the circuit to do... With "varistor" do you mean "potentiometer"? Which voltage are you converting? Why and where do you need pulldown? If you post a more detailed picture, it will be useful.

sorry... potentiometer.. not varistor. it will read volt level on the potentiometer, and digital input.. and then send the value through spi.
and sorry, i dont have proper drawing software for my circuit.
« Last Edit: July 02, 2010, 01:57:45 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #14 on: July 02, 2010, 01:55:39 pm »
Oops, that was a typo up there.  Floating pins should be set to output.  This is due to the switching characteristics of CMOS circuits.  They will take power switching back and forth.
I meant to say change pins to output that have floating inputs.
but changing to input, showing lower current ??? maybe just coincidence.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #15 on: July 02, 2010, 02:20:11 pm »
anyway, i just changed my circuit to #2, change the code, and its seem to work fine right now. 0.5-2mA during normal operation and down to 0uA on sleep, my DMM cannot read further down, so it shows just zero. maybe i've achieved the spec already, thanx guys for sharing thoughts.
« Last Edit: July 02, 2010, 02:22:33 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Power Consumption in PIC16F690
« Reply #16 on: July 02, 2010, 02:20:29 pm »
So why not trying to put all pins to input (which I consider safer in a developing phase, since risk of damaging something is lower) and tie them to ground or Vdd? If you're on a breadboard, you could also try to tie only part of them to see if consumption lowers following some rule (proportionally or other)... Could learn something new  :)
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #17 on: July 02, 2010, 02:28:01 pm »
tried that. but i cant see the difference, as the already very low uA is jumping up and down slightly/randomly in any configuration. my own design is the culprit, not the pic. i only have trouble with pin RA0 that will screw my ADC reading if i set to other than "floating output high". dont know what this means as i cannot see anything relating to RA0 in errata. cant even use RA0 for any purpose if i want to read ADC correctly.
« Last Edit: July 02, 2010, 02:32:41 pm by shafri »
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline scrat

  • Frequent Contributor
  • **
  • Posts: 608
  • Country: it
Re: Power Consumption in PIC16F690
« Reply #18 on: July 02, 2010, 03:06:06 pm »
This last thing about RA0 is very strange... Could you post the register settings regarding RA0 (ANSEL, TRISA, WPUA, INTCON, PCON)?
One machine can do the work of fifty ordinary men. No machine can do the work of one extraordinary man. - Elbert Hubbard
 

Offline MechatrommerTopic starter

  • Super Contributor
  • ***
  • Posts: 11706
  • Country: my
  • reassessing directives...
Re: Power Consumption in PIC16F690
« Reply #19 on: July 02, 2010, 06:14:55 pm »
yup strange. but i manage to get a workaround for it, RA0 set to output high... if u ar interested in the registers setting, here it is in assembly only, sorry.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf