Posts with «engineering» label

How NASA might protect tomorrow's astronauts from deep space radiation

There are a million and one ways to die in space, whether it’s from micrometeoroid impacts shredding your ship or solar flares frying its electronics, drowning in your own sweat during a spacewalk or having a cracked coworker push you out an airlock. And right at the top of the list is death by radiation.

Those same energetic emissions from our local star that give you a tan can scour the atmosphere from a planet if it doesn’t enjoy the protection of an ozone layer. While today’s low Earth orbit crew and cargo capsules may not come equipped with miniature magnetospheres of their own, tomorrow’s might — or maybe we’ll just protect humanity’s first deep space explorers from interstellar radiation by ensconcing them safely in their own poop.

Types of Radiation and what to do about them

Like strokes and folks, there are different types and sources of radiation both terrestrial and in space. Non-ionizing radiation, meaning the atom doesn’t have enough energy to fully remove an electron from its orbit, can be found in microwaves, light bulbs, and Solar Energetic Particles (SEP) like visible and ultraviolet light. While these forms of radiation can damage materials and biological systems, their effects can typically be blocked (hence sunscreen and microwaves that don't irradiate entire kitchens) or screened by the Ozone layer or Earth’s magnetosphere.

Earth’s radiation belts are filled with energetic particles trapped by Earth’s magnetic field that can wreak havoc with electronics we send to space. Credits: NASA's Scientific Visualization Studio/Tom Bridgman

Ionizing radiation, on the other hand, is energetic to shed an electron and there isn’t much that can slow their positively-charged momentum. Alpha and beta particles, Gamma rays, X-rays and Galactic Cosmic Rays, “heavy, high-energy ions of elements that have had all their electrons stripped away as they journeyed through the galaxy at nearly the speed of light,” per NASA. “GCR are a dominant source of radiation that must be dealt with aboard current spacecraft and future space missions within our solar system.” GCR intensity is inversely proportional to the relative strength of the Sun’s magnetic field, meaning that they are strongest when the Sun’s field is at its weakest and least able to deflect them.

Chancellor, J., Scott, G., & Sutton, J. (2014)

Despite their dissimilar natures, both GCR and SEP damage the materials designed to shield our squishy biological bodies from radiation along with our biological bodies themselves. Their continued bombardment has a cumulative negative effect on human physiology resulting not just in cancer but cataracts, neurological damage, germline mutations, and acute radiation sickness if the dose is high enough. For materials, high-energy particles and photons can cause “temporary damage or permanent failure of spacecraft materials or devices,” Zicai Shen of the Beijing Institute of Spacecraft Environment Engineering notes in 2019’s Protection of Materials from Space Radiation Environments on Spacecraft.

“Charged particles gradually lose energy as they pass through the material, and finally, capture a sufficient number of electrons to stop,” they added. “When the thickness of the shielding material is greater than the range of a charged particle in the material, the incident particles will be blocked in the material.”

How NASA currently protects its astronauts

To ensure that tomorrow’s astronauts arrive at Mars with all of their teeth and fingernails intact, NASA has spent nearly four decades collecting data and studying the effects radiation has on the human body. The agency’s Space Radiation Analysis Group (SRAG) at Johnson Space Center is, according to its website, “responsible for ensuring that the radiation exposure received by astronauts remains below established safety limits.”

According to NASA, “the typical average dose for a person is about 360 mrems per year, or 3.6 mSv, which is a small dose. However, International Standards allow exposure to as much as 5,000 mrems (50 mSv) a year for those who work with and around radioactive material. For spaceflight, the limit is higher. The NASA limit for radiation exposure in low-Earth orbit is 50 mSv/year, or 50 rem/year.”

SRAG’s Space Environment Officers (SEOs) are tasked with ensuring that the astronauts can successfully complete their mission without absorbing too many RADs. They take into account the various environmental and situational factors present during a spaceflight — whether the astronauts are in LEO or on the lunar surface, whether they stay in the spacecraft or take a spacewalk, or whether there is a solar storm going on — combine and model that information with data collected from onboard and remote radiation detectors as well as the NOAA space weather prediction center, to make their decisions.

The Radiation Effects and Analysis Group at Goddard Space Flight Center, serves much the same purpose as SRAG but for mechanical systems, working to develop more effective shielding and more robust materials for use in orbit.

“We will be able to ensure that humans, electronics, spacecraft and instruments — anything we are actually sending into space — will survive in the environment we are putting it in,” Megan Casey, an aerospace engineer in the REAG said in a 2019 release. “Based on where they’re going, we tell mission designers what their space environment will be like, and they come back to us with their instrument plans and ask, ‘Are these parts going to survive there?’ The answer is always yes, no, or I don’t know. If we don’t know, that’s when we do additional testing. That’s the vast majority of our job.”

NASA’s research will continue and expand throughout the upcoming Artemis mission era. During test flights for the Artemis I mission, both the SLS rocket and the Orion spacecraft will be outfitted with sensors measuring radiation levels in deep space beyond the moon — specifically looking at the differences in relative levels beyond the Earth’s Van Allen Belts. Data collected and lessons learned from these initial uncrewed flights will help NASA engineers build better, more protective spacecraft in the future.

And once it does eventually get built, crews aboard the Lunar Gateway will maintain an expansive radiation sensor suite, including the Internal Dosimeter Array, designed to carefully and continually measure levels within the station as it makes its week-long oblong orbit around the moon.

“Understanding the effects of the radiation environment is not only critical for awareness of the environment where astronauts will live in the vicinity of the Moon, but it will also provide important data that can be used as NASA prepares for even greater endeavors, like sending the first humans to Mars,” Dina Contella, manager for Gateway Mission Integration and Utilization, said in a 2021 release.

NASA might use magnetic bubbles in the future

Tomorrow’s treks into interplanetary space, where GCR and SEP are more prevalent, are going to require more comprehensive protection than the current state of the art passive shielding materials and space weather forecasting predictions can deliver. And since the Earth’s own magnetosphere has proven so handy, researchers with the European Commission's Community Research and Development Information Service (CORDIS) have researched creating one small enough to fit on a spaceship, dubbed the Space Radiation Superconducting Shield (SR2S).

The €2.7 million SR2S program, which ran from 2013 to 2015, expanded on the idea of using superconducting magnets to generate a radiation-stopping magnetic force field first devised by ex-Nazi aerospace engineer Wernher von Braun in 1969. The magnetic field produced would be more than 3,000 times more concentrated than the one encircling the Earth and would extend out in a 10-meter sphere.

“In the framework of the project, we will test, in the coming months, a racetrack coil wound with an MgB2 superconducting tape,” Bernardo Bordini, coordinator of CERN activity in the framework of the SR2S project, said in 2015. “The prototype coil is designed to quantify the effectiveness of the superconducting magnetic shielding technology.”

It wouldn’t block all incoming radiation, but would efficiently screen out the most damaging types, like GCR, which flows through passive shielding like water through a colander. By lowering the rate at which astronauts are exposed to radiation, they’ll be able to serve on more and longer duration missions before hitting NASA’s lifetime exposure limit.

“As the magnetosphere deflects cosmic rays directed toward the earth, the magnetic field generated by a superconducting magnet surrounding the spacecraft would protect the crew,” Dr Riccardo Musenich, scientific and technical manager for the project, told Horizon in 2014. “SR2S is the first project which not only investigates the principles and the scientific problems (of magnetic shielding), but it also faces the complex issues in engineering.”

Two superconducting coils have already been constructed and tested, showing the feasibility in using them to build lightweight magnets but this is very preliminary research, mind you. The CORDIS team doesn’t anticipate this tech making it into space for another couple decades.

Researchers from University of Wisconsin–Madison's Department of Astronomy have recently set about developing their own version of CORDIS’ idea. Their Cosmic Radiation Extended Warding using the Halbach Torus (CREW HaT) project, which received prototyping funding from NASA’s Innovative Advanced Concepts (NIAC) program in February, uses “new superconductive tape technology, a deployable design, and a new configuration for a magnetic field that hasn't been explored before," according to UWM associate professor and researches lead author, Dr. Elena D'Onghia told Universe Today in May.


“The HaT geometry has never been explored before in this context or studied in combination with modern superconductive tapes,” she said in February’s NIAC summary. “It diverts over 50 percent of the biology-damaging cosmic rays (protons below 1 GeV) and higher energy high-Z ions. This is sufficient to reduce the radiation dose absorbed by astronauts to a level that is less than 5 percent of the lifetime excess risk of cancer mortality levels established by NASA.”

Or astronauts might wear leaden vests to protect their privates

But why go through the effort of magnetically encapsulating an entire spaceship when really it’s just a handful of torsos and heads that actually need the protection? That’s the idea behind the Matroshka AstroRad Radiation Experiment (MARE).

Developed in partnership with both the Israel Space Agency (ISA) and the German Aerospace Center (DLR), two of the MARE vests will be strapped aboard identical mannequins and launched into space aboard the Orion uncrewed moon mission. On their three-week flight, the mannequins, named Helga and Zohar, will travel some 280,000 miles from Earth and thousands of miles past the moon. Their innards are designed to mimic human bones and soft tissue, enabling researchers to measure the specific radiation doses they receive.

Its sibling study aboard the ISS, the Comfort and Human Factors AstroRad Radiation Garment Evaluation (CHARGE), focuses less on the vest’s anti-rad effectiveness and more on the ergonomics, fit and feel of it as astronauts go about their daily duties. The European Space Agency is also investigating garment-based radiation shielding with the FLARE suit, an “emergency device that aims to protect astronauts from intense solar radiation when traveling out of the magnetosphere on future Deep Space missions.”

Or we’ll line the ship hulls with water and poo!

One happy medium between the close-in discomfort of wearing a leaded apron in microgravity and the existential worry of potentially having your synapses scrambled by a powerful electromagnet is known as Water Wall technology.

“Nature uses no compressors, evaporators, lithium hydroxide canisters, oxygen candles, or urine processors,” Marc M. Cohen Arch.D, argued in the 2013 paper Water Walls Architecture: Massively Redundant and Highly Reliable Life Support for Long Duration Exploration Missions. “For very long-term operation — as in an interplanetary spacecraft, space station, or lunar/planetary base — these active electro-mechanical systems tend to be failure-prone because the continuous duty cycles make maintenance difficult.”

So, rather than rely on heavy and complicated mechanizations to process the waste materials that astronauts emit during a mission, this system utilizes osmosis bags that mimic nature’s own passive means of purifying water. In addition to treating gray and black water, these bags could also be adapted to scrub CO2 from the air, grow algae for food and fuel, and can be lined against the inner hull of a spacecraft to provide superior passive shielding against high energy particles.

“Water is better than metals for [radiation] protection,” Marco Durante of the Technical University of Darmstadt in Germany, told New Scientist in 2013. This is because the three-atom nucleus of a water molecule contains more mass than a metal atom and therefore is more effective at blocking GCR and other high energy rays, he continued.

The crew aboard the proposed Inspiration Mars mission, which would have slingshot a pair of private astronauts around Mars in a spectacular flyby while the two planets were at their orbital closest in 2018. You haven’t heard anything about that because the nonprofit behind it quietly went under in 2015. But had they somehow pulled off that feat, the plan was to have the astronauts poop into bags, sophon out the liquid for reuse and then pile the vacuum-sealed shitbricks against the walls of the spacecraft — alongside their boxes of food — to act as radiation insulation.

“It’s a little queasy sounding, but there’s no place for that material to go, and it makes great radiation shielding,” Taber MacCallum, a member of the nonprofit funded by Dennis Tito, told New Scientist. “Food is going to be stored all around the walls of the spacecraft, because food is good radiation shielding.” It’s just a quick jaunt to the next planet over, who needs plumbing and sustenance?

Boeing’s Starliner carried a ‘Kerbal Space Program’ character to the ISS

After two-and-a-half years of delays, Boeing’s Starliner capsule successfully docked with the International Space Station. It was an important milestone for a company that has, at least in the popular imagination, struggled to catch up with SpaceX. So it’s fitting how Boeing decided it would celebrate a successful mission.

The seven-member Exp 67 crew gathers for a welcome ceremony in front of the hatch where the @BoeingSpace#Starliner docked on Friday evening.

— International Space Station (@Space_Station) May 21, 2022

When the crew of the ISS opened the hatch to Starliner, they found a surprise inside the spacecraft. Floating next to Orbital Flight Test-2’s seated test dummy was a plush toy representing Jebediah Kerman, one of four original “Kerbonauts” featured in Kerbal Space Program. Jeb, as he’s better known by the KSP community, served as the flight’s zero-g indicator. Russian cosmonaut Yuri Gagarin took a small doll with him on the first-ever human spaceflight, and ever since it has become a tradition for most space crews to carry plush toys with them to make it easy to see when they've entered a microgravity environment.

If you’ve ever played Kerbal Space Program, you have a sense of why it was so fitting Boeing decided to send Jeb to space. In KSP, designing spacecraft that will carry your Kerbonauts to orbit and beyond is no easy task. Often your initial designs will fall and crash as they struggle to fly free of Kerbin’s gravity. But you go back to the drawing board and tweak your designs until you find one that works. In a way, that’s exactly what Boeing’s engineers had to do after Starliner’s first test flight in 2019 failed due to a software issue, and its second one was delayed following an unexpected valve problem.

Boeing kept Jeb’s presence on OFT-2 secret until the spacecraft docked with the ISS. A spokesperson for the company told collectSPACE that Starliner’s engineering team chose the mascot in part because of the science, technology, engineering and math lessons KSP has to teach players. Jeb will spend the next few days with the crew of the ISS before they place him back in the spacecraft for its return trip to Earth.

Earth's orbital economy of tomorrow could be worth trillions

As the scope and focus of human spaceflight has evolved, so too have NASA’s methods and operations. Regions that were once accessible only by the world’s most powerful nations are today increasingly within reach of Earth’s civilian population, the richest uppermost crusts, at least. The business community is also eyeing near Earth space as the next potentially multi-trillion dollar economy and is already working with the space agency to develop the technology and infrastructure necessary to continue NASA’s work in the decades following the ISS’ decommissioning. At SXSW 2022 last week, a panel of experts on the burgeoning private spaceflight industry discussed the nuts and bolts of NASA’s commercial services program and what business in LEO will likely entail.

As part of the panel, The Commercial Space Age Is Here, Tim Crain, CTO of Intuitive Machines, Douglas Terrier, associate director of vision and technology of NASA's Johnson Space Center, and Matt Ondler, CTO and director of engineering at Axiom Space, sat down with Houston Spaceport director, Arturo Machuca. Houston has been a spacefaring hub since NASA’s founding and remains a hotbed for orbital and spacelift technology startups today.

“We're going from a model of where we've had primarily government funded interests in space to one that's going to be focused a lot on the commercial sector,” Terrier said, pointing out that Axiom, Intuitive Machines, and “SpaceX down in Boca Chica” were quickly being joined by myriad startups offering a variety of support and development services.

“[Space is] the most important frontier for the United States to continue to have world leadership in and our goal is to ensure that we continue to do that in a new model that involves harnessing the innovation and the expertise from both inside and outside of NASA in the community represented here,” he continued.

Axiom is no stranger to working with both sides of the government contractor dynamic. It is scheduled to launch the first fully private crew mission to the ISS in April and plans to build, launch and affix a privately funded habitat module to the station by 2028. “This commercial space, very similar to the beginning of the internet,” Older explained. “There were a few key technologies that really allowed the internet to explode and so there's a few things in aerospace that will really allow commercial space to take off.”

“We think that the low Earth orbit economy is a trillion dollar economy, whether it's bioprinting, organs, whether it's making special fiber optic cable,” he continued. “I am completely convinced that 15 to 20 years from now we're going to be surrounded by objects that we can't imagine how we [had] lived without that were manufactured in space.”

“For the last 20 years humans have lived on the International Space Station continuously,” Terrier agreed. “My grandchildren are living in a world where humans live on the moon, where they'll get a nightly news broadcast from the moon? I mean, the opportunities from a societal- and civilization-changing standpoint is beyond comparison.. is actually beyond comprehension.”

The space-based economy is already valued at around $400 billion, Terrier added, with government investment accounting for around a quarter of the necessary upkeep funding and the rest coming from the private sector. He noted that NASA plays two primary roles as President Kennedy dictated in his 1962 “Why Go to the Moon” speech at Rice University: the scientific exploration of space for one, but also “to create the conditions for commercial success for United States in space,” Terrier said.

“It's synergistic in a sense that the more companies operating in space, the more of an industrial base we can call on — driving the price down, amortizing the access to space — so that NASA doesn't have to bear that cost,” he said. “It creates a role where there are things like exploring out among the planets, for which there isn't a business case — clearly the government needs to take the lead there. And then there are things where we're now commercializing low Earth orbit and that is success for everybody.”

This won’t be the first time that the US government hands off control of technology it previously had monopoly power over, Crain added. He points to NACA as “NASA for aviation in the 20s” and guided the government’s commercialization of aircraft technology.

“The only reason we can build a commercial space station is because of 25 years of flying the international space station and all the things that we've learned from NASA,” Ondler said. “NASA has learned about keeping humans alive [in space] for long periods of time. We're really leveraging so much history and so much of the government's investment to build our commercial station.”

Ondler pointed out that construction of the 7-foot x 3-foot Earth Observatory window being installed in Axiom’s station module, “by far the largest space window ever attempted,” would not have been possible without the knowledge and coaching of a former NASA space shuttle engineer. “her expertise, just her helping an engineer in one little area,” Ondler said, “allowed him to design a really good window on his first try.”

“We definitely stand on the shoulder of the great work that the space community has done until now, in terms of technology,” Crain agreed. The Apollo era, he notes, was dominated by producing one-off spacecraft parts meticulously designed for often singular use cases but that system is no longer sufficient. “The more we can make our supply chain, not custom parts, but things that have already been used already in a terrestrial market, the better off we are,” he said.

“Our mindset has to shift from ‘well, let's go all in, I'm building this first lander’ to doing it the first time already looking at the second lander,” Crain continued. “What are the differences between the two, how do we regularize that production in a way so that our design, the core of that vehicle, is basically the same from flight to flight?”

Once the Artemis missions begin in earnest, that supply chain will begin to stretch and expand. It will extend first to LEO, but should attempts to colonize the moon prove successful, it will grow to support life and business there, much like how towns continually grew along the trade and expansion routes of the American West. “You don't load up your wagons in Virginia and go straight to San Francisco,” Terrier said. “You stop in Saint Louis and reprovision, and people build up an economy around that.”

“The cool thing is that it's not just aerospace engineering anymore,” Crain added. He noted that, for example, retinal implants can be more accurately and efficiently printed in microgravity than they can planetside, but the commercial process for actually doing so has yet to be devised. “There's a completely different industry that we're gonna need. Folks to figure out, how do we build that [retinal implant printing] machine? How do we bring it and the raw materials up and down [from LEO]? We need marketing people and all those sort of folks. It's not just aerospace engineering and I think that's really what we mean when we talk about the trillion dollar economy.”

How to incinerate the International Space Station

It took NASA and its partners nearly four dozen trips between 1998 and 2010 to haul the roughly 900,000 pounds worth of various modules into orbit that make up the $100 billion International Space Station. But come the end of this decade, more than 30 years after the first ISS component broke atmosphere, the ISS will reach the end of its venerable service life and be decommissioned in favor of a new, privately-operated cadre of orbital research stations.


The problem NASA faces is what to do with the ISS once it’s been officially shuttered, because it’s not like we can just leave it where it is. Without regular shipments of propellant reactant to keep the station on course, the ISS’ orbit would eventually degrade to the point where it’s forward momentum would be insufficient to overcome the effects of atmospheric drag, subsequently plummeting back to Earth. So, rather than wait for the ISS to de-orbit on its own, or leave it in place for the Russians to use as target practice, NASA will instead cast down the station from upon high like Vader did Palpatine.

NASA is no stranger to getting rid of refuse via atmospheric incineration. The space agency has long relied on it in order to dispose of trash, expended launch vehicles, and derelict satellites. Both America’s Skylab and Russia’s Mir space stations were decommissioned in this manner.

Skylab was America’s first space station, for the whole 24 weeks it was in use. When the final 3-astronaut crew departed in early 1974, the station was boosted one last time to 6.8 miles further out in a 289-mile graveyard orbit. It was expected to remain there until the 1980s when increased solar activity from the waxing 11-year solar cycle would eventually drag it down into a fiery reentry. However, astronomers miscalculated the relative strength of that solar event, which pushed up Skylab’s demise to 1979.

In 1978, NASA toyed with the idea of using its soon-to-be-completed Space Shuttle to help boost Skylab into a higher orbit but abandoned the plan when it became clear that the Shuttle wouldn’t be finished in time, given the accelerated reentry timetable. The agency also rejected a proposal to blow the station up with missiles while still in orbit. The station eventually came down on July 11th, 1979, though it didn’t burn up in the atmosphere as quickly as NASA had predicted. This caused some rather large pieces of debris to overshoot the intended Indian Ocean target South-Southeast of South Africa and instead land in Perth, Australia. Despite NASA’s calculations of a 1 in 152 chance that a piece of the lab could hit someone during its de-orbit, no injuries were reported.

Mir's deorbit went much more smoothly. After 15 years of service it was brought down on March 23rd, 2001, in three stages. First, its orbit was allowed to degrade to an altitude of 140 miles. Then, the Progress M1-5 spacecraft — basically an attachable rocket designed specifically to help deorbit the station — docked with the Mir. It subsequently lit its engine for a little over 22 minutes to precisely put the Mir down over a distant expanse of the Pacific Ocean, east of Fiji.

As for the ISS’ oncoming demise, NASA has a plan — or at least a pretty good idea — for what’s going to happen. "We've done a lot of studies," Kirk Shireman, deputy manager of NASA's space station program, told in 2011. "We have found an orbit and a change in velocity that we believe is achievable, and it creates a debris footprint that’s all in water in an unpopulated area."

According to NASA standards — specifically NASA-STD-8719.14A, Process for Limiting Orbital Debris — the risk of human casualty on the ground is limited to less than 1 in 10,000 (< 0.0001). However, a 1998 study conducted by the ISS Mission Integration Office discovered that an uncontrolled reentry would carry an unacceptable casualty probability of between .024 to .077 (2 in 100 to 8 in 100). A number of controllable decommissioning alternatives have been discussed over the decades, including boosting the ISS farther into orbit in the event of an unexpected evacuation of the station’s crew.

"We've been working on plans and update the plans periodically," Shireman continued. "We don’t want to ever be in a position where we couldn’t safely deorbit the station. It's been a part of the program from the very beginning."

Beginning about a year before the planned decommissioning date, NASA will allow the ISS to begin degrading from its normal 240-mile high orbit and send up an uncrewed space vehicle (USV) to dock with the station and help propel it back Earthward. The ultimate crew from the ISS will evacuate just before the station hits an altitude of 115 miles, at which point the attached USV will fire its rockets in a series of deorbital burns to set the station into a capture trajectory over the Pacific Ocean.

NASA has not yet settled on which USV will be employed. A 2019 plan approved by NASA’s safety council, ASAP, relied on Roscosmos to outfit and send up another Progress spacecraft to do what it did for the Mir. However, that vehicle might not actually be available when the ISS is set to come down because Russia’s commitment to the ISS program terminates in 2024. In April of last year, Russian state media began making noise that the country would abandon the station entirely by 2025, potentially stripping parts from this station to reuse in its upcoming national station and leaving the ISS without a reliable way to break orbit. The ESA’s Automated Transfer Vehicle or NASA's Orion Multi-Purpose Crew Vehicle, though still in development, are both potential alternatives to the Progress.

“NASA is continuing to work with its international partners to ensure a safe deorbit plan of the station and is considering a number of options," spokeswoman Leah Cheshier told UPI via email in 2021, declining to elaborate on what those options might entail but adding that any deorbiting mission would be "shared by the ISS partnership and is negotiation-sensitive at this time."

The fall of the ISS is sure to be a spectacle on par with the international hubbub surrounding Skylab’s demise, but is still nearly a decade away and there is plenty of science still left to do. According to the January 2022 International Space Station Transition report:

The ISS is now entering its third and most productive decade of utilization, including research advancement, commercial value, and global partnership. The first decade of ISS was dedicated to assembly, and the second was devoted to research and technology development and learning how to conduct these activities most effectively in space. The third decade is one in which NASA aims to verify exploration and human research technologies to support deep space exploration, continue to return medical and environmental benefits to humanity, continue to demonstrate U.S. leadership in LEO through international partnerships, and lay the groundwork for a commercial future in LEO.

More than half of the experiments performed aboard the ISS nowadays are for non-NASA users, according to the report — including nearly two dozen commercial facilities — “hundreds of experiments from other government agencies, academia, and commercial users to return benefits to people and industry on the ground.” This influx of orbital commercial activity is expected — and being actively encouraged — to further increase over the next few years until humanity can collectively realize Jeff Bezos’ dream of building a low Earth orbit mixed-use business park.

Billionaire space barons want to build 'mixed-use business parks' in low Earth orbit

The Space Race is no longer a competition between the global superpowers of the world — at least not the nation-states that once vied to be first to the Moon. Today, low Earth orbit is the battleground for private conglomerates and the billionaires that helm them. With the Mir Space Station having deorbited in 2001 after 15 years of service and the ISS scheduled for retirement by the end of the decade, tomorrow’s space stations are very likely to be owned and operated by companies, not countries. In fact, the handover has already begun.

“We are not ready for what comes after the International Space Station,” then-NASA-administrator Jim Bridenstine explained at a hearing of the Senate Commerce Committee’s space subcommittee in October. “Building a space station takes a long time, especially when you’re doing it in a way that’s never been done before.”

NASA is on board with this transference, having drafted and published its Plan for Commercial LEO Development (CLD) in 2019, which calls for “a robust low-Earth orbiteconomy from which NASA can purchase services as one of many customers,” as part of the Human Exploration and Operations Mission Directorate at Johnson Space Center. The CLD plan lays out the agency’s necessary steps towards establishing a commercial space station ecosystem. These start with allowing private corporations “to purchase ISS resources,” i.e. lease space on the station for commercial activities, “allow companies to fly private astronauts to the ISS,” which SpaceX did last April, as well as initiating “a process for developing commercial LEO destinations” and working to “stimulate demand” for those destinations and services.


“NASA by its very nature is an exploration agency,” the space agency wrote in 2019. “We like to challenge the status quo and discover new things. We like to solve impossible problems and do amazing things. NASA also realizes that we need help and do not know everything. We can only accomplish amazing things by teamwork. NASA is reaching out to the US private sector to see if they can push the economic frontier into space.”

Space exploration has been a public-private cooperative effort since the founding days of NASA. For example, the expendable launch vehicles that put satellites into LEO from 1963 to 1982 — the Titan by Martin Marietta, the Atlas from General Dynamics, McDonnell Douglas’ Delta rockets, and the Scout from LTV Aerospace Corporation — were all built by private aerospace companies as federal contractors but operated by the US government. “The US government essentially served as the only provider of space launch services to the Western world,” wrote the FAA. This changed in the ‘70s when the European Space Agency developed its own ELV, the Ariane, and NASA swapped out its own rockets for the Space Shuttle program, which became the nation’s default satellite launch system.

Private space launches, like what SpaceX and Northrop Grumman do, got their start in the US way back in 1982 when Space Services sent up its Conestoga rocket prototype, really the repurposed second stage of a Minuteman missile. The size, number and severity of hoops the company had to jump through to get launch clearance was enough to convince members of congress to introduce legislation streamlining the process, eventually leading then-President Ronald Reagan to declare expanding private sector involvement in civil space launches to be “a national goal.” We’ve seen a number of notable milestones in the decades since including the launch of the Pegasus rocket operated by the Orbital Sciences Corporation in 1990, which was the first fully privately developed and air-based launch vehicle to reach space, Dennis Tito’s ride aboard a Soyuz rocket to the ISS in 2001 to become the Earth’s first space tourist, and the first SpaceX Dragon Capsule mission in 2010, the first time a privately-operated spacecraft was both launched into and recovered from orbit.

The idea of letting private space companies build, launch and operate their own stations grew largely from these earlier cooperative arrangements as well as from partnerships made via the International Space Station US National Laboratory, which is managed by the non-profit organization, the Center for Advancement of Science in Space.

“We leverage our core competencies, facilitate public-private partnerships, and utilize the platform capabilities and unique operating environment of the space station,” the ISSNL’s mission statement reads. ”We create demand, incubate in-space business ventures, provide access for and awareness of fundamental science and technological innovation, and promote science literacy of the future workforce.” More than 50 companies have already partnered with the ISSNL aboard the space station and the agency is currently working with 11 others to “install 14 commercial facilities on the station supporting research and development projects for NASA.”

Axiom's ISS-grown space station

Axiom Space

At the forefront of this commercialization effort is the Axiom Space corporation. The Houston-based company has been contracted by NASA to construct a habitat module for the ISS, install it aboard the station in September of 2024 and then detach the module for use as an independent space platform once the ISS is eventually deorbited by 2028.

“Axiom's work to develop a commercial destination in space is a critical step for NASA to meet its long-term needs for astronaut training, scientific research and technology demonstrations in low-Earth orbit,” NASA’s Bridenstine, said in a 2020 statement.

"We are transforming the way NASA works with industry to benefit the global economy and advance space exploration," he added. "It is a similar partnership that this year will return the capability of American astronauts to launch to the space station on American rockets from American soil."

Axiom has tapped Thales Alenia Space to build both the module itself and a meteoroid shield for the Axiom Node One (a pressurized segment that will connect the Axiom hub onto the ISS).

"The legacy of the International Space Station structure is one of safety and reliability despite huge technical complexity," Axiom Space CEO, Michael Suffredini, said in a 2020 statement. "We are thrilled to combine Axiom's human spaceflight expertise with Thales Alenia Space's experience to build the next stage of human settlement in low Earth orbit from a foundation that is tried and tested."

Axiom has also struck a deal with SpaceX to ferry four “Axionauts” — yes, that’s really what they’re calling them — up to the ISS to train for life in microgravity. The 8-day mission, dubbed Ax-1, was supposed to be led by former NASA astronaut Michael Lopez-Alegria, who would be joined by a trio of space tourists, each of whom shelled out $55 million to ride along. The trip was originally slated to take place in February, however, it was repeatedly delayed due to “additional spacecraft preparations and space station traffic” and is currently scheduled to take place on March 30th. The company is already at work on missions Ax-2 through -4 and has reserved a set of Dragon capsules, though the crew manifests have not yet been finalized.

In addition to the crew habitat, Axiom is building a secondary commercial capsule for Space Entertainment Enterprise (SEE), a startup co-producing Tom Cruise’s latest joint which will be shot at least partially in space later this year. The SEE-1 is scheduled for installation in December, 2024 and will host both a production studio and — somehow — a sports arena as well. Bring on the Battle Rooms.

Nanoracks’ Starlab


While Axiom Space is trying to bud its orbital platform from the ISS like a polyp, space service company Nanoracks is working to build a free-flying station of its own, with help from Voyager Space and Lockheed Martin, as well as a $160 million CLD contract from NASA. That contract runs through 2025 and “will be supplemented with customer pre-buy opportunities and public-private partnerships,” per a recent Lockheed press release.

Nanoracks is already deeply involved in commercial ventures to, from and on the ISS. Founded in 2009, the company has delivered some 1,300 research payloads and small satellites to the station and currently rents space for research modules aboard its Nanoracks External Platform on the outside of the ISS. Its wide-bore Bishop airlock was the first permanent commercial addition to the ISS.

The company is developing a line of smaller self-contained orbital platforms, dubbed Outposts, which could serve a variety of purposes from refueling stations for satellite constellations, to cubesat launchers and advanced technology testbeds to hydroponic greenhouses. The first iteration is expected to be launched by 2024.

The Starlab itself, which should be ready for business by 2027, will consist of an inflatable 340 cubic meter habitat built by Northrop (similar to the Bigelow Expandable Activity Module, or BEAM, that was demonstrated on the ISS in 2016) that can accommodate up to four crew members simultaneously. Four solar panels will generate 60 kW of power for the station to use.

With just under half the usable interior space as the ISS, Starlab’s operations will be centered around its cutting-edge George Washington Carver (GWC) Science Park which includes a biology lab space, plant habitation lab, materials research lab and an unstructured workbench area enabling the station to offer services ranging from fundamental research and astronaut training to space tourism. However, tourists will take a backseat to scientific endeavors aboard the station. “Space tourism is what captures the headlines, but to have a sustainable business model, you really do need to move beyond that,” Nanoracks CEO Jeffrey Manber told TechCrunch last October.

Blue Origin’s Orbital Reef

Blue Origin

With the “pay NASA to pay us to ferry Artemis gear to the moon” plan having been thoroughly imploded by the US federal court system, Jeff Bezos’ Blue Origin has set its sights on a goal slightly closer to Earth. The space launch and tourism company has partnered with Sierra Space to build, launch and operate a "mixed-use business park" in space, dubbed Orbital Reef.

The 830 cubic meter structure is still in its early planning stages, having garnered a $130 million Space Act contract from NASA last December for its development, and isn’t expected to launch until at least the second half of the 2020s. Few other details have yet been confirmed.

"Now, anyone can establish an address in orbit," Blue Origin declared last October when unveiling the project. "Orbital Reef expands access, lowers the cost and provides everything needed to help you operate your business in space." This from the company that got $28 million for a single seat aboard last year’s inaugural New Shepard flight.

Northrop Grumman’s Cygnus-based space station


NASA’s third Space Act agreement recipient from last December is defender contractor Northrop Grumman, which plans to repurpose one of its existing Cygnus spacecraft for use as an orbital station.

Like Orbital Reef, Northrop’s as-of-yet unnamed design is still in its earliest stages of development, though the company does expect the new station to accommodate up to four permanent crew members once it does initiate operations and could at least double that number as the station is expanded throughout its estimated 15-year service life.

Under the terms of the $125 million agreement, "the Northrop Grumman team will deliver a free-flying space station design that is focused on commercial operations to meet the demands of an expanding LEO market," Steve Krein, vice president of civil and commercial space at Northrop Grumman, said in a statement last December. "Our station will enable a smooth transition from International Space Station-based LEO missions to sustainable commercial-based missions where NASA does not bear all the costs, but serves as one of many customers."

Of course, the US and its commercial constituents are far from the only parties interested in colonizing LEO for business interests. China launched the Tianhe core module of its new 3-crew member Tiangong space station into orbit this past April with the remaining Experiment Modules and separate space telescope going up between this year and 2024. Similarly, India’s space agency is developing a station of its own with plans to launch it by the end of the decade, following the country’s upcoming Gaganyaan mission, the first crewed orbital spacecraft to launch as part of the Indian Human Spaceflight Programme.

These propositions are only the start of humanity’s expansion into the stars from low Earth orbit, to the Lunar Gateway, to Mars and beyond. But the question isn’t so much of when and how we’ll do so, but rather, who will be able to afford to?

NASA backs Blue Origin’s Orbital Reef space station

Following October's news that Jeff Bezos' Blue Origin spaceflight company planned to build its own commercial space station in low Earth orbit, NASA announced on Thursday it has selected the program for funding through a Space Act Agreement to further develop the the station's design. The funding is part of NASA’s Commercial LEO Development program, which aims to "develop a robust commercial space economy in LEO, including supporting the development of commercially owned and operated LEO destinations." 

Blue Origin

“We are pleased that NASA supports the development of Orbital Reef, a revolutionary approach to making Earth orbit more accessible to diverse customers and industries,” Brent Sherwood, Senior Vice President of Advanced Development Programs for Blue Origin, said in a prepared statement. The station would be an orbital "mixed-use space business park" that would offer any number of turnkey services as well as reduced operational costs for burgeoning low-g industries "in addition to meeting the ISS partners’ needs." 

Blue Origin is partnering with Sierra Space in this project with the former focusing on the architecture and infrastructure of the station — everything from its design and construction to managing lift logistics using the New Glenn heavy launch system — while the latter is tasked with developing the station's LIFE (Large Integrated Flexible Environment). Boeing is also helping out, designing the operations-maintenance-science module and leveraging its Starliner crew capsule. Genesis Engineering Solutions is involved as well. It's working on a single person spacecraft that tourists and employees alike will be able to putter around in. 

Thursday's announcement, ironically, comes a the end of a year in which Blue Origin protested NASA's “fundamentally unfair” decision to award a lunar lander contract to rival SpaceX to the GAO, which quickly dismissed the claims. Blue Origin then sued NASA — literally, sued NASA —"in an attempt to remedy the flaws in the acquisition process found in NASA's Human Landing System," a spokesperson for Blue Origin told Engadget in August. The company subsequently lost that suit as well but, hopefully, Thursday's deal will serve as a balm for Bezos' critically wounded ego.

Northrop Grumman

The Orbital Reef team hopes to have its first modules in orbit by the end of the decade with further expansions happening throughout the 2030s. But Orbital Reef isn't the only egg in NASA's commercial LEO basket. Northrop Grumman announced on Thursday that it too had signed a Space Act Agreement — to the tune of $126 million — to design a "free flying" space station that will be a permanent presence in LEO for at least 15 years.

"Our station will enable a smooth transition from International Space Station-based LEO missions to sustainable commercial-based missions where NASA does not bear all the costs, but serves as one of many customers,” Steve Krein, Northrop Grumman's vice president of civil and commercial space, said in a statement. The company plans to leverage its existing Cygnus spacecraft, its Mission Extension Vehicle (MEV) and its Habitation and Logistics Outpost (HALO), as the basis for the station's design. 

As part of its agreement with NASA, these development proposals will have to account for every aspect of the station's "commercialization, operations and capabilities," according to Northrop Grumman, "as well as space station requirements, mission success criteria, risk assessments, key technical and market analysis requirements, and preliminary design activities."

Surprise Soyuz thruster firing tilted and turned the ISS

The astronauts and cosmonauts aboard the International Space Station had to initiate emergency protocols after the spacecraft tilted and turned by 57 degrees on Friday. All is well now, but the Roscosmos and NASA ground teams had to spring to action and alert their personnel in space after noticing the change in orientation. According to The New York Times, the incident happened while cosmonaut Oleg Novitsky was testing the engines aboard the Soyuz MS-18 spacecraft that's currently docked with the station. 

NASA spokesperson Leah Cheshier told the publication that "the thruster firing unexpectedly continued" when the engine testing was scheduled to end. By 5:13 AM Eastern time, the ISS lost control of its orbital positioning. Russian controllers in Moscow immediately told Novitsky that the station turned 57 degrees, while NASA's mission control in Houston told its astronauts to begin emergency procedures. Flight controllers were able to regain control of the station around 30 minutes later. The Soyuz spacecraft that caused the incident is expected to fly a Russian fillm crew — that same one that flew to the ISS to shoot the first feature film there earlier this month — back to Earth.

"During the Soyuz MS-18 engines testing, the station’s orientation was impacted. As a result, the International Space Station orientation was temporarily changed. The station’s orientation was swiftly recovered due to the actions of the ISS Russian Segment Chief Operating Control Group specialists. The station and the crew are in no danger," Roscosmos said in its announcement.

As The Times notes, this is the second such emergency on the station. Back in July, the thrusters on Russia's Nauka module fired "inadvertently and unexpectedly" causing the ISS to tilt by about 45 degrees. At the time, NASA spokesperson Rob Navias said the ISS lost "attitude control," which is also what happened in this case, and that the event was quite rare.

My Life in the Connector Zoo

“The great thing about standards is that there are so many to choose from.” Truer words were never spoken, and this goes double for the hobbyist world of hardware hacking. It seems that every module, every company, and every individual hacker has a favorite way of putting the same pins in a row.

We have an entire drawer full of adapters that just go from one pinout to another, or one programmer to many different target boards. We’ll be the first to admit that it’s often our own darn fault — we decided to swap the reset and ground lines because it was convenient for one design, and now we have two adapters. But imagine a world where there was only a handful of distinct pinouts — that drawer would be only half full and many projects would simply snap together. “You may say I’m a dreamer…”

This article is about connectors and standards. We’ll try not to whine and complain, although we will editorialize. We’re going to work through some of the design tradeoffs and requirements, and maybe you’ll even find that there’s already a standard pinout that’s “close enough” for your next project. And if you’ve got a frequently used pinout or use case that we’ve missed, we encourage you to share the connector pinouts in the comments, along with its pros and cons. Let’s see if we can’t make sense of this mess.


The de-facto standard for a hacker’s TTL serial pinout is definitely the layout that FTDI uses for their USB/TTL serial cables. Said cable is just so handy to have on hand that you’d be silly to use any other pinout for the job. And the good news is that the rest of the world has basically joined in. From the Chinese “Pro Mini” cloneduinos to the Hackaday Edition Huzzah ESP8266 board, and from Adafruit’s FTDI Friend to Modern Device’s USB-BUB, almost everyone uses this pinout. A victory for the common man!

There is one slight point of contention, however, and that’s whether pin 6 is DTR or RTS#. We never use either, so we couldn’t care less, but if you’re counting on your programmer sending the DTR signal to enter programming mode on the device (we’re looking at you Arduino!) then you’ll want DTR on pin 6, and the original FTDI cable, ironically, has the “wrong” pinout. Perhaps that’s why Sparkfun avoided the whole debacle and went their own way, breaking out every signal off the FTDI chip into their own unique configuration.

If you’re only going to break out TTL serial lines, you’d be a fool to use any other pinout.

Modules and Other Communications

Unlike the case with simple serial, connecting various kinds of modules to mainboards is a difficult problem. Creating a single pinout or connector specification for many potential protocols or arbitrary signals is a Herculean task. Surprisingly, it’s been done a few times over. Here are some notables.


Digilent makes a wide range of FPGA demo boards, and they needed an in-house standard pinout that they could use to plug into various add-on peripheral modules that they sell. Thus Pmod was born. It has since become a full-fledged, and trademarked, open standard that you can use in your designs. Here’s the PDF version of the specification for you to print out, so you know they mean business.

There are a few aspects of Pmod that we think are particularly clever. First, the number of pins involved is “just right” at six, and it’s easily expandable. They use standard 0.1″ pitch pins and headers. Two lines carry power and ground, leaving four free pins for SPI, UART, or whatever else. The specification is that all power and signal voltages are 3.3 V because they’re designed for FPGAs after all. You can mix and match if you know what you’re doing, but they won’t let you call it Pmod(tm).

Eric Brombaugh’s iceRadio FPGA SDR, plugged together with Pmods

If you need more than four signals, there’s a twelve-pin version which is just two six-pin Pmods stacked into a double-row header. The extra power and ground are redundant, but it makes a twelve-pin output very flexible, because nothing stops it from being used as two sixes. The standard also says that the twelve-pin headers are to be spaced at 0.9″ center-to-center, so you can even connect two of them together when you need sixteen board-to-board signal connections. We like the modularity and expandability.

Pmod connectors are multi-protocol, but for each protocol there is a single pinout. So there’s an SPI Pmod and an I2C Pmod, and the pins are always in the same place. There isn’t a Pmod standard for every conceivable application, of course, so there’s a GPIO pinout that gives you free rein over what goes where. We think that it would be nice if some additional notable protocols (I2S? one-wire? servos? analog stereo audio?) were included in the specs, but the community can also handle these lower-level details.

In our eyes, Pmod is nearly perfect. It uses cheap hardware, is easily expandable, and the smallest incarnations are small enough to fit on all four sides of a one-inch-square board. If you’re willing to pay the brand-name premium, Digilent makes an incredible range of modules. We want to see more hackers outside of the FPGA scene get on it.


What Digilent is to development boards in the US, MikroElektronika is in Europe. While Pmod aims to be capable of doing anything, Mikro-E’s mikroBUS connector wants to do everything, which is to say it has I2C, SPI, UART, two voltages, and even a few extra signals all on the same pinout. Physically, it’s two single rows of eight pins, spaced 0.9″ apart side-to-side, which means it fits into a breadboard nicely. Here’s the spec in PDF.

The tradeoff here, relative to Pmod, is that a lot of pins go unused on any given design. With (only) one “analog” channel, you wouldn’t choose mikroBUS to send stereo audio, whereas nothing stops you from calling the Pmod’s GPIO lines analog and sending four channels of sound. But that mikroBUS gains is fool-proofness. (Well, they could have also made it asymmetric…) There’s no chance of a newbie plugging an SPI module in where an I2C module is expected and scratching their heads. With mikroBus, it should just work.

Microchip has added a mikroBus port to their Curiosity boards, and MikroElektronika makes a ton of modules. If your audience consists of beginners, and one footprint for all protocols, it’s worth considering.

Seeed’s Grove

Meanwhile in China, Seeed Studios makes open-source modules, and makes them cheap. Their Grove connector uses only four pins, with power and ground among them. The have standard pinouts for UART, I2C, and for servo motors. Sensors and other analog peripherals are allocated one “primary” pin and one “secondary” and it’s assumed that you know what you’re doing. The idea behind their system is that you add a shield to your microcontroller board, and they break out the relevant pins into these four-pin Grove headers.

This is great for small things and I2C devices, which is Seeed’s catalog, but there just aren’t enough signal pins to run SPI or an analog RGB LED, for instance. But because of the small number of pins, they use very inexpensive polarized cables and shrouds that you can’t plug in the wrong way, and that take up relatively little board space. That’s Grove’s design trade-off.

Servo Motor control

One of these things is not like the others…

Hobby servo motors need three wires: voltage, ground, and a signal to tell them where to point. There are three distinct ways to arrange these wires, but Futaba, HiTec, Tower, GWS, and JR servos all chose to put them in SVG (or GVS) order, and there’s no reason to buck the trend. (Airtronics, what were you thinking?!)

SVG is also a handy pinout to use for all sorts of one-signal sensors or actuators where space is a premium, and we’ve seen this in a few designs (here and here, for instance). But we’re torn. Relative to the Grove, for instance, you’re just saving one pin. Even the Pmod would work with only three pins’ overhead. Is that worth complicating your life with another pinout? If you need a lot of powered one-signal devices, or servos, it probably is, and you can hardly beat SVG or GVS, whichever way you look at it.


Viewed in the light of any of the other module interconnection systems, the Arduino is the worst of all worlds. It’s monolithic like mikroBUS, but it’s gigantic — you have to build a 55×73 mm board and accommodate 30 pins and pass-throughs if you’d like it to be stackable. The pins have a funny spacing (that gap!), that doesn’t fit any normal protoboard. Nobody goes through the trouble of building a shield just for an I2C connection. No wonder most Arduino projects look like a breadboard hedgehog. About the only good thing we can say about it is that it’s hard to plug one in backwards.

There’s also the tiny little factor that there’s a million Arduino shields out there, a huge community built around them, and widespread support for them. Which turns out to trump all of the reasonable design concerns. (Shakes head.)


Of course, there are other very specific pinouts that one might encounter, like the old ESP-01 module, or the XBee, or the nRF24. Adapting modules to fit boards is always going to be a pain, because the manufacturers will pick whatever suits them on that day. Programmer pinouts for specific microcontrollers are a similar story, as is JTAG, which is a beautiful standard with a dogs’ breakfast of pinout possibilities. (We could do a whole column!)

Faced with this inevitability, and the need for many one-off adapters, what can you do? What we do is buy a lot of those cheap “Dupont” female-to-female cables, get the connections working and tested, and then tape them permanently together and label them. It’s not as pretty as a dedicated PCB adapter, but it’s quick and easy and gets you moving on to what you wanted to do in the first place.

Wrapup and Recommendations

The goal of connectors, and their standards, is putting parts together. If you’re designing a sensor module with more than a couple components, and you want it to be maximally easy for yourself and others to hook up to whatever mainboard they’ve got, this is no easy task. The end result is a proliferation of translators, adapter boards, hats, shields, capes, or whatever else. We have a drawer and a half full, and we bet you do too.

Yes, I do see what I’m suggesting here. [source: xkcd 927]
We’d be happy to see the world settle on Pmod for most needs, honestly, and we’d even throw away our beloved FTDI serial pinout in the name of standardization (or make an adapter). We can also see the need for exceptions like SVG / servo connectors when small sensors or multiples are in play. There will always be the need for dedicated on-board connectors as well, of course. Nobody said hardware was easy.

What’s your solution to the ultimate connector conundrum? Are there important connector systems that we’ve left out? What are their design tradeoffs? How stoked would you be if things could just plug together? Let us know!

Thumbnail image courtesy of [Raspberry Pi Controller].

Filed under: Engineering, Hackaday Columns, hardware, rants

What’s New, ESP-32? Testing the Arduino Library

In case you missed it, the big news is that a minimal Arduino core is up and working on the ESP32. There’s still lots left to do, but the core functionality — GPIO, UART, SPI, I2C, and WiFi — are all up and ready to be tested out. Installing the library is as easy as checking out the code from GitHub into your Arduino install, so that’s exactly what I did.

I then spent a couple days playing around with it. It’s a work in progress, but it’s getting to the point of being useful, and the codebase itself contains some hidden gems. Come on along and take a sneak peek.

The Core

An Arduino isn’t worth very much unless it can talk to the outside world, and making the familiar Arduino commands work with the ESP32’s peripheral hardware is the job of the core firmware. As of this writing, GPIO, WiFi, SPI and I2C were ready to test out. GPIO means basically digitalWrite() and digitalRead() and there’s not much to say — they work. WiFi is very similar to the ESP8266 version, and aside from getting the ESP32 onto our home WiFi network, I didn’t push it hard yet. When other libraries come online that use WiFi, I’ll give it a second look.


The SPI routines in the ESP32 Arduino port both work just fine. I tested it out by connecting a 25LC256 SPI EEPROM to the chip. The ESP’s extremely flexible hardware peripheral routing matrix allows it to assign the SPI functions to any pins, but the Arduino implementation is preset to a default pinout, so you just need to look it up, and hook up MOSI to MOSI and so on. As of now, it only uses one of the ESP32’s two free SPI units.

With SPI, some of the weirdness of using Arduino on a powerful chip like the ESP32 start to poke through. To set the speed of the SPI peripheral, you can use the familiar SPI_CLOCK_DIV_XX macros, only they’re scaled up to match the ESP32’s faster CPU clock speed. The end result is that SPI_CLOCK_DIV_16 gives you a 1 MHz SPI bus on either the 16 MHz Uno or the 240 MHz ESP32, which is probably what you want for compatibility with old code. But 240 divided by 16 is not 1. In retrospect, the macros would be better defined in terms of the desired frequency rather than the division factor, but you can’t go back in time.

There were also two extra definitions that I had to add to the program to make it run, but they’ve both been streamlined into the mainline in the last eighteen hours. That’s the deal with quickly evolving, openly developed software. One day you write that the macro MSBFIRST isn’t defined, and before you can go to press, it’s defined right there in Arduino.h. Great stuff!

I2C: The Wire

The I2C (“Wire”) library has also gotten the ESP32 treatment, and worked just as it should with an LM75 temperature sensor. This is my standard I2C test device, because it lets you read a few registers by default, but you can also send the sensor a few configuration options and read them back out. It’s not a particularly demanding device, but when it works you know the basics are working. And it did.

The ESP’s dedicated I2C pins are on GPIO 21 and 22 for data and clock respectively. Some I2C implementations will use the microcontroller’s pullup resistors to pull the I2C bus lines high, so I tested that out by pulling the 10 KOhm resistors out. The ESP stopped getting data back instantly, so that answers that. Don’t forget your pullup resistors on the I2C lines and all is well. Otherwise, it’s just connecting up two wires, double-checking the I2C device address, and reading in the data. That was easy.

External Libraries

More than half of the reason to use Arduino is the wide range of external, add-on libraries that make interfacing with all sorts of hardware easy and painless. Many of these libraries are built strictly on top of the Arduino core, and should “just work”. Of course, when you’re actually coding this close to the hardware, nothing is going to be as portable as it is a few layers of abstraction higher up on your desktop computer. Let’s go test this hypothesis out.

El Cheapo IL9341 TFT Display

Uno Lauging at ESP32

Since the SPI library works out of the box, the other various libraries that depend on it should as well, right? Well, kinda. I wasted an afternoon, and still failed. Why? I have a cheapo ILI9341 screen that only works with an old TFTLCD library, rather than with the nice Adafruit_ILI9341 libs. The former is so full of AVR-specific voodoo that it completely fails to compile, and is probably easier to re-write from scratch for the ESP32 than make work in its present form. The Adafruit library compiles fine, because it only depends on the SPI library, but it doesn’t work with my lousy screen.

Going repeatedly back and forth between these two libraries, my LCD experiment ended in tears and frustration: I couldn’t make either of them work. I scoped out the SPI data on a logic analyser, and it looked good, but it wasn’t drawing on the screen. At this point, a full line-by-line protocol analysis would have been needed, and that’s a few days worth of work. If I just wanted a running ILI9341 driver, I would go grab [Sprite_tm]’s NES emulator demo and use the one there, but it’s not Arduinified yet, so it’s out of bounds for the scope of this article.

DHT22 Humidity and Temperature Sensor

The Way It Should Work: Three Wires and Ten Lines of Code

Seeking a quick-and-dirty success, and beaten down by hours of hacking away for naught, I pulled a DHT22 sensor out of the eBay bin, and cloned Adafruit’s DHT library. Of course it didn’t compile straight out of the box, but there were only a couple of things that were wrong, and both turned out to be easily fixable.

ESP32’s Arduino didn’t have a microsecondsToClockCycles() function yet so I commented it out, multiplied by 240 MHz, and left a hard-coded constant in my code. This value was just used for a timeout anyway, so I wasn’t too worried. There are also some timing-critical code sections during which the Adafruit code uses an InterruptLock() function to globally enable and disable interrupts, but these functions weren’t yet implemented, so I just commented it all out and crossed my fingers.

After reassigning the data pin to one of the ESP32’s free ones (GPIO 27, FWIW), it compiled, uploaded, and ran just fine. I now know exactly how hot and humid it is up here in my office, but moreover have had a quick success with an Arduino external library, and my faith is restored.

Lessons from the Libraries

I suspect that these two examples are going to be representative of the ESP32-Arduino experience for a little while. Oddball hardware is going to take some time to get supported. Highly optimized libraries with cycle-correct timings or other microcontroller-architecture specific code in them will need to be ported over as well, despite being “Arduino” code. If you’re a code consumer, you’ll just have to wait while the wizards work their behind-the-scenes magic.

But there will also be a broad group of libraries that are written in a more-or-less device-independent way, and these should be easy enough to get working within fifteen minutes or so, as with the DHT sensor library. If you’re willing to compile, read the errors, and comment out or fix whatever shows up, some codebases will work in short order.

What’s Next? Turning Servos

Given that the Arduino-ESP32 port is brand new, indeed it’s still in progress, there is a lot of work for the community to do in getting it up to speed. Suppose that you need to drive a lot of servos, but the “Servo” library isn’t implemented yet. You’re an impatient coder. What to do? Get hacking!

The good news is that the Arduino-ESP32 libraries themselves are full of hints and examples for getting started. Open up the ESP32-specific directory that you cloned from GitHub. The usual *.cpp files provide the standard Arduino core functionality. The esp32-hal-xxx.h and esp32-hal-xxx.c files are chip-specific, and a tremendous help in taking advantage of the chip’s stranger options. For instance, esp32-hal-matrix.* gives you nice and easy access to the pin-routing matrix, which is a daunting task if you’re starting just from the datasheet.

Spot-On and Jitter-Free

But let’s get back to servos. The ESP32 chip has an intriguing hardware LED PWM peripheral that lets you assign up to sixteen channels to individual LEDS, specify the PWM frequency and bit-depth, and then control them by appropriately setting bits in hardware registers. If you think this would be hard to do by hand, you’d be right. The esp32-hal-ledc.* files provide helper functions to set up the hardware PWM generator, and with these libraries, getting a 16-bit LED fade in straight C or “Arduino” is easy. But our sights are set on servos.

To drive a hobby servo, one needs pulses between 1,000 and 2,000 microseconds each, repeated every twenty milliseconds or so. Setting the repetition rate to 50 Hz takes care of the first part, and each count is 20 ms / 65,635 ticks long, or roughly 0.3 microseconds. Setting the PWM width value to something between 3,300 and 6,500 generates pulses in the right ballpark, and my servo ran jitter-free (and a clean signal was confirmed on the oscilloscope). Here’s all it took:

#include "esp32-hal-ledc.h"
void setup() {
   ledcSetup(1, 50, 16); // channel 1, 50 Hz, 16-bit depth
   ledcAttachPin(22, 1);   // GPIO 22 on channel 1

void loop() {
   for (int i=3300 ; i < 6500 ; i=i+100){
    ledcWrite(1, i);       // sweep the servo

That wasn’t so hard, was it? It’s not “Arduino”-style — there’s no objects or classes or methods anywhere in sight — but thanks to a straightforward and well-written hardware abstraction layer, using the very complicated peripherals is made pretty simple. Kudos to [me-no-dev] for his work on the back-end here. The HAL inside the Arduino libraries is currently the best source of code examples on many of the chip’s more esoteric and interesting peripherals.


The short version of my dive into Arduino-esp32 is that there’s a lot here, even though it’s not done yet. Blinking LEDs and other simple GPIO is a given, and the core communication libraries that are already implemented worked for me: GPIO, WiFi, SPI, and I2C are up and running.

Non-core libraries are hit and miss. I suspect that a lot of them will work with just a little bit of tweaking. Others, especially those that are architecture-dependent, may not be worth the effort to port and will need to be re-written. The ESP32 has a bunch of interesting and innovative hardware peripherals onboard and there’s certainly no Arduino libraries written for them yet, but there’s some great HAL code hidden away in the Arduino-ESP32 codebase that’ll give you a head start. We could get lost in there for hours. Time to get hacking!

The ESP32 is still a new chip, but orders should be coming in soon. Have one? Want to see us put other libraries or languages through their paces? Let us know in the comments.

Filed under: Arduino Hacks, Engineering, Featured

Interview: NIcole Grimwood on Electronics (and Cake)

Nicole Grimwood is working towards a dual degree in engineering from Columbia University and liberal arts from Scripps College.

Read more on MAKE

The post Interview: NIcole Grimwood on Electronics (and Cake) appeared first on Make: DIY Projects, How-Tos, Electronics, Crafts and Ideas for Makers.