Arduino altimeter - dual recovery for less than 20 dollar

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
The difference is that the ISP (in-system programming) units use a special protocol built into the chip, over the SPI bus. The Arduino bootloader uses the serial port. If you're a programmer, the ISP method is quicker, and in fact you have to use it if you're programming a bootloader or a chip like an ATTiny that can't take a serial bootloader. For flash updating a completed product, however, you don't want to make the users go out and buy an ISP programmer, so it makes sense to use a serial bootloader since they already have the serial cable to download the altimeter's data.

When I program the ATMega chips on the Eggtimer, I use a special board that I built that has both an ISP and a serial programmer on it. I burn the bootloader with the ISP side, put a dot on it with white-out so I know that I did it, and go on to the next one. When the batch is all done, I go back and use the serial side to program the actual flash code, then I put another dot on the chip. That's why you see the two dots on the chips... it's QC.
 
with the ATMega 328 I do the same
I first do the boot loader with the AVR and then upload the code using the serial module. I did upload some program using the AVR but then the boot loader does not seam to work anymore.
However the reason I am making available some AVR adaptor is mainly for the ATtiny chip that have no serial
 
I have now tested the hardware of my flight datalogger.
https://rocket.payload.free.fr/index.php?option=com_content&view=article&id=13&Itemid=11&lang=en
So far I have an altimeter that has all the fonctionalities of the alti Duo + it can record the altitude/time and then the entire flight can be plotted using Excel

I am not using the 3rd pyro output yet but I will to do airstart.
You can download the code here
rocket.payload.free.fr/Download/FlightLogger/RocketFlightLoggerV1_0.zip
I need to get some smaller transistor for the board and then people who want one of those kit can contact me
Note that the code has not been flyed yet for this altimeter but successfully tested in my chamber. Any suggestions to improve it are welcome
 
I've made an adapter so that I can program the AltiDuo with an FTDI USB board.

AltiDuo_1.jpg


I then modified the board so that auto reset programming is accomplished. A shame that it isn't designed on the board by default.

AltiDuo_2.jpg


The next step was to modify my ALTDuino Firmware by adding the code for BMP085 pressure sensor. The first test came out perfect.

ALTDuino_UI-AltiDuo.png


However I will have to modify the BMP085 code to speed it up, but still have it measuring with the highest resolution.

Next step will be to compare the pressure sensor on my ALTDuino and compare it with the BMP085 in actual flight.
 
Last edited:
There are 3 or 4 of you guys doing these boards. You should combine forces, bring a superior product to market and share the profits. Leo does the computer and user graphical interface, Cerving does the embedded programming and features design, Bdureau does the board layout (with 0.1" screw terminals please).
 
Last edited:
Ther are 3 or 4 of you guys doing these boards. You should combine forces, bring a superior product to market and share the profits. Leo does the computer and user graphical interface, Cerving does the embedded programming and features design, Bdureau does the board layout (with 0.1" screw terminals please).

We are combining forces, I have opened up the code so ideas are comming from all over the place.... and the idea (at least for me) is not to make profit; I just want to have fun and play ... like all of us
and I also like the idea of beeing able to build everything from scratch in rocket from the motor to the electronic... which I can .
 
There are 3 or 4 of you guys doing these boards. You should combine forces, bring a superior product to market and share the profits. Leo does the computer and user graphical interface, Cerving does the embedded programming and features design, Bdureau does the board layout (with 0.1" screw terminals please).

I have been thinking the same thing. I can't keep the various altimeter projects straight. I've also been thinking about how to integrate one of these projects into my gps tracker. Although part of me wants to keep the tracking separate from the altimeter for redundancy or safety purposes.
 
I would like to convert the beeped altitude to feet.
Currently I am doing 1 long beep per 100m and one short beep per 10m. That gives a resolution of 10m
What do you think would be best for feet?
Would one long beep per 1000 feet and one short beep per 100 feet be ok?
 
I have been thinking the same thing. I can't keep the various altimeter projects straight. I've also been thinking about how to integrate one of these projects into my gps tracker. Although part of me wants to keep the tracking separate from the altimeter for redundancy or safety purposes.

Auruindo developers "viewer's guide:"

Leo - The guy with the cool color on black user interface displays
Cerving - The guy that has all the features like aux outputs that drive servo motors
Bdureau - The guy that has a number of compact board layouts and thinks in meters​

There may be other "characters," in fact I'm sure there are, but these are the ones in the "lead roles."
 
Last edited:
I would like to convert the beeped altitude to feet.
Currently I am doing 1 long beep per 100m and one short beep per 10m. That gives a resolution of 10m
What do you think would be best for feet?
Would one long beep per 1000 feet and one short beep per 100 feet be ok?

Boris, imho that is too rough.

If you like I can post the code I wrote for my ALTDuino altimeter. It deeps out the altitude (before comma), e.g. at 285.36 meters it will beep the altitude 285 and converting the beeps to feet is a simple task.
 
.... and the idea (at least for me) is not to make profit

There is nothing wrong with a profit. I think $35 to $40 for a you-build-it board (soldering through-hole, not surface mount) that is feature rich and is usable (wiring connections and user interface) is the sweet spot and would keep out other low-end entrants. From what I have seen you guys doing it is a huge step above the ADEPT22 and look how well that sold.
 
Boris, imho that is too rough.

If you like I can post the code I wrote for my ALTDuino altimeter. It deeps out the altitude (before comma), e.g. at 285.36 meters it will beep the altitude 285 and converting the beeps to feet is a simple task.

Leo that would be cool if you could post the code
I just had a look at the way the Adept one does it; is it similar
 
Leo,

What size cap did you use, and is that the only modification to get reset to function?

Kevin

I then modified the board so that auto reset programming is accomplished. A shame that it isn't designed on the board by default.

AltiDuo_2.jpg
 
Do you guys realise you can lock the adjacent terminal blocks together ? just slide the ridge up the groove on the adjacent terminal block.
This gives a neater look and helps support the terminal blocks from being twisted whilst tightening the screws.
 
Half the fun for me will be modifying the code. I have no problem keeping projects straight. Eggtimer, full featured. AltiDuo simple and ready for me to work with on the code. Leo's unobtainium.
:)
 
Do you guys realise you can lock the adjacent terminal blocks together ? just slide the ridge up the groove on the adjacent terminal block.
This gives a neater look and helps support the terminal blocks from being twisted whilst tightening the screws.
That is a really good point, I will had it to the building instructions
 
Leo,

What size cap did you use, and is that the only modification to get reset to function?

Kevin

I am planning on doing that in future version of the board. The capacitor is I guess 100nF (Leo will confirm)
 
Leo that would be cool if you could post the code
I just had a look at the way the Adept one does it; is it similar

Boris,

here the code I wrote for universal use.

To convert the output from meters to feet simply multiply the float altitude value by 3.28084 before calling 'Altitude_Readout()'


Code:
/*************************************************************************

  Code by Leo Nutz

 
  Output the maximum achieved altitude (apogee) via flashing LED / Buzzer

 *************************************************************************/
void Altitude_Readout(uint32_t value)
{
  char Apogee_String[5];                        // Create an array with a buffer of 5 digits

  ultoa(value, Apogee_String, 10);              // Convert unsigned long to string array, radix 10 for decimal
  uint8_t length = strlen(Apogee_String);       // Get string length

  delay(3000);                                  // Pause for 3 seconds

  for(uint8_t i = 0; i < length; i++ )
  {
    delay(1000);                                // Pause 1 second for every digit output

    uint8_t digit = (Apogee_String[i] - '0');   // Convert ASCI to actual numerical digit

    if(digit == 0)                              // If digit = 0 then 2 quick flashes/beeps
    {
      output_FLASHLED(4, 200);                  // 2 flashes/beeps with 200 ms delay
    }
    else
    {      
      for(uint8_t ii = 0 ; ii < digit ; ii++ )  // Digits 1 to 9
      {
        output_FLASHLED(1, 700);                // Flash/beep on with 700 ms delay
        output_FLASHLED(1, 500);                // Flash/beep off with 500 ms delay
      }
    }
  }
}

/**********************************************
  Output LED / Buzzer
 **********************************************/
void output_FLASHLED(uint8_t count, uint16_t pause)
{
  const uint8_t LED_Pin = 12;                     // Declare the pin that the LED / Buzzer is connected to  

  for(uint8_t i = 0; i < count; i++)
  {
    digitalWrite(LED_Pin, !digitalRead(LED_Pin)); // Toggle on/off
    delay(pause);
  }
}
/*************************************************************************/

Email me if you have any questions.
 
Leo,

What size cap did you use, and is that the only modification to get reset to function?

Kevin

Kevin,

The cap is 100nF (104). You will also have to cut the circuit path between the 2 pins of the cap.
 
Do you guys realise you can lock the adjacent terminal blocks together ? just slide the ridge up the groove on the adjacent terminal block.
This gives a neater look and helps support the terminal blocks from being twisted whilst tightening the screws.

Nope, but now we do :D Thanks.
 
Boris,

here the code I wrote for universal use.

To convert the output from meters to feet simply multiply the float altitude value by 3.28084 before calling 'Altitude_Readout()'


Code:
/*************************************************************************

  Code by Leo Nutz

 
  Output the maximum achieved altitude (apogee) via flashing LED / Buzzer

 *************************************************************************/
void Altitude_Readout(uint32_t value)
{
  char Apogee_String[5];                        // Create an array with a buffer of 5 digits

  ultoa(value, Apogee_String, 10);              // Convert unsigned long to string array, radix 10 for decimal
  uint8_t length = strlen(Apogee_String);       // Get string length

  delay(3000);                                  // Pause for 3 seconds

  for(uint8_t i = 0; i < length; i++ )
  {
    delay(1000);                                // Pause 1 second for every digit output

    uint8_t digit = (Apogee_String[i] - '0');   // Convert ASCI to actual numerical digit

    if(digit == 0)                              // If digit = 0 then 2 quick flashes/beeps
    {
      output_FLASHLED(4, 200);                  // 2 flashes/beeps with 200 ms delay
    }
    else
    {      
      for(uint8_t ii = 0 ; ii < digit ; ii++ )  // Digits 1 to 9
      {
        output_FLASHLED(1, 700);                // Flash/beep on with 700 ms delay
        output_FLASHLED(1, 500);                // Flash/beep off with 500 ms delay
      }
    }
  }
}

/**********************************************
  Output LED / Buzzer
 **********************************************/
void output_FLASHLED(uint8_t count, uint16_t pause)
{
  const uint8_t LED_Pin = 12;                     // Declare the pin that the LED / Buzzer is connected to  

  for(uint8_t i = 0; i < count; i++)
  {
    digitalWrite(LED_Pin, !digitalRead(LED_Pin)); // Toggle on/off
    delay(pause);
  }
}
/*************************************************************************/

Email me if you have any questions.

Thanks leo
I will adapt it and include it in my code
 
Auruindo developers "viewer's guide:"

Leo - The guy with the cool color on black user interface displays
Cerving - The guy that has all the features like aux outputs that drive servo motors
Bdureau - The guy that has a number of compact board layouts and thinks in meters​

There may be other "characters," in fact I'm sure there are, but these are the ones in the "lead roles."

thanks. I got a chuckle out of the "thinks in meters" comment! :)
 
You shouldn't need any adaption.
Leo
I use the tone function for the beep, it is nicer

void longBeep()
{
if (NoBeep == false)
{
tone(pinSpeaker, 600,1000);
delay(1500);
noTone(pinSpeaker);
}
}
 
Ahh, I see :)

I removed the buzzer und replaced it with a bright LED. The buzzer drains too much power.
 

Warning: No Rocketry Content!!

So I think I understand

  • To upload a sketch (application) to an ATmega 328 based unit, all one needs is the serial cable and a chip already flashed with the standard Arduino boot loader. Works fine, but is slower than...
  • To upload a boot loader on a blank 328, or to replace the boot loader with your own, or to make the boot loader the actual program to be run (so its the boot loader and sketch all in one) you need a USB to ISP programmer, a programming cable (6 or 8 pin), and a board with a socket for the cable and a socket for whatever chip you are using.
  • If you have a separate board like the Sparkfun Red Board, or the Diavolino, you can use that as a programmer using a breadboard, but it will be slower than a dedicated programmer.

The advantage of the latter two is you get to use another 1 or 2k of space that the boot loader would otherwise have taken. Would these be correct? Or incorrect?

Boris can I get a hires version of the breadboard picture?
 
Yup, you got it right. The Arduino Uno bootloader is only about 500 bytes, I'll give up 1.5% of the flash memory to give users the ability to field update the code any day.
 
Back
Top