Batteries are great for powering projects on breadboards, PCBs, and just about any circuit. They’re very portable and come in a lot of form factors; with different voltage, current, and power capabilities. If your circuit is in need of portable power or temporary power, batteries can be exactly what you need.
Batteries for small circuits and breadboard projects can be very small - like AA, 9V, or even coin cell. For larger or electro-motive projects, batteries get larger and more expensive fast. Batteries can typically be attached or contained within the project and keep the project portable.
Batteries also provide very stable and clean power, although you have to consider the discharge curve. Batteries follow chemically and physically determined voltage curves as they discharge. Fresh batteries usually have a high initial voltage (sometimes even just a surface charge) that rapidly declines. After the high energy phase of the battery discharge curve there is a more steady decline for the majority of the battery life. This is where battery’s rated voltage comes from. The rated voltage is where the battery will hold at its most steady voltage and power output for the longest time. After this flattest part of the discharge curve, batteries drop off quickly to voltage cutoff level (if you have battery management or minimum voltage circuitry), or the battery becomes fully drained (which may be fine for a primary, or non-rechargeable, battery). Most rechargeable batteries are damaged when fully drained, so try to avoid that.
All batteries will die. A “feature” that comes with the battery’s portability is limited capacity. A power intensive circuit, especially one with moving parts could use up the available energy and discharge the battery very quickly. Plan for this in your project with things like switches to cut off and save power while doing other activities. Another way to cope with dying batteries is a battery level indicator. As mentioned, rechargeable batteries can be damaged with over-discharge so a battery alarm and automatic cutoff can be a good idea too. Know that the circuit might act funny with charged versus dead battery. Motor speed will be faster or slower. Lights will be brighter or dimmer. Sensors might not be as sensitive as expected. IC’s might not have enough voltage to operate while other parts of the circuit still work.
Another feature of batteries is that you can pick your voltage. Chemistries include alkaline, li-ion, lithium polymer, NiMH, NiCd, and many more. All have different outputs and best uses. You can choose a chemistry that suits your needs as far as capacity, voltage, power output, weight, size, and shape are all options. Number of cells can also be selected to arrive at the required voltage or capacity by arranging them in series and parallel.
So, if your project is mobile, or a long way from AC sources, or for when AC won’t be available, batteries are a solution that will be very important to keep in mind and know how to use. With their portable nature comes great features as well as limitations. They are a great addition to many projects and necessary in some cases, so knowing how to utilise them can help clear the way to a successful project.