1 Technophile. Raspberry pi power bank


After more than 4 years spent in home automation, the thing that bothered me the most was the regular failure of my Pi SD cards.

These failures were the consequences of power supply issues and too much IO on the SD card. I could have tried to reduce the IO or to buy a better model of SD card.

With a home automation system, you need something that is available when you need it. Not something that stops in the middle of your holidays.

So here are the results of my recommendations:

  • For the storage, it is now well known that the SD Card on the PI is subject to corruption, to avoid that you can put your system in read-only mode, try to reduce the writing, or install an SSD. The raspberry pi 4b can now also boot from the SSD. I choose this solution as I wanted to keep the DB on the Pi.
  • For the UPS, I had the occasion to test several Power Bank without satisfaction. Indeed if the power bank you are using doesn’t have a pass-through mode, you have a risk that the bank will stop at an unexpected moment, due to the low consumption of the Pi.

The Voltaic Systems V25 is configured by default in Always On mode, so nothing to do especially except connect it to a good power supply.

The Pi 4B is on the first layer with the SSD fixed below the top layer. The power bank is on the second one.

I’m very satisfied with this system. It is stable, the power bank is working perfectly even if it is rated for 2A (Raspberry PI 4 advise a 3A power supply).

The cherry on the cake, I have the space to put the Olimex ESP32 gateway OpenMQTTGateway so as to have a great BLE coverage.

I hope this is useful and will give you some ideas. I wasted so much times due to SD Cards corruption. If I can avoid you this, it will always be winning!

  • Obtenir le lien
  • E-mail
  • Autres applications
  • Obtenir le lien
  • E-mail
  • Autres applications

433toMQTTto433. Bidirectional ESP8266 NodeMCU gateway between RF 433Mhz signal and MQTT

The goal is to act as a gateway between 433Mhz sensors and a MQTT broker or between the MQTT broker and 433Mhz actuators, It enables to: receive MQTT data from a topic and send RF 433Mhz signal corresponding to the received MQTT data publish MQTT data to a different topic related to received 433Mhz signal It can be an interesting part in an home automation system so as to interface sensors and actuators (wall sockets) with software like openhab. List of compatible sensors here The interest of putting this gateway to an ESP8266 and not on a raspberry pi is to be able to manage security actions at gateway level (power on a siren, cut power to certain devices) following RF data received by sensors without being dependent to the PI for security related actions. [EDIT] all infos are now centralized into the github repository take a look at it you will find up to date info about OpenMQTTGateway You need: Software: Mosquitto Arduino IDE latest version (tested ok with 1.6.10

  • Obtenir le lien
  • E-mail
  • Autres applications

Create a portable battery and solar powered Raspberry Pi Zero web server

Ste Wright. 06 Jul 2017

I asked the community on Reddit what tutorials people wanted me to write, and one, in particular, caught my imagination. ‘Thaslegendary’ said:

“A guide on how to power raspberry pi zero with 4 AA battery would help me a lot”

This really got me thinking. Can I build a portable web server that runs off battery alone, topped up with a solar panel? There’s only one way to find out. At the time of writing this, the Raspberry Pi Zero is running on a solar power bank and is therefore completely off the grid.

Step 1 – Choose your power supply and hardware

The Raspberry Pi choice had to be a Zero W. According to Jeff Greerling the Raspberry Pi Zero W uses around 0.4w, a super low consumption. The power bank choice was essential too, it had to fulfil the following criteria:

  • Has to have at least 10,000Mah battery
  • Has to have a solar panel for topping up the charge
  • Has to have a USB port capped at 1a to promote longer battery life

I bought an Aisla 20,000Mah power bank off Amazon for £16. Nice capacity, complete with a solar panel for a modest price.

Step 2 – Install Nginx

I’m going for Nginx as the web server for this project. Nginx is lightweight and uses minimal resources. Let’s first ensure that our installation of Raspbian is up-to-date (I’m assuming that your Raspberry Pi Zero is already working and you’re using Raspbian OS and you’ve connected to your Wi-Fi network):

sudo apt-get update.y sudo apt-get upgrade.y

Now for Nginx installation:

technophile, raspberry, power, bank

sudo apt-get install nginx.y

After a short while, Nginx should be installed. Go ahead and visit the IP address of your Raspberry Pi Zero. You should see something a little like this:

So that’s pretty much it for Nginx, add whatever site you want to or even install PHP. Next, we’ll take a look at some monitoring.

technophile, raspberry, power, bank

Step 3 – Add some monitoring by installing Rpi-Monitor

We will want to know the health status of our Raspberry Pi Zero battery-powered web server. This can be done using a package called Rpi-Monitor. I’m going to talk you through the installation and using Nginx as a proxy to access the monitoring page without an ugly port number.

Rpi-Monitor uses a private Debian repository, so we need to add this first. Install a couple of packages to get started:

sudo apt-get install apt-transport-https ca-certificates

Now we need to add more sources:

sudo wget http://goo.gl/vewCLL.O /etc/apt/sources.list.d/rpimonitor.list

Now let’s install a certificate so we can download from this repository:

sudo apt-key adv.-recv-keys.-keyserver keyserver.ubuntu.com 2C0D3C0F

At this point, we can install the package. We need to update our lists first so the following command will do both update sources and install the package:

sudo apt-get update sudo apt-get install rpimonitor

Finally, we need to ensure our updatable packages are updated:

Try going to your Raspberry Pi Zero’s IP address with the port 8888 and you should see the status page.

Step 4 – Configure the proxy in Nginx

We’re going to proxy our requests to Rpi-Monitor via nginx. This allows us to have our regular web traffic to Nginx and to Rpi-Monitor without an ugly port number on the URL. It also allows us to later add an SSL certificate to our monitoring page (see Adding SSL for free with Let’s Encrypt).

Edit the default site configuration by typing the following command:

sudo nano /etc/nginx/sites-available/default

In the configuration, we will see an entry for ‘location /’. Underneath that location block (so after the closing curly brace) add this:

This will allow requests to example.com/monitor/ to show Rpi-Monitor. Your configuration will now look a little like this:

Exit and save by hitting CTRL X. Finally, test that your configuration isn’t broken by typing the following command:

sudo service nginx configtest

You should have an OK message. Go ahead and restart Nginx:

sudo service nginx restart

In your browser, visit your Raspberry Pi Zero’s IP address and append /monitor/ to the URL. You should see something like this:


We’ve got our solar-powered, completely off-grid Raspberry Pi Zero, installed Nginx and Rpi-Monitor. It’s a truly portable device that can be used for many many different applications. How long the device can run off battery remains to be established. Below is an iframe of the actual monitoring page on my battery operated Raspberry Pi Zero. As always, any questions or feedback, feel free to add a comment and click a banner if you found this tutorial to be beneficial.

Following the publishing of this article, I’ve had two Комментарии и мнения владельцев and an email sent to me criticising me for asking people to click a banner if they found this to be beneficial. The banner adverts contribute towards the cost of the equipment I buy to write up tutorials like this but don’t come close to covering the full costs.

Ste Wright

Thoughts of a software engineer

How to Power Your Raspberry Pi With a Battery

Often, when doing a project based on a Raspberry Pi, the main goal is to make it portable. Thus, we find ways to make it work unplugged. In this tutorial, we will talk about how to power a Raspberry Pi with a battery.

I’ve been using the Raspberry Pi for years now, and hands down, the best part is that you can bring it anywhere. It is a tiny computer the size of your hand, so having it connected to a power outlet kind of defeats its purpose.

With batteries connected, you can set up a web server for sensors in an open field, apply machine learning to a CCTV, or even control actuators from anywhere in the house. Now, the only drawback in using batteries is that you have to start minding power consumption. But that’s perfectly doable, as we will see in this tutorial.

The first thing you need to do is to choose the correct Raspberry Pi.

Choosing the Right Raspberry Pi

The latest Raspberry Pi 4 B is a beast among single board computers. It has a quad-core processor, a gigabit Ethernet port, USB3, which supports two 4k displays, but consumes a whopping 6.25Wh.

technophile, raspberry, power, bank

You can use the Raspberry Pi 4 B if your application is resource intensive, but a Raspberry Pi Zero would be a better choice if you want to maximize battery life.

This table compares the power usage and power source between the Raspberry Pi 4 and the Raspberry Pi Zero:

One hour and forty-five minutes of operating time is definitely not good for a portable device. However, if you use a Raspberry Pi Zero, the results improve significantly:

Note that this is only for a single lithium battery, so there is a large room for improvement. You can add more batteries in parallel to prolong battery life. Also, the Raspberry Pi’s rated current is an average from the datasheet. The actual current readings may differ depending on your Raspberry Pi’s activity and peripherals. If you want to know the actual readings, you can use a current tester.

How to Choose the Battery Size

Using the calculations above, we can formulate a rough estimate of our device’s battery life. For instance, a 1000mAh battery would be able to power a device with a rated current of 1000mA for one hour. Similarly, a 40,000 mAh power bank would be able to power a 4A device for one hour, or 1A device for 40 hours. It’s really a compromise between your project’s power consumption and how long you need the device to be powered by a single charge.

Things to Consider

The Raspberry Pi needs to be powered with 5V DC, so we need to have a DC/DC converter to convert the 3.7V battery voltage to 5V. This means the power consumption and efficiency of the converter needs to be considered when determining battery life. Efficiency affects battery life like a multiplier, so read the datasheet and choose a good DC/DC converter carefully.

Finally, if you’re powering the Raspberry Pi with a rechargeable battery, you need to have a battery charge controller. Charge controllers regulate the incoming current and voltage to your batteries. They are used to prevent overcharging, allow you to charge your lithium batteries safely, prolonging your battery’s lifespan.

Now that you have chosen the appropriate Raspberry Pi, the correct battery size, a DC-DC converter, and a battery charge controller, we can now proceed to the possible battery setups.

There are three setups I have tried over the years. First is the minimal setup.

Charge Controller

Connect a TP4056 charge controller to a 3.7V lithium battery. Then, connect the charge controller’s output to the 5V pin and ground of the Raspberry Pi Zero. Since the Raspberry Pi operates at 3.3V, the 5V rail already has an onboard voltage regulator that creates this voltage using any input between 3.3V and 5.25V.

This setup is great for testing. Best for trying your system out for a few minutes and observe if it is working. However, I don’t recommend using this as a permanent solution. It’s because you’re basically connecting 3.7V to the 5V pin. When the battery level goes down to 3.3V, the Raspberry Pi will shut down even if the battery is not completely spent. Also, you have to disconnect the Raspberry Pi from the battery every time you’re charging, so you’ll need a toggle switch or a breadboard.

DC/DC Converter

To solve this, you need to have a MT3608 3.7V to 5V DC/DC converter that ups your 3.7V to standard 5V. Take the output from the charge controller. Connect it to the converter’s input and connect the output to the 5V pin of the Raspberry Pi. With this setup, you don’t have to worry about not making the most of your batteries. You also don’t have to disconnect the batteries every time you charge because of the built-in circuitry of DC/DC converters.

Power Boost Module

The last setup is uses the PowerBoost 1000 charger module from Adafruit. This module works like a battery charge controller and a DC/DC converter in one. No need to have separate modules. Just connect a 3.7V lithium battery, and you’ll have constant 5V output and regulated USB charging.

Hope this article has helped you setup your Raspberry Pi to run off of a battery! Feel free to leave a comment below if you have questions about anything.

Juice 8000mAh 12000mAh test with Raspberry Pi 3B

B ack in Thu Apr 05, 2018 I was looking around for a power bank that will run my Pi and the 7″ touchscreen without needing to find a random battery, build some power circuit to step up or step down the voltage and so on. I wanted something that’s compact, nice looking for my Smarti-pi Touch case and can pack the power I need for those times I want to take my pi out and about or something to do when the power goes out. If it can last 3 hours that’s perfect for me. At first, I was looking for one I can charge and use at the same time. Unfortunately, I couldn’t find anything like that besides going the other rout and having an ugly setup.

So I reached out to other groups and asked if anyone knew of a battery that can suit my needs. One fella said Juice. I looked it up and I saw an image of one plugged into the wall outlet. At first, I didn’t want that. I didn’t want to pull the battery off all the time and charge it in the wall. Did some more digging on the Juice Battery Bank and seen that some have USB Micro-B. Perfect!

I still had the question, does the Juice 8000mAh work with the screen and the Pi and for how long? I was pretty much stuck with a question that no one can really answer. If you want to view one of those posts here’s one of them. USB Power Bank for Raspberry Pi 3B and 7″ touchscreen.

So I needed to find this information out and log everything so if the next person asks there is now an answer.

So here is the plan

E verything I provide will be data you can use for your projects. So my goal was to get the Juice 8000mAh and a voltage meter and do my own tests.

  • The battery bank has two USB ports. Now I know I cannot run the screen and the Pi on just one. You need to separate that load.
  • The 7′ touchscreen needs to be on one USB port of the Power Bank.
  • The Raspberry Pi, with the “Dual Fans” needs to be on the other USB port of the Power Bank.
  • This will separate the load and it won’t be too overwhelming on one USB port.

A quick test without my voltage meter shows it will work without the lightning bolt on the Raspberry Pi. That tells me the power bank has enough voltage to pull this test off.

I created a datasheet of the things I was going to do. These things are on the more extreme side by playing games, watching videos, surfing the internet and even streaming from Netflix. Most people who own a Raspberry Pi won’t do anything extreme like this but these are the things I do. Now for me, I will only use the Power Bank for times that I really need it. Most of the time my Raspberry Pi will be plugged into the wall. Again, for me, if it can last for 3 hours, I’m happy.

Raspberry Pi 3B (RetroPie) Powered By – Juice 8000mAh

These tests include the 7” Touchscreen Dual Fans on the same battery pack (Separate USB Ports). All recordings are on the activities below and Pi voltage recordings only. Not the screen

Table Position Time Pass Voltage Amps Power (W) Impendence Activity Type
1 0:05:00min Pass 05.200 0.6548 03.556 0007.7 Checking Everything Over
2 0:00:00 min Pass 05.199 0.6694 03.547 0007.5 Sonic 1 Em Genisis
3 0:30:00 min Pass 05.200 0.7143 03.667 0006.4 Zelda Minish Cap Em GBA
4 1:00:00 min Pass 05.202 0.6576 03.486 0006.3 Counting Cars 08e02 Kodi Port
5 1:30:00 min Pass 05.200 0.8015 04.455 0007.7 Mobile Chromium
6 2:00:00 min Pass 05.196 0.8243 03.510 0007.6 Dragon Riders Of Berk s01e01 Chrom NetFlix
7 2:30:00 min Pass 05.199 0.6578 03.578 0007.5 Solitare Desktop
8 3:00:00 min Pass 05.188 0.8347 04.084 0004.7 Fear Thy Neighbor s05e09 Chromium
9 3:30:00 min Pass 05.196 0.6641 03.545 0007.6 Music Audacious
10 4:00:00 min Pass 05.196 0.7158 03.594 0007.3 Pokémon Emerald Em GBA
11 4:30:00 min Pass 05.200 0.6449 03.344 0008.0 Reboot s01e01 Kodi Port
12 5:00:00 min Pass 05.195 0.7623 04.006 0006.7 Spyro 1 Em PS1
13 5:30:00 min FAIL 05.197 0.7537 03.928 0006.9 Speed Punks (Speed Freaks) Em PS1

Any issues will be labelled below here.

Table Position Time Notes
6 2:06:25.00 I had internet issues due to being far away from my modem.
12 5:43:28.00 Jittered near the end of Spyro 1
13 Time Of Death: 5:33:40.99 Died on Speed Punks (Speed Freaks)

This Juice 8000 mAh battery bank had no problems at all. Not once did I see the voltage icon. My Raspberry Pi 3B acted like it was plugged into the wall. Everything I did ran flawlessly except the internet because I was too far away from my modem. I retested it off-camera and no problems what so ever.

I recommend using this battery bank. I give it a Pass.

Raspberry Pi 3B (RetroPie) Powered By – Juice 12000mAh

These tests include the 7” Touchscreen Dual Fans on the same battery pack (Separate USB Ports). All recordings are on the activities below and Pi voltage recordings only. Not the screen

Table Position Time Pass Voltage Amps Power (W) Impendence Activity Type
1 0:05:00min Pass 04.975 0.7553 03.745 0006.6 Checking Everything Over
2 0:00:00 min Pass 04.979 0.7402 03.644 0006.7 Sonic 1 Em Genisis
3 0:30:00 min Pass 04.980 0.7590 03.553 0006.5 Zelda Minish Cap Em GBA
4 1:00:00 min Pass 04.985 0.6923 03.487 0007.1 Counting Cars 08e02 Kodi Port
5 1:30:00 min FAIL 04.981 0.7466 03.595 0006.6 Mobile Chromium
6 2:00:00 min Pass 04.982 0.8456 04.296 0005.5 Dragon Riders Of Berk s01e01 Chrom NetFlix
7 2:30:00 min Pass 04.988 0.6514 03.244 0007.6 Solitare Desktop
8 3:00:00 min FAIL 04.989 0.6186 03.071 0008.1 Fear Thy Neighbor s05e09 Chromium
9 3:30:00 min Pass 04.987 0.6556 03.215 0007.7 Music Audacious
10 4:00:00 min Pass 04.984 0.6539 03.258 0007.5 Pokémon Emerald Em GBA
11 4:30:00 min Pass 04.985 0.6402 03.197 0007.7 Reboot s01e01 Kodi Port
12 5:00:00 min Ok 04.981 0.7094 03.526 0007.0 Spyro 1 Em PS1
13 5:30:00 min Ok 04.979 0.6951 03.466 0007.1 Speed Punks (Speed Freaks) Em PS1
14 6:00:00 min Pass 04.979 0.7009 03.363 0007.8 DestructiveBurn.com (Editing) Chromium
15 6:30:00 min FAIL 04.976 0.7392 03.439 0007.1 South Park Chromium
16 7:00:00 min Ok 04.984 0.6548 03.268 0007.6 Frogger 2 – Swampy’s Revenge Em PS1
17 7:30:00 min Pass 04.986 0.6041 03.116 0008.1 YouTube Kodi Port
18 8:00:00 min FAIL 4.985 0.6009 02.991 0008.3 Mobile Chromium
19 8:30:00 min Ok 04.985 0.6682 03.240 0007.6 Medievil Em PS1
20 9:00:00 min FAIL 04.986 0.6188 03.078 0008.0 Phantasmagoria Em DoS Box

Any issues will be labelled below here.

Table Position Time Notes
1 00:01:38 Lightning Icon pops up on heavy loads
4 1:12:34 min Already 1 light out on the battery bank
5 1:39:00 min freezes on video load/scrolling only
8 3:30:00 min Froze loading TV show in the browser. Used Kodi instead – data is on Kodi not chrome
12 5:04:00 min Spryro runs sluggish and the audio cuts in and out.
13 5:33:00 min Just like Spyro sluggish
15 6:38:00 min Froze streaming TV show in the browser. Used Kodi instead – data is on Kodi not chrome
16 7:03:00 min Just like Spyro sluggish
0-0 8:00:00 min Bolt icon fully displaying on everything now
18 8:03:00 min freezes on video load/scrolling only
19 8:30:00 min Just like Spyro sluggish
9:00:00 min Started to blink
9:05:00 min Screen Blacked-out. The Pi is still running. I won’t be able to see it now
Time Of Death: 9:09:16.90 min Officially called it dead. Started dropping power from the screen.

This battery bank has been plagued by this icon through the whole test.

These issues are due to the voltage running under 5.0v DC. If the voltage was at 5.0v there would be no problems. Unfortunately, since the Juice Battery Bank, 12000 mAh has this problem. I give it a complete FAIL. I would not recommend using it at all on the Raspberry Pi. I even tested the Pi by itself on the Battery Bank and the same results of being under 5v.

I will be updating this post again in the future when these battery packs wear down to give you a better reading from New to Old.

Now I know these Battery Banks were never designed to be used like this but these tests are experimental.


Raspberry Pi LCD – 7″ Touchscreen

  • Touch Screen.odsSpreadsheet Data from UM25C USB LCD VOLTAGE METERThis data shows from the time I started to when the battery died: Read times – Voltage graph / Voltage(V) – Voltage graph / Read times – Current graph / Current(A) – Current graph
  • You can get the screen here: https://www.sparkfun.com/products/13733

8,000 mAh Juice Data

  • Juice 8000mAh.odtThis is the same information as I provided above for the Table Position / Time / Pass / Voltage / Amps / Power (W) / Activity and Type
  • 8000mAh.odsSpreadsheet Data from UM25C USB LCD VOLTAGE METERThis data shows from the time I started to when the battery died: Read times – Voltage graph / Voltage(V) – Voltage graph / Read times – Current graph / Current(A) – Current graph
  • 8000mAh.txtSame Data as 12000mAh.ods just in a text format.

12,000 mAh Juice Data

  • Juice 12000mAh.odtThis is the same information as I provided above for the Table Position / Time / Pass / Voltage / Amps / Power (W) / Activity and Type
  • 12000mAh.odsSpreadsheet Data from UM25C USB LCD VOLTAGE METERThis data shows from the time I started to when the battery died: Read times – Voltage graph / Voltage(V) – Voltage graph / Read times – Current graph / Current(A) – Current graph
  • 12000mAh.txtSame Data as 12000mAh.ods just in a text format.

Raspberry Pi 4 Power Requirements: Everything You Need to Know

The Raspberry Pi 4 was released in June of 2019 and brought with it some major changes. The most noticeable change was the increase in performance, making it a viable option for use as a desktop computer. However, with this increase in performance comes an increased power requirement. This article will discuss the Raspberry Pi 4 power requirements and provide you with everything you need to know to ensure your device is properly powered!

What are Raspberry Pi 4 Power Requirements?

The Raspberry Pi 4 requires a power adapter that outputs at least 5 Volts and 3 Amps. The power adapter can be connected to the micro USB power port on the Raspberry Pi 4. It is important to use a power adapter to provide enough power for the Raspberry Pi 4, as insufficient power can lead to performance issues.

Depending on what peripherals are connected to the Raspberry Pi 4, the power requirements may be higher. For example, if the Raspberry Pi 4 is used for video applications, it is recommended to use a power adapter that can output 15.3 Watts.

Can You Use a Power Bank to Power Raspberry Pi 4?

The short answer is yes. You can use a power bank to power a Raspberry Pi 4 project. However, there are a few things to keep in mind. First, the power bank must be able to provide enough power to the Raspberry Pi 4. The Pi 4 requires 3A of power, so make sure your power bank can provide this.

Second, you’ll need to use a USB Type C cable to connect the power bank to the Raspberry Pi.

Fourth, make sure the power bank is fully charged before using it.

And finally, if you’re using a battery case for your Raspberry Pi, make sure the case has proper ventilation so that the Pi doesn’t overheat.

How to Measure The Power Usage of Raspberry Pi 4?

When working with the Raspberry Pi 4, it’s important to keep an eye on your power usage. After all, the Pi 4 is a small computer and doesn’t have a lot of extra room for cooling. That means if you’re overclocking or running multiple programs, you could run into problems. Fortunately, there are a few ways to measure the power usage of your Pi 4 projects.

The easiest way is to use a multimeter to measure your device’s voltage and current draw. You can also use a USB Power Meter, which will measure the current draw and calculate the power usage.

If you’re using an external power supply, check the label to see how much power it draws. By keeping an eye on your power usage, you can avoid problems like thermal throttling and ensure that your Raspberry Pi projects are running smoothly.

How to Reduce Power Consumption on Raspberry Pi 4?

The Raspberry Pi 4 consumes a lot of power compared to other boards in its class. While this is understandable given its increased performance, there are still some ways to reduce power consumption on the device.

One way is to use a lower voltage for the CPU and GPU. By default, the Raspberry Pi 4 uses 1.2 volts for these components, but lowering the voltage to 1.1 volts can save significant power.

Another way to reduce power consumption is to disable any unnecessary peripherals. For example, if you’re not using the Wi-Fi or Bluetooth module, you can disable these features in the BIOS to save power, because these downstream USB peripherals consume extra power.

You can also underclock the CPU and GPU to reduce power consumption further. While this will result in reduced performance, it can be helpful if you’re trying to eke out every last bit of power from your device.

By following these tips, you can reduce the power consumption of your Raspberry Pi projects and make sure they are running smoothly.

Do you have any questions about the Raspberry Pi 4’s power requirements? Let us know in the Комментарии и мнения владельцев below!

About the Author: Vishnu Mohan

Vishnu Mohan is an ardent hobbyist of Raspberry Pi projects, who hails from God’s Own Country. He is kind of a minimalist person who believes in keeping things simple elegant in life. Apart from the techy things, he is passionate about music and cricket. In his free time, he likes to read books and spend quality time with his family and friends.

Leave a Comment