Astro Pi Hardware
A Raspberry Pi computer is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. It’s capable of doing everything you’d expect a desktop computer to do, from browsing the internet and playing high-definition video, to making spreadsheets, word-processing, and playing games.
What’s more, the Raspberry Pi has the ability to interact with the outside world, and has been used in a wide array of digital maker projects, from music machines and parent detectors to weather stations and tweeting birdhouses with infra-red cameras. And for the first time, it will be used on the International Space Station this year!
The Raspberry Pi Model B+ will be used on the Astro Pi payload but you can use older models for your coding and testing for the Astro Pi competition!
What makes the Astro Pi so special is the Hardware Attached on Top board, called HAT for short. This board, as the name suggests, is attached on top of the Raspberry Pi computer via the 40 General Purpose Input Output (GPIO) pins which provide the data and power interface. This board has several integrated-circuit based sensors that can be used for many different types of experiments, applications, and even games. The HAT board includes:
- Temperature sensor
- Barometric pressure sensor
- Humidity sensor
- 8×8 RGB LED matrix display
- 5 button joystick
A gyroscope measures the orientation of an object. It can be quite difficult to visualise if you’ve never used one before. You may have seen one being used for a fairground ride though. The ride, an Aerotrim, takes only one person who is strapped in by their legs and arms. They sit inside three big metal rings which can independently rotate in relation to each other, the man usually says “Scream if you want to go faster!” and sets you going. You then go upside down, back to front and side to side all at the same time while screaming. This ride is a Gyroscope, it allows three degrees of movement. These are normally called:
- Pitch (up and down like a plane taking off and landing
- Yaw (left and right like steering a car)
- Roll (imagine barrel rolling a fighter jet)
The Astro Pi board has a very tiny Gyroscope built into it. In code you can ask for its pitch, roll and yaw values which are returned as angles between 0 and 360 degrees. You could use this to make your program react to changes in orientation / which way the Astro Pi is pointing (or rather which way the ISS is pointing since it will probably be fixed to a wall or table top while on board).
Consider the fact that, in space, the concept of up and down no longer apply when planning how you would use this sensor data.
An accelerometer measures the speed of movement of an object. At rest it will measure the direction and force of gravity but in motion it measures the direction and force of the acceleration as it moves. Because they can detect the direction of gravity accelerometers are often found in devices that need to know which way is down such as a mobile phone or tablet. When you turn the screen sideways the accelerometer detects the direction of gravity has changed and therefore changes the orientation of the screen. The Nintendo Wiimote uses accelerometers to detect the force and direction of your movement while playing Wii Sports, for example. It can tell if you’re doing a hard back-swing or a soft under-arm shot in the Tennis game.
The Astro Pi board also has an accelerometer built in and you can read its data as pitch, roll and yaw angles or as X, Y and Z raw numbers in your code. In space the accelerometer will always read zero because it’s in free fall however any movement will show up, it is also sensitive enough to detect when the station is under thrust. For example when the space station itself is doing an orbital correction manoeuvre or a debris avoidance manoeuvre.
A magnetometer is used to measure the strength and direction of a magnetic field. Most often they’re used to measure the Earth’s magnetic field in order to find which way North is. If your phone or tablet has a compass it will most probably be using a magnetometer to find North. They are also used to detect disturbances in the Earth’s magnetic field caused by anything magnetic or metallic. Airport scanners use them to detect the metal in concealed weapons for instance.
The Astro Pi board has a magnetometer built in too. The mag data comes as only one angle between 0 and 360 degrees in your code, a bit like just the yaw value from the previous two sensors, and shows the direction of geomagnetic North. On the surface of the Earth the magnetic field lines run flat across the surface which makes them ideal for finding the direction of North. You should easily be able to program a compass using the LED matrix. However the away further you are from the surface the more curved the magnetic field becomes. Consider that, up on the ISS, magnetic North might look like its pointing off out into space somewhere because the shape of the field is hugely curved up there. As the station orbits the Earth geomagnetic North will sway back and forth and this could be used as a way to count how many orbits have happened while your code is running.
A temperature sensor is used to measure hot and cold. It’s exactly like the thermometer that you would put in your mouth to take your own temperature. Except it’s an electronic one built into the Astro Pi board and reports the temperature as a number, in Celsius, to you in your code. The environment temperature on the ISS is carefully controlled and as such the ambient temperature will not change very much. You may be aware that warm air rises while cool air falls, this is because cool air is denser and heavier than warm air and is therefore pulled down by gravity. On the ISS this effect doesn’t happen because there is no gravity to pull the heavier air downwards. Air flow is an important issue on the station and it may be that you would detect different ambient temperatures in different parts of the station where the airflow is different.
Consider also that the temperature sensor may be measuring some heat coming from the Raspberry Pi itself as well as the ISS environment.
Barometric Pressure sensor
A pressure sensor (sometimes called a Barometer) measures the force exerted by tiny molecules of the air we breathe. Although air molecules are invisible they still have weight and take up space. There is a lot of empty space between air molecules and therefore they can be compressed to fit into a smaller space, this is what happens when you blow up a balloon. The air inside the balloon is slightly compressed and so the air molecules are pushing outwards on the elastic skin. This is why it stays inflated and feels firm when you squeeze it. Likewise if you suck all the air out of a plastic bottle you’re decreasing the pressure inside it and so the higher pressure on the outside crushes the bottle. Ever felt your ears pop when going up and down in a lift?
The Astro Pi board has an air pressure sensor built in and will report air pressure to you using either Pascals or Millibars in your code. Air pressure on the ISS is controlled and you should not expect to see it change very much.
A humidity sensor measures the amount of water vapour in the air. There are several ways to measure it but the most common is relative humidity. One of the main properties of air is that the hotter it is the more water vapour can be suspended within it. So relative humidity is a ratio, usually a percentage, between the actual amount of suspended water vapour to the maximum amount that could suspended for the current temperature. So 100% relative humidity would mean that the air is totally saturated with water vapour and cannot hold any more.
The Astro Pi board has a humidity sensor that will report relative humidity as a percentage to you in your code. It uses data from the temperature sensor to give you the correct value. Humidity on the ISS is carefully controlled by environmental systems so you can expect it to be quite low all the time (the air is very dry up there). However the sensor will be good enough to detect the water vapour in human breath so you might be able to use this data to detect the presence of the crew working near the Astro Pi.
8×8 RGB LED Matrix Display
This is the only real form of visual output that the Astro Pi computers will have up on the ISS. For a number of technical and safety reasons we are not allowed to plug the HDMI or Composite outputs of the Raspberry Pi into anything on the ISS since this would have necessitated a very lengthy certification process that we did not have time for.
LED stands for light emitting diode. Light emitting because it emits light (duh) and diode means that current can only flow through it in one direction. The matrix consists of 64 LEDs arranged in an eight by eight grid and each individual LED has a red, green and blue component that you can control in code.
For a single LED you can specify how much red, green and blue you want using numbers between 0 and 255. Using various combinations of red, green and blue for each LED you can create any colour or shade that you want.
It should allow you to create a basic display or status monitor for your competition entry, you can even play animations showing what your program is doing (this video went viral on the 10th of December 2014 and shows about an hours’ worth of programming).
Use of this matrix will be a unique way to display information about your program.
Visible light and Infra-red (Pi NoIR) Cameras
There will be two Astro Pi payloads sent to the International Space Station; one will have a visible light camera while the other is fitted with an infra-red camera. These are both five mega pixel cameras giving high quality still images and supporting a variety of video recording modes, just like those found in a normal mobile phone. You could program these cameras to record time lapse videos of the Earth spinning below or even recognise the faces of the crew when they float near the Astro Pi.
These cameras can also be used to detect the presence of radiation. When a high energy particle passes through the camera sensor it creates secondary particles that are detected as light. This produces a snow storm interference effect on the video output of the camera. An interesting programming exercise would be to write code to detect and quantify this so that a measurement of the level of radiation could be given. Schools may be able to use low powered calibrated isotopes to simulate this effect on the ground whereas natural background cosmic radiation could be observed on the station. You could even use the camera to tell if the station is on the light or dark side of the Earth by looking at luminosity in the captured image.
The Pi NoIR camera has identical technical properties to the standard camera however it has no infra-red filter meaning that it can also perceive the infra-red spectrum of light. The Pi NoIR also comes with a small plastic blue filter which allows you to use it to observe the chlorophyll production levels in green plants. A good estimation of how much photosynthesis is happening can be obtained by observing the colour through this filter and therefore the overall health of the plants. A technique pioneered by the NASA Landsat missions. Some really interesting Earth observation science could be done by pointing this camera out of the window on the ISS and seeing where green plants are most or least healthy.
5 button joystick
This is a standard direction pad, like the one on your console control pad, made up of five buttons for up, down, left, right and centre. You will be able to pick up events in your code when the joystick is moved and you could use them to allow a human user to control your program. Combine this with the LED matrix and you have the possibility to create a game for the ISS crew to play. Tetris, Pong and Snake come to mind but you could also use the joystick to make a reaction time game and use the data you capture to determine if the crew reactions are getting faster or slower over time?
Additional function buttons
A number of general purpose buttons will be available that you can program to do anything you choose since there will be no USB keyboard connected when on the ISS. Use these as part of a game or to allow further fine control of your program by the user. You will be able to receive events in your code in much the same way as with the joystick