Project in progress
Altduino

Altduino

An Arduino-based altimeter, mostly for model rocketry.

  • 806 views
  • 2 comments
  • 4 respects

Components and supplies

BMP180 for arduino
any generic will work
×1
micro SD shield module for arduino
any generic will work
×1
Kce8bkptj7srmwx6wcxu
Arduino Mini 05
any generic will work
×1
11026 02
Jumper wires (generic)
×1

Necessary tools and machines

09507 01
Soldering iron (generic)
Solder wire (generic)

Apps and online services

About this project

*This project is actually in developement* As my first project in Arduino environement, I wanted to build something useful and acessible for everyone. I've been working on an altimeter that could cost less than $5 US because I saw that the cheapest was sell for 20 bucks and I think that it's too much.

Code

AltduinoArduino
/*
Pin configuration
BMP180
  VIN 3,3V
  GND GND
  SCL A5
  SDA A4
  
 SD Card
   CS 4
   SCK 13
   MOSI 11
   MISO 12
   VCC 5V
   GND GND
*/

#include <SD.h>           //Including SD library
#include <SPI.h>          //Including SPI library
#include <Wire.h>         //Including wire library
#include <SFE_BMP180.h>   //Including BMP180 library
SFE_BMP180 pressure;      //Creating an object for the BMP180
SFE_BMP180 bmp180;
Sd2Card card;             //Creating an object for the SD card
File myFile;              //Preparing the files
int pinCS = 4;            //Pin for the sd card
float Po = 1013.0;
char filename[] = "LOGGER00.CSV";

void setup() 
{
  pinMode(pinCS, OUTPUT);   //initialize digital pin pinCS as an output 
  pinMode(LED_BUILTIN, OUTPUT);  //initialize digital pin LED_BUILTIN as an output
 
   // create a new file
    for (uint8_t i = 0; i < 100; i++) {
      filename[6] = i/10 + '0';
      filename[7] = i%10 + '0';
      if (! SD.exists(filename)) {
        break;  // leave the loop!
      }
    }
}

void loop() 
{
   if ((!pressure.begin()) || (!card.init(SPI_HALF_SPEED, 4)) || (!myFile))    //If initialization failed, the built-in led blink:
    {
      digitalWrite(LED_BUILTIN, HIGH);  //turn the led on (High is the voltage level)
      delay(1000);
      digitalWrite(LED_BUILTIN, LOW);  //turn the led off (High is the voltage level)
      delay(1000);
    }
    
  char status;
  double T, P, p0, alt;       //Creating variables for temp, pressure and relative pressure
  status = pressure.startTemperature();
  if (status != 0) {
    delay(status);
    status = pressure.getTemperature(T);
    if (status != 0) {
    status = pressure.startPressure(3);
      if (status != 0) {
        delay(status);
        status = pressure.getPressure(P, T);
        if (status != 0) {
          alt = bmp180.altitude(P, Po);
          }}}}
  
  //SD Card setup
   myFile = SD.open(filename, FILE_WRITE);
   if (myFile) {
     
     myFile.print("Altuino : ");
     myFile.print("\t");    
     myFile.print(alt);
     myFile.print("\t");
     myFile.print(" Meters");
     myFile.close();
    }   
      
  delay(500);
}

Schematics

Altduino circuit

Comments

Similar projects you might like

Ultrasonic Glasses for the Blind

Project tutorial by Team GardnerTech

  • 7,795 views
  • 17 comments
  • 60 respects

Smart IOT Propane Monitoring Pedestal

Project in progress by Team A Bit Gassy

  • 1,912 views
  • 1 comment
  • 13 respects

Third Eye for The Blind

Project tutorial by Muhammed Azhar

  • 58,239 views
  • 36 comments
  • 129 respects

Arduino 101 BLE App

Project in progress by Alexis Santiago Allende

  • 13,894 views
  • 29 comments
  • 57 respects

Logifox: The End of E-Waste Has Arrived

Project tutorial by Celia Garrido Hidalgo and Luis Roda Sánchez

  • 6,677 views
  • 0 comments
  • 13 respects

Smart Bird Feeder

Project showcase by Team ESIEE-Amiens Students

  • 4,454 views
  • 11 comments
  • 16 respects
Add projectSign up / Login