Facebook Twitter Instagram Pinterest YouTube
    Trending
    • Add Kodi to RetroPie Menu
    • Disable Auto-login in Raspberry Pi OS
    • Raspberry Pi Cloud Storage with MEGA
    • RetroPie Temperature Monitor from Menu
    • Pi Pico Pinout and Power Pins
    • Install Arduino IDE on Raspberry Pi
    • Raspberry Pi 400 SSD Upgrade
    • Raspberry Pi Temperature Monitoring
    Facebook Twitter Instagram Pinterest YouTube RSS
    Raspberry Pi SpyRaspberry Pi Spy
    • Home
    • Categories
      • General
      • Hardware
      • Programming
      • Python
      • Software
      • Tutorials & Help
    • BerryClip
      • BerryClip Instructions
      • BerryClip Plus Instructions
      • Videos & Reviews
    • Buy
      • Buy Pi
      • Buy Pi Accessories
      • Buy Books
    • Tools
      • Ultimate Raspberry Pi Alexa Skill
      • Pi Power Estimator App
      • Pi-Lite 14×9 LED Matrix Sprite Editor
      • RPiREF Pin-out Reference App
      • Simple Ohm’s Law Calculator
      • Web Sites & Links
    • Tutorials & Help
        Featured
        November 9, 20200

        Raspberry Pi Temperature Monitoring

        Recent
        May 6, 2022

        Add Kodi to RetroPie Menu

        February 26, 2022

        Disable Auto-login in Raspberry Pi OS

        February 2, 2022

        Raspberry Pi Cloud Storage with MEGA

      1. Contact Us
      2. Site Map
      Raspberry Pi SpyRaspberry Pi Spy
      You are at:Home»Hardware»Running a Raspberry Pi from 6 AA Batteries

      Running a Raspberry Pi from 6 AA Batteries

      26
      By Matt on February 13, 2013 Hardware, Power

      Interfacing a Raspberry Pi with a Radio Controlled car was on my list of projects so I need to experiment with powering the Pi from batteries. I had a number of basic requirements.

      • Use AA batteries as I already had lots of rechargeables and chargers
      • Reduce the overall cost low by keeping additional electronics to a minimum

      The batteries would be required to power the Pi which needed 5V. AA batteries can vary in voltage from 1.2V-1.5V so some sort of voltage regulator was required to provide a stable 5V to the Pi. With the addition of a Bluetooth or WiFi dongle and some GPIO interfaces the regulator needed to provide 1A of current.

      6xAA Battery PackAfter some research I decided to buy a “UBEC”. In the Radio Controlled world this is a “Universal Battery Eliminator Circuit” but is really just a plain switch mode voltage regulator to everyone else. The device I bought from eBay was £5, provided 5V from an input of 5.5V-20V and was capable of supplying up to 3A. Perfect.

      6xAA Battery PackNext I bought a battery box. 4 AAs might struggle to provide enough voltage to the regulator so I opted for a 6xAA battery box. I already had plenty of rechargeable AA batteries so I grabbed some Sanyo Eneloop (NiMH) cells and charged them up. These batteries are great as unlike regular rechargeables they hold their charge even if left for months without use.

      6xAA Battery PackThe final stage was simply connecting the battery box to the UBEC regulator and the regulator to the Pi. The UBEC came with a 3 pin connector. I carefully repositioned one of the pins so that they had a space between them. This allowed the connector to plug onto the Pi’s GPIO header and provide +5V to Pin 2 and 0V to Pin 6.

      Here some photos of the basic setup I used to test my battery pack :

      And the results? Well I ran two tests. I took a Raspberry Pi and plugged in an Edimax 7811 USB WiFi dongle. Then I connected the UBEC to the GPIO header. Finally I inserted the last battery into the battery holder to complete the circuit. I gave the Pi 60 seconds to boot and then connected to it using Putty via WiFi. I ran this command in Putty to constantly display the system uptime :

      watch -n 60 uptime

      Every minute the Putty window refreshed. This kept the WiFi connection active and proved the Pi was still operating. When the Raspberry Pi finally ran out power the last figure displayed in the Putty window gave the total time the Pi stayed powered.

      • Model A (256MB) gave 16 hours 48 minutes
      • Model B (256MB Rev 2.0) gave 7 hours 15 minutes

      These are amazing results in my opinion. The Pi wasn’t asked to do any real work so I expect the times would be reduced in a real project but I was still impressed. If I doubled the number of batteries the Model A would probably run for 24+ hours!

      Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
      Previous ArticleRaspberry Pi Status LEDs Explained
      Next Article Cheap PIR Sensors and the Raspberry Pi – Part 2

      Related Posts

      Pi Pico Pinout and Power Pins

      Raspberry Pi 400 SSD Upgrade

      Raspberry Pi 400 Launched

      26 Comments

      1. David Gillooly on February 13, 2013 8:21 pm

        Pretty good idea for a server battery backup to.

        Reply
      2. John Doe on February 13, 2013 11:49 pm

        Can you please clarify if this was the 512mb version of the model B board?

        Thanks

        Reply
        • Matt on February 13, 2013 11:53 pm

          It was a 256MB Rev 2 which I bought a few days before they announced the 512MB upgrade!

          Reply
      3. Josef Schneider on February 14, 2013 12:05 am

        If you are OK to void the warranty you could remove the 3.3V regulator (which is linear), and use a switching regulator to create that voltage too. You _could_ get an even longer running time, as long as the switching regulator is efficient.

        Reply
      4. Cia91 on February 14, 2013 10:22 am

        Why you used GPIO instead of usb, for powering the pi? There is a particular reason or not?

        Reply
        • Matt on February 15, 2013 1:57 pm

          The UBEC regulator had a three pin female header already attached. This meant I could plug it straight onto the GPIO pins. Using USB would have required messing about with USB cables.

          Reply
      5. DOSSTONED on February 14, 2013 1:18 pm

        Is that possible to measure the volts between Pin 2 and Pin 6?

        Reply
        • HBrydon on February 18, 2013 3:20 am

          Pins 2 and 6 are “occupied” by the power connector if you power it this way (I suppose you knew this). You can measure the voltages on the bottom of the PC board directly, or you can measure the voltage between TP1 (+) and TP2 (-). TP1 is next to the 3v3 regulator (near the 5V MicroUSB connector and capacitor), and TP2 is between the (yellow) video out and P1 header. [There are also several other test points which are easy to use but harder to explain.]

          Reply
      6. zerinsakech on February 14, 2013 6:06 pm

        Cool,I was able to get the Model B Raspi powered on with only 4 AA batteries. I used an old cassette recorder to hold the batteries and pi in there. It was directly plugged into the RASPI and actually worked for a while until it killed my raspi since I didn’t use a regulator 🙂 I learned it the hard way.

        Reply
      7. Harry Orford on February 18, 2013 5:49 pm

        Is it possible to charge the batteries up with while they are still plugged into the device for example able to charge them up with the micro usb port on the raspberry pi.

        Reply
        • Matt on February 24, 2013 7:32 pm

          Not using the configuration I had setup. The regulator would not allow current to flow back into the batteries. To charge batteries at the same time you are using them would require some sort of charging regulator.

          Reply
      8. Dan Trickey on February 19, 2013 5:24 pm

        You bypassed the pi’s internal voltage regulator. This voids the warrenty and may cause damage to your pi if the external volatge regulator fluctuates.

        Reply
        • Matt on February 20, 2013 11:54 pm

          That is true and obviously you take a risk whenever you connect something to the GPIO header … but the beauty of the Pi is that you can take risks you can’t take with a normal computer. In this case it is no more risky that attaching a powered USB hub. Many of which have sub-standard power circuits.

          Reply
      9. Teddy on February 22, 2013 2:14 pm

        Hey this is interesting, thanks for posting. I had no idea the pi would work with power supplied to the GPIO pins, let alone that this would void the warranty…

        So, what are you planning to do with your RC car – I had been thinking about doing this too, using the battery pack that came with my car to power the Raspi as well. I was thinking of using the Raspi to control the drive and steering servos on the car, maybe through commands sent over wifi, or maybe even setting up some kind of automatic self-driving like a model Google car? I’d be interested in what you have in mind!

        Reply
      10. Paris Nakita Kejser on March 13, 2013 1:11 pm

        I have buy 2x (8x AA batteri boxes ) now, i will test it but i will ask about, can i put 10x (8x AA batteri boxes) to it or will it make to much power?

        Reply
        • Matt on March 15, 2013 3:05 pm

          Adding battery boxes in parallel will just mean it lasts longer. If you connected 2 8x boxes in parallel I would expect it to last twice as long as a single box.

          Reply
      11. Harry on March 14, 2013 7:55 am

        Great article thanks. Just a question could I put say 15v through the UBEC and It would work fine? 🙂

        Reply
        • Matt on March 15, 2013 3:07 pm

          Check the specs for the UBEC. It just depends on the range of input voltages it supports. I think mine supported 15V.

          Reply
          • Sean on September 2, 2018 9:14 pm

            Do you think I could power an lcd screen AND a model 3B using this method?

            Reply
            • Matt on September 2, 2018 10:57 pm

              Possible but it depends entirely on the LCD screen and what voltage it needs. Obviously the current draw from the screen will reduce the run time of the system.

              Reply
      12. Hans on March 15, 2013 8:39 am

        Would a zener diode 5 volt – 5 watt do the job also?

        Reply
      13. Kirk Bailey on March 20, 2013 3:24 am

        The new lithium based primary cell AA batteries offer much longer life than even alkaline cells. Pricy, but good.

        For service in a battery backup role, how about simply using a LARGE super capacitor, such as 10 Farad(!) backup. Best to use a resistor and diode to limit charge current or it will be n hour after power-up before you get boot. This should carry a critical system for quite a while.

        `Natch, a sealed lithium cell is maintenance free and has high power density.

        Reply
      14. Pingback: [Videograime] Raspberry Pi Sobre Baterias | Atarefado

      15. Pingback: [Videograime] Running Pi Over Batteries | Task Overload

      16. Pingback: Gromit Unleashed – Field Testing The Raspberry Pi Camera | Raspberry Pi Spy

      17. Pingback: Building a Bee Cam – Where do I start? | JCs Site

      Leave A Reply Cancel Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Recent Posts
      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      February 2, 2022

      Raspberry Pi Cloud Storage with MEGA

      January 7, 2022

      RetroPie Temperature Monitor from Menu

      January 24, 2021

      Pi Pico Pinout and Power Pins

      Categories
      • 1-wire
      • 3D Printing
      • Add-ons
      • BBC Micro:bit
      • BerryClip
      • Books
      • Camera Module
      • Cases
      • Events
      • General
      • Hardware
      • I2C
      • Infographics
      • Interfaces
      • Minecraft
      • Model A+
      • Model B+
      • News
      • Pi Models
      • Pi Zero
      • Power
      • Programming
      • Python
      • Raspberry Pi OS
      • Raspbian
      • RetroGaming
      • Robotics
      • Sensors
      • Software
      • SPI
      • Tutorials & Help
      Tags
      3D Printing Arduino audio battery berryclip Birthday bluetooth cambridge camera CamJam DigiMakers display games GPIO I2C interface Kickstarter LCD LED Linux media Minecraft Model A Model B motionEyeOS PCB photography photos Pi-Lite portable power python Raspberry Jam Raspberry Pi Bootcamp raspbian Retrogaming retroPie screen SD card security sensor SPI temperature ultrasonic video
      Raspberry PI Related
      • Adafruit Blog
      • Average Maker
      • Official RaspBerry Pi Site
      • Raspberry Pi Pod
      • RasPi.tv
      • RaspTut
      • Stuff About Code
      Tech Resources
      • MattsBits – Pi Resources
      • Microbit Spy
      • Technology Spy
      Archives
      About

      Unofficial site devoted to the Raspberry Pi credit card sized computer offering tutorials, guides, resources,scripts and downloads. We hope to help everyone get the most out of their Pi by providing clear, simple articles on configuring, programming and operating it.

      Popular Posts
      September 19, 2014

      Top 5 Reasons The Raspberry Pi Sucks

      July 27, 2012

      16×2 LCD Module Control Using Python

      October 20, 2013

      Analogue Sensors On The Raspberry Pi Using An MCP3008

      Recent Posts
      May 6, 2022

      Add Kodi to RetroPie Menu

      February 26, 2022

      Disable Auto-login in Raspberry Pi OS

      February 2, 2022

      Raspberry Pi Cloud Storage with MEGA

      Facebook Twitter Instagram Pinterest YouTube RSS

      Entries RSS | Comments RSS

      This site is not associated with the official Raspberrypi.org site or the Raspberry Pi Foundation. Raspberry Pi is a trademark of the Raspberry Pi Foundation.

      Copyright © 2022 - All Rights Reserved - Matt Hawkins

      Type above and press Enter to search. Press Esc to cancel.