Power Consumption in PIC16F690 - Page 1
Forum section: electronics / beginners

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 01:21:28 pm
content: 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.

author: Unknown
author_rank: Unknown
timestamp: July 01, 2010, 01:25:01 pm
content: 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?

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 03:12:22 pm
content: Quote from: alm on July 01, 2010, 01:25:01 pmno v.reg, no led. i'm using Uni-T DMM, can measure down to uA. In uA, it will read thousands.

author: Unknown
author_rank: Unknown
timestamp: July 01, 2010, 03:20:53 pm
content: 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.

author: s3c
author_rank: Contributor
timestamp: July 01, 2010, 03:41:31 pm
content: 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...

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 01, 2010, 04:04:00 pm
content: Quote from: alm on July 01, 2010, 03:20:53 pmi'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?

author: Unknown
author_rank: Unknown
timestamp: July 01, 2010, 06:44:25 pm
content: 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.

author: TheDirty
author_rank: Frequent Contributor
timestamp: July 01, 2010, 08:59:39 pm
content: 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.

author: safarir
author_rank: Regular Contributor
timestamp: July 01, 2010, 10:45:53 pm
content: 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)

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 05:05:31 am
content: 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-400uAupdate: we have to wait several seconds more or minutes, then it will go down to 6uA in sleep modeupdate: 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@3Vi 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

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 08:14:27 am
content: 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?

author: scrat
author_rank: Frequent Contributor
timestamp: July 02, 2010, 09:11:42 am
content: Quote from: shafri on July 02, 2010, 08:14:27 amI 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.

author: TheDirty
author_rank: Frequent Contributor
timestamp: July 02, 2010, 01:42:11 pm
content: 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 01:54:06 pm
content: Quote from: scrat on July 02, 2010, 09:11:42 amsorry... 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.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 01:55:39 pm
content: Quote from: TheDirty on July 02, 2010, 01:42:11 pmbut changing to input, showing lower currentmaybe just coincidence.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 02:20:11 pm
content: 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.

author: scrat
author_rank: Frequent Contributor
timestamp: July 02, 2010, 02:20:29 pm
content: 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

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 02:28:01 pm
content: 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.

author: scrat
author_rank: Frequent Contributor
timestamp: July 02, 2010, 03:06:06 pm
content: This last thing about RA0 is very strange... Could you post the register settings regarding RA0 (ANSEL, TRISA, WPUA, INTCON, PCON)?

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 02, 2010, 06:14:55 pm
content: 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.