Getting ready for take off with Astro Pi – Updated 10/5/2016 1

The Astro Pi project has seen two Raspberry Pi (model B+) computers fly up to the International Space Station (ISS) with ESA (European Space Agency) astronaut Tim Peake.

At the heart of the project is a board called the Sense HAT which is a scientific platform for exploration and experimentation. The Sense HAT comes with a series of sensors for use in your experiments. For example there is an accelerometer to measure G-force and acceleration, a magnetometer which can measure magnetic forces and be used as a compass. There is also a gyroscope to measure orientation and a temperature sensor which can measure the temperature and humidity of an area. Lastly we have a barometer which can be used to measure atmospheric pressure. These sensors are packed onto the Sense HAT along with a five way joystick, for input and an 8 x 8 grid of red, green, blue (RGB) light emitting diodes (LEDs) which can be used for basic data output.

The Sense HAT is a powerful platform for experimentation and that is why two of these boards are also present on the ISS, inside a very special enclosure.

The Astro Pi Flight Case has been carefully designed to meet the ESA’s exacting criteria. Made from a single block of aluminium the Astro Pi flight case is designed to safely enclose the Raspberry Pi, Sense HAT and Raspberry Pi Camera. The aluminium also acts as a heat sink to keep the devices cool.

The flight case is a thing of beauty, but alas it is rather expensive, so what if we could make our own case?

Thanks to Ryanteck, who offers a great on-demand 3D printing service, we had a case 3D printed and posted to our office makerspace where our maker in residence set to work.

Ryan has done an excellent job with the 3D printed parts and each part required only a small amount of preparation before being assembled. We used the official Raspberry Pi Foundation worksheets as our guide to assembling the parts ready for construction.

We built the unit to the exact specifications given in the guide, this included sourcing an 11mm male to female spacer. The tolerances inside of the case are exacting and require this level of attention to detail.

We have a stock of the APEM switches used for input on the flight case, so we used a set of these for our “Hero” unit, a term used to describe a show piece / prop which has an extensive level of detail. These switches are exquisite and are extremely robust, they have to be to survive on the ISS for an extended period.

We also tested a series of compatible switches and found that we have a more cost effective and similarly robust switch in stock.


We found these switches to be a great alternative to the APEM switches.

Work is still ongoing with our case, we need to work on a way to route the seven wires that are used for our switches, to reduce the chance of a short and ensure a good connection. These wires are broken out from the lower group of eight GPIO pins using a GPIO extension. Hopes are high that we can use an old 26 pin GPIO extension and then directly connect to these lower GPIO pins.

This is a great project to undertake and the team are very excited to complete it.

Finishing the project 10/5/2016

Our Maker In Residence, Les, completed the build today and has made a few observations and adjustments to the overall build process.


The Sense HAT only uses a few GPIO pins, namely 5V, GND, SDA and SCL, which are used for I2C communication with the components on the Sense HAT. So to save a little space on the GPIO, more on which later, we used a 26 pin header extension rather than the full 40 pin.

By using the 26 pin GPIO extension we leave 14 GPIO pins free, enabling us to connect the APEM switches to them using jumper wire and secure them in place with the Sense HAT board. The only downside to connecting this way is that we lose the connecting pins that link the Raspberry Pi to the EEPROM, but we can hack our way around this issue.

Part of the installation process, detailed via the Raspberry Pi Foundation’s worksheet, Section 7 “Test The Buttons” requires us to make changes to the config.txt file found in the /boot/ directory. Follow those steps to the letter but as a last line add the following


Hat tip to Michael Horne for that little gem!

This will enable the Sense HAT to be detected by the Raspberry Pi.

To ensure that we had no short circuits with our wiring we chose to use heat shrink as a means to secure and protect the wires. So off to the workshop we went and a few minutes later we had some lovely secure wires.

The finished project!

We finished the project by tying up the loose wires into a bunch using twist ties and then screwing the case together.

Once it was put together we ran the test code to ensure that everything was still working as it had previously.


After plenty of work and lots of fun we finally had our own working Astro Pi case. To celebrate this success we wrote a simple script.


  • A – Would take a photo using PiCamera.
  • B – Would record 5 seconds of video, again with the PiCamera.
  • Up – Takes a temperature reading and scrolls it across the LED matrix.
  • Down – Displays the CPC text and rotates across the LED matrix.
  • Left – Scrolls the CPC logo.
  • Right – Shows a Space Invader!

We had so much fun building this project, and we are working on a special kit full of parts to help you build your own version! Stay tuned for more info.

One thought on “Getting ready for take off with Astro Pi – Updated 10/5/2016

Comments are closed.