how to measure power consumption using xplained pro

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

I have code flashed on a SAMD20 on a Xplained Pro, and all it does is set some GPIOs and go to sleep.  I power the board with a USB cable, and I see 1.8uA on the current measurement header.

 

I also have a PCB with a battery input and 3.3V regulator.  I jumper some wires on the Xplained Pro headers to my PCB, the GPIOs disable all the hardware on the PCB and I measure 1.5uA out of the battery.  At this time I can also still see the 1.8uA on the Xplained Pro current measurement header.

 

Now I want to power the Xplained Pro board with the 3.3V regulator on the PCB; in other words, power everything with the battery and measure the current out of the battery, expecting to see ~ 1.5uA+1.8uA

 

I did that by connecting 3.3V to one of the Xplained Pro pins named "Vcc".  But I'm getting 6mA out of the battery, and >99% of it is going to the Xplained Pro board.

 

 

Is it possible to do this test?  I've thought of possible reasons why I get 6mA:

1.  debugger or USB components are getting power

2.  IO leakage; but the CPU is asleep so doesn't make sense

 

Last Edited: Thu. Oct 15, 2015 - 11:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Have you looked at the schematic to see exactly where the current measurement header is and, thus, what you are measuring ... ?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes.  What else could 1.8uA possibly represent?  Obviously it is the current going into the micro.  Are you suggesting that I can add 1.8+1.5 and say that equals 3.3?

 

Actually what made sense to me was to leave the header unconnected, and apply power to the VCC_MCU_P3V3 side, thinking that only the SAMD20 would be powered and not anything else on the XPlained Pro board.  But, this doesn't work; I get a constant 20mA, never goes lower.  Don't know why.

Last Edited: Wed. Aug 5, 2015 - 08:41 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Totally agree, you need to look at the  schematic for the board and see what happens when you apply an off-board 3v3 to that particular pin. There is probably some protection diode that gets forward biased or something like that. Is there a power indicator led that is on ? 

If you're using ASF, neither of us know what your code is really doing :)
Have I just solved your problem ? My bitcoin address: 1EpGuPa2VtUVWjGmgWRmFicNKMFZSGhfLr

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

I made a mistake:  I tried connecting 3.3V to VCC on one of the Xplained headers eg. EXT2, thinking that VCC was the same net as VCC_MCU_P3V3 , but it's actually VCC_TARGET_P3V3 , which explains the extra current into LED, etc.

But, correcting that mistake, I still get 6mA out of the battery, and now it's 1.5mA into the micro.

 

This should be a very common thing to do, which is why I'm asking directly for the answer.  Has anyone done this?

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

You will also be powering EDBG and other stuff on the board. The board is not really designed for total current measurement like this. EDBG part is obviously not optimized for power consumption.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

I've simplified this further.  Forget the other PCB I have.  

 

With just any 3.3V power supply, a SAMD20 XPlained Pro board whos code just boots up and goes to sleep, and 2 jumper wires, is it possible to see X uA coming out of the power supply, where X is the sleep mode current of the SAMD20?

 

With the current measurement header disconnected and 3.3V connected to VCC_MCU, I'm getting 1.5mA.  With USB power and an ammeter shorting the header, I get 2uA.  

 

Any suggestions?

Last Edited: Wed. Aug 5, 2015 - 09:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Not with XPro. You will have to physically remove EDBG IC to get actual power consumption numbers. Also, D20 has all those switches for the external connector, they also leak a bit.

 

For full system consumption measurement it would be easier to get TQFP breakout board and have D20 sitting on a board by itself.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

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

Seems right.  I tried to verify that:

I checked the EDBG page in the schematic, and I noticed that VCC_EDBG_P3V3 is tied to VCC_P3V3 by R425 (0 ohm) but VCC_P3V3 would be disconnected if the current measurement header was disconnected.  So I figured VCC_EDBG_P3V3 would have no power.  But, I measured R425 and got 0.58V, so VCC_EDBG_P3V3 must be leaking.  

 

I like the breakout board idea.  I do have to test non-EDBG programming, so maybe I'll convert an Xpro into a breakout haha!

 

Thanks so much !

 

Last Edited: Wed. Aug 5, 2015 - 10:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

It is a bit harder with D20, since D20 XPro has no connector for the external programmer. D21 Xpro has one, so removing EDBG is not a big deal.

 

EDIT: Actually I'm wrong. D21 XPro has no connector either. Only R21 Xpro has it.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

Last Edited: Thu. Aug 6, 2015 - 02:06 AM