Electroreception and electrogenesis are the closely-related biological abilities to perceive electrical stimuli and to generate electric fields. Both are used to locate prey; stronger electric discharges are used in a few groups of fishes to stun prey. The capabilities are found almost exclusively in aquatic or amphibious animals, since water is a much better conductor of electricity than air. In passive electrolocation, objects such as prey are detected by sensing the electric fields they create. In active electrolocation, fish generate a weak electric field and sense the different distortions of that field created by objects that conduct or resist electricity. Active electrolocation is practised by two groups of weakly electric fish, the Gymnotiformes (knifefishes) and the Mormyridae (elephantfishes), and by Gymnarchus niloticus, the African knifefish. An electric fish generates an electric field using an electric organ, modified from muscles in its tail. The field is called weak if it is only enough to detect prey, and strong if it is powerful enough to stun or kill. The field may be in brief pulses, as in the elephantfishes, or a continuous wave, as in the knifefishes. Some strongly electric fish, such as the electric eel, locate prey by generating a weak electric field, and then discharge their electric organs strongly to stun the prey; other strongly electric fish, such as the electric ray, electrolocate passively. The stargazers are unique in being strongly electric but not using electrolocation.
The electroreceptive ampullae of Lorenzini evolved early in the history of the vertebrates; they are found in both cartilaginous fishes such as sharks, and in bony fishes such as coelacanths and sturgeons, and must therefore be ancient. Most bony fishes have secondarily lost their ampullae of Lorenzini, but other non- homologous electroreceptors have repeatedly evolved, including in two groups of mammals, the monotremes ( platypus and echidnas) and the cetaceans ( Guiana dolphin).
In 1678, while doing dissections of sharks, the Italian physician Stefano Lorenzini discovered organs on their heads now called ampullae of Lorenzini. He published his findings in Osservazioni intorno alle torpedini.  The electroreceptive function of these organs was established by R. W. Murray in 1960.  
In 1921, the German anatomist Viktor Franz described the knollenorgans (tuberous organs) in the skin of the elephantfishes, again without knowledge of their function as electroreceptors. 
In 1949, the Ukrainian-British zoologist Hans Lissmann noticed that the African knife fish (Gymnarchus niloticus) was able to swim backwards at the same speed and with the same dexterity around obstacles as when it swam forwards, avoiding collisions. He demonstrated in 1950 that the fish was producing a variable electric field, and that the fish reacted to any change in the electric field around it.  
Electroreceptive animals use the sense to locate objects around them. This is important in ecological niches where the animal cannot depend on vision: for example in caves, in murky water, and at night. Electrolocation can be passive, sensing electric fields such as those generated by the muscle movements of buried prey, or active, the electrogenic predator generating a weak electric field to allow it to distinguish between conducting and non-conducting objects in its vicinity. 
In passive electrolocation, the animal senses the weak bioelectric fields generated by other animals and uses it to locate them. These electric fields are generated by all animals due to the activity of their nerves and muscles. A second source of electric fields in fish is the ion pump associated with osmoregulation at the gill membrane. This field is modulated by the opening and closing of the mouth and gill slits.   Passive electroreception usually relies upon ampullary receptors such as ampullae of Lorenzini which are sensitive to low frequency stimuli, below 50 Hz. These receptors have a jelly-filled canal leading from the sensory receptors to the skin surface.  
In active electrolocation,  the animal senses its surrounding environment by generating weak electric fields (electrogenesis) and detecting distortions in these fields using electroreceptor organs. This electric field is generated by means of a specialised electric organ consisting of modified muscle or nerves.  Animals that use active electroreception include the weakly electric fish, which either generate small electrical pulses (termed "pulse-type"), as in the Mormyridae, or produce a quasi- sinusoidal discharge from the electric organ (termed "wave-type"), as in the Gymnotidae. 
Many of these fish, such as Gymnarchus and Apteronotus, keep their body rather rigid, swimming forwards or backwards with equal facility by undulating fins that extend most of the length of their bodies. Swimming backwards may help them to search for and assess prey using electrosensory cues. Experiments by Lannoo and Lannoo in 1993 support Lissmann's proposal that this style of swimming with a straight back works effectively given the constraints of active electrolocation. Apteronotus can select and catch larger Daphnia water fleas among smaller ones, and they do not discriminate against artificially-darkened water fleas, in both cases with or without light.  
These fish create a potential usually smaller than one volt (1 V). Weakly electric fish can discriminate between objects with different resistance and capacitance values, which may help in identifying objects. Active electroreception typically has a range of about one body length, though objects with an electrical impedance similar to that of the surrounding water are nearly undetectable.   
Active electrolocation relies upon tuberous electroreceptors which are sensitive to high frequency (20-20,000 Hz) stimuli. These receptors have a loose plug of epithelial cells which capacitively couples the sensory receptor cells to the external environment. Elephantfish (Mormyridae) from Africa have tuberous electroreceptors known as Knollenorgans and Mormyromasts in their skin.   
Elephantfish emit short pulses to locate their prey. Capacitative and resistive objects affect the electric field differently, enabling the fish to locate objects of different types within a distance of about a body length. Resistive objects increase the amplitude of the pulse; capacitative objects introduce distortions. 
Electrolocation of capacitative and resistive objects in elephantfish. The fish emits brief pulses from its electric organ; its electroreceptors detect signals modified by the electrical properties of the objects around it. 
For the elephantfish, the electric organ in the tail (blue) generates an electric field (cyan). This is sensed by electroreceptors in the skin, including two electric pits (foveas) to actively search and inspect objects. Shown are the field distortions created by two different types of objects: a plant that conducts better than water (green) and a non-conducting stone (brown). 
The Gymnotiformes, including the glass knifefish (Sternopygidae) and the electric eel (Gymnotidae), differ from the Mormyridae in emitting a continuous wave, approximating a sine wave, from their electric organ. As in the Mormyridae, the generated electric field enables them to discriminate accurately between capacitative and resistive objects. 
Electrolocation of capacitative and resistive objects in glass knifefish.
electric organs occupy much of its body.
Weakly electric fish can communicate by modulating the electrical waveform they generate. They may use this to attract mates and in territorial displays.  Electric catfish frequently use their electric discharges to ward off other species from their shelter sites, whereas with their own species they have ritualized fights with open-mouth displays and sometimes bites, but rarely use electric organ discharges. 
When two glass knifefishes (Sternopygidae) come close together, both individuals shift their discharge frequencies in a jamming avoidance response. 
In bluntnose knifefishes, Brachyhypopomus, the electric discharge pattern is similar to the low voltage electrolocative discharge of the electric eel, Electrophorus. This is hypothesized to be Batesian mimicry of the powerfully-protected electric eel.  Brachyhypopomus males produce a continuous electric "hum" to attract females; this consumes 11–22% of their total energy budget, whereas female electrocommunication consumes only 3%. Large males produced signals of larger amplitude, and these are preferred by the females. The cost to males is reduced by a circadian rhythm, with more activity coinciding with night-time courtship and spawning, and less at other times. 
Fish that prey on electrolocating fish may "eavesdrop"  on the discharges of their prey to detect them. The electroreceptive African sharptooth catfish (Clarias gariepinus) may hunt the weakly electric mormyrid, Marcusenius macrolepidotus in this way.  This has driven the prey, in an evolutionary arms race, to develop more complex or higher frequency signals that are harder to detect. 
Some shark embryos and pups "freeze" when they detect the characteristic electric signal of their predators. 
In vertebrates, passive electroreception is an ancestral trait, meaning that it was present in their last common ancestor.  The ancestral mechanism is called ampullary electroreception, from the name of the receptive organs involved, ampullae of Lorenzini. These evolved from the mechanical sensors of the lateral line, and exist in cartilaginous fishes ( sharks, rays, and chimaeras), lungfishes, bichirs, coelacanths, sturgeons, paddlefishes, aquatic salamanders, and caecilians. Ampullae of Lorenzini appear to have been lost early in the evolution of bony fishes and tetrapods, though the evidence for absence in many groups is incomplete and unsatisfactory.  Where electroreception does occur in these groups, it has secondarily been acquired in evolution, using organs other than and not homologous with ampullae of Lorenzini.  
Electric organs have evolved at least eight separate times, each one forming a clade: twice during the evolution of cartilaginous fishes, creating the electric skates and rays, and six times during the evolution of the bony fishes.  Passively-electrolocating groups, including those that move their heads to direct their electroreceptors, are shown without symbols. Non-electrolocating species are not shown.  Actively electrolocating fish are marked with a small yellow lightning flash and their characteristic discharge waveforms.  Fish able to deliver electric shocks are marked with a red lightning flash . 
Sharks and rays ( Elasmobranchii) rely on electrolocation using their ampullae of Lorenzini in the final stages of their attacks, as can be demonstrated by the robust feeding response elicited by electric fields similar to those of their prey. Sharks are the most electrically sensitive animals known, responding to direct current fields as low as 5 nV/cm.    
Two groups of teleost fishes are weakly electric and actively electroreceptive: the Neotropical knifefishes ( Gymnotiformes) and the African elephantfishes ( Notopteroidei), enabling them to navigate and find food in turbid water.  The Gymnotiformes include the electric eel, which besides the group's use of low-voltage electrolocation, is able to generate high voltage electric shocks to stun its prey. Such powerful electrogenesis makes use of large electric organs modified from muscles. These consist of a stack of electrocytes, each capable of generating a small voltage; the voltages are effectively added together ( in series) to provide a powerful electric organ discharge.  
The monotremes, including the semi-aquatic platypus and the terrestrial echidnas, are the only group of mammals that have evolved electroreception. While the electroreceptors in fish and amphibians evolved from mechanosensory lateral line organs, those of monotremes are based on cutaneous glands innervated by trigeminal nerves. The electroreceptors of monotremes consist of free nerve endings located in the mucous glands of the snout. Among the monotremes, the platypus (Ornithorhynchus anatinus) has the most acute electric sense.   The platypus localises its prey using almost 40,000 electroreceptors arranged in front-to-back stripes along the bill.  The arrangement is highly directional, being most sensitive off to the sides and below. By making short quick head movements called saccades, platypuses accurately locate their prey. The platypus appears to use electroreception along with pressure sensors to determine the distance to prey from the delay between the arrival of electrical signals and pressure changes in water. 
The electroreceptive capabilities of the four species of echidna are much simpler. Long-beaked echidnas (genus Zaglossus) have some 2,000 receptors, while short-beaked echidnas (Tachyglossus aculeatus) have around 400, near the end of the snout.  This difference can be attributed to their habitat and feeding methods. Western long-beaked echidnas feed on earthworms in leaf litter in tropical forests, wet enough to conduct electrical signals well. Short-beaked echidnas feeds mainly on termites and ants, which live in nests in dry areas; the nest interiors are presumably humid enough for electroreception to work.  Experiments have shown that echidnas can be trained to respond to weak electric fields in water and moist soil. The electric sense of the echidna is hypothesised to be an evolutionary remnant from a platypus-like ancestor. 
Dolphins have evolved electroreception in structures different from those of fish, amphibians and monotremes. The hairless vibrissal crypts on the rostrum of the Guiana dolphin (Sotalia guianensis), originally associated with mammalian whiskers, are capable of electroreception as low as 4.8 μV/cm, sufficient to detect small fish. This is comparable to the sensitivity of electroreceptors in the platypus. 
Until recently, electroreception was known only in vertebrates. Recent research has shown that bees can detect the presence and pattern of a static charge on flowers.