Thursday, September 6, 2012

[Testing] 9-6-12

Today I started to put together the horizontal vibration testing chamber. I used three cans to make this apparatus. I traced and cut an outline out of the first can so that the two can apparatus could fit nicely inside. Then I hot glued the two cans onto the cutout can. Testing will be done tomorrow.

Monday, September 3, 2012

[Mechanical] Revised Design

We learned some things from the initial design and printing.  As mentioned before, we knew we had to reduce the overall size from 1.75" x 1.75" down to 1.25" x 1.25" which has been done.  In addition we added a dual gusset support underneath the sample container to support the weight and any flex in the unit as well as add additional gluing surface area. 

One challenge that we have is that we have been unable to source a 360 degree servo and the current one that we have is only operable to 180 degrees.  One solution for this was to redesign the setup and move away from a direct drive system and toward a geared one.  The new design has the servo attaching to the servo arm as normal but then the arm is inserted and glued to a gear.  The gear will contact a smaller gear (at least 2:1 ratio) that will be connected to the top disk allowing for a full 360 degree turn. 

The black part is the servo with the white servo arm attached.  It is inserted into the semi-transparent gear (shown without teeth).  The yellow part is the top disk and smaller gear (again shown without teeth).  Finally, the red part is the modified base (sample container). 

 
After meeting with the group and discussing the design we realized that we need a way to keep the gear positively connected during the vibrations associated with launch/flight.  We decided that there will need to be a groove cut into the two gears and an o-ring strung around them to keep them from vibrating apart.  This will be reflected in future designs. 
 
Another issue that we are contemplating is whether the rapid prototype printer that we have will be able to handle the printing of the gears.  If not, we will have to source pre-made gears and attach them to the parts that we print.  

Sunday, September 2, 2012

[Mechanical] Initial Structural Testing

This week we were able to use the testing apparatus that Nick E. put together to test whether using hot glue to attach the sample container to the backing plate would hold up during the stresses of the rocket launch. Some of these stresses include up to 50 g during launch and the vibrations from flight. We attached the base, top disk, servo assembly via hot glue to the backing plate and tested it against vibration at 20 Hz, 30 Hz, 40 Hz, 50 Hz, 60 Hz, 70 Hz, 80 Hz, 90 Hz and 100 Hz.

This is the high speed video (210 FPS) of the testing at 50 Hz.

This is the high speed video (210 FPS) of the testing at 100 Hz.



The vibration test was a success. Even with the initial design, which does not include the gussets to support the assembly, the hot glue held the assembly without fail.

The second test that we conducted was to drop-test the unit. We put the entire assembly inside of a container and dropped it from 11 meters. It was able to withstand three drops from 11 meters before failing. Once we have the new design eith gusset printed, we will retest. 

Saturday, September 1, 2012

[Programming] main_code 5.0 Beta SP: Pin-match table

Digital pins:
9: Servo: signal wire
10:SD CARD: CS
11:SD CARD: MOST
12:SD CARD: MISO 
13:SD CARD: CLK

Analog pins:
A0:Accelerometer: L
A1:Accelerometer: H
A2
A3
A4:Pressure Sensor: SDA
A5:Pressure Sensor: SCL

Wednesday, August 29, 2012

[Mechanical] Initial Design Printed

The initial design was printed on the rapid prototype printer. Already, we know that we have some changes to make such as with the dimesions. The 1.75" x 1.75" outside dimensions have to be modified to fit within the 1.25" constraints. The base contains a square outside to allow maximum area for securing to the backing plate. There is a 1/16" o-ring race around the outside and another around the axle shaft. This will allow the compartments to be sealed off. The five compartments allow for four altitude-based samples to be collected and one baseline sample.





The top has a cutout to allow for one open compartment at a time. The servo will rotate the top disk at the desired altitude allowing the aerogel to collect samples. 




This is how the assembly will look put together.


Tuesday, August 28, 2012

[Programming] main_code 5.0 Beta

/* Requires the SD library from the Adafruit website * SD card attached MOSI - pin 11, MISO - pin 12, CLK - pin 13, CS - pin 10*/
#include <SD.h>
#include <Servo.h>
#include "Wire.h"
#include "Adafruit_BMP085.h"
Adafruit_BMP085 bmp;
Servo myservo;  // create servo object to control a servo
const int chipSelect = 10; //??
File dataFile;
//global varibles
long initialPressure=0;
int counter = 0; //counter for flush
int flushRate = 100; //the rate of flush
//long topP;
//int floors;
//long PPerFloor= (topP-initialPressure)/floors;
//------------------------------------------------------------------------------------------- <setup>
void setup(){ 
 
  //>>>>>>>>>>>>>>>> servo setup
  myservo.attach(9); // servo-pin: pin9
 
  //>>>>>>>>>>>>>>>> pressure sensor setup
   bmp.begin();
  
  //>>>>>>>>>>>>>>>> SD card setup
 
  //----------------------------------  [initialize SD card]
  Serial.begin(57600);  // initialize serial communications: 57600
  while (!Serial) { // wait for serial port to connect. (Needed for Leonardo only) 
    ;
  }
  Serial.println("Initializing SD card..."); // (make sure that the default chip select pin is set to output, even if you don't use it)
  pinMode(SS, OUTPUT);   
  if (!SD.begin(chipSelect)) {  // see if the card is present and can be initialized:
    Serial.println("Card failed, or not present");      
    while (1) ; // if card failed, don't do anything more:
  } 
  Serial.println("card initialized sucessfully!");
 
  //-----------------------------------  [search for the last file and create a new file]
  char filename[] = "LOGGER00.TXT";
  for (uint8_t i = 0; i < 100; i++) {  
    filename[6] = i/10 + '0';  
    filename[7] = i%10 + '0';   
    if (! SD.exists(filename)) { // open a new file if it doesn't exist        
      dataFile = SD.open(filename, FILE_WRITE);    
      break;    
    } 
  }  
  if (! dataFile) {  // check if a new file is found
    Serial.println("couldnt create file"); 
  }
 
  //------------------------------------------------------ [the new file is found]
  delay(500);
  Serial.print("Logging to: "); 
  Serial.println(filename);
 
  //>>>>>>>>>>>>>>>>>> pressure sensor setup
  //------------------------------------------------------- [Calibrate pressure]
  Serial.print("Calibrate Pressure: ");
  for (int j = 0 ; j < 10; j++)
  {
    initialPressure += long(bmp.readPressure());
    delay(50);
  }
  initialPressure = initialPressure / 10;  //Average the initial pressure
  Serial.println(initialPressure);
  Serial.println();
  delay(5000);
}


//--------------------------------------------------------------------------------------------  <loop>
String accelRead()//read data from accelerometer
{
  String data = "";
  int a0 = analogRead(0);
  int a1 = analogRead(1);
 
  Serial.print(a0);
  Serial.print(",");
  Serial.print(a1);
 
  data += String(a0);
  data += ",";
  data += String(a1);
 
  return data;
}
String pressureRead()//read data from pressure
{
  String data = "";
  int t=bmp.readTemperature();
  long p=bmp.readPressure();
 
  Serial.println();
  Serial.print("T = ");
  Serial.print(t);
  Serial.println(" *C");
  Serial.print("P = ");
  Serial.print(p);
  Serial.println(" Pa");
  Serial.println();
 
  data += String(t);
  data += ",";
  data += String(p);
 
  return data;
}
int SDwrite(File inputFile, String data, int i) //write data into SD card and flush in certain rate
{
  inputFile.print(data);
  if (i>flushRate)//flush data into SD card. flush rate: 100
  {     
    dataFile.flush(); 
    i = -1; 
  }
  return i+1;
}
int SDwriteNL(File inputFile, int i)
{
  inputFile.println();
  if (i>flushRate)
  {     
    dataFile.flush(); 
    i = -1; 
  }
  return i+1;
}
long moveServoUp(const long bottomP, const long pressurePerFloor, const int movePerFloor, long lastP) // servo move according to altitude
{
  long p=bmp.readPressure();
  int i;
  if(lastP==0)
  {
    lastP=p;
  }
  if(p<lastP)
  {
    i= (bottomP-p)/ pressurePerFloor;
    lastP=p;
  }
  else
  {
    i= (bottomP-lastP)/ pressurePerFloor; 
  }
  if(i<0)
    i=0;
  myservo.write(movePerFloor*i);
 
  Serial.print("Floor: ");
  Serial.println(i);
  //Serial.println(p);
  //Serial.println(lastP);
 
  return lastP;
}
long LP=0; //LP= lastPressure has recorded
void loop()
{
  //----------------------------------- [read and write data]
  SDwrite(dataFile, accelRead(), 0); //less than flushRate forever: save time on calculation
  SDwrite(dataFile, ",", 0);
  SDwrite(dataFile, pressureRead(), 0);
  counter= SDwriteNL(dataFile,counter);
 
  
  //------------------------------------ [servo control]
   LP = moveServoUp(initialPressure, 10, 45, LP);
 
 
  //-------------------------------------- [loop frequence 20Hz]
  delay(50);
}

Friday, August 24, 2012

Rocket Project Update:

Current Progress:

Mechanical Team:  (Jason and Brandon)
  • A design has been completed and an initial prototype has been printed by the Engineering Design Technology department.  An updated design has already been made, but further updates will be made pending assembly of the initial assembly. 
  • Tasks:  Assemble prototype with Servo and Test with electrical team.
Electrical: (Stephen and Ray)
  • BMP085 altimeter is wired.  Dual Accelerometer board is completed. SD card IO is working with prototype board. Servo is wired to prototype board.   Gswitch is tested using a latching relay.
  • Tasks:  Assemble Battery Pack, Wire all parts to soldered protoboard.  Move from arduino protoboard to soldered connections on Arduino Mini.   Integrate Gswitch with package.  Determine overall power budget.
Programming: (James)
  • Code is written to read altimeter and temperature sensor, accelerometers and write data to SD card.  Servo is controlled from code based on altitude. 
  • Tasks:  Write moving average filter for pressure data, do additional calibration for sensors. General code clean up.  Present code to rest of team.
Science: (Michele)
  • Aerogels obtained.  Contacts with Material Science lab made.
  • Tasks:  Deliver aerogels for use in sample container.  Better define science mission.
Testing:  (Nick) 
  • Rotation test apparatus developed.  Status of vibration test apparatus is unknown.  
  • Tasks:  Update status of test equipment.  Test uninstrumented prototype for mechanical failure. 
Funding: (Des)
  • Proposal developed. Paperwork completed and signed.
Tasks:  Present to Student senate.

Oversight:  (Mason)
  • Provide Battery Packs.  
  • Need to decide if current servo is sufficient for needs and obtain other servos
All teams need to contribute status documentation for their area to this blog. (Pictures and text)