atmega164P : Sleep mode power consumption

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello friends,

I have programmed the atmega164P to operate in
1. power down sleep mode 2. power save sleep mode

The INT2 (falling edge)interrupt is used to wake up the device.
The imp. fuse bit settings are as follows:

1. BOD is disabled
2. startup time is 16ck + 65 ms for external XTAL

The device sleep period = 7 secs

When device wakes up, I am transmitting (through UART interrupt based) a counter value, date, time, battery voltage (calculated using ADC) and a serial no.

To enter power down mode I have done following:
1. Loaded SMCR = 0x05
2. followed by sleep instruction

To enter power save mode :
1. Loaded SMCR = 0x07
2. followed by sleep instruction

When Interrupt is triggered, I am clearing the SE bit of SMCR by writting 0x04,0x06 for power down and power save mode respectively.

power down sleep mode observations 4Mhz XTAL, vcc = 3.3v : DMM is used for current measurement

1. sleep mode current = 4.97 - 5.0 mA
2. active mode current = 8.30 - 8.45mA

power save sleep mode observations 4Mhz XTAL, vcc = 3.3v :

1. sleep mode current = 4.94 - 5.14 mA
2. active mode current = 7.50 - 8.25mA

The on board chips being used and their power rating are as follows:
Component Name Under conditions Active current
(uA)
atmega164P At 3v, 1 Mhz 1500.00
Max3232 300.00
PCF8563 At 3v, 100KHz 1.00
A3212 sensor 10.00
leakage/anything else 10.00

total current approximately at 1 Mhz= 2 mA

No other chip is used on the board. All remaining components are discrete. Currently power is supplied using dc 3.3v supply( no battery).

Questions

1. Why the system is consuming more than expected?

2. How I can find out the over consuming device?

3. Why there is no good difference in sleep mode consumption and active mode consumption?

4. What other settings needs to be disabled/enabled to save power and to operate the current system on battery ?

Thanks in Advance !!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
1. Why the system is consuming more than expected?

What did you expect?

Quote:
2. How I can find out the over consuming device?

Start with a bare chip, absolute minimum components, and put into deep sleep after a few seconds (so you can measure the active current) and no wakeup source (reset the AVR to retest). Get that acceptable first. Add pieces one-by-one.

[I should find where I've outlined this before. Trust me--start with bare and add on. The alternative is to pull parts one by one anyway so why not do it the easy way? And trust me--you can match or better the datasheet's consumption numbers.]

Once you have done the above you know that you can go to sleep properly and you are probably sitting at a few uA. (Side note on that: some meters when measuring uA use a higher-ohm sense resistor and the measurement device consumes more power than the UUT and you get funky readings. It is like that guy's cat.)

Then enable wake-up soruces one-by-one and retest.

Then add subsystems one by one and retest.

Quote:
4. What other settings needs to be disabled/enabled to save power and to operate the current system on battery ?

There is no mention at all of PRR. Any "real" low power system will utilize that fully.

Quote:
3. Why there is no good difference in sleep mode consumption and active mode consumption?

First, how are you measuring? Is there a voltage regulator? Are you measuring just the AVR or the entire system? Are all Vcc and Gnd pins hooked up and properly decoupled? Are no port pins floating?

What do you get when just measuring the AVR?

Is this going to be a battery-only system, or dual power?

Quote:

Max3232 300.00

Does that driver have a shutdown pin? If not use one that does.

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Lee,

Thanks for the reply.

What did you expect?

I was expecting active current = 2.2mA - 2.5 mA
sleep current = 330uA - 400 uA

What do you mean by "PRR" ?

Is there a voltage regulator?

There is provision for regulator lp2985. But currently it is unavailable locally. so I soldered remaining circuit (caps) but lp2985 is missing on board.

Are you measuring just the AVR or the entire system?

I am measuring the entire system consumption.
I have placed 0 ohm resistor across VCC pin of each IC. I hope by removing it, I can measure the consumption of individual IC. What do you think ?

Are all Vcc and Gnd pins hooked up and properly decoupled?

0.1 uF cap is used as decap for all the vcc pins of entire circuit.

Are no port pins floating?
Port pins PD4,PD5,PD7, PC4 - PC7 and UART0 are being used for RF module interface.
PORT pins PC5-PC7, PD4, PD5 are not used currently. Hence set to 0. Port pins which are not required are kept as NC on board.

What do you get when just measuring the AVR?
I will inform you soon after measuring.

Is this going to be a battery-only system, or dual
power?

Yes it is going to be a battery only system finally.

Does that driver have a shutdown pin? If not use one that does.
No it doesn't. I think it is bit difficult use max3221 ( has shut down pin) on behalf of max3232 on the current board. But I will be using it in next version.

Thanks :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

What do you mean by "PRR" ?

Search the datasheet for "prr".

Quote:

Are you measuring just the AVR or the entire system?

I am measuring the entire system consumption.


Then before you raise questions here about AVR power consumption, and not matching the datasheet numbers, let's measure the AVR only.

If you are indeed going to be looking for uA, then you must start from the ground up. You cannot expect to mount components drawing mA and then complain about a few uA.

Trust me--start with a bare board and work up. It is MUCH more frustrating to start with the full board and work down.

What does a 0-ohm resistor across a Vcc pin do? You mean short it to ground? Does it really sound like a good idea to short the Vcc net to ground?

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.