|
Poorman's Space Program
Making Sensors for BalloonSat Flight Computers (Part 2)
L. Paul Verhage
Follow Paul at Twitter.
Part 1 appeared in the September 2009 installment of The Citizen Scientist. Readers are encouraged to answer Paul's question at the end of this project. Editor.
Steps for Making an External Temperature Sensor
- Make an analog cable.
- Strip the free ends of the three wires and tin.
- Slide 10 mm (about 3/8 inch) of thin heat shrink over the wires and push way away from the end.
- Solder the LM335 header wires to the following analog cable wires.
- Right-most lead of the LM335 to the ground wire (green).
- Resistor lead to the +5V wire (red).
- Left-most bare resistor lead to the signal wire (white).
- Slide the heat shrink over the soldered wires and shrink.
- Apply a thin coating of hot glue between the bare wires and around the resistor.
- Cover the LM335, resistor, and short header pins in heat shrink tubing.

Figure 10. A completed external LM335 temperature sensor. The cable is long enough to protrude from the BalloonSat and its smart use of colored wires ensures it's plugged into an analog port with the proper orientation.
Using the READADC and READADC10 Commands
For the flight computer to read the temperature, the READADC or READADC10 command is used. The READADC converts the voltage of the temperature sensor into a digital value with eight bits of resolution. The sensor's voltage is an analog value because it can be any value between 0 and 5 volts and at any arbitrary level of precision. Since the conversion results in a digital value, the result can only have values in discrete steps.
The READADC 's eight-bit resolution means the analog voltage of the temperature sensor is divided into 28 or 256 discrete steps. With a voltage range of five volts, each step equates to a change of 0.0195 volts. The READADC10 command has ten bits of resolution, which is 210 or 1,024 discrete steps. At ten bits of resolution, each step of the five volt range equates to 0.0049 volts. Detecting a smaller change in the analog voltage of the temperature sensor means the READADC10 command can detect smaller changes in the temperature.
So why not always use the READADC10 command? Because the results of a READADC conversion can be stored in eight bits, or a byte of memory while the results of a READADC10 conversion requires 10 bits of memory for storage. Since the PICAXE microcontroller can only store variables in a byte or a word, the READADC10 conversion can only store half as many measurements. Which conversion command you decide to use depends on how many measurements you want to collect which also influences how often the flight computer can collect data. The more precise the conversion, the less frequently the flight computer can record data and the less resolution in time or altitude that results. Do you want to record data every 1,000 feet or every 2,000 feet?
Figures 11 and 12 show sample temperature data from actual BalloonSat flights.

Figure 11. A single LM335 temperature sensor placed outside a BalloonSat records data like this during a near space mission. The transition from decreasing to increasing temperature signals the location of the tropopause. The troposphere begins at the surface, and the stratosphere is located above the troposphere.

Figure 12. Two LM335s, one inside and the other outside a BalloonSat, record data like this. The interior temperature remained from 35 to 90 degrees warmer than the outside air temperature.
Aware RM-60 Geiger Counter

Figure 13. Cosmic ray studies via BalloonSat are possible with the RM-60 Geiger Counter by Aware Electronics (http://www.aw-el.com). At 123 grams, this radiation detector will not break the mass budget of your BalloonSat, but it will return amazing data.
While flying a RM-60 is a little expensive (about $150), the data you get back is pretty spectacular. The RM-60 operates from a PC or laptop serial port. The serial port provides the power to operate the Geiger-Muller tube (after a suitable voltage gain) so no external battery is required. The passage of a cosmic ray is signaled by the brief drop from five to zero volts at the serial port's receive data pin. Therefore, unlike a LM335, a digital conversion by the analog port is not required to record cosmic ray data. Instead, the COUNT command collects the cosmic ray data.
Parts List for a RM-60 Geiger Counter
Aware Electronics RM-60
Three pin header
RJ-11 telephone cable
Thin heat shrink tubing
Green marker
Since the Geiger counter is located inside the BalloonSat, the RJ-11 telephone cable doesn't have to be very long. You'll get a cable with your Geiger counter; however, you should save this cable for non-near space use. A length of 30 cm (or 12 inches) should be plenty. If you can't locate a cable that short, then cut a longer cable in half and you'll have two suitable cables. Notice that the RJ-11 consists of four thin wires, each in colored jackets, and all inside a thicker outer jacket. The end of the cable terminates in a plastic connector with a latch that plugs into the side of the RM-60. The modification explained below shows how to terminate the bare end of the cable with a three pin header.
Steps for Making a RM-60 Cable
? Carefully cut the outer jacket of the bare end of the RJ-11 15mm (3/4 inch) from the end.
? Strip 5mm (1/4 inch) of insulation from all three inner wires.
? Cut back the RJ-11's unneeded wire to the outer jacket.
Note: The order of the colored wires depends on which end of the RJ-11 you cut. Rather than explain which color is connected to each pin in the header, plug the RJ-11 into a RM-60 and look at the order of the wires at the bare end of the RJ-11 cable. Using the diagram below, you'll see the proper wires to connect to the three pin header.

Figure 14. The rightmost wire is marked NC (no connection). This is the wire in the RJ-11 cable to cut off and not use.
- Tin the remaining three wires.
- Insert a three-pin male header into an analog receptacle and tin the short side of the pins.
- Slide 10mm (about ½ inch) of thin heat shrink over the wires and push them away from the tinned end of the wires.
- Lay the ground wire in the RJ-11 cable against the ground pin of the header and solder.
- Repeat for the other two wires (+5V and Signal).
- Slide the heat shrink over the soldered pins and shrink.
- The RJ-11 has a green wire that is not the ground for the RM-60, so place a green dot on the three pin male header next to the proper ground pin.
Using the COUNT Command
The PICAXE COUNT command counts the number of low to high transitions on an I/O pin over a specified time period. The RM-60 produces a constant five volts until radiation passes through the Geiger-Muller tube. For approximately 20 microseconds afterwards, the RM-60 output remains at zero volts. The COUNT command then detects the return of the RM-60's output voltage back to five volts. Therefore, COUNT is counting the number of ionizing events that occur over the over the time specified in the command.
The syntax for COUNT is this
COUNT I/O-Pin, Time-Period, Variable
The valid I/O pins for the BalloonSat Mini are 1, 2, and 4 (2 is only available if the camera relay is not installed).
The valid I/O pins for the BalloonSat Easy are 0, 1, and 2.
The Time-Period is given in milliseconds and can't be higher than 65,657 (64k) of 65.6 seconds.
Variable is a storage location for the result. A byte-size variable will work in most cases if the time period is on the order of ten seconds.
An example:
COUNT 0, 10000, B0
This example counts the number of detections made by the RM-60 plugged into I/O port 1 for ten seconds. The result is stored in RAM variable B0.
Sample Cosmic Ray Data
Figure 15 shows an example of the data collected by a BalloonSat in a mission over Minnesota. As usual, the cosmic ray flux increased with increasing altitude as the BalloonSat climbed above the filtering of secondary cosmic rays provided by the atmosphere. Above 62,000 feet, the BalloonSat has entered a region where the secondary cosmic rays were less plentiful because significant numbers of primary cosmic rays could be detected. However, the cosmic ray flux normally continues to decrease with increasing altitude. So what is happening here?

Figure 15. Cosmic ray data collected with an RM-60 during a BalloonSat flight.
Readers are encouraged to send their answers to Paul's closing question to "Backscatter." Please include reliable references. This concludes "Making Sensors for BalloonSat Flight Computers." Editor.
A full list of all of L. Paul Verhage's Poorman's Space Program projects in The Citizen Scientist accompanies this article. For a Near Space overview, see this PowerPoint presentation: Near Space Platforms For Amateur Space and Astronomy. To learn more about Paul and his balloon research, enter his name in the SAS Google search window. Editor.
__________________________________
The Citizen Scientist (02 October 2009).
|