Battery powering 2 weeks

Hello…real excited about this product. Have used an Arduino on a few projects (build a ultrasonic sensor for example). I needed something for data logging with RTC without soldering (no thanks Adafruit).

Anyways I need to send this out in the field to measure vibrations and log the data. It needs to be out there for 2 weeks at a minimum. I was wondering if anyone knows of any battery solutions that might work. The sensor runs on 5 volts. Any ideas?

Also I was wondering what is the max SD card I can use?

Welcome to the forum.

What is “this” (FEZ type)? What’s the current draw of your sensor? Does “in the field” mean outdoors? If so, what’s the average temperature like?

FEZ Panda II. The sensor is the ADXL335. It will draw 5V. The data will be written to the MicroSD.

Temps in Sweden will be between 10 C and -10 C I suspect.


@ rgm - looking for current of the sensor. The datasheet says typical current is 350 uA, which is very low (and good for battery life). Your best bet is to hibernate the Panda between readings, unless you need a continuous data stream. I’ve had good luck with 6V alkaline lantern batteries such as h . These are ~12Ah, so if you’re drawing a continuous 100 mA (example only), you’ll get a maximum of 120 hours out of it (at ~25C). This is why hibernating the Panda is crucial. Other options would be to get a rechargeable version of this battery and hook up a small solar panel, use several batteries in parallel, or get a bigger battery. Again, low temperature is going to be your biggest hurdle.

I hope this information helps. Good luck!

Awesome…thanks so much.

Any idea about getting really fast write speeds from to the Micro USB. I am not an Ace is C# but I tried for giggles to write 1 to 100000 here and in 30 seconds I got to 12…

        for (int i = 1; i < 10000; i++)
            byte[] data =
               Encoding.UTF8.GetBytes(i + ",");
            // write the data and close the file
            FileHandle.Write(data, 0, data.Length);


I need much much faster write times.

Thanks again. I really love this platform and I hope it takes off because the documentation is a bit slim right now. From a testing perspective it offers a lot more options…

This is a very poor test :frowning:

Writing one byte at a time is going to be the slowest possible way to do things. The process of creating the single encoded byte and calling the write function for one byte of payload is a huge amount of overhead. Think of it like this: You have to carry a large number of ping-pong balls out to your car, would you carry them one at a time or would you carry a big box of them at once?

A better approach would be to buffer a number of bytes and write them all at once. Try creating an array of size 1K, fill it with some sample data. Then in your loop write it out 10 time (same amount of data written in total as your first test.)

That is funny because that is exactly what I was thinking I just do not know how to buffer them with the Fez Panda.