We are pleased to announce our second in the Project_ series. Project_InSight…following on from Project_Arthur aims to educate and inspire fans of space & technology and in the spirit of the Apollo event and its 2020 theme ‘Mission to Mars’ encourages you to discover and learn about the events theme.

Project_Insight gives you all you need to know about building a beautiful framed map of Mars that’s connected live to NASA’s martian spacecraft Insight. The spacecraft on Mars records this weather data every second of every martian day and sends it back to Earth where its displayed in the unashamedly old school scrolling LED matrix display.

We are going to use several sources of data and different types of software which we will talk you through on the project from start to finish that way we hope you learn as much as we did along the way.

Shopping List:

Raspberry PI Zero W

IKEA 23X23cm RIBBA Frame

Micro Dot full kit pHAT – Red

The laser map i’m going to presume you will get cut by a third party i paid £25 for my version from The Cornish Laser Cutting Company so i haven’t included the materials needed for that but they used 3mm laser birch ply from here 

The Map

We will take you through how we created the project from scratch as its the best way to learn how you can hack it for different uses. If your’e short of time you can find the finished files in the GIT repository

Our first step is the quest for data to create the map..i eventually found some GIS shapefiles that were created from Mars Contours (from NASA’s PIGPEN FTP repository) This data is from the Mars Orbiter Laser Altimeter, or MOLA, an instrument aboard the Mars Global Surveyor.

  1. Start with downloading QGIS an opensource GIS system so that we can inspect the data https://qgis.org/en/site/forusers/download.html
  2. Open the “contours_1km_smooth7x7box_simplify0.1_remove2kmLen.shp” file from the GIT repository and you should be presented with a lovely GIS map of Mars as below

3. Now we need to locate where the InSight Spacecraft is on the map so we can accurately display the position in the map frame. We know from NASA the lander is located at 4.502° N, 135.623° E, at an elevation of -2,613.426 meters with respect to the MOLA geoid, within Elysium Planitia. Elysium is a broad, flat, volcanic plain. The very flat, smooth landing site was chosen to minimize the effects that local variations would have on the seismic signals traveling through the ground. I had to reverse the co-ordinates to get the location to roughly align to NASA’s image below

4. I then changed the layer properties of the contour layer in QGIS to red and line thickness of 0.10000 to be suitable for laser cutting.

 

 

Pic credit – NASA

5.. The map was then exported to illustrator where i cropped the size of the map to 230mm x 230mm to fit inside the Ikea frame. I then sent the file over to the Cornish Laser Cutting Company to be cut.

Black and White version…i preferred the white version in the end that shows the contours better

6. Its really easy to take apart the IKEA frame and fit the map. Remove the back of the frame, the spacer and the glass(plastic) and replace with your laser cut map where the glass would go…then add the spacer back on top of that and sandwich it down with the backing board. Note the perfect pre machined cut for the cable outlet 🙂

Use some hot glue to secure the PI in the cutout. You’ll also have to sand out a bit of the ply to accept the soldered pins


Ideally use a long USB lead to power the PI

The PI and microdotpHat

7. So this bit is a little more tricky but hopefully ive made it easier for you after much trial and error. The first job is to solder the microdotpHat to your pi zero w. Dont be too daunted by this if you haven’t done too much soldering in the past like me. Please follow this excellent tutorial here that does a far better job explaining it than i could https://learn.pimoroni.com/tutorial/sandyj/assembling-micro-dot-phat – you could get a hammer header for the 40pin connection to the PI but really its not that hard and you’ll pick up a good new skill 🙂

Once you’ve soldered your microdotpHat onto your PI you will want to test the hardware by running some of the examples – again Pimoroni have written a great tutorial here https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-micro-dot-phat just follow the instructions carefully and you’ll be scrolling in no time. (One thing i found odd was that i couldn’t get the examples in the tutorial to work unless i ran them from the Pimoroni/microdotphat/examples directory which is created when you use the one line installer curl https://get.pimoroni.com/microdotphat | bash  i think it must be something to do with where the modules are located on the pi)

Assembled frame

Once you’ve got the examples working you know your soldering is good and we can move onto the next step.

8. I then created a new python file in the Pimoroni folder that would of been created on your pi called pi_code.py and copy and pasted the code below – please check the github for the latest version.

You’ll need to apply for a NASA API key here replace yours within the code where it says “YOURAPIKEY”

 

What the code does

The python scrip connects to the NASA API and looks for the latest sol day (martian day) downloads the maximum and minimum temperature data and delivers it to the microdotPhat to scroll across the display. This will update every 24hrs

Further development ideas

  • Add wind direction and speed
  • Display Earth time after each scroll
  • Light up the spacecraft position with an LED that is run from the onboard PI power LED, this will aid with visual confirmation when the PI boots up
  • Auto boot to the script when the PI is powered on to prevent going through SSH each time its powered up
Download on Github