Project in progress
Omega Flight Computer

Omega Flight Computer © GPL3+

This will keep your rocket going straight without fins!

  • 499 views
  • 1 comment
  • 2 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

Here is V1 of the Omega Flight Computer made for big rockets and spacecraft. It is made on a protoboard. It will control the rocket on the way up and also hopefully on the way down too! Every time there is a update I will be sure to publish it!

For contacting please visit @space_delta on Twitter or https://deltaspacesystems.wixsite.com/rockets

Flight Computer Video

Design Video 2

Channel Trailer

Avionics before Omega

Code

Horizon_Avionics.inoC/C++
//RocketryUniverse2019//


#include "Wire.h" // This library allows you to communicate with I2C devices.
int bluePin = 3;

const int MPU_ADDR = 0x68; // I2C address of the MPU-6050. If AD0 pin is set to HIGH, the I2C address will be 0x69.
int16_t accelerometer_x, accelerometer_y, accelerometer_z; // variables for accelerometer raw data
int16_t gyro_x, gyro_y, gyro_z; // variables for gyro raw data
int16_t temperature; // variables for temperature data
char tmp_str[7]; // temporary variable used in convert function
char* convert_int16_to_str(int16_t i) { // converts int16 to string. Moreover, resulting strings will have the same length in the debug monitor.
  sprintf(tmp_str, "%6d", i);
  return tmp_str;
}
void setup() {
  Serial.begin(9600);
  pinMode(bluePin, OUTPUT);
  digitalWrite(bluePin, LOW);
  
  Wire.begin();
  Wire.beginTransmission(MPU_ADDR); // Begins a transmission to the I2C slave (GY-521 board)
  Wire.write(0x6B); // PWR_MGMT_1 register
  Wire.write(0); // set to zero (wakes up the MPU-6050)
  Wire.endTransmission(true);
}
void loop() {
  Wire.beginTransmission(MPU_ADDR);
  Wire.write(0x3B); // starting with register 0x3B (ACCEL_XOUT_H) [MPU-6000 and MPU-6050 Register Map and Descriptions Revision 4.2, p.40]
  Wire.endTransmission(false); // the parameter indicates that the Arduino will send a restart. As a result, the connection is kept active.
  Wire.requestFrom(MPU_ADDR, 7*2, true); // request a total of 7*2=14 registers
  
  // "Wire.read()<<8 | Wire.read();" means two registers are read and stored in the same variable
  accelerometer_x = Wire.read()<<8 | Wire.read(); // reading registers: 0x3B (ACCEL_XOUT_H) and 0x3C (ACCEL_XOUT_L)
  accelerometer_y = Wire.read()<<8 | Wire.read(); // reading registers: 0x3D (ACCEL_YOUT_H) and 0x3E (ACCEL_YOUT_L)
  accelerometer_z = Wire.read()<<8 | Wire.read(); // reading registers: 0x3F (ACCEL_ZOUT_H) and 0x40 (ACCEL_ZOUT_L)
  temperature = Wire.read()<<8 | Wire.read(); // reading registers: 0x41 (TEMP_OUT_H) and 0x42 (TEMP_OUT_L)
  gyro_x = Wire.read()<<8 | Wire.read(); // reading registers: 0x43 (GYRO_XOUT_H) and 0x44 (GYRO_XOUT_L)
  gyro_y = Wire.read()<<8 | Wire.read(); // reading registers: 0x45 (GYRO_YOUT_H) and 0x46 (GYRO_YOUT_L)
  gyro_z = Wire.read()<<8 | Wire.read(); // reading registers: 0x47 (GYRO_ZOUT_H) and 0x48 (GYRO_ZOUT_L)
  
  // print out data
  Serial.print("aX = "); Serial.print(convert_int16_to_str(accelerometer_x));
  Serial.print(" | aY = "); Serial.print(convert_int16_to_str(accelerometer_y));
  Serial.print(" | aZ = "); Serial.print(convert_int16_to_str(accelerometer_z));
  // the following equation was taken from the documentation [MPU-6000/MPU-6050 Register Map and Description, p.30]
  Serial.print(" | tmp = "); Serial.print(temperature/340.00+36.53);
  Serial.print(" | gX = "); Serial.print(convert_int16_to_str(gyro_x));
  Serial.print(" | gY = "); Serial.print(convert_int16_to_str(gyro_y));
  Serial.print(" | gZ = "); Serial.print(convert_int16_to_str(gyro_z));
  Serial.println();

  if (accelerometer_x < 1000 && accelerometer_y < -8000) {
    digitalWrite(bluePin, HIGH);
    
  } else if (accelerometer_x < 1000 && accelerometer_y > 8000) {
    digitalWrite(bluePin, HIGH);
    
     } else if (accelerometer_x > 8000 && accelerometer_y < 1000) {
    digitalWrite(bluePin, HIGH);
    
    } else if (accelerometer_x < -8000 && accelerometer_y < 1000) {
    digitalWrite(bluePin, HIGH);
    
  } else {
  digitalWrite(bluePin, LOW);
  
  }
  // delay
  delay(200);
}

Custom parts and enclosures

Omega Flight Computer Holder

Schematics

Schematic
Screen shot 2019 06 30 at 6 bfquowbqih

Comments

Similar projects you might like

Onboard computer for bicycle

Project in progress by Pararera

  • 4,597 views
  • 16 comments
  • 20 respects

Arduino Nano as CP/M-Compatible Computer

Project in progress by FoxyLab

  • 15,969 views
  • 18 comments
  • 35 respects

16x2 LCD Backpack with Enclosure for the Onion Omega

Project in progress by Carlos Silva

  • 4,501 views
  • 5 comments
  • 18 respects

Computer Prank

Project in progress by theuser42

  • 2,884 views
  • 1 comment
  • 6 respects

DIY Flight Instruments for Horizon and Compass

Project tutorial by Aritro Mukherjee

  • 29,820 views
  • 16 comments
  • 60 respects

Amazing Control Computer Using Hand Motion And Arduino

Project tutorial by Smart Technology

  • 7,833 views
  • 15 comments
  • 14 respects
Add projectSign up / Login