Switching off SD cards for low power data logging


Edward Mallon writes:

I saved SD power control to the end of my quest for low power logging, because of all the potential weirdness that could arise with the Arduino libraries. But after a reasonably thorough round of testing it all seems to be working OK with a BJT switching the ground line.

More details at Edward Mallon’s blog.

Via the Arduino forum.

Join the Conversation


  1. Well, he has wrote a lot of stuff on getting power usage down.

    But all of it could have been solved at the outset very, very easily. No need all those twists and turns. Use the MCU as an AVR, not an Arduino. Sleeping at 10-20uA would have been very easy to do.

    There are 8 pin NOR flash, 32MB for less than USD4. If the data fits in there, then I’d rather use NOR flash instead. Much easier on the energy budget.

    I’m surprised he didn’t check the 2N2222. Look at its data sheet, the V(CE) performance is not great. Take 0.3V at 100mA, then the SD card would have been actually running at 3.0V, right at the -10% VCC rating edge. I’m surprised the problems are not worse. Of course it would be extremely sensitive to VCC sag… I recommend he stock up on some good PFETs…

    Also if he wants his data loggers to run through a Canadian winter, then he’d better stick to lithium AAs.

    1. Thank you for pointing out the V(CE)sat problem! I still have a lot to learn, and I simply missed that important point. I’ve added your comment to the blog so I don’t lead anyone else into trouble there.

      I also appreciate the AVR/NOR information, but I’m really trying to see how far I can go with cheap modules from eBay, despite the various problems baked into that approach. My interest is more in creating a flexible platform so non-engineering students can build different logger prototypes, rather than in creating an optimized design.

  2. Bottom line, if he wants reliability, you need the margins. Use a nice PFET with a on-resistance of well under 1 ohm. He tested a few modules for a few weeks, but did he test it for winter conditions? Capacitors in winter, hmmmm. Even for SMD ones, watch out for characteristic changes for those cheap Y-prefix types. Now if he build 20 of those things, would they all work reliably? Without extensive testing? A nice PFET is a small price to pay, no reason to eat up the margins for no good reason. Ensure good margins, or embrace the risk. Also, if he wants to use regular alkalines in winter or freezing conditions, capacity testing is needed. Stratosphere balloon flights by hobbyists often use primary lithiums.

    In the old days, an embedded enthusiast would have designed the thing (and think AVR) from the outset to meet objectives / specs, not struggle with integrating the various modules and meeting very-so-so sleep currents (while thinking Arduino). Surely, this is a textbook example of how not to do embedded engineering if you are doing it for a salary.

    1. Thanks again for the tip about caps at low temp. And this comment was so bang-on that it made me chuckle:

      “…surely, this is a textbook example of how not to do embedded engineering if you are doing it for a salary…”

      In fact I should probably add that to the main landing page, since I am an artist, with the kind of patchy, self-taught electronics background that would embarrass a first year engineering student… and I don’t get paid.

      Even so, our little project is approaching the scale, and data accuracy of some well-funded research groups using commercial equipment. And this is happening all over the place now, with citizen-science level resources. So I’ll be doing my “cold weather” testing in a domestic refrigerator – which might work – or it might not. But if I pull it off then everyone else will be able to do it too, and that’s a real reason for optimism. Even if we don’t end up matching pro-level kit in the end, I’ll still be happy if we produce more grinning science-fair kids, holding hot-glued rat-nests in their hands. Considering where I started, that would be an achievement.

  3. Keep tinkering with your projects, you’re doing fine, solving problems and such. Just think of me and some of the others here as grumpy dinosaurs…

    1. Given how long it takes me to root this stuff out on my own, constructive criticism from people with real experience is without question the most valuable information I can get. So grumpy or not, I’m always happy for the input.

  4. Oh, I’ve done a lot of the things that you are doing, only back in the Old Days of UV erasers etc, we didn’t put our progress diary/notes online :-). Tried old transistors/diodes in power switching circuits and saw just how inefficient they are when trying to pass more than a few tens of mA, etc. (E.g. 1N4148 and resistor-shaped axial audio inductors in a boost converter… works but the parts struggle mightily and efficiency is poor)

    One remember one’s mistakes well… so one becomes more sensitive to situations where older tech can hurt performance. It also pays to browse datasheets and know ballpark values to apply quickly.

    I buy only X5R and X7R chip caps for my own projects, but cheap ready-made modules may be using Y-prefixed parts, which are significantly cheaper, hence the note of caution.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.