Close

Switching off SD DOES work - 1.8µA in sleep mode ✔

A project log for µPower (beehive) SD logger

Let's observe an emerging beehive throughout the year 2018! (And create an logger from scratch for that purpose)

janJan 08/02/2018 at 17:582 Comments

Edit - 04.08.2018

A hint from @K.C. Lee together with my own findings helped making it work. The SD seemed to bleed voltage from either or all of the pins which were still high after turning off the VCC of the SD card. 

Switching these all off after turning off SPI comm. worked. Quiescent power consumption is now 1.8uA.

Situation is as follows:

Putting the board into powerDown mode without the SD inserted does exactly that: Power down. Current consumption 1.6µA.

When using the SD, doing a few test writes, closing the file etc. and turning it off by pulling low the EN pin of the TPS27082 sleep current consumption is always 75µA.

When I pull the SD out it drops to the 1.6µA mentioned above. Following pic is the integrated high-side switch I control the SD power with:

And the uSD socket:
Now the strange thing is: I measure 0V at VCC_SD sockets pin when the card is not inserted (exactly what should happen), but 2.8 something Volt when I insert it. So, the SD seems to "feed back" voltage into the output of the TPS27082. Where does it get the voltage from?
I tried pulling up/low all respective lines to no avail. Minimum current consumption I get is always 75µA when the SD is in its slot. The moment I take it out it drops to 1.6µA.

Tried different brands and cards. Checked all the circuits and soldering numerous times.
I measured the following voltages in powerDown mode
PIN (SD card)
VOLTAGE
1 (NC)
0V
2 (CS/SS)
3.2v
3 (MOSI)
0V
4 (VIN)
2.76
5 (CLK/SCK)
0V
6 (GND)
0V
7 (MOSI)
3.04V
8 (NC)
0V
The last thing the SPI port does are the 8 cycles of the CLK pin:
So, I guess the table tells me I need to pull MOSI and CS low before turniing the SD VCC off, right? I think I tried that already, but I'll try again and report back.

In the meanwhile: Do you have any other ideas?!

Discussions

K.C. Lee wrote 08/02/2018 at 18:31 point

Just a wild guess  Your SD pullups are wired to VREG_3V3 not VCC_SD.   So power is leaking there to the ESD diodes on the Vcc side of the SD card.

You have to set all I/O and all GPIO pull ups to the SD low or tristate prior to shutting down.  You can probably remove the external pull ups and use the GPIO ones.

  Are you sure? yes | no

Jan wrote 08/03/2018 at 11:29 point

Thank you a lot for your help. Much appreciated.
I connected the pullups to VREG_3V3 as I intended to use them in case I need to add another SPI device (which atm I don't). I already unsoldered them and switched over to the internal pullups.

Your second part was key. I did something wrong/not in the right order when switching off all the lines. I corrected it and now it works. Sweet!

1.8µA sleep current. Yay, that's much over two three years of battery life (or maybe less because of self-discharge of the battery(/ies).

Cheers, Jan

  Are you sure? yes | no