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

PIC power consumption
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Nick
Guest







PostPosted: Mon Aug 02, 2004 2:05 pm     Reply with quote

Its just a simple timer that will turn three pin on and off at time intervals


Included are
Dallas 1307 RTC
24C32 EEPROM
MAX232 chip
PIC16F876 on a 4mhz clock (was a 20)

It will also have 3 solid state relays. the specs say the will pull 1ma. Only two of the SSR will be on at the same time.

What I have done so far is swap clocks, turn off the LED and 232 chip. That has gotten from 80ma to 10ma. All ideas are welcome, thanks for the help so far!

Nick
dbotkin



Joined: 08 Sep 2003
Posts: 197
Location: Omaha NE USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Aug 02, 2004 2:35 pm     Reply with quote

Nick wrote:

MAX232 chip
Dallas 1307 RTC
PIC16F876 on a 4mhz clock (was a 20)


Dump the MAX232 and save another couple of bucks: http://www.botkin.org/dale/rs232_interface.htm

If your timing needs are slow enough, try a 32kHz oscillator instead of a 4mHz clock. Or, heck -- you HAVE a DS1307, why not use it? Use the SQW/OUT pin to wake up the PIC once a second, do whatever needs to be done, and go back to sleep.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Aug 02, 2004 5:48 pm     Reply with quote

It should be easy to reduce your power requirements with another factor 10 to 100, after that more is possible with some tweakings.

Are you using the real MAX232 or one of its deratives? The MAX232 is a proven, but old power hungry design. Typical current for the RS-232 is 5mA and when transmitting data this adds another 20mA or so for each Tx-port. Replace it with a newer variant like the MAX220 (0,5mA typical 5uW in power down) or consider the design as mentioned by dbotkin. This alternative design is not 100% compliant to the RS232 specs, but it has the nice feature that the connected device will supply the transmit current, no device connected means no power waste in a voltage pump.

Please consider using the special low power versions of a specifc processor type, for example your PIC16F876 is also available as PIC16LF876 at a frequency range of 0 to 4MHz you can run this processor as low as 2V!!! This way you will save current consumption: 0,3mA in XT-mode @ 2V instead of 2mA-HS mode @ 5V. Another big advantage, you can run this processor with 2 batteries instead of 3.

Can you change the PIC16F876 to another processor with lower power requirements? There is a special range of processors designed for low power consumption. For a simple timer device you don't need a PIC16, a PIC12 will do.

Rechargable NiMH batteries are available in capacities up to 2300mA but have the large disadvantage of a high self discharge which makes them unusable for application that require more than 1 - 2 months running time. Li-ion or alkaline batteries are a better options. A Panasonic alkaline AA battery has a capacity of 2,8Ah (beware that Duracell is a less good option at about 2,0Ah). Li-Ion batteries are really great because you can recharge them, they are 3,6V and have low self discharge, but they are not as easy to get and have non-standard sizes.
ernest



Joined: 11 Feb 2004
Posts: 51

View user's profile Send private message

How? Why? LCD cannot display after OFF
PostPosted: Fri Oct 08, 2004 5:36 am     Reply with quote

Hi...calling all experts out there...

Can anyone please gimme some ideas how to solve my low power application problem. Sad

I've a PIC16LF877A that controls a relay, reads a few discrete (On/Off)sensors, 4x3 keypad, 2x16 LCD and a RS232 port on MAX232.
The board runs on primary power but from time to time, this primary power would not be available. So, the PIC must be able to continue operating (without losing any data) by running on a backup battery. Of course, during low power mode, the PIC needs to shut off all other unnecessary peripherals such as LCD and backlight and MAX232.

Both the primary supply & backup battery are connected to Vdd of PIC via one diode each to prevent current from flowing in opposite direction. Besides PIC, the 4MHz XT, DS1302 and NMCLR are also connected to the backup power.

I use PIN_C5 to sense for the availability of primary supply while powering the LCD using PIN_C4. Whenver, PIN_C5==0, PIN_C4 will output LOW to switch OFF LCD. But, when the primary power returns, the LCD could not display (blank) even when PIN_C4 is switched high and I have put in a delay of 100ms (tried with 50,150,200,250ms) to let the LCD to power up properly before initializing it.
WHY?

When PIN_C5==LOW (no primary power), I set Tx and Rx (to MAX232) as input, set all I/O connections to LCD as LOW (output_low). PIN_C4 output LOW to switch OFF LCD.
Is this the CORRECT way?

How can I keep the whole board running at minimal power consumption when the primary power is not available.

Please help...I've been trying for many days to solve this.

Sad Confused
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Oct 08, 2004 11:52 am     Reply with quote

The reason it's difficult to help you is because the program that
you posted is far too long, and contains tons of code that is irrelevant
to the problem. So we have to wade through all this code that has
nothing to do with the LCD power-up/ power-down problem.

You need to make a small test program that only deals
with the LCD issue. ie.,
1. Initialize the LCD at the start of main().
2. Send some text to it, to demonstrate that it works.
3. Power-down the LCD, and wait for a while.
4. Power the LCD back up.
5. Re-init it.
6. Send some text. See if it works.

Don't do anything else. Just get that piece working.
ie., Don't test putting the PIC to sleep. Do that later.

If you have a problem with the test program that I described
above in steps 1-6, then post that program. It's simple enough
and the hardware is simple enough that we could probably duplicate
your test setup and actually solve the problem with you.
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 Previous  1, 2
Page 2 of 2

 
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