Electrical phenomena were known from the early history of investigation of electricity to travel with great speed, and many experimenters worked on the problem of applying electricity to communications. All the known effects of electricity - such as sparks, electrostatic attraction, chemical changes, electric shocks, and (later) electromagnetic effects - were applied by various people to the problem of detecting controlled transmission of electricity at a distance.
In 1746 the French scientist and abbé Jean-Antoine Nollet gathered about two hundred monks into a circle about a mile (1.6 km) in circumference, with pieces of iron wire connecting them and discharged a battery of Leyden jars through them; he observed that each man reacted at substantially the same time to the electric shock, showing the speed of propagation to be very high. In 1753 an anonymous writer in the Scots Magazine suggested an electrostatic telegraph, with one wire for each letter of the alphabet - a message could be transmitted by connecting wires in turn to an electrostatic machine, and observing the deflection of pith balls at the far end. While this scheme was eventually demonstrated experimentally in Europe, it was never developed into a useful communication system.
Alessandro Volta invented the Voltaic Pile in 1800, allowing a continuous current for experimentation; this was a source of low-voltage current that could be used to produce different effects than the momentary discharge of electrostatic machines which were the only source of electricity previously known. Samuel Thomas von Soemmering constructed his electrochemical telegraph in 1809. Hans Christian Ørsted discovered in 1820 that an electric current produces a magnetic field which will deflect a compass needle. Also in 1820, Johann Schweigger invented the galvanometer, with a coil of wire around a compass, which could be used as a sensitive indicator for electric current. In 1821, André-Marie Ampère suggested that telegraphy could be done by a system of galvanometers, with one wire per galvanometer to indicate each letter, and said he had experimented successfully with such a system. In 1824, Peter Barlow said that such a system only worked to a distance of about , and so was impractical. William Sturgeon in 1825 invented the electromagnet, with a single winding of uninsulated wire on a piece of varnished iron, which increased the magnetic force produced by electric current. In 1828, Joseph Henry improved the electromagnet by placing on it several windings of insulated wire, creating a much more powerful electromagnet which could operate a telegraph through the high resistance of long telegraph wires. An electromagnetic telegraph was created by Baron Schilling in 1832. Carl Friedrich Gauss and Wilhelm Weber built an electromagnetic telegraph in 1833 in Göttingen. In 1835 Joseph Henry invented the relay, by which a weak current over long wires could operate a powerful local electromagnet.
Later the same year, instead of a Voltaic pile, Gauss used an induction pulse, enabling him to transmit seven letters a minute instead of two. The inventors and university were too poor to develop the telegraph on their own, but received funding from Alexander von Humboldt. Carl August Steinheil in Munich was able to build a telegraph network within the city in 1835-6, and installed a telegraph line along the first German railroad in 1835.
On October 21, 1832, Schilling managed a short-distance transmission of signals between two telegraphs in different rooms of his apartment. In 1836 the Schilling's telegraph was tested on a 5 km experimental underground - underwater cable, laid around the building of the main Admiralty in Saint Petersburg. Schilling also was one of the first to put into practice the idea of the binary system of signal transmission.
A murder has just been committed at Salt Hill and the suspected murderer was seen to take a first class ticket to London by the train that left Slough at 7.42pm. He is in the garb of a Kwaker with a brown great coat on which reaches his feet. He is in the last compartment of the second first-class carriageThe reason for the misspelling of 'Quaker' was that the British system did not support the letter Q.
In the United States, the telegraph was developed by Samuel Morse and Alfred Vail. Samuel F. B. Morse independently developed an electrical telegraph in 1837, an alternative design that was capable of transmitting over long distances using poor quality wire. His assistant, Alfred Vail developed the Morse code signalling alphabet with Morse. The Morse code alphabet commonly used on the device was also named after Morse.
On January 6, 1838 Morse first successfully tested the device at the Speedwell Ironworks near Morristown, New Jersey, and on February 8 he publicly demonstrated it to a scientific committee at the Franklin Institute in Philadelphia, Pennsylvania.
In 1843 the U.S. Congress appropriated $30,000 to fund an experimental telegraph line from Washington D.C. to Baltimore. By May 1, 1844 the line had been completed from the U.S. Capitol to Annapolis Junction in Maryland. That day the Whig Party nominated Henry Clay at its national convention in Baltimore. News of the nomination was hand carried by railroad to Annapolis Junction where Vail wired it to Morse in the Capitol. On May 24, 1844, after the line was completed, Morse made the first public demonstration of his telegraph by sending a message from the Supreme Court Chamber in the U.S. Capitol in Washington, D.C. to the B&O Railroad "outer depot" (now the B&O Railroad Museum) in Baltimore. The famous message was: What hath God wrought (from the Biblical book of Numbers 23:23: Surely there is no enchantment against Jacob, neither is there any divination against Israel: according to this time it shall be said of Jacob and of Israel, What hath God wrought!).
The Morse/Vail telegraph was quickly deployed in the following two decades. Morse failed to properly credit Vail for the powerful electromagnets used in his telegraph. The original Morse design, without the relay or the "intensity" and "quantity" electromagnets invented by Vail only worked to a distance of .
This was a practical electrical telegraph system, and subsequently electrical telegraph came to refer to a signaling telegram - a system where an operator makes and breaks an electrical contact with a telegraph key which results in an audible signal at the other end produced by a telegraph sounder which is interpreted and transcribed by a human. Morse and Vail's first telegraphs used a pen and paper system to record the marks of the Morse Code, and interpreted the marks visually however, operators soon realized that they could "read" the clicking of the receiver directly by ear. Systems which automatically read the signals and print formed characters are generally called teletype rather than telegraph systems. Some electrical telegraphs used indicators which were read visually rather than by ear. The most notable of these was the early transatlantic telegraph cable.
According to a Pennsylvania Historical and Museum Commission heritage marker installed along Pennsylvania Route 230 near Elizabethtown, Pennsylvania in 1947 (see image at right), the first commercial telegraph line in the United States ran along a railroad right-of-way (currently part of Amtrak's Keystone Corridor) between Lancaster, Pennsylvania and Harrisburg, Pennsylvania in 1845. The first message, received on January 8, 1846, was "Why don't you write, you rascals?
On October 24, 1861, the first transcontinental telegraph system was established. Spanning North America, an existing network in the eastern United States was connected to the small network in California by a link between Omaha and Carson City via Salt Lake City. The slower Pony Express system ceased operation two days later. Carson City has another claim in the history of telegraphs for the largest and costliest transmission ever sent came from there. Union sympathizers in the American Civil War were eager to gain statehood for Nevada before the next presidential election so that Abraham Lincoln would have enough votes to win. They rushed to send the entire state constitution by telegraph to the United States Congress, which approved it and sent it to the President for signature. They did not believe sending it by train would guarantee it would arrive on time. The constitution was sent on October 31st, just 8 days before the election on November 7th, 1864.
The first successful transatlantic telegraph cable was completed on July 27, 1866, allowing transatlantic telegraph communications for the first time. Earlier submarine transatlantic cables installed in 1857 and 1858 only operated for a few days or weeks before they failed. The study of underwater telegraph cables accelerated interest in mathematical analysis of these transmission lines.
In 1867, David Brooks (while working for the Central Pacific Railroad) was awarded and for his improvements to telegraph insulators. He was also awarded reissue number 2,717 in 1867, for , which was originally awarded to him on 1864, for his insulator design. Brooks' patents allowed the Central Pacific to more easily communicate with construction crews building the First Transcontinental Railroad in America; the completion of the railroad was broadcast by telegraph on May 10, 1869, with the telegrapher striking his key in unison with the strikes on the Golden Spike during the completion ceremony.
Another advancement in telegraph technology occurred on August 9, 1892, when Thomas Edison received a patent for a two-way telegraph ("Duplex Telegraph") . On January 27, 2006, Western Union discontinued all telegram and commercial messaging services, though it still offered its money transfer services.