PDA

View Full Version : Minimum power modes for PIC18LF4620



BrianT
- 5th February 2008, 09:38
I have a data logger with a DS1626 RTC and thermometer, a PIC18LF4620, dual M25P64 flash memory chips for 16 MBytes storage and some analog peripherals for acceleration, pressure, light levels, etc. Everything runs on a 3.7 volt lithium cell.

I need to run at lowest possible power for maximum battery lifetime. I need to wake the product up every ten minutes or so to take the next readings. I also need to monitor the battery voltage and shut the product down permanently when the battery goes low to prevent code scrambling. Experience shows the PIC18LF4620 will totally scramble the code space when the battery goes flat.

Here is what I have found.

If I set BOREN then the product draws about 40 uA when asleep - way too much. It looks like the brown out detector draws about 32 uA. If I clear BOREN the current drops to about 5 uA. Will the HLVD approach draw any less current than the Brown Out Detector?

I set the WDT OFF in hardware and enable it with software (SBOREN = 1). The WDT draws about 2 uA it seems. If the WDT is OFF the PBP SLEEP command never recovers.

If I clear the OSCON.7 bit = 0, making IDLEN = SLEEP, the book says I can get down to about 100 nA current draw. If I do that however, all the peripherals are then OFF and I can't see how the PBP SLEEP command can work. The code will run once and never recovers from the SLEEP command.

Am I right in assuming that the lowest power will come from clearing IDLEN and then I must rely on an external interrupt to portb.o to recover from sleep. It seems to be a bit self defeating if I need extra hardware to kick the PIC in the goolies to wake it up.

The lowest current I an repeatably and reliably get down to is a sleep of 3.5 uA with a run current around 5 mA which is largely set by the external hardware.

Any tips on getting this 'nanowatt' technology to actually work at the nanowatt level will be gratefully appreciated. I have read at least some of the App Notes on nanowatt but they do not go past the obvious such as powering down attached hardware.

Cheers
BrianT

duncan303
- 5th February 2008, 09:51
Hi BrianT,

I have recently been reading the datasheets on the 18F2420 with regard to power modes and battery power. it is something I have not done before.

I thought I might start experimenting with a lower class of chip with less features to help me understand how the different power features work. but in the back of my mind I keep thinking why should i use the BOD feature in the chip and not implement an external power monitor circuit, and convey the info to the MCU, possibly to prevent writing to the external eeprom.

I am waaay behind you though, just sharing a first few thoughts.


Duncan

BrianT
- 5th February 2008, 23:53
Table 26.2 shows what peripherals draw.

4.6 uA for the Watch Dog Timer,
40 uA for the Brown Out Detector,
40 uA for the High/Low Voltage Detector,
4.5 uA for the Timer1 Oscillator
2 uA for the Analog to Digital Converter.

Every time the battery goes flat the PIC18LF4620 scrambles the code space (and corrupts the bootloader) so I was going to try the BOR or the HLVD but the current draw is unacceptable. My next PCB layout will have ICSP pins so I can try the Code Protect option which I don't think allows a bootloader.

I think I am right in saying the PBP SLEEP command needs the WDT to be active so that sets a minimum current around 4.6 uA unless there is some other way of getting to the fabled 100 nA mentioned in the Microchip literature.

Any thoughts on how to IDLE or SLEEP the PIC18LF4620 at 100 nA, AND still be able to wake from this comatose state, would be most welcome.

Cheers
Brian

Archangel
- 6th February 2008, 00:48
Hey BrianT,
Greetings !
Those are some mighty tiny power figures, is there any chance you might be able to augment your power with a small (pocket calculator type) solar panel? Or maybe use a smaller device to power up that big 18F device as a supervisor circuit?
JS

skimask
- 6th February 2008, 01:30
Every time the battery goes flat the PIC18LF4620 scrambles the code space (and corrupts the bootloader) so I was going to try the BOR or the HLVD but the current draw is unacceptable. My next PCB layout will have ICSP pins so I can try the Code Protect option which I don't think allows a bootloader.

I think I am right in saying the PBP SLEEP command needs the WDT to be active so that sets a minimum current around 4.6 uA unless there is some other way of getting to the fabled 100 nA mentioned in the Microchip literature.

The '4620 has A/D. You could occasionally sense your own Vdd voltage with an extra diode or voltage divider circuit.
As far as the 100nA goes, I know microchip has a couple of really good app notes for that...I can't remember what or where they are though...