Battery (electricity)
In electronics, a battery is two or more electrochemical cells which store chemical energy and make it available as electrical energy. Common usage has evolved to include a single electrical cell in the definition. There are many types of electrochemical cells, including galvanic cells, electrolytic cells, fuel cells, flow cells and voltaic piles.  A battery's characteristics may vary due to many factors including internal chemistry, current drain and temperature.
One common division of batteries distinguishes two types: primary (disposable) and secondary (rechargeable). Primary batteries are designed to be used once only because they use up their chemicals in an effectively irreversible reaction. Secondary batteries can be recharged because the chemical reactions they use are reversible; they are recharged by running a charging current through the battery, but in an opposite direction to the discharge current. Secondary, also called rechargeable batteries can be charged and discharged many times before wearing out. After wearing out some batteries can be recycled.
Although an early form of battery may have been used in antiquity, the modern development of batteries started with the Voltaic pile, invented by the Italian physicist Alessandro Volta in 1800. Since then, batteries have gained popularity as they became portable and useful for many purposes. The widespread use of batteries has created many environmental concerns, such as toxic metal pollution. Many reclamation companies recycle batteries to reduce the number of batteries going into landfills.

# History
The modern story of the battery begins in the 1780s with the discovery of "animal electricity" by Luigi Galvani, which he published in 1791. He created an electric circuit consisting of two different metals, with one touching a frog's leg and the other touching both the leg and the first metal, thus closing the circuit. In modern terms, the frog's leg served as both electrolyte and detector, and the metals served as electrodes. He noticed that even though the frog was dead, its legs would twitch when he touched them with the metals.
Volta realized that the frog's moist tissues could be replaced by cardboard soaked in salt water, and the frog's muscular response could be replaced by another form of electrical detection. He already had studied the electrostatic phenomenon of capacitance, which required measurements of electric charge and of electrical potential.  Building on this experience Volta was able to detect electric current flow through his system, now called a voltaic cell, or cell for short.  The terminal voltage of a cell that is not discharging is called its  electromotive force (emf), and has the same unit as electrical potential, named (voltage) and measured in  volts, in honor of Volta.  In 1799, Volta invented the battery by placing many voltaic cells in series, literally piling them one above the other. This Voltaic Pile gave a greatly enhanced net emf for the combination, with a voltage of about 50 volts for a 32-cell pile. In many parts of Europe batteries continue to be called piles.
Unfortunately, Volta did not appreciate that the voltage was due to chemical reactions. He thought that his cells were an inexhaustible source of energy, and that the associated chemical effects (e.g. corrosion) were a mere nuisance, rather than, as Michael Faraday showed around 1830, an unavoidable consequence of their operation.
While early batteries were of great value for experimental purposes, their limitations made them impractical for a large current drain. Later, starting with the Daniell cell in 1836, batteries provided more reliable currents and were adopted by industry for use in stationary devices, particularly in telegraph networks where they were the only practical source of electricity, since electrical distribution networks did not exist then. These wet cells used liquid electrolytes, which were prone to leakage and spillage if not handled correctly. Many used glass jars to hold their components, which made them fragile. These characteristics made wet cells unsuitable for portable appliances. Near the end of the 19th century, the invention of Dry cell batteries, which replaced liquid electrolyte with a paste, made portable electrical devices practical.
The battery has since become a common power source for many household and industrial applications. According to a 2005 estimate, the worldwide battery industry generates US$48 billion in sales annually.
Since 21st Century, all electrommunication appliances have been pursuing mobility, portability, more functions and larger LCD. As the main energy for mobile electronic equipment, Polymer Li-ion battery to the largest extent corresponds to the trend for its extraordinary advantages over any other chemical energy.

# How batteries work
A battery is a device that converts chemical energy directly to electrical energy. It consists of one or more voltaic cells. Each voltaic cell consists of two half cells connected in series by a conductive electrolyte. One half-cell is the positive electrode and the other is the negative electrode. The electrodes do not touch each other but are electrically connected by the electrolyte, which can be either solid or liquid. In many cells, the materials are enclosed in a container, and a separator, which is porous to the electrolyte, which prevents the electrodes from coming into contact.
Each half cell has an electromotive force (or emf), determined by its ability to drive electric current from the interior to the exterior of the cell.  The net emf of the battery is the difference between the emfs of its half-cells, as first recognized by Volta. Thus, if the electrodes have emfs \mathcal{E}_1 and \mathcal{E}_2, then the net emf is \mathcal{E}_{2}-\mathcal{E}_{1}. (Hence, two identical electrodes and a common electrolyte give a zero net emf.)
The electrical potential difference, or \displaystyle{\Delta V_{bat}} across the terminals of a battery is known as terminal voltage and is measured in volts.  The terminal voltage of a battery that is neither charging nor discharging is called the open-circuit voltage and equals the emf of the battery. Because of internal resistance, the terminal voltage of a battery that is discharging is smaller in magnitude than the open-circuit voltage and the terminal voltage of a battery that is charging exceeds the open-circuit voltage.  An ideal battery has negligible internal resistance, so it would always have a terminal voltage of \mathcal{E}. This  means that to produce a potential difference of 1.5 V, chemical reactions inside would perform 1.5 J of work for a charge of 1 C.
The voltage developed across a cell's terminals depends on the chemicals used in it and their respective concentrations. For example, alkaline and carbon-zinc cells both measure approximately 1.5 volts, due to the energy release of the associated chemical reactions. Because of the high electrochemical potential changes in the reactions of lithium compounds, lithium cells can provide as much as 3 volts or more.

# Classification of batteries

## Disposable and rechargeable
Batteries are usually divided into two broad classes:
- Primary batteries irreversibly (within limits of practicality) transform chemical energy to electrical energy. When the initial supply of reactants is exhausted, energy cannot be readily restored to the battery by electrical means.
- Secondary batteries can be recharged; that is, they can have their chemical reactions reversed by supplying electrical energy to the cell, restoring their original composition.
Historically, some types of primary batteries used, for example, for telegraph circuits, were restored to operation by replacing the components of the battery consumed by the chemical reaction. Secondary batteries are not indefinitely rechargeable due to dissipation of the active materials, loss of electrolyte and internal corrosion.
From a user's viewpoint, at least, batteries can be generally divided into two main types: non-rechargeable (disposable) and rechargeable. Each type is in wide usage, as each has its own advantages and disadvantages.
Disposable batteries, also called primary cells, are intended to be used once and discarded. These are most commonly used in portable devices with either low current drain, are only used intermittently, or are used well away from an alternative power source. Primary cells were also commonly used for alarm and communication circuits where other electric power was only intermittently available. Primary cells cannot be reliably recharged, since the chemical reactions are not easily reversible and active materials may not return to their original forms. Battery manufacturers recommend against attempting to recharge primary cells, although some electronics enthusiasts claim it is possible to do so using special types of chargers.
By contrast, rechargeable batteries or secondary cells can be recharged by applying electrical current, which reverses the chemical reactions that occur during its use. Devices to supply the appropriate current are called chargers or rechargers.
The oldest form of rechargeable battery still in modern usage is the "wet cell" lead-acid battery. This battery is notable in that it contains a liquid in an unsealed container, requiring that the battery be kept upright and the area be well ventilated to ensure safe dispersal of the hydrogen gas produced by these batteries during overcharging. The lead-acid battery is also very heavy for the amount of electrical energy it can supply. Despite this, its low manufacturing cost and its high surge current levels make its use common where a large capacity (over approximately 10Ah) is required or where the weight and ease of handling are not concerns.
A common form of lead-acid battery is the modern wet-cell car battery. This can deliver approximately 10,000 watts of power over a short period and has a peak current output that varies from 450 to 1100 amperes. An improved type of liquid electrolyte battery is the sealed valve regulated lead acid (VRLA) battery, popular in the automotive industry as a replacement for the lead-acid wet cell, as well as in many lower capacity roles including smaller vehicles and stationary applications such as emergency lighting and alarm systems. The one-way pressure activated valve eliminates electrolyte evaporation while allowing out-gassing to prevent rupture. This greatly improves resistance to damage from vibration and heat. VRLA batteries have the electrolyte immobilized, usually by one of two means:
- Gel batteries (or "gel cell") contain a semi-solid electrolyte to prevent spillage.
- Absorbed Glass Mat (AGM)  batteries absorb the electrolyte in a special fiberglass matting
Other portable rechargeable batteries include several "dry cell" types, which are sealed units and are therefore useful in appliances such as mobile phones and laptop computers. Cells of this type (in order of increasing power density and cost) include nickel-cadmium (NiCd), nickel metal hydride (NiMH) and lithium-ion (Li-Ion) cells.
Recent developments include batteries with embedded functionality such as USBCELL, with a built-in charger and USB connector within the AA format, enabling the battery to be charged by plugging into a USB port without a charger, and low self-discharge (LSD) mix chemistries such as Hybrio, ReCyko, and Eneloop, where cells are precharged prior to shipping.

### Disposable
Not designed to be rechargeable - sometimes called "primary cells". "Disposable" may also imply that special disposal procedures must take place for proper disposal according to regulation, depending on battery type.
- Zinc-carbon battery: mid cost, used in light drain applications.
- Zinc-chloride battery: similar to zinc-carbon but slightly longer life.
- Alkaline battery: alkaline/manganese "long life" batteries widely used in both light-drain and heavy-drain applications.
- Silver-oxide battery: commonly used in hearing aids, watches, and calculators.
- Lithium-Thionyl Chloride battery: used in industrial applications, including computers, electric meters and other devices which contain volatile memory circuits and act as a "carryover" voltage to maintain the memory in the event of a main power failure. Other applications include providing power for wireless gas and water meters. The cells are rated at 3.6 Volts and come in 1/2AA, AA, 2/3A, A, C, D & DD sizes. They are relatively expensive, but have a long shelf life, losing less than 10% of their capacity in ten years.
- Mercury battery: formerly used in digital watches, radio communications, and portable electronic instruments. Manufactured only for specialist applications due to toxicity.
- Zinc-air battery: commonly used in hearing aids.
- Thermal battery: high-temperature reserve. Almost exclusively military applications.
- Water-activated battery: used for radiosondes and emergency applications.
- Nickel Oxyhydroxide battery: Ideal for applications that use bursts of high current, such as digital cameras. They will last two times longer than alkaline batteries in digital cameras.
- Paper battery: In August 2007, a research team at RPI (led by Drs. Robert Linhardt,  Pulickel M. Ajayan, and Omkaram Nalamasu) developed a paper battery with aligned carbon nanotubes, designed to function as both a lithium-ion battery and a supercapacitor, using ionic liquid, essentially a liquid salt, as electrolyte. The sheets can be rolled, twisted, folded, or cut into numerous shapes with no loss of integrity or efficiency, or stacked, like printer paper (or a voltaic pile), to boost total output. As well, they can be made in a variety of sizes, from postage stamp to broadsheet. Their light weight and low cost make them attractive for portable electronics, aircraft, and automobiles, while their ability to use electrolytes in blood make them potentially useful for medical devices such as pacemakers. In addition, they are biodegradable, unlike most other disposable cells.

### Rechargeable
Also known as secondary batteries or accumulators. The National Electrical Manufacturers Association has estimated that U.S. demand for rechargeables is growing twice as fast as demand for non-rechargeables.  There are a few main types:
- Nickel-cadmium battery (NiCd): Best used for motorized equipment and other high-discharge, short-term devices. NiCd batteries can withstand even more drain than NiMH; however, the mAh rating is not high enough to keep a device running for very long, and the memory effect is far more severe.
- Nickel-metal hydride battery (NiMH): Best used for high-tech devices. NiMH batteries can last up to four times longer than alkaline batteries because NiMH can withstand high current for a long while.
- Lithium ion battery: commonly used in digital cameras. Sometimes used in watches and computer clocks. Very long life (up to ten years in wristwatches) and capable of delivering high currents but expensive. Will operate in sub-zero temperatures.
- Rechargeable alkaline battery: Uses similar chemistry as non-rechargeable alkaline batteries and are best suited for similar applications.  Additionally, they hold their charge for years, unlike NiCd and NiMH batteries. However drain/charging pattern can greatly affect their efficacy and lifespan.
- LiFeP as used in the OLPC laptop.
Flow batteries are a special class of rechargeable battery where additional quantities of electrolyte are stored outside the main power cell of the battery, and circulated through it by pumps or by movement. Flow batteries can have extremely large capacities and are used in marine applications and are gaining popularity in grid energy storage applications.
Zinc-bromine and vanadium redox batteries are typical examples of commercially available flow batteries.

## Homemade cells
Almost any liquid or moist object that has enough ions to be electrically conductive can serve as the electrolyte for a cell. As a novelty or science demonstration, it is possible to insert two electrodes made of different metals into a lemon, potato, et cetera and generate small amounts of electricity. "Two-potato clocks" are also widely available in hobby and toy stores; they consist of a pair of cells, each consisting of a potato (lemon, et cetera) with two electrodes inserted into it, wired in series to form a battery with enough voltage to power a digital clock. Homemade cells of this kind are of no real practical use, because they produce far less currentand cost far more per unit of energy generatedthan commercial cells, due to the need for frequent replacement of the fruit or vegetable. In addition, one can make a voltaic pile from two coins (such as a nickel and a penny) and a piece of paper towel dipped in salt water. Such a pile would make very little voltage itself, but when many of them are stacked together in series, they can replace normal batteries for a short amount of time.
Sony has developed a biologically friendly battery that generates electricity from sugar in a way that is similar to the processes observed in living organisms. The battery generates electricity through the use of enzymes that break down carbohydrates, which are essentially sugar.
Lead acid cells can easily be manufactured at home, but a tedious charge/discharge cycle is needed to 'form' the plates. This is a process whereby lead sulfate forms on the plates, and during charge is converted to lead dioxide (positive plate) and pure lead (negative plate). Repeating this process results in a microscopically rough surface, with far greater surface area being exposed. This increases the current the cell can deliver.  For an example, see .
Daniell cells are also easy to make at home. Aluminum-air batteries can also be produced with high purity aluminum.  Aluminum foil batteries will produce some electricity, but they are not very efficient, in part because a significant amount of hydrogen gas is produced.

## Battery packs
The cells in a battery can be connected in parallel, series or in both. A parallel combination of cells has the same voltage as a single cell, but can supply a higher current (the sum of the currents from all the cells). A series combination has the same current rating as a single cell but its voltage is the sum of the voltages of all the cells. Most practical electrochemical batteries, such as 9-volt flashlight batteries and 12-volt automobile batteries, have several cells connected in series inside the casing. Parallel arrangements suffer from the problem that, if one cell discharges faster than its neighbour, current will flow from the full cell to the empty cell, wasting power and possibly causing overheating. Even worse, if one cell becomes short-circuited due to an internal fault, its neighbour will be forced to discharge its maximum current into the faulty cell, leading to overheating and possibly explosion. Cells in parallel are therefore usually fitted with an electronic circuit to protect them against these problems. In both series and parallel types, the energy stored in the battery is equal to the sum of the energies stored in all the cells.

## Traction batteries
Traction batteries are high-power batteries designed to provide propulsion to move a vehicle, such as an electric car or tow motor. A major design consideration is power to weight ratio since the vehicle must carry the battery. While conventional lead acid batteries with liquid electrolyte have been used, gelled electrolyte and AGM-type can also be used, especially in smaller sizes.
The largest installations of batteries for propulsion of vehicles are found in submarines, although the toxic gas produced by seawater contact with acid electrolyte is a considerable hazard.
Battery types commercially used in electric vehicles include
- lead-acid battery, which uses lead(IV) oxide (PbO2) and sulfuric acid (H2SO4)
flooded type with liquid electrolyte
gel
AGM-type (Absorbed Glass Mat)
- flooded type with liquid electrolyte
- gel
- AGM-type (Absorbed Glass Mat)
- Nickel-metal hydride and Nickel-Cadmium batteries
- Lithium-Ion and Lithium-Polymer batteries
- Zebra Na/NiCl2 battery operating at 270 C requiring cooling in case of temperature excursions
- NiZn battery (higher cell voltage 1.6 V and thus 25% increased specific energy, very short lifespan)
See also: battery electric vehicles and hydrogen vehicle.

# Battery capacity and discharging
The more electrolyte and electrode material there is in the cell, the greater the capacity of the cell. Thus a small cell has less capacity than a larger cell, given the same chemistry (e.g. alkaline cells), though they develop the same open-circuit voltage.
Because of the chemical reactions within the cells, the capacity of a battery depends on the discharge conditions such as the magnitude of the current, the duration of the current, the allowable terminal voltage of the battery, temperature and other factors.
The available capacity of a battery depends upon the rate at which it is discharged. If a battery is discharged at a relatively high rate, the available capacity will be lower than expected.
The battery capacity that battery manufacturers print on a battery is the product of 20 hours multiplied by the maximum constant current that a new battery can supply for 20 hours at 68 F (20 C), down to a predetermined terminal voltage per cell.
A battery rated at 100 Ah will deliver 5 A over a 20 hour period at room temperature. However, if it is instead discharged at 50 A, it will run out of charge before the theoretically-expected 2 hours.
For this reason, a battery capacity rating is always related to an expected discharge durationthe standard duration is 20 hours.
where
The relationship between current, discharge time, and capacity for a lead acid battery is expressed by Peukert's law. The efficiency of a battery is different at different discharge rates. When discharging at low rate, the battery's energy is delivered more efficiently than at higher discharge rates.
In general, the higher the ampere-hour rating, the longer the battery will last for a certain load. Installing batteries with different Ah ratings will not affect the operation of a device rated for a specific voltage unless the load limits of the battery are exceeded. Theoretically, a battery would operate at its Ah rating, but realistically, high-drain loads like digital cameras can result in lower actual energy, most notably for alkaline batteries. For example, a battery rated at 2000 mAh may not sustain a current of 1 A for the full two hours.
Discharging performance of all batteries drops at low temperature.

# Battery lifetime

## Life of primary batteries
Even if never taken out of the original package, disposable (or "primary") batteries can lose 8 to 20 percent of their original charge every year at a temperature of about 2030C. This is known as the "self discharge" rate and is due to non-current-producing "side" chemical reactions, which occur within the cell even if no load is applied to it. The rate of the side reactions is reduced if the batteries are stored at low temperature, although some batteries can be damaged by freezing. High or low temperatures may reduce battery performance. This will affect the initial voltage of the battery. For an AA alkaline battery this initial voltage is approximately normally distributed around 1.6 volts.

## Life of rechargeable batteries
Rechargeable batteries traditionally self-discharge more rapidly than disposable alkaline batteries; up to three percent a day (depending on temperature). However, modern Lithium designs have reduced the self-discharge rate to a relatively low level (but still poorer than for primary batteries). Due to their poor shelf life, rechargeable batteries should not be stored and then relied upon to power flashlights or radios in an emergency. For this reason, it is a good idea to keep alkaline batteries on hand. NiCd Batteries are almost always "dead" when purchased, and must be charged before first use.
Although rechargeable batteries may be refreshed by charging, they still suffer degradation through usage. Low-capacity Nickel Metal Hydride (NiMH) batteries (1700-2000 mAh) can be charged for about 1000 cycles, whereas high capacity NiMH batteries (above 2500 mAh) can be charged for about 500 cycles. Nickel Cadmium (NiCd) batteries tend to be rated for 1,000 cycles before their internal resistance increases beyond usable values. Normally a fast charge, rather than a slow overnight charge, will result in a shorter battery lifespan. However, if the overnight charger is not "smart" (i.e. it cannot detect when the battery is fully charged), then overcharging is likely, which will damage the battery. Degradation usually occurs because electrolyte migrates away from the electrodes or because active material falls off the electrodes. NiCd batteries suffer the drawback that they should be fully discharged before recharge.  Without full discharge, crystals may build up on the electrodes, thus decreasing the active surface area and increasing internal resistance. This decreases battery capacity and causes the dreaded "memory effect".  These electrode crystals can also penetrate the electrolyte separator, thereby causing shorts. NiMH, although similar in chemistry, does not suffer from "memory effect" to quite this extent.
Automotive lead-acid rechargeable batteries have a much harder life. Because of vibration, shock, heat, cold, and sulfation of their lead plates, few automotive batteries last beyond six years of regular use. Automotive starting batteries have many thin plates to provide as much current as possible in a reasonably small package. Typically they are only drained a small amount before recharge. Care should be taken to avoid deep discharging a starting battery, since each charge and discharge cycle causes active material to be shed from the plates. Hole formation in the plates leads to less surface area for the current-producing chemical reactions, resulting in less available current when under load. Leaving a lead-acid battery in a deeply discharged state for any significant length of time allows the lead sulfate to crystallize, making it difficult or impossible to remove during the charging process. This can result in a permanent reduction in the available plate surface, and therefore reduced current output and energy capacity.
"Deep-Cycle" lead-acid batteries such as those used in electric golf carts have much thicker plates to aid their longevity. The main benefit of the lead-acid battery is its low cost; the main drawbacks are its large size and weight for a given capacity and voltage. Lead-acid batteries should never be discharged to below 20% of their full capacity, because internal resistance will cause heat and damage when they are recharged.  Deep-cycle lead-acid systems often use a low-charge warning light or a low-charge power cut-off switch to prevent the type of damage that will shorten the battery's life.
Special "reserve" batteries intended for long storage in emergency equipment or munitions keep the electrolyte of the battery separate from the plates until the battery is activated, allowing the cells to be filled with the electrolyte. Shelf times for such batteries can be years or decades. However, their construction is more expensive than more common forms.

## Extending battery life
Battery life can be extended by storing the batteries at a low temperature, as in a refrigerator or freezer, because the chemical reactions in the batteries are slower. Such storage can extend the life of alkaline batteries by ~5%; while the charge of rechargeable batteries can be extended   from a few days up to several months. In order to reach their maximum voltage, batteries must be returned to room temperature; therefore, alkaline battery manufacturers like Duracell do not recommend refrigerating or freezing batteries.

# Battery hazards
A battery explosion is caused by the misuse or malfunction of a battery, such as attempting to recharge a primary (non-rechargeable) battery, or short circuiting a battery. With car batteries, explosions are most likely to occur when a short circuit generates very large currents. In addition, car batteries liberate hydrogen when they are overcharged (because of electrolysis of the water in the electrolyte). Normally the amount of overcharging is very small, as is the amount of explosive gas developed, and the gas dissipates quickly. However, when "jumping" a car battery, the high current can cause the rapid release of large volumes of hydrogen, which can be ignited by a nearby spark (for example, when removing the jumper cables).
When a battery is recharged at an excessive rate, an explosive gas mixture of hydrogen and oxygen may be produced faster than it can escape from within the walls of the battery, leading to pressure build-up and the possibility of the battery case bursting. In extreme cases, the battery acid may spray violently from the casing of the battery and cause injury. Overchargingthat is, attempting to charge a battery beyond its electrical capacitycan also lead to a battery explosion, leakage, or irreversible damage to the battery. It may also cause damage to the charger or device in which the overcharged battery is later used. Additionally, disposing of a battery in fire may cause an explosion as steam builds up within the sealed case of the battery.

# Environmental concerns
Battery manufacture consumes resources and often involves hazardous chemicals. Used batteries also contribute to electronic waste. Some areas now have battery recycling services available to recover some of the materials from used batteries. Batteries may be harmful or fatal if swallowed. Recycling or proper disposal prevents dangerous elements (such as lead, mercury, and cadmium)  found in some types of batteries from entering the environment. In the United States, Americans purchase nearly three billion batteries annually, and about 179,000 tons of those end up in landfills across the country.  In the United States the Environmental Protection Agencys Mercury-Containing and Rechargeable Battery Management Act of 1996, has reduced the amount of mercury in regular household batteries. Recycling programs for lead and cadmium batteries have been put in place.  Recycling and disposal regulations may in the future apply to alkaline and nickel-metal hydride batteries.