Hi Bob! thanks for your observations!
Indeed, 1mA is waaaay too much!!!
I am giving the quiescent current because this is what is consumed most of the time. The component will be turned on when sampling for a couple ms, a couple of time a day.
Without counting the PIC, I have at most 3µA of current IDLE, and 5mA at most when writing to EEPROM. To simplify calculation let's say we use the sampling routine for 1 second every hour (that's likely to be longer than needed). So, for hourly consumption that gives: (1*5/3600)+(0.003*3599/3600) = 4,38 µAh
That's about 190 days on 20mAh.
I have already all conservation routines programmed and tested for the peripherals, so I'm confident that these numbers are meaningful. I measured them on my prototype.
Now comes the PIC! The solution would be to shut off the CPU core between sampling and use interrupt from the timer to wake it up. Peripherals and timers can work on their own, and this would cut down the PIC consumption to a few µA too.
Now the device itself will be build inside the body of an USB jumpdrive. It will not be connected to USB when sampling, so there's no available power. The limited amount of space within the jumpdrive body does not allows for much options as well. I have found the smallest LiPO battery, the 25mAh model, that can fit within 1 by 2cm space in the back of the enclosure. They have a 60mAh model too, but it is significantly larger, and I need to keep some space to cram SMD components on the PCB too. So, Is this device going to be connected to the USB port all the time? No, and Can you use a bigger battery? If I really have to that will be the option. However I first need to design the device to be the most power efficient, regardless of available battery capacity.
I'll go through a step by step testing of these power saving possibilities with PicBasic... hopefully without ASM calls!
Bookmarks