Scratch Built Altimeter: Parts

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ghost

Well-Known Member
Joined
Aug 1, 2011
Messages
900
Reaction score
1
Hi,

I'm planning on making my own altimeter, and I'm going to use the BASIC Stamp 2 microcontroller. What's a good source for a barometric pressure sensor and an ADC (analog to digital converter) that is compatible.

I heard the MAX187 ADC is good as well as the Honeywell sensor.
Also, I have schematics for the above components (regarding the whole altimeter), so if there are better sensors, would they have the same # of pins and be compatible?

Thanks!
 
I know of that site, but I wanted to build my own for a couple of reasons:
1) it's fun!
2) that altimeter is too long
3) I would be able to say "I made my own altimeter!"

Although, now that I think about that, that does sound good (AAA electronics). I could always program it myself...
Do you know if that products includes the programming cable?

Thanks
 
Hi :)

I quite like the Freescale MPX4115 pressure sensor and the Analog Devices ADXL78 Accelerometer (the package will be hard to solder however...)

These seem to be the most common in rocketry (anyone correct me if im wrong :D)

For the ADC, im using the Microchip MCP3208, which is a 12bit, 8 channel (also available in 4 channel) ADC with SPI interface.

Let me know if you need more info :)
 
Thanks for your help.

I want to use the BASIC stamp controller, but have no experience with it. What's the cheapest method?
Would you get this:
https://www.parallax.com/detail.asp?product_id=BS2-IC
Also, do you have to get the following to program it? Or is there a cheaper option?
https://www.parallax.com/detail.asp?product_id=28850

Or would you get this (what's the advantage to the first option - remember, I just need a very simple chip):
https://www.parallax.com/detail.asp?product_id=27205
Does this include everything you need to program the chip?

Also, is the Parallax language easy to use? I've seen sample code, and it looks simple (at least a LOT easier than PIC programming).

And lastly, where do you buy your barometric sensor and ADC from (what dealer is good/reliable)?

Thanks!!!
 
Microchip ADCs are solid and most altimiters use the max4115 or something like it.

If you're just building one for your own enjoyment, using a STAMP should be fine. If you want to build a lot, however, other MCUs will get you better bang for your buck.

EDIT: well shoot, if you don't have any experience with microcontrollers, then you might not want a STAMP. They're normally good for very basic projects and applications, but as I said, they're pretty expensive.

A lot of people use Microchip controllers (PICs) because of their variety, low cost, popularity, and support. I, however, recommend Atmel controllers (AVRs). They're much like the PICs except they are slightly more powerful and have a much more powerful instruction set.

Also, are you planning on programming in assembly or a higher level language?
 
I tried programming in PIC and it was HARD!!!
Just looking at the code made my head hurt (and I'm an experienced Java developer).

But when I look at Parallax code, it seems clean, straight-forward, and concise.

Also, this wouldn't be a one-time-thing. I wouldn't solder it to the board (I would use one of those removable holders). Then, I could use it in numerous other projects.

Thanks!
 
Oh... what EEPROM should I get? Do they all use the same pins?
 
Sorry to triple post, but does this look good:?


MPX4115AP-ND SENSOR ABS PRESS 16.7 PSI MAX $14.94
MCP3208-BI/P-ND IC ADC 12BIT 2.7V 8CH SPI 16-DIP $5.73
PARALLAX KIT BASIC STAMP I STARTER $79.00
24LC256-E/P-ND IC SERIAL EEPROM 256K 2.5V 8DIP $3.80

I will get all the small stuff (resistors, caps, etc) at my local electronics store.

Thanks!!!
 
Originally posted by ghost
I tried programming in PIC and it was HARD!!!
Just looking at the code made my head hurt (and I'm an experienced Java developer).

But when I look at Parallax code, it seems clean, straight-forward, and concise.

Also, this wouldn't be a one-time-thing. I wouldn't solder it to the board (I would use one of those removable holders). Then, I could use it in numerous other projects.

Thanks!
The more basic the language, the more efficient and easier to learn it will be. However, it will be very very tedious to write and debug. PIC assembly is as simple as it gets, and can be mind numbingly tough to deal with. AVR assembly has three times as many instructions and a lot more working registers (32 as opposed to one in PIC, which is really helpful), making it it much more efficient and more dense. It's slightly more abstract, but much easier to debug. BASIC code for stamps is even higher, and is very beginner friendly (however, you ultimately pay more for less).

If you know C, then there is no reason to not get an AVR, since there is awesome support for C compilers. If you know Java, then jumping to C shouldn't be too hard.

Originally posted by ghost
Oh... what EEPROM should I get? Do they all use the same pins?
No, there are many different configurations. Most of the variety is done in how you select the chip and what interface it uses.

Again, microchip parts are very common and reliable for eeproms. If you want a lot of space, look at ATMEL's dataflash ICs.
 
I understand how AVRs are better, but I want to go with Basic Stamp. I already have a few books that utilize it.

So... does the above order (a few posts above) look OK? Am I missing anything?

Thanks
 
Sure, those look fine. What kind of STAMP are you looking at? Some have built in ADCs, but probably not at 12 bits.
 
I was just looking at the simple Basic Stamp I.

Now to order the stuff... :D
 
Have a look at my project at https://oss.tekno.us/flightcon/ . The sensors I use are pretty standard and I have schematics posted which you might find useful. Shoot me a PM if you have any questions about how I did things.

Cheers,
Erik
 
Originally posted by ghost

I'm planning on making my own altimeter, and I'm going to use the BASIC Stamp 2 microcontroller. What's a good source for a barometric pressure sensor and an ADC (analog to digital converter) that is compatible.

Great! Building electronics can be as fun as building rockets. I've built several over the years. My latest is on this page:

https://reality.sgiweb.org/overby/rockets/Simple_Altimeter/index.html

I use the Freescale (formerly motorola) pressure sensor parts which are about $15. I've used the MPX4101 and MPX4115 components, but there are many to pick from. I've purchased mine from Digi-Key.com but I believe they're also available from mouser.com and newark.com. I use a 10-bit A/D converter in the Atmel AVR chips, but have previously used the 10-bit A/D in a PIC (16F877 if I recall correctly). I haven't used a basic stamp so I can't provide any suggestions there.

For filtering algorithms, read: the altimeter paper at https://home.earthlink.net/~david.schultz

For higher resolution, you should be able to do oversampling of the sensor. I have written but have not flight tested an altimiter using this (hopefully this weekend). A good description of this is available from:
Atmel Corp application note AVR121 "Enhancing ADC resolution by oversampling (9/05)"
 
Originally posted by overby

I use the Freescale (formerly motorola) pressure sensor parts which are about $15. I've used the MPX4101 and MPX4115 components, but there are many to pick from. I've purchased mine from Digi-Key.com but I believe they're also available from mouser.com and newark.com. I use a 10-bit A/D converter in the Atmel AVR chips, but have previously used the 10-bit A/D in a PIC (16F877 if I recall correctly). I haven't used a basic stamp so I can't provide any suggestions there.

The Integrated sensors are great for low to medium altitude flight (< 45K) but the bottom out at 15kPa. I'm going to switch to the non-integrated MPXM2202 which gives 0-200 kPa with the downside of needing an amp or and ADC with a PGA. I'm also switching to the AD7708 16bit ADC with integrated PGA.

-Erik
 
If I recall correctly*, if you base your altimeter or flight computer on the basic stamp, the FETS will fire on power up as the stamp initializes. This requires extra safety interlocks etc.

I've programmed stamps and pics. PICS take more time, and are harder, but I bet you can find more code out their that was already written, tried and tested for a PIC then say the stamp.

Also, the low end stamps may not be fast enough for good use as a deployment altimeter.

Hey, RDH8, Are you out there? Can you comment since you have lots of experiance in this area?

*footnote
*Recalling correctly on the internet means I heard my brother-in-laws wife's girlfriend had overheard it at the hair dresser.
 
Hmmmm...

I'm planning to use the BS1. It will use a baro plus an ADC. Instead of converting pressure to altitude, I will convert the altitude to pressure and have it compare those numbers. Then, instead of using an EEPROM, it will simply hold 2 numbers: the goal reading and the current reading. If the current reading is above the goal (or equal to it), fire the Pyrodex. Then, it will keep reading values until the altitude (read in pressure) falls. It will then turn the peak pressure into feet and display it using an LCD.
I attached a picture of the schematics... does it look good?

Thanks!
 
Hi Ghost,

don't take my thoughts for gospell, only my pure guesses

* How much current is that Nichrome going to take?
* The LCD weighs way too much for flight, why do you need it again?
* Is the BS1 stamp fast enough?

* Edit: Break wire rather then G-switch more reliable and safe with Mod_roc motors. G-switch needs lots lots of filtering and debounce the BS1 won't be fast enough for I'm betting.
 
Originally posted by ghost
Hmmmm...

I'm planning to use the BS1. It will use a baro plus an ADC. Instead of converting pressure to altitude, I will convert the altitude to pressure and have it compare those numbers. Then, instead of using an EEPROM, it will simply hold 2 numbers: the goal reading and the current reading. If the current reading is above the goal (or equal to it), fire the Pyrodex. Then, it will keep reading values until the altitude (read in pressure) falls. It will then turn the peak pressure into feet and display it using an LCD.

A few things:
  • Pressure in inversely related to altitude. peak pressure will be on the ground.
  • If your pyro is for main deployment, make sure you pass through your target pressure before arming the pyro. Otherwise you will dump your laundry on the way up.
  • the pressure altitude function is non linear so setting a constant offset will only be good for one ground altitude. Take a look at https://en.wikipedia.org/wiki/Pressure_altitude for more info.


I attached a picture of the schematics... does it look good?
  • Your LEDs are backwards.
  • I would put some decoupling capacitors on your ADC. The datasheet for that part
  • Is that thing next to the g switch a 5V regulator?
  • What FET are you using.

Cheers,
 
Hi Ghost,

don't take my thoughts for gospell, only my pure guesses

* How much current is that Nichrome going to take?
* The LCD weighs way too much for flight, why do you need it again?
* Is the BS1 stamp fast enough?

Question 1:
Not sure, but I do know a 9V battery easily melts the nichrome. I tested it :)

Question 2:
The LCD is there more for testing than flight, but if weight is OK, I would leave it for flight.

Question 3:
I think so. It is not writing anyhting to EEPROM: it is just comparing 2 values. And after that, it converts numbers. No conversions are done during flight.
 
Originally posted by konkers
  • Your LEDs are backwards.
  • I would put some decoupling capacitors on your ADC. The datasheet for that part
  • Is that thing next to the g switch a 5V regulator?
  • What FET are you using.

Cheers,

LEDs are fixed.

The bottom 3 capacitors are the manufactured recommended ones from the datasheet. Should I add more? If so, where?

It's a transistor. I'm not sure if a transistor is a FET, but I assume it is. It is normally open, but closes and stays closed when the G switch activates.

I'm not sure what transistors I'll be using yet. Both the transistors seem to be collecting 9V, the base will get 5V, and hopefully emit 9V. Any suggestions?

Originally posted by konkers
A few things:
  • Pressure in inversely related to altitude. peak pressure will be on the ground.
  • If your pyro is for main deployment, make sure you pass through your target pressure before arming the pyro. Otherwise you will dump your laundry on the way up.
  • the pressure altitude function is non linear so setting a constant offset will only be good for one ground altitude. Take a look at https://en.wikipedia.org/wiki/Pressure_altitude for more info.

My bad about pressure being inversely related :rolleyes:

I will not deploy the Pyro until the target is reached.

This confused me a bit. What about NASA's pressure to altitude equation? Couldn't I enter 850 feet and solve for P? Then I would simply compare P to the output from the ADC (I assume it outputs directly like this - or does it)?

Thanks for all of your help!!! :)

PS: new schematics = attached
 
Originally posted by ghost
.....

Question 3:
I think so. It is not writing anyhting to EEPROM: it is just comparing 2 values. And after that, it converts numbers. No conversions are done during flight.

Ok, is it fast enough not to let the rocket coast past your target altitude before the comarision ends and fires?

I'd use a break wire rather then worry about filtering and debounce on the g-switch.

How close were the altitudes for the winners in this years TARC?

2006 the winners were only feet apart, and the resolution/calibration your going to get on this compared to the offical altimeter seems to be a large task your going to face with lots of trial flights and testing.
 
Originally posted by Art Upton
Ok, is it fast enough not to let the rocket coast past your target altitude before the comarision ends and fires?

I'd use a break wire rather then worry about filtering and debounce on the g-switch.

How close were the altitudes for the winners in this years TARC?

2006 the winners were only feet apart, and the resolution/calibration your going to get on this compared to the offical altimeter seems to be a large task your going to face with lots of trial flights and testing.

It should be fast enough. If not, it will be close and maybe we won't use it for TARC. I'll just use it on my own rockets :) Remember, this isn't only for TARC: this is for me - I want to be able to say "I built and programmed my own altimeter!!!" Also, I don't have a huge budget - I would rather use the BS1 than the BS2.

How does a break wire work? Where should it be? Is it simply a switch like those "remove before flight" ones? Why is there debounce? Also, once the G switch first goes on, the transistor closes - and stays closed. Doesn't this debounce/filter enough?

The winners were close, but look at my first point. Also, there is minimal flight testing needed. I can simply put both altimeters in the same jar and suck the air out. I can then compare readings and fine tune it - without it ever flying!
Oh... and the second or third placed team used this same system (not sure which Basic Stamp, though. They scored a 3 point something.

Thanks again for all of your help!
 
Oh... and if it seems to be coasting past the target consistently, I can simply set the target to be something like 840 feet.
 
Originally posted by ghost
It should be fast enough. If not, it will be close and maybe we won't use it for TARC. I'll just use it on my own rockets :)

Don't get me wrong, building your own altimeter is a good thing to be able to say. But it will take some time, research and effort. it will also cost more in the long run then buying one.

Also, using it on rockets other then the TARC option for your terminate flight will lead into even more issues you will have to overcome for it to be of real value to you.

Use the net to research the need for debounce on switches, G-or otherwise.

A breakwire is used instead of a g-switch for more reliability with less code. It's just a fine wire broken on liftoff, changing from normally closed to open.

Many on here have much more knowlege about all the issues then I do. I'll leave the rest to them to comment on.
 
It's more than just being able to say I built my own alt. It's actually doing it! I love making things from scratch, and this project is perfect.

And this is not the final version of the altimeter. I assume there will be many, many, many, and many revisions/changes.

I know it will cost more. I can get (and already have) a deployment alt. for less than $100. I'm assuming this will end up costing at least $150.

I still don't see why debouncing would be a problem. As soon as the G switch activates (aka closes) - if only for a micro second - the transistor will still close... and remain closed. Maybe I'm missing something. If so, please elaborate.


Now: to ask a new question: when the ADC returns output from the barometer, will it return the pressure in kPa? Or as a signal that must be decoded? Or does the stamp do that for me?

Once again, I'm uber gracious for your help :D
 
Not sure on the specifics of your ADC, but usually they return a Binary number between 0 and 1023 (well, 1023 for a 10 bit ADC at least). 0 for Vin = 0V and 1023 for when Vin = Vref.

You will need to write code to turn this back into volts, and then into pressure.

All the calc's should be on the data sheet for the ADC and the MPX :)
 
My ADC is 8 bit. It is the one recommended by the BS1 manual.

Thanks for your help. I'll look at the ADC's datasheet.
 
Back
Top