Saving Power with the PIC16F1827

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Hi,
I'm looking for ways to save power using the PIC16F1827. My application requires very low power. I found this document http://ww1.microchip.com/downloads/en/DeviceDoc/01146B_chapter%202.pdf pretty helpful, but it doesn't prioritize them so I don't know which ones will reduce the power the most. Since I only have a limited amount of time to finish this project, what are the top 3 ways to reduce power? I only need to operate my circuit about every 20 seconds so what I'm thinking is to put my circuit into sleep or deep sleep for 20 seconds and wake it up using the watchdog timer. Would lowering the CPU speed save a lot of power? How would I do that?
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Hi Bill,
Basically I want the PIC to go into sleep for about 20 seconds, then wake up and execute code for less than a second and then go back into sleep mode for about 20 seconds and then execute the same code again for 1 second and so on and repeat forever. I'm using a 3V Battery as a power source.
 

thatoneguy

Joined Feb 19, 2009
6,359
What amount of code would run for 1 second and at what clock speed?

Usually, reducing the voltage and clock speed, while using sleep as much as possible results in low power usage. However, peripherals in the circuit may be drawing most of the power.

For the 3V cell, do you mean a CR2032 coin cell or the large CR123A battery?

What are the inputs and outputs of the circuit?
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
What amount of code would run for 1 second and at what clock speed?

Usually, reducing the voltage and clock speed, while using sleep as much as possible results in low power usage. However, peripherals in the circuit may be drawing most of the power.

For the 3V cell, do you mean a CR2032 coin cell or the large CR123A battery?

What are the inputs and outputs of the circuit?
Probably about 30-40 lines of code for 1 second at the most and the clock speed isn't important. For the 1 second of code I will need to use the serial peripheral and the ADC peripheral. I will be using something similar to a CR123A battery.
 

thatoneguy

Joined Feb 19, 2009
6,359
Probably about 30-40 lines of code for 1 second at the most and the clock speed isn't important. For the 1 second of code I will need to use the serial peripheral and the ADC peripheral. I will be using something similar to a CR123A battery.
Will the output go to a MAX232 IC or similar? That would draw more power then the uC itself, and should be shutdown between uses, as shown in the document you linked in the first post.

Your question on "Which Helps More?" is essentially lower voltage, which you have, lower the clock speed, which is limited by the serial speed you intend to use, and using sleep as often as possible. Those would all be for nothing if an RS232 driver was being run on the same battery full time, though.
 

Thread Starter

Guinness1759

Joined Dec 10, 2010
64
Will the output go to a MAX232 IC or similar? That would draw more power then the uC itself, and should be shutdown between uses, as shown in the document you linked in the first post.

Your question on "Which Helps More?" is essentially lower voltage, which you have, lower the clock speed, which is limited by the serial speed you intend to use, and using sleep as often as possible. Those would all be for nothing if an RS232 driver was being run on the same battery full time, though.
Actually I'll be driving an external transmitter with a baud of about 9600. What register should I set to change the clock speed? Will that affect other registers such as the WDTPS, because I have the watchdog set to 16 seconds for interrupt.
 

thatoneguy

Joined Feb 19, 2009
6,359
The details are in the link you posted above. If you change the clock speed, you'll want to change the prescaler on the WDT to timeout at 16 seconds. Switching from 20Mhz to 4Mhz is even a boost to power saving, using the internal oscillator is better than using a crystal, though I'm not sure how 'exact' the 16 second interval needs to be in your case.
 
Top