XMega32a4u DAC current drain

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

We are using the 32a4u in a new project. We noticed that the board uses 26mA. Using the JTAG ICE, we can see that this is made up  of:

  • 6mA for the analog circuitry (when Xmega is in reset or erased mode)
  • 9mA for the DAC
  • 11mA when running at 16MHz

We used the PLLDIV bit to drop the frequency to 8MHz and it noiw draws 23mA which is better.

 

The question is why does the DAC draw so much current and is there anyway to reduce this. We have turned on the Low power bit for the DAC but this only dropped the current drain by 0.3mA. The PRP power reduction registers make minimal difference to the current drain. 

Electronic System Design
http://www.esdn.com.au

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

Have you disabled the digital input of the DAC output pin?

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

Is the DAC driving a load of some mA?

 

Indeed, the datasheet shows the DAC consumption of a mA or two with no load.

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

PRR is too shut down unused modules, not to decrease power on modules in use.

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

Yes, the DAC is driving a load of 11kohms. We are using the DAC on channel PB3. We did turn off the digital pin using PORTB.PIN3CTRL = 0x07 but this made no difference.

 

Yes, we know the PRP are for turning off unused modules and that is what we did but the drop in current drain was not noticeable.

 

In the datasheet, it does say the DAC has a maximum current output of 10mA.

Electronic System Design
http://www.esdn.com.au

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

Hefty wrote:
Yes, the DAC is driving a load of 11kohms.
When searching for uA (or mA), I always like the sanity check of "as bare as possible" first.  What is the draw with the load unconnected?

 

But indeed, an 11k load is less than a mA, right?

 

 

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

We just found out that the DAC was driving some analog circuitry which had an issue. The DAC does only draw 1-2 mA as per datasheet. The issue is almost fixed now and the power supply draws much less current now.

Electronic System Design
http://www.esdn.com.au

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

On further inspection, there still seems to be some issue. If the DAC value is below 20, the current goes up to 22.4mA. If above 20, the current drain for the board is 15.5mA. The analog circuitry draws 6mA on the board.

 

We have added this code which seems to reduce the current drain. It would be nice to know if this is an known XMega issue.

 

int dac;
    dac = ua*16.38;
    if (dac<20) {
        dac = 20;
    }
    DACB.CH1DATA = dac;  // 4095/100 20.475  4095/250=

 

Electronic System Design
http://www.esdn.com.au

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

A 5V dac output into a 10k load draws 2mA...

Hefty wrote:
If the DAC value is below 20, the current goes up to 22.4mA.
 

It seems related to the external circuit. No way to analyse this for us without schematics.

What happens if you disconnect external circuitry and the dac goes below "20" ?

 

As a general note for low power design:

It is often wiser to use a high clock frequency and do everything you need to do fast and then put the uC in sleep mode.

Lower clock frequencies mean the uC is awake more of the time which results in a bigger Joule count in the end.

About Joules... lowering Vcc also helps a lot (but might necessitate a slower clock frequency so there is a tradeoff).

 

Hefty wrote:
6mA for the analog circuitry (when Xmega is in reset or erased mode)

So how much does your XMega consume in reset mode?

You can measure it by putting a 1 Ohm shunt in series with Vcc. Just make sure there is a decoupling cap on the side of your uC.

 

And as always when in doubt:

Verify with another board just to exclude faulty hardware.

When hardware goes haywire there is no way to predict in what way it will do that.

 

Also:

How low do you want to go with power consumption?

It's not uncommon to have an average power consumption of 100uA and sometimes uC's run on a coin cell for a year.

But you won't get near that if "external  circuitry" draws 6mA.

Set yourself a goal based on the batteries used & lifetime. 

 

 

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com