May 27, 2015

NASA Space App Challenger Runs Yocto on an Intel Edison-Based Nanosat

ScanSat-teamNASA has long had an interest in Linux and other open source technologies, and has used Linux in a variety of systems, including the R2 humanoid robot now at work at the International Space Station. With its International NASA Space App Challenge, the space agency is tapping into the maker gestalt to come up with new ideas, as well as inspire future space engineers. In this year's two-day Space App Challengehackathon, which ran April 10-11 in 133 cities around the world, NASA greeted participants with over 25 challenges split into Earth, Outer Space, Humans, and Robotics categories.

A number of projects used the Intel Edison computer-on-module in their designs, including the two highest scoring projects at the April 10 event in San Francisco -- Team ScanSat and Team AirOS. They both advanced to the global competition, but did not make the final list of winners. Both projects ran Yocto-based Linux code on the Edison's dual-core Intel Atom processor. Intel donated the modules to the event, and Intel's Grace Metri posted a report on the event with more details on both projects.

Intel's Wai Lun Poon, meanwhile, posted a blog entry highlighting the many Edison-based projects at the New York City event. These included a device that maps space debris (Team Kessel), a spacebase sensor platform (Team SpaceBase), a high-tech glove with heat sensors (Team FirstHand), and a drone for collecting temperature data on Mars (Team DEMS), among others.

Here, we take a closer look at the ScanSAT project, which developed a CubeSat satellite designed to launch from an interplanetary Dragon-sized spacecraft to do visual inspections of the craft and other objects of interest. In the next article we'll look at AirOS, the runner-up at the San Francisco event. AirOS is a sensor-laden, augmented reality headgear device for NASA ground inspection personnel, combining an Intel Edison with an Oculus Rift VR headset using Leap Motion APIs.

Building with Yocto

Team ScanSAT took on the Deep Space CamSat Challenge, which asked for designs for CubeSat nano-satellites stored in a larger spacecraft to support deep space missions. These "CamSats" would launch from the spacecraft during interesting events, such as a planetary flyby, orbit the ship, and take photos of the ship and nearby objects on a hypothetical mission to Mercury. The CamSat would then return to the spacecraft and dock for later reuse.

Team ScanSat's Anand Biradar, an aerospace engineer who had previously worked on CubeSats at Planet Labs, answered our questions about the project on behalf of his team members. These include Krishna Sadasivam, a Microsoft computer engineer; Sheen Kao, a mechanical engineer who had worked with CubeSats at Cal Poly; and Robert Chen, a computer scientist who had done remote sensing work at NASA/Jet Propulsion Laboratory.

The members had previously entered several other hackathons together, but had never worked with the Intel Edison. They did have some Arduino experience, however, which was all they needed.

"It was a huge plus that the Intel Edison came with an Arduino-compatible expansion board, with level shifters to support both 3.3v and 5v components," said Biradar. "This greatly expanded the number of peripherals we could integrate, given that the Edison itself only supports 1.8v on its I/O pins. We enjoyed the amount of control we had over the platform, being able to program behavior at a low level without having to use the Arduino IDE, which most of the teams used. This allowed for more advanced functionality, such as image processing."

Biradar also lauded the Edison for its support sensors such as accelerometers and gyroscopes, which he said were "crucial" for satellite control systems. Intel provided a Grove starter kit add-on to the Edison, with components including a Smart Relay and Base Shield that "allowed us to quickly prototype and build our project," said Biradar.

Biradar also liked working with Yocto-based Linux. "Yocto was great in that it worked right out of the box without the need for additional software tools," he said. "Setup consisted of simply plugging in a USB cable and logging in through the serial port USART. The package manager for Yocto had OpenCV-Python builds available, and the camera worked as soon as we plugged it in. A script made it a breeze to set up WiFi for remote access, and we started developing with the built-in vim editor in less than 10 minutes."

The design used a webcam as a stand-in for a GoPro camera, which were not available to them at the time. To develop the image processing functions, the team used an OpenCV Python binding.

"We first developed the functionality on our personal computers using our webcams, and were able to easily transfer the code over to the Edison for deployment without any changes," said Biradar. "The algorithm captured images from the perspective of the CubeSat, and ran it through several image processing techniques to pick out the largest red object in the image, which would ideally represent the docking port on the mothership."

The team established a virtual bounding box in the image to determine if the dock was within the target area. If it was too far to the left, a signal was sent to pivot the CubeSat to the left or vice versa. The signals were received by a reaction wheel mounted in the demonstration CubeSat, which was essentially a plastic lunchbox equipped with the camera, Edison, control components, a motor, and the reaction wheel.

"The prototype floated virtually frictionless on water," explained Biradar. "When the reaction wheel spun, the prototype pivoted in the opposite direction in order to orient itself to dock."

An Edison-Powered CubeSat

One of the key innovations in the design was in the docking and magnetic propulsion mechanisms that enabled the ScanSat to undock and re-dock with the main craft autonomously. 

"The CubeSat has one ion thruster, so it can only accelerate forwards," explained Biradar. "The repulsive force for undocking is applied by magnetic coils mounted on the mothership. We chose ion thrusters because they have minimal mass loss, and can be recharged while docked with the mothership. This allows it to be reused for a higher number of operational cycles than conventional thrusters."

Team ScanSat also chose a novel conical design for the craft. "The conical design allows for a more flexible angular approach by the CubeSat, and helps to avoid unneeded complexity in the docking mechanism," said Biradar.

According to Biradar, his team is planning to build a complete working prototype for control systems and image processing using the Edison. "We would love to see an Edison powered CubeSat in orbit." He added, however, that to fit into the 10 x 10 x 10cm CubeSat, ScanSat would require an even smaller footprint than the module's 35.5 x 25mm, while offering the same 3.3v and 5v level I/O.

Considering the rapid rate of miniaturization in the embedded board business these days, with the Edison, Intel's upcoming Quark-based Curie, and Samsung's ARM-based Artik, Team ScanSat's wish may come true sooner than it thinks.

Click Here!