This is the repository for the High Altitude Balloon Major Qualifying Project(MQP) at Worcester Polytechnic Institute(WPI). The objective of this MQP was to collect Greenhouse Gas(GHG) (e.g. CO2, NO2, O3) emissions and other data (e.g. temperature, UV, pressure, altitude) from the Stratosphere. The repository is broken into three main code bases (Sensor, Ground Control Station(GCS), and Payload) for different tasks. The system works by obtaining the sensor data and packaging them into data packets. From there, the data packets are transferred by USB and/or radio. The Sensor obtains and transmits data to the Payload, via USB. Once the data packet has been received, it streams it back down to the the GCS via WiFi bridge. The data packet's integrity is confirmed with a checksum.
- About this project
- Devices and Software
- Libraries
- Ground Control Station
- Payload (Weather Balloon)
- Sensors
- Data streaming
- Project Components
Communication between the payload and GCS was established with a wifi bridge via a Ubiquiti Antenna and Dish. Our estimated altitude during launch was around 70,000+ ft. However, the two devices have an estimated range of around 130,000 ft when configured to 10 MHz.
Software for development purposes
- Visual Studio Code
- PlatformIO - VSCode extension
- Requirements:
SQLite was used to record all the sensor data, on the payload and GCS. We decided to create two different databases in case we lost/damaged the payload and because the payload itself cannot stream data to a cloud service.
- Run
sudo apt-get install sqlite3 libsqlite3-dev
- Export to CSV
screen to run the payload program on a different process after connecting via SSH
- Run
sudo apt-get install screen
To receive the data that is being sent to the ground, a GCS is necessary to capture the incoming sensor data. The GCS can be any computer that runs a Linux based OS.
When viewing the data, you will most likely run into a database filled with a large number of data points. Using SQL commands will provide easy viewing. For example, you can view the sensor data at, say, 16,000 ft or higher. Our tests generally provided about 2 hours worth of data, which was quite massive, so this will helpful.
- Enter src directory
- Make sure you have the required libraries installed
- Run
make
- Run
./gcs
The Payload is designed to read the incoming sensor data from the UNO and send it back down to the ground. A Raspberry Pi 4 was used for 4 key reasons: OS, lightweight, cost and SSH.
SETUP
- Make sure you have done Libraries
- Identify the Pi's IP address
- Run
hostname -I
- Suggested: Set static IP
- Run
- Identify serial port - this is needed to read the the data being sent by the NANO
- Run
dmesg | grep tty
to find open ports
- Run
- Assuming you correctly configured the WiFI bridge, power on the payload and GCS.
- Run
[username]@[pi_hostname].local
on the GCS in a terminal - Enter password of username
- Navigate to the src directory
- Run
make
to build the program - Run
./gcs
To collect sensor data, while keeping in mind of the physical dimensions of the payload, an Arduino UNO was selected. The UNO is tasked with reading the sensor data and packing them for transmission to the HAB_Payload.
Note. make sure that there are no Serial.println()
or any other functions that write to the data line except for the ones that write the sensor data. If you do not do this, you will have garbage data on the receiving end.
Open visual studio code and import the directory via PlatformIO. The .ini file should automatically be recognized and it should allow you to upload new code.
To further add onto the real-time data streaming capabilities of this project, the ThingSpeak API is utilized. Upon receiving data from the Payload, the GCS will send a POST request to their server. This will allow you to view the data in a more sensible manner. Also, this service provides various features that could prove useful to you: live streaming on youtube, import CSV, public access.
To use the ThingSpeak functionality, you will have to create an account on ThingSpeak and create a channel. This channel should possess 7 fields, one for each sensor: Pressure, NO2, Temp, UV, CO2, Ozone, Altitude; read the Doxygen for sendData()
in postData.c
to understand what parameters are required. You will also require an API key, which will be provided once you create a channel. There are two keys, Write API Key and Read API Keys, make sure you the write key.
Refer to ThingSpeak to understand how the API works
- Any Linux machine
- Ubiquiti dish
- Raspberry Pi 4
- 2x GoPro Hero7
- Sensor
- Ubiquiti antenna