The year 1977 was an important one for music. Fleetwood Mac's Rumours and the Sex Pistols' Never Mind the Bollocks were released. Elvis left the building for the last time, dying at the age of only 42. But amid all this rock'n'roll history another less celebrated but far more significant album was quietly being made.

Fashioned from copper rather than vinyl, and plated with gold for longevity, The Sounds Of Earth was compiled by the American astronomer Carl Sagan. It was a broader range of music than most of the other albums released that year, aiming to encapsulate 5,000 years of human culture; from an Australian Aborigine song and an Indian raga to Azerbaijani bagpipes, bamboo flutes, Bach, Beethoven and Chuck Berry.

Like any compilation album, each piece was carefully selected and its merit, to make the cut, hotly debated. But unlike most other records, only two copies were made. They were placed inside their aluminium album covers, complete with artwork in the form of a "clear", universally understandable, pictorial depiction of what they were and instructions for how to play them. A stylus was also included, to help any creatures that might chance upon them in the future to hear the music and other recordings. In a scene that would not have been out of place in Ridley Scott's recent Prometheus, they were then carefully bolted to the outside of the two Voyager spacecraft, by the last human beings ever to touch them.

The records sit on one face of each craft's 10-sided "chassis" or bus, above which sits the large, white 3.7-metre wide communications dish, which dominates the structure. Protruding, insect-like, from the craft are "limbs" and antennae. The radioisotope thermoelectric generators, which power the Voyagers in the darkest reaches of the outer solar system, stretch out to on one side, just below a proboscis-like, 13m-long magnetometer boom. Across the other side of the craft, another broad arm juts out. It carries Voyager's "eyes" – an array of cameras, spectrometers, particle detectors and other equipment.

The challenge for Nasa's Jet Propulsion Lab, which designed and constructed the Voyagers, was to build a craft that could survive in space for years. In the early 1970s, when the JPL team began the project, they'd never built a craft rated for longer than a few months of interplanetary travel. It was a big jump to create something that would reach the outer planets, and perhaps even farther.

"At that point in time, that was a mind-blowing thought," says Voyager systems engineer John Casani. "How you build a spacecraft that can survive failures and still keep on chugging. We thought we could do it. Nobody else did!"

Half a decade of back-breaking building and testing followed, to create a craft which was up to the job. As the build was nearing completion Casani decided to do something unique, to celebrate the sacrifices of his 2,000-strong engineering team and their families had made. During an open house party held to mark the end of Voyager's design phase, he invited everyone there to sign their names on large sheets of paper. He then had these papers reduced and reproduced onto six small metal plaques, still large enough to read the individual names. These were then stitched into the thermal blankets inside the main spacecraft bus, as a memorial to those whose ingenuity, skill and support had made these unique machines possible.

With these signatures and their golden records on board, the twin spacecraft were launched in late summer of 1977 from Cape Canaveral and placed on a "grand tour" trajectory that would carry them on fleeting, but historic fly-bys of Jupiter and its moons, and then on to Saturn and its rings. Deflected towards Saturn's moon Titan, Voyager 1 would head out of the plane of the solar system and off in the direction of the northern constellation of Camelopardalis.

Voyager 2 would carry on towards an encounter with Uranus in 1986 and Neptune in 1989, which would accelerate it to more than 50,000mph and hurl it in the direction of the brightest star in our sky – Sirius.

On the course of this journey past the giant planets, the craft returned more than 67,000 photographs – among them stunning images of worlds we hadn't even dreamt of. As Voyager's chief scientist Ed Stone put it as they flew past Saturn: "Our imaginations were not nearly up to what nature provided." The pictures have challenged our understanding of meteorology and geology – redefining our understanding of the solar system and of planetary science as a discipline.

These were places that we had only known as fuzzy pinpricks of light seen through telescopes from Earth before Voyager. These two spacecraft on the grandest of grand tours have taught us more about the outer solar system in the last 35 years than in all of human history. It was, and still is mankind's greatest voyage of discovery. But it is perhaps appropriate that the final image captured by Voyager, the image for which the mission is best remembered, was of ourselves.

On Valentine's Day 1990 Voyager 1 was instructed to turn its cameras around to snap a final family portrait of as many of the planets as possible, seen uniquely from 6bn km above the solar system. The imaging team knew that, from this distance, each planet would occupy less than a pixel.

It would be the farthest picture ever taken of home, capturing us as a single speck – an almost invisible point in the black ocean of space. At first when the photograph was printed, Earth was mistaken as a speck of dust which Voyager scientists initially tried to brush off the glossy print! But this visually underwhelming image of Earth – a "pale blue dot" as Sagan described it – was as profound as the spectacular whole Earth images captured by the Apollo astronauts some 20 years before.

Not long after taking this final picture, Voyager 1 passed the orbit of Pluto, and by the end of 2004 had entered the realm of the Kuiper belt – a band of dark, Pluto-like worlds of rock and ice orbiting the Sun, almost imperceptibly far away. Voyager 2 reached this domain shortly afterwards. Today the two spacecraft still continue to hurtle away from us at 16km per second.

Thirty five years after leaving Earth, and now 18bn km from home, Voyager 1 is entering the "bow shock" - a region of space marking the boundary between the solar and the galactic winds – the edge of the Sun's influence. Voyager 2 has also encountered this frontier, as each craft prepares to enter the region astronomers call "interstellar space".

Five instruments on each craft are still functioning, reporting back the nature of this new environment into which we have extended our senses; characterising the new magnetic fields and galactic particles they are now in contact with.

Their public voice also continues to reach us from this distance. Despite being technologically frozen in the 1970s, the Voyagers have managed to embrace the digital age – now harnessing Twitter to communicate their story. When a Twitter follower asked 'what could Voyager 2 see?' it replied in fitting Sagan-esque prose: "I can sense stars and their whispers amid the roaring of our own sun".

Although they don't tweet every day, both craft still maintain daily contact with the Earth. Even travelling at the speed of light their messages take quite a long time to reach home. "The journey time is now about 15 hours each way," says Voyager's current manager Suzanne Dodd. "We sent a command Saturday morning and it came back Sunday afternoon." Dodd has been with Voyager since the mid-1980s, and likens keeping in touch with the spacecraft to the nurturing of an elderly senior citizen. "Sometimes they need a bit of tuning on their hearing!"

It's not just the Voyagers that are ageing. Everyone on the team has lived out their lives against the backdrop of their mission. "When I started on Voyager my two daughters were young," says Ed Stone, who has been on board since day one. "By the time they were in college we had passed Saturn and were on our way to Uranus. They got married and the Voyagers just kept going, and we had grandchildren and Voyager just kept going and our grandchildren are now aware of what's happening to the Voyagers just like our children were."

Barring any serious engineering failures, the Voyagers will both continue to report from interstellar space until around 2025, when declining power and propellant required to point their communication dishes towards Earth will gradually prevent them from calling home.

Were it not for these diminishing consumables, and the risk of losing their lock on the increasingly dim and distant Sun, Nasa could track them for another century or two.

But even without power the two Voyagers will continue to serve us. In the largely empty, benign environment of interstellar space, these craft are likely to last for millions of years. They will outlive the pyramids, they're likely to outlive us, and perhaps even the Earth itself; the only record of our existence, circling the galaxy for ever. If other intelligent, technological creatures ever find them, as they drift for eons in deep space, the craft will reveal something about the beings that built them. Our size and dexterity can be inferred from their scale. Their engineering sophistication will tell these creatures something about our technological and mathematical abilities, at least as they were in the 1970s. But the Voyagers' design alone will tell them nothing about what kind of creatures we really were.

So while the team at the Jet Propulsion Lab put the finishing touches to the Voyagers in early 1977, spacecraft engineer John Casani suggested to Carl Sagan that they include something on board each craft that would address this. Sagan reasoned that music might be the best way of communicating to other creatures something more about us. "Could the meaning of music be understood by something else," Sagan wondered. "The soaring emotions from music might be a mystery to them, but if we were to convey something of what humans were about then music has to be a part of it," he later recalled in an interview with BBC Radio 4.

Sagan quickly pitched the idea for the golden records, estimating it would cost $25,000 to make them. Casani agreed and Sagan and team member Ann Druyan set about choosing the music. They had just six weeks to assemble the album, the most symbolic music compilation project in history. It was an almost impossible task, by Sagan's own admission.

A frantic consultation with musicologists around the world ensued, as Druyan, who later became Sagan's wife, battled to track down 26 specific recordings, which reflected something of the emergence and evolution of music on Earth.

When the physician and biology writer Lewis Thomas was asked which tracks he would send he quickly replied 'the complete works of JS Bach …" before adding, after a pause " … But that would be boasting!" But The Sounds of Earth does carry more from Bach than any other single composer, with three pieces chosen to reflect the evolution of his style.

As with any mixtape project, particularly one intended to represent something of our diversity as a species and what it means to be a human, there are going to be some obvious omissions; not least the Beatles. Druyan was hoping for Here Comes the Sun but the request was turned down by the band's record company, as they presumably couldn't agree to clearance for the rights "in perpetuity, across the known Universe".

But the most striking story from this effort to compile the golden record concerns the closing piece for the album; Beethoven's Cavatina from the String Quartet No. 13 in B flat, Op 130. Whilst researching an article about the project for the New York Times, Druyan had looked at Beethoven's diaries, and: "in his own hand he'd written: 'will they like my music on Venus? What will they think of it on Uranus…" At last, a way to respond to that impulse, that question that Beethoven asked so long ago, she felt.

Despite its ambition, and the epic time scales over which the Voyagers are likely to survive, given the vastness of space, these two tiny craft and their golden records are unlikely ever to be found. But Sagan was clever enough to realise this. For him it wasn't so much what the records said to other civilisations that mattered, but more significant was what they said about our own. Like the pale blue dot photograph captured by Voyager 1, the compilation record was a mirror to hold up to ourselves.

"Here is a moment when we have to suddenly think what is it about our culture we'd want others to know about, that we'd be proud of," Sagan reflected in a 1982 interview. "The record should represent the human species as an entirety. We are a single species on the planet Earth. The unity of the species seen down here is a fact that is essential for the human future."

As our first interstellar ambassadors set sail on this new sea, it's worth reflecting once more on this unique vantage point which such exploration, far beyond our "pale blue dot" offers us. From such a perspective national boundaries melt away and ethnic, religious or ideological differences seem an irrelevant way to define our identity.

In the summer of 1977 the launching of our collective message in a bottle into the cosmic ocean was a highly optimistic gesture, which briefly put all our tribal differences aside. This optimism is perhaps best summed up by one of the voice recordings it carries. "This is a present from a small, distant world, a token of our sounds, our science, our images, our music, our thoughts and our feelings. We are attempting to survive our time so we may live into yours."

Campbell and Riley's documentary, Voyager – to the Final Frontier, is on BBC4 at 9pm on 24 October. Hear the Voyager golden discs' playlist at goldenrecord.org.