CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

18F4550 Sleep Current Drifting Upward as Temperate Decreases
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

18F4550 Sleep Current Drifting Upward as Temperate Decreases
PostPosted: Sat Mar 22, 2008 9:21 pm     Reply with quote

I am using an 18F4550 in a remote temperature monitoring application. I need to keep my sleep current down to 60ua which I have been able to do. When I cool the pic down to about 0C, the idle current soars to about 2ma. All my I/O is properly terminated. I am waking from sleep every 2 seconds, take a sample, then return to sleep. At room temp all works great. If I cool the PIC itself, the current rises steadily until reaching 2ma at freezer temperatures. I am using the internal xtal osc at 4MHz with a super low quiescent regulator.(LM2936BM5). My peripherals are shut off using a 2nd LM2936BM5 controlled by the pic. I know I am scraping the buffalo off a nickel, but I need to get 12-14 months from a single 9v batt
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Sat Mar 22, 2008 10:23 pm     Reply with quote

If your really pushing battery life you might be interested in this.
MCP1703
The power used by the internal oscillator is going to be more than an external crystal uses. You can also try using a lower oscillator frequency and spend less time in sleep mode. The power is somewhat exponential with frequency.
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Sat Mar 22, 2008 10:50 pm     Reply with quote

Thanks for the info on the microchip regulator. I have reached the desired current , but it increase tremendously when the 4550 gets below room temp. I tried slowing down the internal osc, but it had no appreciable effect on current... surprisingly....even at 32KHz. Tomorrow I will have to start physically disconnecting stuff and dropping the CPU temp to see what happens.
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Sun Mar 23, 2008 9:59 pm     Reply with quote

I've isolated all circuitry and have the 4550 running at around 20ua. If I cool the PIC it the current goes up dramatically. I tried it on two of my pre-production boards with the same result, so have ruled out a defective PIC. Anyone have any suggestions?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Mar 23, 2008 10:12 pm     Reply with quote

1. Post the program that you're running during this test. This could
consist of the #include, #fuses, #use delay, and some statements to
set the i/o ports to all output a logic zero level, followed by a sleep()
statement and then a while(1) statement.

2. Post your compiler version.

3. Post the external connections and components that still remain
on your board. I realize that you have removed most of them
but post what still remains. Include the bypass capacitors on
the Vdd pins of the PIC and their value and type.

4. Post the silicon revision of your PIC. You can see this in the output
window in MPLAB when you tell the ICD2 to "connect" to the PIC.
CCS must have something similar in their IDE.

5. Post the input and output capacitors that you're using for the voltage
regulator. Post the type and the value. Post the ESR rating of the
output capacitor.

6. Are you freezing the entire board (including the voltage regulator),
or just the PIC ?
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Mar 24, 2008 2:31 pm     Reply with quote

I will see what I can do to answer your questions. I isolated the 18F4550 with all outputs low and all other periferals completely disconnected (and corresponding port pins outputted as 0.

I eliminated the LDO and its filtering and powered only the PIC from an external, well regulated supply. I then monitored the current to the PIC at 20ua. This is using the internal oscillator set to 4mhz (off during sleep of course). Then i direct cold spray to the PIC ONLY for a fraction of a second and the current skyrockets to over 3 ma. The 18F4550 has a datecode from 2005 but since I am using the CCS compiler I don't know the specific chip info. I tried selectively coding a/d, spi, sci, ccp and most all other port configurations off... including tmr1 and 2... with no change in 20ua current and still cold sensitive.

Hope this helps... I am not at home yet to put the code together for you, but will try later.
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Mon Mar 24, 2008 3:13 pm     Reply with quote

foodwatch wrote:
Then i direct cold spray to the PIC ONLY for a fraction of a second and the current skyrockets to over 3 ma.

I would guess that PIC is going way below it's rated operating range but that alone seems like it would not have a x100 impact. What triggers it to wake up from sleep?
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Mar 24, 2008 3:35 pm     Reply with quote

The PIC goes to sleep with a sleep command and uses the WDT2048 setting and "wakes" on wdt timeout, it then samples 2 temperatures on an0 and an1 and goes back to sleep with a sleep command. I am using the PIC4550I version which should be good well below 0c. I noticed that under a controlled cooling that the current starts to rise at about 5c and continues as it gets colder. The PIC still executes code correctly even when drawing higher current, but my battery life goes from years to days.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Mon Mar 24, 2008 4:16 pm     Reply with quote

Stupid question, but how clean is the PCB? Is there any possibility of flux or anything else being responsible for this?
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Mar 24, 2008 4:32 pm     Reply with quote

No questions are stupid... PC board is fr4 double layer, ground plane flooded on both sides.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Mon Mar 24, 2008 4:35 pm     Reply with quote

Was it cleaned after the parts were mounted?

One other thing: can you modify the code to light an LED or set a line high when it's not sleeping? The only other thing I can think of (and someone else alluded to) is that the PIC isn't actually sleeping once you chill it.
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Mar 24, 2008 4:39 pm     Reply with quote

I have my own SMD facility using no clean solder/paste so flux wont be an issue. Your suggestion that I am dropping from sleep to normal operation makes sense, I just dont understand why it would do that (assuming that accounts for the current increase). However, the current increases slowly and in direct relation to how cold it gets. I would expect a sudden jump if I were falling out of sleep, but the current increase seems to track the temperature. If I heat the PIC with a low temp iron, I can see the current fall back to the 20ua....all very strange.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Mon Mar 24, 2008 4:49 pm     Reply with quote

I'd suggest contacting Microchip directly. You've covered all the bases and have definitely isolated the PIC as the cause of the problem, so from my point of view, the ball's in Microchip's court, so to speak.
foodwatch



Joined: 18 Apr 2006
Posts: 66

View user's profile Send private message Yahoo Messenger

PostPosted: Mon Mar 24, 2008 6:27 pm     Reply with quote

Was going to do that today, but ran out of time. The chip has a 3 year old datecode... perhaps some production issue that I am not aware of. I am wondering if the internal oscillator has some low temp issues... I will post anything I find from Microchip... Thanks all...
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Tue Mar 25, 2008 7:28 am     Reply with quote

"3 year old datecode"

Is this a sample of one? Can you test a different chip?

Ken
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group