NASA robot artist draws shapes with Raspberry Pi

By Russell Barnes. Posted

The NASA robot artists is a robotics arm project.

A hand reaches out to a shiny gold box emblazoned with the NASA logo. At the press of a button, the connected robotic arm springs into life, lowering a blue Sharpie pen onto a paper pad to draw the circular outline of the famous logo, then an inner ‘spacecraft orbit’ ellipse, before switching to a red pen to sketch the red chevron.

See also: NASA Boot Cuff Surface imager

This is the Advanced Robotic Manipulator System Tools and Resources – or ‘ARM’ for short – built and programmed by Dan Gribok, a robotics intern at NASA’s Goddard Space Flight Center within the Satellite Servicing Projects Division. Designed to be used at outreach events to educate the public in what NASA is doing with robots, the Pi-powered ARM is a versatile device that can also be controlled manually using an Xbox gamepad to pick up objects using a hook or grabber.

This project showcase was written by David Crookes and first appeared in The MagPi #64

NASA robotic Art for events

Dan tells us that the drawing ability came about from a need to have a constantly running demonstration at events, such as this year’s Awesome Con in Washington DC. “So we wanted a demo where you could just push a button, step back, and everyone could watch all at once. And you can also give away a sheet of paper at the end and have them say, ‘Hey, a robot drew this – how cool is that?’ ”

Asked about what ARM can draw, Dan says it depends on what he can program into it and what the hardware can actually replicate. He admits that the drawing action is a little jerky, which is due to the hardware itself: “There’s a lot of slop in the joints, a couple of degrees, and some slop in the other mechanisms, which makes it really hard to draw [smooth] curved lines.” However, since it understands positions and coordinates, “Any line that you can express as x and y coordinates, so virtually anything, you can program into it and it’ll just follow that over and over.”

The force of gravity is used to get the pen pressure right, as each Sharpie pen is held loosely in a tube. “We previously tried some other spring-like mechanisms, but we just settled on gravity drawing because it’s so much easier and it works perfectly fine.”

So, what’s in the shiny control box? Somewhat surprisingly, along with a PCA9685 I2C servo controller and other components, the ARM uses an original Raspberry Pi 1 Model B – as did the two previous versions of the project, which were based on OWI Edge robot manipulators. In autumn 2016, Dan was granted permission to upgrade the project’s robots: “I kept about half the internals of the control box and got completely new robot manipulators.”

While the hardware setup was relatively straightforward, the software took a lot longer. “The original robots were programmed in Python, but I noticed that we had performance issues, so we switched entirely to C++.” After getting basic robotic functionality working by spring 2017, Dan made improvements over the summer, including adding the drawing capability.

NASA robot arm: Quick Facts

  • It can draw any shape using x-y coordinates
  • Dan took around a year to refine the software
  • The arm can also be controlled manually
  • It’s powered by an original Pi 1 Model B
  • A PCA9685 board drives the arm’s servos
  • Build a drawing robot like NASA

Step-01: Manipulator arm

Dan replaced the four-axis OWI Edge arm of the earlier robots with a six-axis Sain Smart manipulator. It features four standard MG996 55g metal-gear servos and two SG90 servos.

Step-02: Control box

Inside the control box, a Pi 1 Model B is hooked up to a PCA9685 breakout board to drive the servos. Along with status LEDs and wiring, there’s a USB hub to supply power to both the Pi and the arm.

Step-03: Drawing mechanism

The tip of the arm rotates to lower one of two Sharpie pens for drawing. Each is held loosely in a tube so that the force of gravity provides enough pen pressure to mark the paper.

From The MagPi store


Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.