Portable Power with the Raspberry Pi 2

I am a fan of Kickstarter. I’ve invested in several ventures, one of which was for the Tylt Energi 2K Smart Charger. This is a wall charger for USB devices with a built-in 2200 mAh battery.

I take occasional business trips and wanted to have a portable charger like this for those times when my phone battery id dying and I am unable to get to a wall outlet. After one experience on a trip to Providence, RI, my phone was just about dead when I arrived in Charlotte, NC for my connecting flight to Providence. Charlotte Douglas International Airport (CLT) has a few available wall outlets scattered around the terminal and most of them are already in use by other travelers. I found an available outlet near my departure gate and only had about 5-10 minutes before boarding began so I plugged the phone in for enough of a charge to use it once I arrived in Providence and before I got my rental car.

While on the flight to Providence I decided to pull my Macbook out to do some work and realized that I had enough of a charge in it to allow me to plug my phone in and use the Mac at the same time. By the time we arrived in Providence, my Mac was almost dead but my phone was at 90%.

Enough of chasing that rabbit trail. Obviously I could have used a portable charger.

I received my Tylt Energi 2K just about a year ago and have used it quite often. It was my main charger for most of the last year and I’ve had no complaints. It is a great product and it still works as well as it did when I got it.

I purchased a Raspberry Pi 2 just last week along with a NoIR camera module and wanted to set it up and try some timelapse photography and see how it performs. (I plan on writing a post on that in the next few days. Be sure to come back.) I set the Pi up in my office and took a series of pictures every ten seconds for 30 minutes. However, I really wanted to set it up outside and try it. I just needed portable power.

I started thinking through how I could power the Pi and realized that the Energi 2K was perfect for the task. I set everything up outside using the Energi 2K. Everything worked without a hitch. The Energi 2K’s output is 1A and thus it more than sufficient to power a Pi.

I wanted to know just how long I could use the Energi 2K with the Pi before the battery died. I decided the best way to test would be to set it up and run uptime from a cron job every minute and save the output to a log file. I used the following entry in root’s crontab.

*/1 * * * *  /usr/bin/uptime > /var/log/uptime.log 2>&1

I checked to make sure that the cron job executed and wrote the log entry and then set the Pi and the Energi 2K on the shelf to run the test.

I checked on it several hours later and saw that all the LEDs were off on the Pi. I plugged it into my other mini-USB power adapter and logged in to check how long it took before the Energi 2K battery died. I saw a single entry in the log file from the first time the job executed when I rebooted the Pi. I realized I had used a single right angle bracket to redirect the output to the log file and overwrote the log every time the job executed. I quickly changed the crontab entry to the following.

*/1 * * * * /use/bin/uptime >> /var/log/uptime.log 2>&1

I had to recharge the Energi 2K so I decided to retry the test the next day.

The following afternoon, I hooked the Pi up the Energi 2K and set it aside for several hours. When I rebooted the Pi at the end of the test and checked the log I found the following entry at the end of the log file.

22:01:01 up  5:38,  0 users,  load average: 0.00, 0.01, 0.05

The Energi 2K powered the Pi for over 5.5 hours. Now, this test was performed on an idle system so the total uptime would be less if taking a video or series of photos. For my next test I will take a series of photos and post the results.

Here is the setup I used for the test:

  • Raspberry Pi 2
  • Edimax EW-7811Un WiFi adapter (normal broadcast network traffic only)
  • Raspberry Pi NoIR camera module (unused during the test)
  • 8GB PNY Micro SDHC card (Class 4)
  • Raspian Wheezy 2015-05-05 (3.18.11-v7+ kernel)

Keith

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s