Model Rocketry

Reference / Paper · 2009

Peak of Flight #242: How do electronic altimeters work Part 2

Read the PDF ↗

Apogee Components' Peak of Flight newsletter, issue 242 (2009-08-25).

Author
Tim Van Milligan / Apogee Components
Year
2009
Type
Reference / Paper
Credit
Apogee Components, Inc. (Colorado Springs, CO) — Peak of Flight newsletter
  • peak-of-flight
  • apogee-components
  • model-rocketry

← Back to the Reference Library

Peak of Flight #242: How do electronic altimeters work Part 2

Apogee Components' Peak of Flight newsletter, issue 242 (2009-08-25).

Feature Article: How Do Electronic Altimeters Work Part 2 Other Features: EMRR Corner Cover Photo: Pemberton Technologies Space Ark Jr. rocket. To get one, visit: www.ApogeeRockets.com/pemtec_space_ark.asp Apogee Components, Inc. — Your Source For Rocket Supplies That Will Take You To The “Peak-of-Flight” 3355 Fillmore Ridge Heights Colorado Springs, Colorado 80907-9024 USA www.ApogeeRockets.com e-mail: [email protected] ISSUE 242 AUGUST 25, 2009 How Do Electronic Altimeters Work - Part 2 Written By Norm Diedzic Jr. Toward the end of our first installment on altimeters in Newsletter 240 (www.ApogeeRockets.com/education/ downloads/Newsletter240.pdf) it was found that the output of a barometric pressure sensor changes if the supply voltage to the sensor changes. We said this is called ratiometric. With a little thought, it becomes apparent that keeping the supply voltage stable is critical to the operation of an altimeter. If we let this voltage vary, then the signal from our pressure sensor will vary and we won’t be able to determine the true altitude. Since an altimeter needs to be light and portable, the power source of choice is a battery. Batteries come in all sorts of shapes and sizes so there is a nice selection to choose from to power our system. Some altimeters include the mounting for the battery “on-board” the device while others only have a connector where the modeler wires in their own battery. This is another classic trade off point. With the battery on-board, the altimeter is larger but easier to setup. With the battery off-board, the altimeter is smaller but more complex to install and setup. Of course with the size of modern electronics, this issue is becoming moot because the entire electronic package for an altimeter can be as small as a battery itself and simple altimeters smaller than a U.S. quarter and powered by coin cell batteries are now available. Figure 3: Mini altimeter and battery board. While I haven’t seen any altimeters that don’t use a battery, I would not be surprised if some time soon, someone will invent one that uses something called a super capacitor or electric double layer capacitor. These devices have very fast charge and discharge times but not quite the longevity of a battery. However, with the trend to lower power devices, they may well be designed into an altimeter good for a few flights in a super light weight package. Figure 1: Altimeter with battery on-board. That gives us a lot of battery options but is a battery alone going to give us the nice stable supply voltage required by the barometric sensor? As it turns out, over the useable life of a battery (standard or rechargeable) the voltage drops slowly as the battery’s capacity is used up (See Figure 4). While these curves are relatively flat across the 20% to 80% discharge range, they still slope down to varying degrees across the life of the battery. We need to put something else into our design that will keep give a stable, constant voltage supply for the sensor. What we turn to for this is called a voltage regulator. Voltage regulators take a varying input voltage and make a stable, constant output voltage for use with our electronic components. One of the most popular voltage regulators is the LM317 from National Semiconductor. The Figure 2: Altimeter with off-board battery. About this Newsletter Newsletter Staff You can subscribe to receive this e-zine FREE at the Apogee Components web site (www.ApogeeRockets.com), or by sending an e-mail to: [email protected] with “SUBSCRIBE” as the subject line of the message. Page 2 Continued on page 3 ISSUE 242 Writer: Tim Van Milligan Layout / Cover Artist: Tim Van Milligan Proofreader: Michelle Mason AUGUST 25, 2009 Continued from page 2 How Do Electronic Altimeters Work - 2 take into consideration when using them. The first is that you have to supply a higher voltage at the input terminal than you want to get out of the regulator. This extra voltage is referred to as the dropout voltage of the regulator. So the input must always be greater than the desired voltage plus the dropout voltage. If the input should drop below this level, the output will start fall as well as shown in Figure 6. This is part of the reason that altimeters are often powered by 9V batteries or mini 12V batteries so that there is enough voltage to allow for the dropout. 4.0 Lithium Ion 3.0 Cell Voltage (Volts) 2.5 2.0 Lead Acid Ni-Zn 1.5 Ni-Cd, NiMH 1.0 Varying Input Voltage Zn/MnO 2 0.5 20 40 60 80 Percent of Capacity Discharged Ideal Output Voltage 100 Dropout Voltage Figure 4: Battery discharge voltage curves. simplified circuit for using the voltage regulator is shown in Figure 5. Figure 5: Simplified regulator circuit. VIN is the un-regulated voltage coming from the power source or battery and VOUT is the regulated voltage going to the rest of the circuit. R1 and R2 are resistors and the relationship between them determines the regulated output voltage. The ideal voltage regulator would take any input voltage and supply a constant output voltage to the rest of the system. As usual, nothing is ideal and while the LM317 and regulators like it are great devices, there are some limitations that a designer has to Actual Output Voltage Figure 6: Ideal vs. Actual Voltage Output. Next, they rely on outside components which will have tolerances of their own that must be adjusted for in the final product. This is normally done by replacing one of the resistors with a variable resistor also known as a potentiometer or pot for short. The process of adjusting something during manufacturing is called calibration. Older pots are mechanical devices that have a small screw head on them that is turned to adjust the resistance; newer units are all digital and can adjusted by putting voltages on certain pins Continued on page 4 Your Cool Rocket Designs Look So Much Better In RockSim Version 9! Launch It. v9 www.RockSim.com Space Foundation certified as an excellent teaching aid. For further information, call Apogee Components at: 719-535-9335. ISSUE 242 AUGUST 25, 2009 Page 3 Continued from page 3 How Do Electronic Altimeters Work - 2 during calibration. Another issue that comes up with voltage regulation is that the regulator is connected to a varying source on the input side and a varying load on the output side. To compensate for this, it is recommended to put in something called a bypass capacitor on each side of the regulator. So our simple regulator circuit becomes more complex. The National Semiconductor datasheet for the LM317 recommends the circuit in Figure 7 for most applications. The last issue to consider with regulators is power. We need to Figure 7: Standard take into account both how much regulator circuit. power the regulator can supply to downstream components as well as how much power the regulator consumes itself. Our standard LM317 regulator has a dirty little secret in that the more difference between the input and output voltages, the more energy is lost as heat and is of no use to us. Newer devices V IN V out called Low Drop Out LOW DROPOUT REGULATOR V SNS regulators or LDO’s GND 1� F 1� F for short are now more common and cost effective. These have lower dropout voltages Figure 8: Typical LDO circuit. and rely on external capacitors instead of resistors so they are more efficient. The trick here is that most of them are designed for a fixed voltage output so they must be selected with the entire system in mind. On the output side, the regulator has to be able to supply enough current to power the downstream devices or the altimeter will fail to do its job. Next up on our topic list and the subject for the rest of this installment is the Analog to Digital Converter or A/D for short. While the concept is rather simple the A/D converters are full of black magic (not really) and a study of them leads to such strange topics as successive approximation, delta sigma conversions, sample and hold, dither and other neat concepts. However, we’ll ease into this by discussing the difference between digital and analog signals first. In the world of controllers, there are two types of signals: digital and analog. A digital signal can stand for only two states like on or off. Digital signals are used for devices like pushbuttons or key switches or LED lights that are always just on or off. These signals are easy for controllers to handle because they can be represented by a single bit of data. If the bit is zero, then the device is off, it the bit is one then the device is on. At the hardware level, the on state can be signified by a positive voltage and the off state by zero voltage. These voltage levels are generally set for the system. Traditional TTL signals were +5V for on, 0V for off. Newer low voltage devices have different logic levels but the idea is the same. Continued on page 5 Model Rocket Design and Construction By Timothy S. Van Milligan New 3rd Edition Now Shipping! This new 328 page guidebook for serious rocket designers contains the most up-to-date information on creating unique and exciting models that really work. With 566 illustrations and 175 photos, it is the ultimate resource if you want to make rockets that will push the edge of the performance envelope. Because of the number of pictures, it is also a great gift to give to beginners to start them on their rocketry future. For more information, and to order this hefty book, visit the Apogee web site at: www.ApogeeRockets.com/design_book.asp Apogee Components 3355 Fillmore Ridge Heights Colorado Springs, Colorado 80907 USA telephone: 719-535-9335 website: www.ApogeeRockets.com Page 4 ISSUE 242 AUGUST 25, 2009 Continued from page 4 To help understand the difference between digital and analog, think of the difference between a house light on a standard switch and one on a dimmer switch. With the standard (digital) switch, you get light or no light. Those are your only choices. With the dimmer (analog) switch, you can control the brightness of the light from dim to very bright and everywhere in between. While there is such a thing as an analog computer, for altimeter use, all the controllers used are digital so inside everything has to be a 1 or a 0. We need a way to convert the analog pressure signal into a digital signal that our controller can use to determine the altitude; and that’s what the A/D does. Just because the controller is digital doesn’t mean we can’t represent numbers larger than 1 within it. True our 1 bit example has only 2 states (0, 1) but if we put 2 bits together, we get 4 possible states (00, 01, 10, 11); with three bits we get 8 possible states (000, 001, 010, 011, 100, 101, 110, 111) and so on… Each time we add a bit, we multiply the number of states by 2. You can also find out the number of states by using the equation states=2n where n When we talk about A/D converters, the first specification we need to know is the resolution. This is the number of bits that the A/D uses to represent the analog signal. We speak of an “8 bit A/D” or a “12 bit A/D” and this tells us how fine of a resolution we will have on our signal once it gets converted into a number. That is a lot of words so let’s get moving with an example in round numbers to try to pull all of this together. Say we have a pressure transducer set up in our circuit to output 5 volts at ground level (14.7 psi) and 0 volts at 40,000 ft. (2.7 psi). That’s a total pressure range of 12 psi. If I use a very coarse resolution of 3 bits, I get to break my 12 psi up into 8 states. Each state is 12/8 or 1.5 psi. Looking at Figure 9 we see the stair step effect of breaking the signal up into discrete numbers. The red dashed trace is the analog voltage from the sensor. The blue trace shows how the digitized signal changes with pressure. Actual Pressure (psi) Figure 9: Analog and digital With this 3 bit expressure plot ample, there are only 14.7 5.0 13.2 4.375 11.7 3.75 10.2 3.125 8.7 2.5 7.2 1.875 5.7 1.25 4.2 0.625 2.7 2.7 4.2 5.7 7.2 8.7 10.2 11.7 13.2 14.7 Sensor Signal (volts) When it comes to our pressure transducer, theoretically, there are an infinite number of voltages between 0 and the maximum signal voltage designed into the system. This is an analog signal. Analog signals go beyond the on off nature of digital signals and allow us to know the magnitude of the measured value, not just whether it is there or not. is the number of bits you are using. This is where all those wonderful computer type numbers like 256 and 1024 come from. (256=28, 1024=210) Converted Digital Pressure (psi) How Do Electronic Altimeters Work - 2 0.0 Continued on page 6 Keep Your Reload Cases CLEAN! Featured Tip on EMRR by Lance Alligood: This method works for all brands and sizes of reloadable motor hardware from 18mm to 98mm. It is particularly useful when you want to use the same casing multiple times at a launch as well as making it easier to do a more thorough clean up when returning home from a launch. CLEANING SOLUTION= 1 part (~16oz) water, 1 part (~16oz) white vinegar, and 1 teaspoon of dish detergent 1) Wait until the motor is cool enough to safely handle. 2) Disassemble the motor according to the manufacturer’s directions/reload instructions. Dispose of the liner and other replaceable items as appropriate. 3) Using the CLEANER, liberally spray all of the casings, closures, snap rings, nozzles, etc. and put them in the plastic bucket to soak for at least 5 minutes (but they can soak as long as you like--even till you return home). 4) Scrub any parts as necessary with the sponge and/or scrub brush to remove any stubborn residue. 5) Repeat steps 3 and 4 if necessary. 6) Rinse the parts by spraying them with the WATER bottle. 7) Dry parts with paper towels. Full details and many other tips are found on EMRR! Brought to you by Essence’s Model Rocketry Reviews & Resourses - www.rocketreviews.com ISSUE 242 AUGUST 25, 2009 Page 5 Continued from page 5 How Do Electronic Altimeters Work - 2 8 possible pressures that can represent the pressure in the controller. Imagining a launch, the controller will see a pressure of 14.7 psi at first and then as the rocket rises, the next number it will see is 13.2 psi. It will have no way of knowing what happens between these two pressures. As we increase the number of bits of resolution, this effect lessens but you can never get rid of it completely. There will always be some of this stair step or digitizing effect in the converted signal. So how do these A/D chips go about converting the voltage to a digital number? It turns out that there are several different types of converters. The simplest and also fastest type is called the direct conversion or flash A/D. It employs a series of components called comparators which each take in two voltages and give a 1 bit output if the test voltage is higher than the reference voltage. V in Keeping with our 3 bit example, the schematic for this flash A/D would look like V that shown in Figure 10. ref R + - Vin is the voltage from the transducer that we R want to digitize while Vref 8 Line to 3 Line is a fixed reference voltR Priority Encoder age generated in the A/D. Binary Output R Each triangle element is a comparator that compares R Vin at its (+) input to a fixed voltage at its (-) input. R Note that as the voltage from Vref gets passed R down the line of resistors (R elements) it gets Figure 10: Flash A/D circuit. reduced after each resistor. For our example, Vref would be 4.375V, then after the first resistor there would be 3.75V and so on down to 0.625V going into the last comparator. + - Vdd + - + - + - flash A/Ds are only used where their speed is absolutely necessary such as video or high quality audio processing equipment. The next step down the path of the A/D yellow brick road is the successive approximation A/D (Figure 11). It only uses one comparator but has the ability to change the comparison reference value with a built in D/A converter. Digital to Analog Converter Comparator Sample/ Hold Successive Approx. Register (SAR) Voltage From Sensor V in Control Logic Digital Value to Controller Figure 11: Successive approximation A/D. The name actually gives us a clue to how it works. I like to think of this unit as the “guess a number between 1 and 100” device. It starts by comparing Vin to the middle of the voltage range. If Vin is higher, then it splits the difference and compares it to 3/4 of the range; otherwise it compares it to 1/4 of the range. Note that if Vin is larger than the mid range, the most significant bit will be 1, otherwise it is 0. This dividing continues to “zero in on” the actual voltage setting another bit in the output with each step. It accumulates these bits in the Successive ApproximaContinued on page 7 } + - + - You get: (4) AT 29/13 (4) AT 41/18 (2) AT 56/18 (2) AT 66/18 (1) AC-56 (1) AC-66 Price: $22.72 You Save: $5.17 While the flash A/D has the advantage of being very fast (indeed, the conversion happens as fast as the electrons can travel through the circuit), it has the disadvantage of requiring many components. For our 3 bit example, we needed 7 comparators. As we move to larger bit A/D units, the number of comparators is given by the equation 2n-1 where n is the bit resolution. So for a minimal 8 bit A/D, we need 255 comparators. This also complicates the encoder section of the A/D circuit. The number of components required adds cost, size and heat generation to the flash A/D. Larger resolution Page 6 ISSUE 242 You get: (6) AT 13/18 (6) AT 18/18 (6) AT 24/18 (6) AT 33/18 Price: $26.00 From Estes, you would spend over $44.45! http://www.ApogeeRockets.com/body_tubes.asp AUGUST 25, 2009 Continued from page 6 How Do Electronic Altimeters Work - 2 tion Register (SAR) and then when finished, outputs the entire word to the controller. The advantage here is you can get whatever bit resolution you want; you just keep dividing voltages until you have enough bits. The disadvantage is that the conversion process takes several steps and the more bits of resolution you want, the longer the conversion takes. You might wonder what happens if Vin changes while the conversion is taking place? Since the procedure depends on continually comparing a new voltage with the signal voltage, letting the voltage change during the conversion would definitely thrown a monkey wrench into the process. These devices have an input section called a sample and hold circuit. Its function is to “trap” Vin voltage and hold is constant while the conversion is taking place. This way the A/D is isolated or buffered from changes at the input while the conversion is taking place. So with the successive approximation A/D we are not required to have a geometrically expanding number of comparators to get higher bit resolutions. We just keep dividing up the voltage between the current approximation and the compared signal to get more and more bits. But nothing is free so what we have traded away for this increased resolution is speed. The more bits of resolution required, the longer it takes to convert the signal to a digital number. Also, the built in sample & hold and D/A sections of this type of device are a little more complex than the simple comparators and bit encoder of the flash A/D. However, for altimeter use, these types of devices are plenty fast to determine the apogee of a flight or even log points to later plot out the altitude vs. time chart of a launch. Even with an A/D that can look at multiple signals, you can still do 100’s of thousands of conversions per second. The last type of A/D that bears mentioning is the DeltaSigma (sometimes called Sigma-Delta) A/D. This can also be denoted by ΔΣ after the Greek letters for Delta and sigma. Figure 12 shows a simplified block diagram for a ΔΣ converter. To fully explain the ΔΣ A/D is beyond the scope of this article but its name comes from the normal use of the Greek symbols in math. Σ or Sigma normally stands for a summing operation while Δ or Delta normally denotes the difference between values. The main parts of this converter are an integrator which performs a summing-Σ operation, a comparator which looks at the difference-Δ between the sensor voltage and a feedback signal, and a 1 bit A/D converter (I told you there was Continued on page 8 Pratt Hobbies GO BOX Launch Controller Launch controller for mid-power rockets. Hooks right up to your car’s battery. No more dead AA batteries! Plenty of electricity to set off any type of rocket motor igniter. 24 foot cord, allows you to stand far back for launch safety. Audible continuity buzzer lets you know the circuit is armed and ready for launch. Flat-jaw alligator clips Only $39.99 P/N 7705 Brought to you by: (for easy hook-up of igniter.) www.ApogeeRockets.com/go-box_controller.asp ISSUE 242 AUGUST 25, 2009 Page 7 Continued from page 7 How Do Electronic Altimeters Work - 2 resolution of the output. You will notice that the ΔΣ A/D uses very simple components in it and so is very inexpensive to produce. And again, it will be slower than the previous flash and SAR type converts but fine for our rocketry applications. You can easily get 60 samples per second with the ΔΣ style A/D converter. Vref Switch Voltage From Sensor V in Output - - + + Clock D Q Q D Register Counter C2 If you want a better understanding of the ΔΣ A/D the last two Bibliography references are a good place to start. Counter C1 Figure 12: Delta Sigma A/D black magic here). The obvious question is what good is a 1 bit A/D converter? The first trick here is that the 1 bit A/D converter is only looking at the difference between the current signal and the feedback signal to determine if the signal is raising or falling. While not obvious, these differences get added up by the counter in the block diagram and become the digital number. The next trick is that a ΔΣ A/D uses a concept called oversampling to run the internal components. So for every digital signal it sends out to the controller, it may have gone through 1000’s of cycles internally. This oversampling helps reduce the noise in the signal and allows for a higher The last point for this article is how these A/D devices communicate their output to the controller. The most basic way is to use an output pin for each bit in the output number. This is called a parallel interface because the traces that connect the A/D with the controller will look like a series of parallel lines. The problem with this approach is that the pins are usually the most expensive part of an I/C chip and so to get a useable bit resolution we are using a lot of pins. More pins also make the A/D chip larger and heavier which is especially bad for a rocket payload. A better method is to use a serial communication protocol to move the number between the A/D and the controller. There are a number of standards for this type of interface with names like I2c, SPI, CAN and many more. The beauty Continued on page 9 • Won’t Shatter Like Brittle Phenolic Tubes! • Super Smooth Surface With Tight Spirals • Standard LOC Diameters Up To 6 inches • Cut and Slot With Standard Tools • No Fiberglass Wrap Needed • Sands and Paints Easily • Cheaper than Fiberglass Blue Tube From Always Ready Rocketry www.ApogeeRockets.com/blue_tubes.asp Page 8 ISSUE 242 AUGUST 25, 2009 www.ApogeeRockets.com High Power Tubes & Couplers Continued from page 8 How Do Electronic Altimeters Work - 2 http://www.mpoweruk.com/performance.htm http://code.rancidbacon.com/LearningHowToPowerCircuits LP38690/LP38692 1A Low Dropout CMOS Linear Regulators, National Semiconductor http://www.allaboutcircuits.com/vol_4/chpt_13/4.html http://www.hitequest.com/Kiss/DeltaSigma.htm http://www.maxim-ic.com/appnotes.cfm/an_pk/1870/ of a serial interface is that it can transmit huge amounts of data over 2 or 4 pins. It does this by sending the data, in our case the sensor voltage converted into a binary number, one bit at a time. The standard interfaces define the speeds, called bit timings that the devices use as well as methods of error correction to make sure the numbers sent are received properly. About The Author: Some of the standards are bus interfaces which allow multiple devices to be connected to the same set of wires for more space and cost savings. Each device on a bus must support the same interface and be set for the same speed and error correction but once they are set up, these busses are great ways to get multiple devices to transmit data. While we have really just skimmed the surface of these devices you will hopefully have a little better feel for how they work and the sort of decisions that an altimeter designer must make in order to make a working device. Next up we will get to the meat and potatoes of an altimeter and cover the controller that interprets all the data we have been discussing and makes all the decisions. Bibliography: http://en.wikipedia.org/wiki/Electric_double-layer_capacitor Norm Diedzic Jr. is an avid rocket flyer and a member of NIRA (Northern Illinois Rocketry Association; NAR Section 117). He has written several technical articles for their LAC winning newsletter, The Leading Edge, as well as a treatese on hemispherical parachute construction that appears in the book Model Rocket Design and Construction. You may also recognize Norm as the inventor of a method of restraining small rocket motors in minimum diameter models, called the Dziedzic cut-out method (see Model Rocket Design and Construction, 3rd Edition, page 100) He has an M.S. in Mechanical Engineering from University of Illinois at Chicago, and is currently the Engineering Manager at CMA/Flodyne/Hydradyne, an industrial distribution company serving Northern Illinois and Wisconsin and specializing in hydraulic and electrical motion control. Continued on page 10 • Designed to ignite the top motor in two-stage rockets. • Provides an easy way to stage composite propellant motors • Fires off igniters after a preprogrammed amount of time following liftoff • G-switch senses liftoff and insures against a false launchdetection • Small, lightweight design is great for skinny rockets • Easy-to-use, and will fire off any igniter, including clusters! Battery, battery connector, mounting board and igniter are not incuded. www.ApogeeRockets.com/Staging_Timer.asp ISSUE 242 AUGUST 25, 2009 www.ApogeeRockets.com Staging Electronics Page 9