Based on the IT journey of Michael Rickert

Raspberry pi near space satellite

Getting a Raspberry Pi to near space, Part 1

The Challenge:

  • Get a raspberry pi to near space
  • Have it take pretty pictures using the pi camera
  • Make sure it logs lots of interesting temp/humidity/gps/telemetry data
  • Get it back home safely


The Gear:

  • Raspberry pi model B
  • Raspberry pi camera
  • NEO-6M GPS
  • GY-86 attitude meter
  • DHT-11 humidity sensor
  • DS18B20 temp sensor
  • ESP8226 wifi OR hoperf RFM23BP 433Mhz
  • LCD 16×2 display
  • 2x 2600mah LiIon usb batteries
  • 300g weather balloon

A full kit breakdown including all prices/weights/purchase links can be found here

Getting started:

I prepped for this project by breaking down a list of project goals and listing their importance to the success of the project. Things like streaming pictures live were moved lower in the goal priority list while gps data and recoverable devices were moved much higher up. Whats the point of getting nice pictures of space if you can’t see them!

Project Goals Goal priority (1-5)
pictures from near space 5
telemetry data 5
recoverable payload 5
Telemetry data streamed live 3
pictures streamed live 2


After I had some clear goals set for the project, it was time to breadboard up the pi and get the initial code working:

Time to bring the pi up with the proper software packages:

#install raspbian using NOOBS
> sudo apt-get update && sudo apt-get upgrade
> sudo apt-get install python-dev libgtkmm-3.0-dev
> sudo apt-get install gpsd gpsd-clients python-gps
> sudo nano /boot/cmdline.txt
#remove the line: console=ttyAMA0,115200
> sudo nano /etc/inittab
#comment out the line ‘T0:23’
> sudo reboot
> sudo ln -s /dev/i2c-1 /dev/i2c-0
> \curl -sSL https://get.rvm.io | bash
> source /home/pi/.rvm/scripts/rvm
> rvmsudo rvm install ruby-2.2.0
> gem install rails
> ssh-keygen -t rsa -C “[email protected]
> ssh-agent -s && ssh-add ~/.ssh/id_rsa
> git clone [email protected]:slacker87/NearSpacePi.git
> cd NearSpacePi && bundle install
> cd dht11 && sudo python setup.py install
> cd .. && sudo chmod +x setup-i2c.sh && sudo setup-i2c.sh

The above steps are a quick and dirty rundown of prepping the raspberry pi with the proper drivers and ruby on rails so that it can interface with all of the pinned connections.

Tools like gpsd and python-gps were used to collect location data from the NEO-6M gps while setup-i2c was used for controlling the humidity and temperature sensors using bit-banging. Ruby/rails was used to collect all of the information in one place as well as display it in an easy to read format. Not everyone wants to view pitch/roll/yaw and gps coordinates as raw numbers like this!:



Rails and three.js were set up (full code source) to read the latest raw telemetry data and display it in a browser in real time as a 3d cube. More on that in a later post…


Part 1 wrap-up:

Part 1 is a quick high-level overview of the goals, parts, and basic pi configuration commands to get this project off the ground. In the next parts I’ll dive deeper into the actual code for the project as well as planning and eventually, launch!





Leave a Reply