DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Curiosity's Brain

In the early hours (UK time) of Monday August 6th, an astounding feat of engineering came to a heart-stopping climax. After travelling millions of miles through space the Mars Science Laboratory, AKA Curiosity rover entered the Martian atmosphere and began its descent. NASA had already hyped up this phase of the mission with a video called ‘7 minutes of terror’. Of course, this being an unmanned probe meant that the ‘terror’ was limited to the engineers back on earth wondering if their employment would end in the next seven minutes! I watched the live feed from the JPL control room on NASA TV while everybody there listened to the reports from the ‘CapCom’ interpreting the telemetry coming back from Mars, delayed by 20 minutes. I guess it was that communications delay that made it all the more nerve-wracking because by the time telemetry arrived confirming the start of descent you knew the lander had either landed successfully or was spread all over the Gale crater.

 

If I’m honest, I didn’t really believe that such a complicated landing procedure would work, involving friction braking, a parachute opening with a 9g snatch, the dropping of ballast weights, eight retro rockets firing down to the last few metres where the spacecraft hovered as the rover was lowered down on nylon ropes. Finally the ropes were cut and the now-redundant descent stage flew off to crash some distance away. Unlike the Apollo moon landers of 50 years ago, all these operations including the firing of dozens of explosive bolts and umbilical cable shears, were performed autonomously by the spacecraft computer. The communications delay precluded any human intervention, the latter proving vital on Apollo 11 in 1969 when the LEM computer was overloaded.

How has the computing technology used in spacecraft changed over the last 50 years? Back in the 1960’s, the Apollo Guidance Computer was ‘custom-made’ and didn’t have enough non-volatile memory to contain all the functions at each stage of the mission. In those days the reason for low performance was simply that integrated circuit technology wasn’t sufficiently advanced to provide high speed and high capacity in a small enough package. The Apollo computer was cutting-edge in terms of its processing power to size ratio.

A modern spacecraft computer might be expected to use the newest technology and have the performance figures we expect from a powerful gaming PC. Such a machine could easily cope with all the real-time control systems on board. But could it cope with a space environment:  radiation, acceleration from 0 to 10g and wide temperature fluctuations? Radiation is the biggest hazard causing ‘bit flipping’. In other words, cosmic particles impacting the chips and corrupting memory or causing errors in calculations. This article in Wired not only describes these effects in the context of spacecraft, but also points out that bit flipping is becoming a major problem here on Earth.  There are ‘super-computers’ that suffer so badly from bit flipping that only Error Correction Coding (ECC) of memory keeps them functioning reliably. The problem is that active components of chips are getting smaller and more susceptible to the cosmic rays that make it through our atmosphere. Part of the solution for spacecraft is to use ‘old’ technology featuring much larger active components in the silicon which aren’t so readily flipped or even destroyed. The processor device in Curiosity is a RAD 750 developed by BAE Systems. This chip is derived from the PowerPC  750 processor that powered Apple Computers in the late 1990’s. In fact software written for one will run on the other! The silicon of the RAD 750 has been designed so that it can withstand massive amounts of radiation that would fry the PowerPC version. There is a price for this ruggedness though: a PowerPC motherboard would probably cost a few hundred dollars. The RAD 750 will set you back about $200,000. In terms of its processing capability it’s true that a Raspberry Pi is more powerful than the computer on Curiosity. Unfortunately the former would probably have suffered permanent damage before it even left Earth orbit. Mind you, a sizeable part of the RAD 750 is heavily gold-plated so at least it looks the part! Curiosity has two of these processor modules, the second able to be switched in should something go irretrievably wrong with the primary.

Just as the processor might be considered obsolescent but reliable, the same applies to the on board memory: no terabyte hard disks here. Just as the Apollo astronauts had to key in new programs when required, NASA have had to upload new firmware replacing the flight code with exploration code. Curiosity’s computer runs a Real-Time Operating System (RTOS), VxWorks which has been around for years. Hence even the software has a vintage feel about it to ensure reliable operation. This has led to some suggestions that Curiosity could be ‘hacked’. Of course you would need either your own Deep Space Network, or to get control of NASA’s. The latter has happened…

Can the engineer with more down-to-Earth applications make use of ruggedized processing with ECC and redundancy? The answer is of course yes and what’s more, new generations of microcontrollers from a number of manufacturers feature ECC, self-testing and redundant cores for safety applications. I talked about the Texas Instruments Hercules range in a DesignSpark blog post last year. Freescale are now launching their very similar PXS Series. As for software, there are a number of RTOS available including VxWorks. A no-cost option is FreeRTOS available for a large range of platforms. Freescale bundle MQX RTOS with their microcontroller development kits. One of the Texas Instruments Stellaris range of Cortex-M3 devices has SafeRTOS in on-board ROM. Linux is often quoted as being suitable for real time operation. If your application does not require accurate timing and low interrupt latency then yes, it can be used. Otherwise you will need a version that has been optimized as an RTOS and there will be programming constraints.

If you're stuck for something to do, follow my posts on Twitter. I link to interesting new electronics projects, components and development kits (some of them available from my employer!) and retweet posts I spot about robot, space exploration and other issues.

Engineer, PhD, lecturer, freelance technical writer, blogger & tweeter interested in robots, AI, planetary explorers and all things electronic. STEM ambassador. Designed, built and programmed my first microcomputer in 1976. Still learning, still building, still coding today.

16 Aug 2012, 9:32