Powering Circuits
In this part of the tutorial, ISD students learn how electrical circuits in the field of embedded systems are supplied with electrical energy. For ETR and BMT students, this part is not relevant for the exam.
Operation from a mains socket
A circuit needs an energy source for its supply. For stationary circuits, a mains socket is normally used to draw electrical energy from the grid. In Europe, the grid provides a sinusoidal alternating voltage with f = 50 Hz and an RMS value of 230 V (peak value 325 V). The internal resistance of the grid at a socket is very low, so the grid is an almost ideal AC voltage source. The peak value hardly changes with the load. A great deal of energy is available at a socket; if anything, it has to be limited artificially by fuses.
From an electrical point of view, the grid is a perfect source. Unfortunately, a device connected to the grid can only be moved to a limited extent. We often need portable solutions. The trend is for more and more circuits to be detached from the grid and become portable.
In your application, you often need DC voltage and direct current. If microcontrollers such as an Arduino are used, you generally need supply voltages of 3.3 V or 5 V relative to ground. When using operational amplifiers, you often need ±12 V relative to ground. The grid only supplies alternating voltage, which often has far too high a peak value.
Power supplies generate DC voltages at the output from the mains voltage at the input. The simplest option is to use plug-in power supplies that you can plug directly into the socket. Your smartphone charger is such a plug-in power supply. At its output, it provides a DC voltage of 5 V. The maximum current, and thus also the maximum power, varies. The output voltage and the maximum output current are normally printed on the power supply.
Typical output voltages of power supplies are 5 V and 12 V. There are also power supplies with an adjustable output voltage.
Power supplies have different plugs at the output. Often these are barrel plugs or USB plugs. Make sure that you fit a matching socket on your circuit. With barrel plugs, there are minimal differences in dimensions that lead to incompatibility between plug and socket (inner diameter 2.1 mm or 2.5 mm). USB plugs are often mechanically less robust than barrel plugs.
Operation from a battery
Whenever circuits have to be portable (such as a smartphone), rechargeable batteries or primary batteries are used. In this text, I use the term “battery” for both. Primary batteries cannot be recharged; rechargeable batteries can. From an ecological point of view, rechargeable batteries are therefore more suitable than primary batteries. Unfortunately, the output voltages of rechargeable and primary batteries of the same size differ somewhat. Rechargeable batteries provide a somewhat lower voltage than primary batteries. That is why some circuits only work with primary batteries and not with rechargeable ones.
Energy and size
The weight and dimensions of a battery depend on the energy stored in it. Batteries are classified by size, voltage and energy. Typical batteries are AAA cells or AA cells, which are often used in remote controls. Note that batteries of the same size (e.g. AA) do not necessarily have the same output voltage!
Capacity
A battery has a capacity C. It is given in ampere-hours. This is the unit of current multiplied by the unit of time. If the capacity is multiplied by the (mean) voltage, we obtain the energy unit watt-hours. A LiPo battery with a mean voltage of U = 3.7 V has, for example, the capacity C = 1500 mAh printed on it. At 100 % SOC, it stores the energy WMax = U ∙ I ∙ t = 3.7 V ∙ 1.5 A ∙ 1 h = 5.55 Wh = 20 kJ. You can draw 1.5 A of current from the battery for 60 minutes. If you draw less current, the battery supplies this current for longer.
State of charge
The state of charge (SOC) is given in percent. An empty battery without separated charge has an SOC of 0 %. A full battery has an SOC of 100 %. The SOC decreases when current is drawn from the battery. It increases when the battery is charged with current. Manufacturers specify a mean voltage. At SOC = 100 %, the real voltage is somewhat higher. At a low SOC, it is somewhat lower.
Self-discharge
Batteries discharge by themselves, even when no load is connected. The self-discharge of a LiPo battery is about 1 % of the capacity per month. For C = 1500 mAh, this corresponds to a permanently flowing current of about 20 µA. Full primary batteries that lie unused in a cupboard for years also discharge by themselves. In the process, they can also leak.
Ageing
As batteries age, they can store less separated charge. Then the energy that can be stored at 100 % SOC decreases. In the example above, the battery could have dropped to WMax = 4 Wh after 2 years, for example. If you draw the same current, the battery is empty sooner. You know this from old smartphones or notebooks. The battery runtime decreases over the months of operation.
Maximum output current
Batteries provide a maximum current at their output that should not be exceeded. For many batteries, this value is printed on them or given in the data sheet. For a NiMH AA battery, this value is approx. 1 A. For LiPo batteries, the maximum current depends on the capacity C. You will find specifications such as “IMax = 20C”. Here, “C” stands for the capacity related to one hour. For C = 1500 mAh, the maximum current is then IMax = 20 ∙ 1500 mAh / 1 h = 30 A. If the maximum current is exceeded, the battery ages much faster and becomes very warm.