Samuel Morse in a framed daguerreotype, facing to the right.
Samuel F. B. Morse, photographed around the time of the Washington–Baltimore demonstration. c. 1845.Photographer unidentified · Library of Congress, 2004664459 · Public domain

A painter’s idea and a chemist’s advice

Samuel F. B. Morse was a portrait painter before he was an inventor. In the autumn of 1832, returning from Europe aboard the packet ship Sully, he fell into conversation with other passengers about recent experiments with electromagnets and began sketching a way to send messages along a wire. He spent much of the next five years working on the idea while teaching the literature of the arts of design at the University of the City of New York, now New York University.

His early apparatus worked across a room but not much farther. The weak point was electrical. Morse had little training in the subject, and his battery and magnets could not push a usable current through a long wire. Leonard Gale, a professor of chemistry at the same university, pointed him to Joseph Henry’s published work on batteries of many cells and magnets wound with many turns of wire. With those changes the signal could travel miles rather than feet.

Morse was one of several people working on electrical telegraphs in the 1830s. In Britain, William Cooke and Charles Wheatstone patented a needle telegraph in June 1837. What Morse and his partners produced was a recording instrument and a code of short and long signals, and that combination is the ancestor of the Morse code taught on this site.

Alfred Vail and the Speedwell workshop

On 2 September 1837 Morse demonstrated his instrument at the university. In the audience was Alfred Vail, a recent graduate whose family owned the Speedwell Iron Works in Morristown, New Jersey. Vail had trained as a machinist there. Within three weeks he and Morse had signed an agreement: Vail would build the equipment and pay for patent applications in return for a share of the rights.

The rebuilding took place at Speedwell over the following months. On 6 January 1838 the instrument sent a message through about two miles of wire strung around the works, and a public demonstration followed a few days later. Vail’s improvements were practical ones. He replaced the pencil that had marked the paper with a steel point that embossed the strip, and he simplified the mechanism that moved the paper.

Francis O. J. Smith, a congressman from Maine who chaired the House Committee on Commerce, joined the partnership in 1838 and pressed the case for federal money in Washington. Morse received United States patent 1,647 for the telegraph on 20 June 1840. The partners did not always agree, and how much of the system each man should be credited with was argued over for decades afterward.

From numbered words to an alphabet

Morse’s first scheme did not spell words at all. Each common word was given a number in a printed vocabulary. The sender set up the digits as notched metal type in a holder called a port-rule, which was drawn through the transmitter so that the notches opened and closed the circuit. The receiver wrote down the numbers from the marks on the paper and then looked each one up in the book. It was slow, and any word missing from the vocabulary could not be sent.

By the time of the Speedwell trials the partners were moving to an alphabetic code in which every letter, numeral and punctuation mark had its own pattern of short and long signals. Smithsonian archivists credit Vail with much of this work, including the principle of giving the shortest patterns to the most frequent letters. E became a single dot and T a single dash, as they still are in International Morse. A popular story says Vail counted the type in a printer’s case to find which letters were most common; the archives support the principle but not the anecdote.

Building the Washington–Baltimore line

On 3 March 1843 Congress passed an act appropriating $30,000 for an experimental line between Washington and Baltimore. The plan was to run the route along the Baltimore and Ohio Railroad and to bury the wires in lead pipe. Ezra Cornell, who later founded Cornell University, designed a plough that cut a trench, laid the pipe and covered it in one pass.

The underground line failed. The insulation on the wires inside the pipe proved defective, and tests on the buried sections showed current leaking away. Much of the appropriation had already been spent. Rather than dig the pipe up and start again, the builders hung the wires on wooden poles beside the railway, using glass insulators that Cornell designed to keep the wire from leaking current into the wet wood. Overhead construction was quicker, cheaper and far easier to repair, and it became the standard method for American lines.

The line was built from Washington toward Baltimore and was tested as it went. On 1 May 1844, with the wire as far as Annapolis Junction, news that the Whig convention in Baltimore had nominated Henry Clay for president was carried by train to the junction and telegraphed on to Washington. It arrived about an hour before the train.

The message of 24 May 1844

The completed line ran about 38 miles. On 24 May 1844 Morse, in the Capitol, sent the first formal message to Vail at the railroad depot in Baltimore: “What hath God wrought,” a phrase from the Book of Numbers chosen by Annie Ellsworth, the daughter of the Commissioner of Patents, Henry L. Ellsworth. Vail sent it back.

The Senate Historical Office notes that the room is often said to have been the old Supreme Court chamber, but no record confirms that. The most likely location is the room in the Senate wing where Morse had already set up his equipment. The Democratic convention met in Baltimore the following week, and the line carried news of its proceedings to Washington as they happened.

How the register recorded a message

The receiving instrument was called a register. A clockwork motor drew a narrow strip of paper past a steel stylus mounted on a lever. When current flowed in the line it energized an electromagnet, which pulled down an iron armature on the lever and pressed the stylus up into the paper. A short pulse embossed a dot; a longer one embossed a dash. When the current stopped, a spring pulled the lever back and the paper moved on blank.

The operator at the other end controlled all of this with a key, a sprung switch that closed the circuit while it was held down. The timing of the key was the only information sent. A dot and a dash differed only in how long the circuit stayed closed, and a gap inside a letter differed from a gap between letters only in length.

Operators soon found they did not need the paper. The armature clicked as it moved, and experienced receivers could read messages from the sound faster than they could read the strip. Within a few years many offices replaced the register with a simpler instrument called a sounder, built to make a clear click on the down stroke and a different one on the release. Reading by ear became the normal skill of an American telegrapher.

American Morse and the spread of the lines

The code used on American lines, later called American or railroad Morse, differs from the International Morse taught here. It used dashes of more than one length: T was a short dash, L a longer one and the numeral zero longer still. Several letters, including C, O, R, Y and Z, contained a space inside the character. O, for example, was a dot, a short space, and another dot. An operator had to hear the difference between that internal space and the slightly longer gap between two separate letters. Engineers in Germany later removed these features, and the revised code became the basis of International Morse.

Commercial lines followed quickly. Morse and his partners formed the Magnetic Telegraph Company in 1845, and its line between Washington and New York was working in 1846. Dozens of companies built competing routes over the next decade. Several consolidated as the Western Union Telegraph Company, which took that name in 1856, and on 24 October 1861 a line across the continent connected the east coast with San Francisco. Vail described the system in detail in The American Electro Magnetic Telegraph, published in 1845. American Morse remained in use on North American railway and landline circuits well into the twentieth century, alongside International Morse on cables and radio.

Start learning the code