UW-Makeathon: Deepwater Swarm Probe

Running for: NASA- Out of this world; Best Project; Formech Sustainability Award; Digi-Key Award; Isthmus Engineering Award

IntermediateWork in progress40
UW-Makeathon: Deepwater Swarm Probe

Things used in this project

Hardware components

Arduino Uno Rev3
Arduino Uno Rev3
×1
Grove - Barometer Sensor (BMP280)
Seeed Grove - Barometer Sensor (BMP280)
×1
Servos (Tower Pro MG996R)
×1
9V battery (generic)
9V battery (generic)
×1
9V Battery Clip
9V Battery Clip
×1

Software apps and online services

Arduino Web Editor
Arduino Web Editor
SolidWorks
MakerCase
Adobe Illustrator

Hand tools and fabrication machines

Formech Thermoformer
Used to create the waterproof casing for the project
Materia 101
Arduino Materia 101
3D Printer (Ultimaker 3)
Used to print the cap for the probe
Laser cutter (generic)
Laser cutter (generic)
We used the laser cutter to create a box that became the mold used in the thermoformer to create the casing for our probe
Soldering iron (generic)
Soldering iron (generic)
Generic hand tools (see comments)
a hacksaw, rubber mallet, and box cutters were all used in imparting slight modifications on our probe casing after the thermoforming process
Multimeter (generic)
wave generator (generic

Story

Read more

Custom parts and enclosures

Probe Lid

This piece was used to cap off the top of the probe. When attached with silicone caulk, it created a water-tight seal with the thermoformed case.

Box

Schematics

Circuit Sensor

Circuit diagram sensors 6uweqzxasm

Code

Main program file

C/C++
This is uploaded to the arduino uno and run to collect data.
/*
  Thomas Hansen
  Yash Wani
  
  This is the code for installing on the arduino for the run, 
  and it will collect the necessary data.
*/

#include <Adafruit_BMP280.h>
#include <EEPROM.h>
#include <Servo.h>

#define BMP_SCK 13
#define BMP_SDO 12
#define BMP_SDI 11 
#define BMP_CS 10
#define SERVO 8

int eepromIndex = 0;
int loopIterations = 0;

Servo weightServo;

Adafruit_BMP280 bmp280(BMP_CS, BMP_SDI, BMP_SDO,  BMP_SCK);

void setup() {
  
  Serial.begin(9600);  //Set the baud rate of serial monitor as 9600bps
  
  // setup servo
  weightServo.attach(SERVO);
  weightServo.write(0);

  if (!bmp280.begin())
  {
    Serial.println("Unable to connect to barometer.");
    while (true);
  }
    
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  
}

/*
  Continually loops throug
*/
void loop() {
    
  Serial.print(F("Temperature: "));
  float curTemp = bmp280.readTemperature();
  Serial.print(curTemp);
  Serial.println(" deg C");
  
  Serial.print(F("Pressure: "));
  float curPress = bmp280.readPressure();
  Serial.print(curPress);
  Serial.println(" Pa");
  
  Serial.print(F("Depth: "));
  float curDepth = realDepth();
  Serial.print(curDepth);
  Serial.println(" m");
  
  
  // write data to EEPROM
  EEPROM.put(eepromIndex, curTemp);
  eepromIndex = eepromIndex + sizeof(float);
  
  EEPROM.put(eepromIndex, curPress);
  eepromIndex = eepromIndex + sizeof(float);  
  
  EEPROM.put(eepromIndex, curDepth);
  eepromIndex = eepromIndex + sizeof(float);  
  
  Serial.println();
    
  delay(5000);
  
  ++loopIterations;
  Serial.println(loopIterations);
  if (loopIterations > 24) {
    weightServo.write(140);
  }
  
}

/*
  Calculates the depth of the probe in m below
  sea level based off pressure.
*/
float realDepth() {
  int pTotal = bmp280.readPressure();
  int pAtm = 99964;
  
  return (pTotal - pAtm)/(1025 * 9.806);
}

Read Data

C/C++
This code is used to read the data off of the probe.
#include <EEPROM.h>

float f = 0.00f;
int eeAddress = 0;
int i = 0;
  
void setup(){
  
  Serial.begin( 9600 );
  while (!Serial) {
    ;
  }
  int eeAddress = 0;
    
  Serial.print( "Temperature: " );
  EEPROM.get( eeAddress, f );
  Serial.print( f, 3 );
  Serial.println(" deg C");
  delay(1000);
      
  for (int i=1; i < 10; i++) {
  
    eeAddress = eeAddress + sizeof(float);
    Serial.print( "Pressure: " );
    EEPROM.get( eeAddress, f );
    Serial.print( f, 3 );
    Serial.println(" Pa");
     delay(1000);
     
    eeAddress = eeAddress + sizeof(float);
     
    Serial.print( "Depth: " );
    EEPROM.get( eeAddress, f );
    Serial.print( f, 3 );
    Serial.println(" m");
    delay(1000);
      
    eeAddress = eeAddress + sizeof(float);
    
    Serial.print( "Temperature: " );
    EEPROM.get( eeAddress, f );
    Serial.print( f, 3 );
    Serial.println(" deg C");
    delay(1000);
  
  }
    
  eeAddress = eeAddress + sizeof(float);
  Serial.print( "Pressure: " );
  EEPROM.get( eeAddress, f );
  Serial.print( f, 3 );
  Serial.println(" Pa");
  delay(1000);
    
  eeAddress = eeAddress + sizeof(float);
  Serial.print( "Depth: " );
  EEPROM.get( eeAddress, f );
  Serial.print( f, 3 );
  Serial.println(" m");
  delay(1000);
  
}

void loop()
{}

Credits

Malachi Alvarez

Malachi Alvarez

1 project • 5 followers
Ricka Edwards

Ricka Edwards

1 project • 4 followers
Yash Wani

Yash Wani

1 project • 4 followers
Thomas Hansen

Thomas Hansen

1 project • 4 followers
HAWRA ALJAWAD

HAWRA ALJAWAD

1 project • 4 followers

Comments

Add projectSign up / Login