Designing facilities for astronauts to use in space is one of the most basic considerations because anyone left anywhere long enough is going to have to use a washroom. But it’s more complicated than you might think. When the rudimentary systems of Apollo-era spacecraft were replaced with a working toilet on the space shuttle, NASA learn just how challenging it is to go in space. Because gravity can’t help you in orbit.

During the Apollo-era, defecating in space was awkward and unpleasant. It wasn’t a huge issue for Mercury astronauts whose flights were so short a urine collection system sufficed. Still, they were put on so-called “low residue” diets designed to minimize solid waste and the need to defecate during a flight. Gemini and Apollo astronauts were put on similar diets, but with missions lasting up to two weeks there was no way they couldn’t defecate during a flight. The solution was crude: a large, tube-shaped plastic bag with an adhesive around the opening an astronaut could stick to his naked buttocks. A special “finger tube” would let the astronaut dislodge any bits of waste from his skin without touching it. After wiping with a tissue and a wet cleansing wipe, both of which were added to the fecal containment bag, the astronaut would add a germicide pouch, crushing it by squeezing from the outside of the bag. Once sealed, the bag was stored for the duration of the mission; there was no way to safely vent solid waste from the spacecraft. On the Moon, astronauts wore diapers in the event of a sudden need to go, but no one ever used them.

It was common on Apollo flights for the astronaut using the fecal containment system to strip naked in an effort to avoid getting feces all over his clothes while his crew would try and get as far from him as possible since there wasn’t exactly fresh air inside the spacecraft. From start to clean up, the whole act could take up to an hour to complete.

Compared to this fecal containment system of bags, finger tubes, and germicide pouches, the toilet NASA debuted with the space shuttle was luxurious.

With NASA’s astronaut corps expanding to include women starting in 1978, the toilet had to accommodate both male and female needs; the Apollo-era urine collection system of a condom-like pouch that transferred urine either into a storage bag or jettisoned it out the side of the spacecraft would not work for women. The result was close to a standard toilet that used airflow rather than gravity to separate waste from a user.

Astronauts would sit (as well as possible in microgravity) and urinate or defecate in a pressurized commode. Inside was fast-flowing air and a high speed “slinger” that would collect and propel waste material to the side of the commode bowl. From there, fans would generate strong enough airflow to separate liquid and solid waste, the former was dumped overboard and the latter vacuum dried by exposure to space and then stored on board. The whole system relied on a series of pumps, fans, and motors all working in perfect harmony. It also took considerable maintenance. Crews had to clean it out with water daily and replace the odor and bacteria filter if odors became a problem.

On NASA’s first shuttle mission, STS-1, the urine collection system worked well, but the fecal containment system left much to be desired. Results were mixed, varying not only between crew members but between individual usages as well.

There was an airflow problem caused by a flooded charcoal filter and fan that in turn destroyed the odor and bacteria filter. The system on the whole was unable to collect and retain waste, and the airflow problem meant it couldn’t separate liquid from solid material. Everything clogged to the point where the toilet became unusable by the end of the mission. Luckily, Apollo urine and fecal containment systems were on board as a backup.

But there was another part of the problem on STS-1. Vacuum drying fecal matter by exposing it to the vacuum of space tended to generate fecal dust, and if the whole system didn’t work perfectly the material could migrate into the ventillation system, spreading this fecal dust thorugh the cabin. This is just what happened during STS-1’s reentry. Dust got into the environmental control system and a small amount ended up in the main cabin. The danger was for the material to come into contact with the astronauts’ eyes, nose, or throats – basically any part of the human body that is moist by nature – it would reconstitute. And that, needless to say, could become a very serious problem quickly.

The STS-1 crew was fine, though reported trouble with the toilet in that it didn’t do much to separate waste material from the user’s body. After STS-1, the system was removed from the orbiter and returned to the contractor for refurbishment and overall changes.

Changes were made to the system before STS-2 launched, including the addition of a space odor and bacteria filter and a change in maintenance procedures to limit chances of flooding. Nevertheless, problems persisted due to problems with the motor mechanism inside the commode.

Finally, a simplified, redesigned system was flown on the STS-41D mission that launched and landed in November of 1984. The slinger/motor assembly was completely removed, which effectively eliminated the generation of fecal dust as well as cut down on noise and energy usage of the whole system. This modification also made the system easier to use and maintain, both benefits for spaceflight.

Space toilets and their associated systems have continued to evolve since those first problematic shuttle flights. Today on the International Space Station, urine is processed through a filtration system and turned into drinking water while feces are typically compressed and jettisoned with trash that’s left to burn up in the atmosphere.