Telemetry Data

Here are the results from the launch! Note that some sensor data was not included due to faulty hardware.

 

BalloonPlot1 BalloonPlot2 BalloonPlot3 BalloonPlot4 BalloonPlot5 BalloonPlot6 BalloonPlot7

 

Arduino Flight Code

/////////BalloonVFlight.ino////////

/*EGR 190: Applied Engineering Design and Skills
11/19/15
Duke University

Sensors:
Temperature: Sparkfun TMP102 x 2
Pressure: Sparkfun BMP180 x 1
Ozone: SainSmart MQ131 x 1
Accelerometer/Gyro: SparkFun LSM6DS x 1
SD Card Reader: Sparkfun Open Logger x 1
Ambient Light: Sparkfun TEMT6000 x 1
I2C Bus Components:
TMP102 0x72 (Master), TMP102 0x73 (Slave), BMP180 0x48 (Slave), LSM6DS3 0x53 (Slave)
*/

// Include Libraries
#include “SparkFunLSM6DS3.h”
#include “Wire.h”
#include “SPI.h”
#include <SFE_BMP180.h>
// ——Define Parameters——-
// Temperature
byte res;
byte msb;
byte lsb;
int val;

// Ambient Light
int temt6000Pin = 0;

// Ozone
int OzoneValue = 1;
int time = 0;

// Pressure
#define ALTITUDE 381.0
SFE_BMP180 pressure;
// IMU
LSM6DS3 myIMU;
void setup() {
Serial.begin(9600);
Wire.begin();
if (pressure.begin())
Serial.println(“Telemetry initialization success”);
else
{
Serial.println(“Telemetry initialization failure\n\n”);
while(1); // Pause forever.
}
Serial.println(“^ useless data block^”);
Serial.println(” “);
Serial.println(” “);
myIMU.begin(); // Begin Accelerometer

}

void loop()
{
// Timer
unsigned long currentMillis = millis();
if (currentMillis % 1000 == 0){
// Accelerometer
Serial.print(currentMillis); // 1
Serial.print(” “);
Serial.print(myIMU.readFloatAccelX(), 4); // 2
Serial.print(” “);
Serial.print(myIMU.readFloatAccelY(), 4); // 3
Serial.print(” “);
Serial.print(myIMU.readFloatAccelZ(), 4); // 4
// Gyroscope
Serial.print(” “);
Serial.print(myIMU.readFloatGyroX(), 4); // 5
Serial.print(” “);
Serial.print(myIMU.readFloatGyroY(), 4); // 6
Serial.print(” “);
Serial.print(myIMU.readFloatGyroZ(), 4); // 7
Serial.print(” “);

// Ozone
OzoneValue = analogRead(1);
Serial.print(OzoneValue, DEC); // 8
Serial.print(” “);

// Ambient Light
int light = analogRead(temt6000Pin);
Serial.print(light); // 9
Serial.print(” “);

// UPPER TEMPERATURE (TOP)
res = Wire.requestFrom(72,2);
if (res == 2) {
msb = Wire.read();
lsb = Wire.read();
val = ((msb) << 4);
val |= (lsb >> 4);
Serial.print(val*0.0625); // 10
Serial.print(” “);
}
res = Wire.requestFrom(73,2);
if (res == 2) {
msb = Wire.read();
lsb = Wire.read();
val = ((msb) << 4);
val |= (lsb >> 4);
Serial.print(val*0.0625); // 11
Serial.print(” “);
}
Serial.print(myIMU.readTempC(), 4); // 12
Serial.print(” “);

char status;
double T,P,p0,a;

status = pressure.startTemperature();
if (status != 0)
{
// Wait for the measurement to complete:
delay(status);

status = pressure.getTemperature(T);
if (status != 0)
{
// Print out the measurement:
Serial.print(T,2); // 13
Serial.print(” “);
status = pressure.startPressure(3);
if (status != 0)
{
// Wait for the measurement to complete:
delay(status);
status = pressure.getPressure(P,T);
if (status != 0)
{
// Print out the measurement:
Serial.print(P,2); // 14
Serial.print(” “);
p0 = pressure.sealevel(P,ALTITUDE);
Serial.print(p0,2); // 15
Serial.print(” “);
a = pressure.altitude(P,p0);
Serial.print(a,0); // 16
Serial.print(” “);
}
else Serial.println(“error retrieving pressure measurement\n”);
}
else Serial.println(“error starting pressure measurement\n”);
}
else Serial.println(“error retrieving temperature measurement\n”);
}
else Serial.println(“error starting temperature measurement\n”);
Serial.println(” “);
Serial.println(” “);
// Execution takes about 0.7 seconds
delay(250);
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *