The Raspberry Pi is an extremely useful single-board computer that allows you to easily carry out many tasks. It is powered via the microUSB port with stabilized voltage of 5 V. There are appropriate protections on the power input that allow you to connect to the system simply a 5 V power supply, which gives a stable voltage.
Remember that while it is possible to supply 5V voltage to the GPIO inputs to power our computer in such a way, it is an undesirable solution, because in such a situation we ignore many important security features of the system - fuse, protection diodes, etc. The USB port is definitely the best solution for powering a microcomputer, but it also has its requirements, especially when we want to power the system from a battery.
The popular 'Raspberry' requires a voltage of 5 V. As we all know, there are no batteries that give this voltage, so we have to use different ones: four AA batteries will give us over 6V when fully charged, two lithium-ion cells will give us 7.4 Volts, and a single battery can give as much as 9 V. These voltages will cause our microcomputer to fail, so we need to use some kind of circuit that will allow our RPi to be powered from them. Here are three solutions to this problem:
Okay : Resistance divider
The use of a voltage divider for two resistors is the simplest thing that can be done to power our module from a voltage source higher than 5 V. Such a divider looks like this:
As long as we know the input voltage of the divider, we can choose R1 and R2 to get 5V at the output. The ratio of the input voltage to the output voltage in the divider is R1 / (R1 + R2). Remember, however, that when using such a divider, the voltage above the supply voltage will cause the dissipation of excess power on the divider elements, so it is worth choosing a supply voltage as close as possible to 5 V. For example, 4 AA batteries will give 6 V, which is quite close to 5 V and requires 'put aside' only 1V, but the use of a 9V battery will seriously reduce the energy efficiency of our power system and will cause serious heating of the resistors.
In addition, for the divider to work without failure, resistors of appropriate power should be used. When we calculate the value of the resistors we want to use, we need to calculate what power they should have. How much power dissipates across the resistor depends on what current flows through it multiplied by the voltage drop across the resistors. If we want to get 5 V from a 6 V battery set, we can use the resistors R1 = 100 ? and R2 = 20 ?. If we now want to determine how much power will dissipate on the first resistor, we need to calculate the power - P = I * U - the voltage drop is 1 V, and the current that RPi needs is about 1 A, so the power that will be dissipated on the resistor is 1 W. Although it is not very much, it is already quite a lot of heat that will be produced. Similarly, if we want to power the system from a 9 V battery, we will produce 4 W of heat, which is quite a significant value and requires the use of expensive high-power resistors.
Benefits : The cheap and simple solution.
Disadvantages : Low energy efficiency - we waste a lot of power, and if we incorrectly assemble the system, we can burn ourselves or damage, for example, the plastic housing of the system. Additionally, as the voltage drop is constant, the output voltage will drop as the cell voltage drops.
Better : LDO Linear Satbilizer.
The linear LDO stabilizer, i.e. with a low voltage drop, is a linear stabilizer that will stabilize a set voltage at its output. Due to the fact that it is of the LDO type, the input voltage does not have to be much higher than the output voltage - it will both work well when powered with 6V and 5.25V, giving the output a stable voltage of 5V.
A popular element is, for example, the LM1117. At its output we find a stable voltage of 5 V, and we can supply it with a voltage of up to 15 V. We can take up to 1.3 A from the system. These systems are cheap, available in THT and SMD casings, so we can easily integrate them with any system. It is enough to add two capacitors to the circuit, one for input and one for output, and we have a ready power supply.
It must be remembered, however, that when it comes to power, such a system does not differ much from a voltage divider. So all of the excess voltage will be generated at its input, which means that we need to provide the system with adequate cooling to be able to give back 1..4 W as heat. It is advisable to add, for example, a heat sink to the system, especially if you want to power it from a 9 V battery, for example.
Benefits : It is cheap, easy to use and provides a stable voltage independent of the input voltage.
Disadvantages : Still low efficiency and problems with managing heat dissipation.
Best : DC / DC converter.
The converter is the most efficient solution when it comes to the power supply system. The inverter can be set up based on discrete elements, but you can also use ready-made integrated circuits or modules, such as the CC6-1205SF-E by TDK-Lambda. Such a module does not require additional elements or cooling, as it does not dissipate significant amounts of heat. The efficiency of such a module is about 80%, regardless of the input voltage, and integrated converters are commercially available, which are also characterized by higher efficiency.
Benefits : Easy to implement and efficient solution; does not require additional external elements.
Disadvantages : It is the most expensive solution of the power supply system from the ones presented above.
Source: https://www.arrow.com/en/research-and-events/articles/battery-power-your-pi
Remember that while it is possible to supply 5V voltage to the GPIO inputs to power our computer in such a way, it is an undesirable solution, because in such a situation we ignore many important security features of the system - fuse, protection diodes, etc. The USB port is definitely the best solution for powering a microcomputer, but it also has its requirements, especially when we want to power the system from a battery.
The popular 'Raspberry' requires a voltage of 5 V. As we all know, there are no batteries that give this voltage, so we have to use different ones: four AA batteries will give us over 6V when fully charged, two lithium-ion cells will give us 7.4 Volts, and a single battery can give as much as 9 V. These voltages will cause our microcomputer to fail, so we need to use some kind of circuit that will allow our RPi to be powered from them. Here are three solutions to this problem:
Okay : Resistance divider
The use of a voltage divider for two resistors is the simplest thing that can be done to power our module from a voltage source higher than 5 V. Such a divider looks like this:
As long as we know the input voltage of the divider, we can choose R1 and R2 to get 5V at the output. The ratio of the input voltage to the output voltage in the divider is R1 / (R1 + R2). Remember, however, that when using such a divider, the voltage above the supply voltage will cause the dissipation of excess power on the divider elements, so it is worth choosing a supply voltage as close as possible to 5 V. For example, 4 AA batteries will give 6 V, which is quite close to 5 V and requires 'put aside' only 1V, but the use of a 9V battery will seriously reduce the energy efficiency of our power system and will cause serious heating of the resistors.
In addition, for the divider to work without failure, resistors of appropriate power should be used. When we calculate the value of the resistors we want to use, we need to calculate what power they should have. How much power dissipates across the resistor depends on what current flows through it multiplied by the voltage drop across the resistors. If we want to get 5 V from a 6 V battery set, we can use the resistors R1 = 100 ? and R2 = 20 ?. If we now want to determine how much power will dissipate on the first resistor, we need to calculate the power - P = I * U - the voltage drop is 1 V, and the current that RPi needs is about 1 A, so the power that will be dissipated on the resistor is 1 W. Although it is not very much, it is already quite a lot of heat that will be produced. Similarly, if we want to power the system from a 9 V battery, we will produce 4 W of heat, which is quite a significant value and requires the use of expensive high-power resistors.
Benefits : The cheap and simple solution.
Disadvantages : Low energy efficiency - we waste a lot of power, and if we incorrectly assemble the system, we can burn ourselves or damage, for example, the plastic housing of the system. Additionally, as the voltage drop is constant, the output voltage will drop as the cell voltage drops.
Better : LDO Linear Satbilizer.
The linear LDO stabilizer, i.e. with a low voltage drop, is a linear stabilizer that will stabilize a set voltage at its output. Due to the fact that it is of the LDO type, the input voltage does not have to be much higher than the output voltage - it will both work well when powered with 6V and 5.25V, giving the output a stable voltage of 5V.
A popular element is, for example, the LM1117. At its output we find a stable voltage of 5 V, and we can supply it with a voltage of up to 15 V. We can take up to 1.3 A from the system. These systems are cheap, available in THT and SMD casings, so we can easily integrate them with any system. It is enough to add two capacitors to the circuit, one for input and one for output, and we have a ready power supply.
It must be remembered, however, that when it comes to power, such a system does not differ much from a voltage divider. So all of the excess voltage will be generated at its input, which means that we need to provide the system with adequate cooling to be able to give back 1..4 W as heat. It is advisable to add, for example, a heat sink to the system, especially if you want to power it from a 9 V battery, for example.
Benefits : It is cheap, easy to use and provides a stable voltage independent of the input voltage.
Disadvantages : Still low efficiency and problems with managing heat dissipation.
Best : DC / DC converter.
The converter is the most efficient solution when it comes to the power supply system. The inverter can be set up based on discrete elements, but you can also use ready-made integrated circuits or modules, such as the CC6-1205SF-E by TDK-Lambda. Such a module does not require additional elements or cooling, as it does not dissipate significant amounts of heat. The efficiency of such a module is about 80%, regardless of the input voltage, and integrated converters are commercially available, which are also characterized by higher efficiency.
Benefits : Easy to implement and efficient solution; does not require additional external elements.
Disadvantages : It is the most expensive solution of the power supply system from the ones presented above.
Source: https://www.arrow.com/en/research-and-events/articles/battery-power-your-pi