Contact electrification

Contact electrification was an erroneous scientific theory from the Enlightenment that attempted to account for all the sources of electric charge known at the time. It has since been superseded by more modern notions. In the late 18th century, scientists developed sensitive instruments for detecting 'electrification', otherwise known as electrostatic charge imbalance. The phenomenon of electrification by contact, or "contact tension", was quickly discovered. 
When two objects were touched together, sometimes the objects became spontaneously charged. One object developed a net negative charge, while the other developed an equal and opposite positive charge. Then it was discovered that 'piles' of dissimilar metal disks separated by acid-soaked cloth, Voltaic piles, could also produce charge differences. Although it was later found that these effects were caused by different physical processes - triboelectricity, the Volta effect, differing work functions of metals, and others - at the time they were all thought to be caused by a common 'contact electrification' process.
The contact electrification phenomenon allowed the construction of so-called 'frictional' electrostatic generators such as Ramsden's or Winter's machines, but it also led directly to the development of useful devices such as batteries, fuel cells, electroplating, thermocouples. Contact between materials is responsible for such modern electrical technology as semiconductor junction devices including radio detector diodes, photocells, LEDs, and thermoelectric cells.
History.
The theory held that static electricity was generated by means of contact between dissimilar materials, and was in close agreement with the principles of static electricity as then understood. It was eventually replaced by the current theory of electrochemistry, namely, that electricity is generated by the action of chemistry and the exchange of electrons between atoms making up the battery. An important fact leading to the rejection of the theory of contact tension was the observation that corrosion, that is, the chemical degradation of the battery, seemed unavoidable with its use, and that the more electricity was drawn from the battery, the faster the corrosion proceeded.
The Volta effect (described below) corresponds to a weak electric potential difference developed by the contact of different metals. Nowadays, this is often known as a contact potential difference. This effect was first discovered by Alessandro Volta, and can be measured using a capacitance electroscope comprising different metals. However, this effect does not, by itself, account for the action of electric batteries.
A number of high voltage dry piles were invented between the early 19th century and the 1830s in an attempt to determine the answer to this question, and specifically to support Volta’s hypothesis of contact tension. The Oxford Electric Bell is one example. Francis Ronalds in 1814 was one of the first to realise that dry piles also worked through chemical reaction rather than metal to metal contact, even though corrosion was not visible due to the very small currents generated.
Triboelectric contact.
If two different insulators are touched together, such as when a piece of rubber is touched against a piece of glass, then the surface of the rubber will acquire an excess negative charge, and the glass will acquire an equal positive charge. If the surfaces are then pulled apart, a very high voltage is produced. This so-called "tribo" or "rubbing" effect is not well understood. It may be caused by electron-stealing via quantum tunneling, or by transfer of surface ions. Friction is not required, although in many situations it greatly increases the phenomenon. Certain phenomena related to frictionally generated electrostatic charges have been known since antiquity, though of course the modern theory of electricity was developed after the Scientific Revolution.
Solid-solid contact.
The mechanism of contact electrification (CE) between solid-solid has been debated for more than 2600 years. A most controversial topic in CE is the identity of the charge carriers: electron transfer, ion transfer or even materials species transfer. Recent studies by using Kelvin probe force microscopy suggest that electron transfer is the dominating charge carrier in CE for solid-solid cases. When the interatomic distance between two atoms belonging to two materials is shorter than the normal bonding length (typically ~0.2 nm), the electrons will transfer at the interface. It implies that a strong electron cloud overlap (or wave function overlap) between the two atoms/molecules in the repulsive region will reduce the interatomic potential barrier (Fig. 1), and result in electron transition between the atoms/molecules. The contact/friction force in CE is to induce strong overlap between the electron clouds (or wave function in physics, bonding in chemistry).
Liquid-solid contact.
Besides ion transfer at liquid-solid interface, electron transfer occurs as well. As for the liquid-solid case, molecules in the liquid would have electron cloud overlap with the atoms on the solid surface at the very first contact with a virginal solid surface, and electron transfer is required in order to create the first layer of electrostatic charges on the solid surface. Then, ion transfer is the second step, which is a redistribution of the ions in solution considering electrostatic interactions with the charged solid surface (Fig. 2). Both electron transfer and ion transfer co-exist at liquid-solid interface.
Electrolytic-metallic contact.
If a piece of metal is touched against an electrolytic material, the metal will spontaneously become charged, while the electrolyte will acquire an equal and opposite charge. Upon first contact, a chemical reaction called a 'half-cell reaction' occurs on the metal surface. As metal ions are transferred to or from the electrolyte, and as the metal and electrolyte become oppositely charged, the increasing voltage at the thin insulating layer between metal and electrolyte will oppose the motion of the flowing ions, causing the chemical reaction to come to a stop. If a second piece of a different type of metal is placed in the same electrolyte bath, it will charge up and rise to a different voltage. If the first metal piece is touched against the second, the voltage on the two metal pieces will be forced closer together, and the chemical reactions will run constantly. In this way the 'contact electrification' becomes continuous. At the same time, an electric current will appear, with the path forming a closed loop which leads from one metal part to the other, through the chemical reactions on the first metal surface, through the electrolyte, then back through the chemical reactions on the second metal surface. In this way, contact electrification leads to the invention of the Galvanic cell or battery. "See also: Dry pile"
Metallic contact.
If two metals having differing work functions are touched together, one steals electrons from the other, and the opposite net charges grow larger and larger; this is the Volta effect. The process is halted when the difference in electric potential (electrostatic potential) between the two metals reaches a particular value, namely the difference in work function values - usually less than one volt. At this point, the Fermi levels for the two metals are equal, and there is no voltage difference between them. [If there were a voltage difference between them, then a current would flow between them: so "zero current" implies "zero voltage difference".]
Semiconductor contact.
If a metal touches a semiconductor material, or if two different semiconductors are placed into contact, one becomes charged slightly positive and the other slightly negative. It is found that if this junction between semiconductors is connected to a power supply, and if the power supply is set to a voltage slightly higher than the natural voltage appearing because of contact electrification, then for one polarity of voltage there will be a current between the two semiconductor parts, but if the polarity is reversed, the current stops. Thus contact between materials lead to the invention of the semiconductor diode or rectifier and triggered the revolution in semiconductor electronics and physics.
In materials with a direct band gap, if bright light is aimed at one part of the contact area between the two semiconductors, the voltage at that spot will rise, and an electric current will appear. When considering light in the context of contact electrification, the light energy is changed directly into electrical energy, allowing creation of solar cells. Later it was found that the same process can be reversed, and if a current is forced backwards across the contact region between the semiconductors, sometimes light will be emitted, allowing creation of the light-emitting diode (LED).