[ATmega128RFA1] High deep-sleep currnet consumption?

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

Hi everyone, I've been making a prototype based on a MEGA128RFA1 ('built-in' radio) and the last prototype worked fine on current consumption.

That one used a ceramic antenna, a 15k resistor between the TST pin and ground and had the AREF pin floating (also had four SPI flash memories, each with its own CS line connected to each to a different pin in the µC).

On this device, I had around 5~15µA of consumption in sleep.

 

Then I made some changes:

- ceramic antenna was replaced by a µFL connector.

- removed the 15k TST pin resistor (TST pin is directly connected to ground).

- and since I wanted to measure the battery, I connected the AREF pin to PF1 (ADC1) and battery to PF0 (ADC0) to measure differential voltage.

- (also in this case I'm using only one pin to control the Chip Select line on all four SPI memories, since they have a 'HOLD' pin to make them stop listening).

- this board has a different distribution, so it has some pins in the microcontroller exchanged.

 

In this prototype I'm getting ~1mA of consumption on deep-sleep.

 

So, now the question is ¿why am I getting 1mA of consumption instead of the 5~15µA?

Is it related to the AREF pin?

Is it related to the VCC connected directly to an input pin?

(Is there any configuration needed on either of those pins?)

 

Maybe I shouldn't remove the resistor on the TST pin? (I doubt it's this one)

 

I don't think is the new antenna connector, could it be?

 

(I also don't think it's the use of a single 'chip select' line since the memories are all disconnected when entering deep-sleep.)

 

Ideas?

 

If need more info I'll gladly give it to you.

 

Thanks!

 

Or could it be 

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

Well, in general, to test, make one change at a time and verify the results.

My guess is the AREF pin, I don't understand why it's connected to a port pin?  It's usually connected to a cap to gnd.

The ADC always measures its input referenced to AREF, so a diff to AREF and another input would be the same as a single ended measurement, would it not? 

Jim

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

ki0bk wrote:

Well, in general, to test, make one change at a time and verify the results.

My guess is the AREF pin, I don't understand why it's connected to a port pin?  It's usually connected to a cap to gnd.

The ADC always measures its input referenced to AREF, so a diff to AREF and another input would be the same as a single ended measurement, would it not? 

Jim

As far as I understood, you can only measur voltages between GND and your reference voltage (maximum is AREF which is 1,8V) or a differential voltage (don't remember the maximum value)

 

I want to measure values between 3 and 3,6V, so that has to be differential.

If I'm using one pin on AREF (which should be 1,8V) and the other to this variable voltage (the battery actually), I could measure between 1.8 and 3.6, am I wrong?

 

Consider that AREF in this case is the negative input of the ADC, not the positive one.

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

I would have to look at the DS to see how to use the ADC in diff. mode, but I would use a resistor divider to drop the battery down to a level it could be read directly by the ADC, in this case a pair of 10k's and take the reading at the junction between the resistors (vbatt/2).

If battery drain is an issue, then use another port pin and a fet to gate the vbatt sense lead.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

Well a voltage divider isn't possible because I want to limit the consumption to a minimum and can't add more components to the board, no more space left.

 

Still, I have no idea what's happening with the consumption.

Could it be that AREF pin and/or that VCC pin connected to an input pin?

 

With more tests, I found that disabling the SPI (and leaving the MOSI/SS/SCK as input by default) gives me the low current I was expecting, but then I can't use the SPI devices with no SPI enabled, can I.

 

Ideas?

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

No room left for a pair of 0102's? 

It's also quite common in low power app's to disable all options until needed, then enable, use and then disable again.

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

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

ki0bk wrote:

No room left for a pair of 0102's? 

It's also quite common in low power app's to disable all options until needed, then enable, use and then disable again.

Jim

 

Adding anything would mean a reestructuration of the whole board, so if possible I'd rather not (Of course, if there's no other way, I'd go with it).

Anyway, since consumption is very important, I'd rather not use the voltage divider based on resistors (also, wouldn't the difference in resistance make a wrong measure of the voltage?).

 

Anyway, I'd still like to know if it's 'wrong' to directly connect Vcc to a pin and if it's wrong to connect AREF to another pin in the µC (wrong in the sense of reducing current consumption when sleeping).