StratoPi - Raspberry Pi Based Stratospheric Balloon

by josamue in Circuits > Raspberry Pi

9 Views, 1 Favorites, 0 Comments

StratoPi - Raspberry Pi Based Stratospheric Balloon

Wetterballon_web_6.jpg

Stratospheric dataloggers are often expensive and offer limited functionality — not to mention the additional weight of carrying separate action cameras for images and video. To solve this, I set out to build my own lightweight, multifunctional and expandable datalogger.

By combining a custom-designed PCB with a Raspberry Pi 3, I created a system capable of not only logging sensor data directly to the Pi’s SD card but also capturing high-resolution images and recording videos — all without the need for bulky external cameras. This setup uses three Pi cameras along with a variety of sensors, providing a compact, efficient solution perfect for stratospheric missions.

In this Instructable, I'll walk you through the design, assembly, and setup of this versatile, all-in-one datalogging system.

Supplies

Custom PCB

Raspberry Pi 3/4/5 Model B


Used Sensors:

  1. MPU6050 Accelerometer
  2. DS1307 RTC
  3. AHT10/BMP180/BMP280 Temperature sensor for inside Data
  4. BME280 Pressure, Temperature and Humidity Sensor
  5. MS6803 Pressure Sensor (more precise for low pressure)
  6. DFRobot Ozone Sensor
  7. SCD41 CO2 Sensor
  8. DFRobot Geiger counter
  9. I2C PM-Sensor e.g. BMV080 or SPS30
  10. USB-Camera(s)
  11. Pi Camera

(You don't have to implement all these sensors, these are only suggestions, most other I2C sensors should work too.)

(For the sensors, that are directly plugged into the PCB, you might have to get breakout Boards, that have the same form factor)

Electronic components:

  1. Flatband wires (or any wires)
  2. JST-XH-Crimp-Connectors
  3. Pin sockets (2.54mm) + Raspberry Pi Stacking Header
  4. PCB-Spacers (M2, M2.5 or M3)

Tools:

  1. Soldering Iron
  2. JST-XH-Crimp Pliers
  3. 3D-Printer (optional)

Software:

  1. KiCAD
  2. Raspberry Pi Imager
  3. VSCode with the SSH extension (optional)

Other components required for a stratospheric balloon:

  1. Styrofoam Box like this
  2. White duct tape
  3. GPS-Tracker with SIM-Card
  4. Powerbank (5000 mAh should be enough)
  5. Weather Balloon
  6. Helium
  7. Parachute
  8. Cords

Order the PCB

Screenshot from 2025-04-28 18-43-47.png

First, download the PCB design files from my GitHub repository. If you want to customize the design to better suit your project, you can edit it using KiCAD, a free and open-source PCB design software.

Once you're happy with the design, you'll need to create what's called Gerber files — these are standard manufacturing files that PCB fabrication companies use to produce your board. KiCAD can easily generate Gerber files through its built-in export tools.

After generating the Gerber files, you can upload them to any PCB manufacturer to have your board made. (I personally chose Aisler because their service is very beginner-friendly — you can simply upload the .kicad_pcb file directly without needing to generate Gerber files manually.)

Assembly

PXL_20250426_212844918.jpg
Screenshot from 2025-04-28 18-41-18.png
PXL_20250426_212820824.jpg

Once your PCB arrives, you can start assembling the components:

  1. Soldering: Begin by soldering the pin sockets, headers, and JST connectors onto the PCB and onto the sensors. Take your time to ensure clean, solid joints for reliable connections.
  2. Crimping the Wires: Next, crimp the wires for your sensor connections. Keep in mind that the pinout of your sensors may not match exactly with the PCB layout — in some cases, you’ll need to arrange the cables crosswise to ensure proper alignment.
  3. Installing the Raspberry Pi: To connect the Raspberry Pi, install a stacking header between the PCB’s pin sockets and the Pi’s GPIO pins. This provides a secure, stable connection and ensures good electrical contact.
  4. Final Assembly: Finally, plug the sensors into the PCB and secure them and the Raspberry Pi using PCB spacers. This helps prevent strain on the connectors and keeps the setup mechanically stable, especially during flight.
  5. Now it's time to install the PCB inside your enclosure. You have a few options for securing it:
  6. Simple Methods: You can use duct tape or toothpicks to hold the PCB in place if you need a quick and easy solution.
  7. 3D-Printed Mounts: For a more secure and professional setup, you can 3D-print the stand I designed. These feet are designed to stick through the bottom of your box and include mounting points for the PCB. (You'll need M2 threaded inserts to fasten the PCB properly.) Depending on the dimensions of your enclosure, you may need to slightly modify the CAD files or use spacers to ensure the mounting threads extend fully through the floor of the box.
  8. Finally, attach all sensors that need to be placed on the outside of the enclosure. I secured these sensors using duct tape, but you can also use 3D printed mounts. For the cameras, you'll need to cut openings into the walls of the styrofoam box so the lenses have a clear view outside. Make sure the holes are properly aligned with each camera to avoid obstructing the image or video capture.

Downloads

Setting Up the Software

Screenshot from 2025-04-28 19-44-29.png

Once you’ve mounted everything inside the enclosure, it’s time to move on to the software setup.

The first step is to create a bootable SD card for the Raspberry Pi. To do this, I recommend using the Raspberry Pi Imager, a simple and free tool available for Windows, macOS, and Linux.

When selecting an operating system:

  1. If you plan to write your code using Visual Studio Code via SSH (which I highly recommend for convenience) or directly through the terminal, you can choose the 64-bit Lite version of Raspberry Pi OS.
  2. If you prefer using a graphical interface, it’s better to choose the standard 64-bit version of Raspberry Pi OS.

Once you've selected the OS:

  1. Choose your SD card as the storage device and click Next.
  2. A window will pop up, allowing you to customize the OS settings.
  3. If you want to use VSCode or SSH, you should configure these settings now:
  4. Set a hostname to easily find your Pi on the network.
  5. Set a username and password for later login.
  6. Configure your Wi-Fi network settings if you're using a wireless connection.
  7. In the Services tab, make sure to enable SSH.
  8. If you’re unsure about the options, select Password Authentication for a simple and secure setup.

After customizing these settings, finish the flashing process and your SD card will be ready to boot your Raspberry Pi!

Now you can start your Raspberry Pi and connect via the SSH extension in VSCode or Plug in a monitor.

Programming

DiagrammLuftdruck.png
DiagrammLuftfeuchtigkeit.png
DiagrammTemperatur.png
UVIndex_Driagramm.png

Now that everything is set up, you can finally start programming the datalogger!

You have two options:

  1. Write your own Python scripts from scratch, tailored to your needs.
  2. Use or adapt my existing code available in the GitHub repository to get started faster.

My scripts save the collected data into two CSV files, which can easily be opened later using spreadsheet programs like Excel or LibreOffice Calc for further analysis.

If you decide to use my code, make sure to:

  1. Install the required Python libraries listed in the repository.
  2. Enable the I2C interface on the Raspberry Pi using the raspi-config tool (under Interface Options).
  3. Set up an autostart service for the Python scripts.
  4. This ensures that the datalogger starts recording data automatically, even if the Raspberry Pi unexpectedly reboots during your mission.

With the software ready and the scripts running, your stratospheric datalogger will be fully operational!

Have fun!

Alternative Options

PXL_20250426_213214512.jpg

If you do not want to order the PCB another great option is to use perfboard and just solder your own PCB. As the required connections are not that complicated this is also rather simple and was what I did successfully at the first attempt.

Also feel free to ask any questions and share your experiences.