04 September 2009

Poorman's Space Program

 

Making Sensors for BalloonSat Flight Computers (Part 1)

L. Paul Verhage

Follow Paul at Twitter.

For several months now, this column has described the construction of three flight computers for BalloonSats. Previous to that, the column covered the construction and use of sensors for the Hobo data logger. In a way, a Hobo data logger is a programmable flight computer in that it operates experiments by recording the voltages from its sensors according to the instructions downloaded into it. So let's begin discussing how to make sensors for the flight computers recently described. The sensors do a lot of the same things as the Hobo sensors, for instance, they measure temperature and light level. However, the technology these sensors use is different from the sensors that the Hobo uses. So is the level of programming required to record data from these sensors. As a result, we gain flexibility in the type of data we can collect and in the way it can be recorded.


The Anatomy of an Analog Port

The three NearSys BalloonSat flight computers have analog ports rather than 3/32 inch stereo jacks. To increase their flexibility, the analog ports provide power and ground for any sensor plugged into them. Therefore, once you plug a sensor in, it's producing a useful signal – without mucking about with sensor power and switches.

Figure 1. The analog port of this BalloonSat Easy is the circled cubic block. The three-prong header (right) is a port for operating servos.

Each channel in an analog port has a channel number as its designation and consists of three sockets arranged in a column. Each socket in a channel has a specific function. The outermost socket is labeled GND and is the ground for power and signal. The center socket is labeled +5V (positive five volts) and provides the power necessary to operate the sensor. The innermost socket is the connection to the microcontroller I/O (input/output) pin. Each channel is unique in that channels can't share the same microcontroller I/O pin. (There is an exception with the BalloonSat Extreme, but in that case, only one of the channels can be used at a time). Below is an example of an Analog Port and the function of its sockets.

Figure 2. The white lines indicate the I/O connections between the microcontroller in a BalloonSat Easy and its Analog Port. The +5 volt sockets are colored red and the ground sockets are colored green.


We refer to the entire body of the Analog Port as a receptacle. The spacing between the sockets of the receptacle is 0.1 inches (100 mils) and the sockets are squares that measure 0.025 inches (or 25 mils) on a side. The body of the receptacle is made of plastic, and inside each socket is a tiny metal fork.


The Sensor's Male Header

Most sensors require only voltage and ground to produce a signal (typically, a signal is a varying voltage or a series of pulses). Even through the microcontroller requires the sensor's signal to have a ground reference; a second ground connection is not required, because the ground is shared with the power ground. This means sensors only need a three-pin header at the end of their cable to plug into the Analog Port. The header consists of three square-shaped pins held together with a plastic body that keeps the pins in the proper 0.1 inch spacing. When a sensor is plugged into a receptacle, the pins at the end of its header wedge themselves between the tines of the fork inside the receptacle sockets. This design ensures a reliable connection every time a sensor is connected to the Analog Port. It also ensures that if the sensors are swapped out hundreds of times, there will still be a good electrical connection between the sensor and the receptacle.

Figure 3. A three pin male header designed to plug into the Analog Port 's receptacle. The header in this image is ¼ inch wide and ½ inch tall. Note that the pins on one side of the plastic bar are longer than the pins on the other side of the bar. This is important when terminating sensor cables for the Analog Port.


Soldering a Cable to a Male Header

There are no pierced holes in the pins of the header, nor is the spacing between the pins large enough to wrap the wires around. Therefore, the best method to attach the wires of a sensor cable to the pins of a header is to let solder fuse them together. The best wire for this is #24 gauge stranded wire. Stranded wire consists of many thin wires twisted together to form a single wire that is more flexible than a solid wire of the same diameter. Using stranded wire reduces the likelihood that the sensor cable will break over time.

The header's plastic body will soften from the heat of soldering wires to the pins. A result is that the header can distort and the pins fall out during soldering. To prevent this, insert the long pins of the header into the Analog Port. The receptacle will hold the header pins in their proper orientation while you quickly solder three wires to the short side of the pins. If it still looks as if soldering damaged the header, then you can try coating the short end of the header pins and wires with a little hot glue. A small squirt of cyanoacrylate glue may also work; however, I'm not sure (in any case, use the tiniest drop of CA).

Figure 4. The wire in this image is being held firmly against the header pin until the solder fusing them together has cooled. Not shown in this image is that the wire and header pin are tinned before fusing them together.


The order that the wires are soldered to the header is not too important, other than it's best not to solder the center wire last. The color of the wires soldered to each pin is important only in that the colors indicate the function of each wire. This color-coding insures the header is plugged into the receptacle with the correction orientation. With that in mind, use a green or black wire for the ground wire, red for the power (+5V) wire, and a different color (like white) for the signal wire. If there are several sensors with long cables to plug into the Analog Port, then using a different color for each sensor's signal wire is a good way to distinguish between the cables at the Analog Port (so for example, use blue for one sensor and white for the other).

Steps

( ) Tin the short side of the pins of a three-pin header.

( ) Cut the ground (green or black), power (red), and the signal (white perhaps) wires for the proper length of the completed sensor (one foot is usually long enough for a BalloonSat).

( ) Strip 6 mm (1/4 inch) of insulation from one end of all three wires.

( ) Lightly tin each stripped end.

( ) Solder the ends of the three wires to the following short pins of a male header:

Green: Right

Red: Center

White: Left

( ) Cut three pieces of thin heat shrink tubing 10mm (1/2 inch) long.

( ) Slide heat shrink tubing over the header pins to cover the soldered connections.

( ) Heat and shrink.

Figure 5. A completed analog cable. The order of the colored wires indicates the header pins are (left to right) ground, power, and signal. Thin gray heat shrink tubing covered the fused wire and pins so no metal objects can short the sensor leads.


The LM335 Temperature Sensor

Described next are two variations on the LM335 temperature sensor. The first sensor attaches directly to a three-pin male header and is suitable for measuring the internal temperature of a BalloonSat. The second variation attaches to the end of the sensor cable assembled above and allows the temperature sensor to exit the airframe and measure the external air temperature.


Figure 6. The LM335 temperature sensor is a pretty simple circuit. It only has three components, some wire, and heat shrink tubing. With 10-bit A to D conversion, your flight computer will record temperature changes of 0.5 degrees Celsius or 0.25 degrees Fahrenheit.


Parts List for a LM335 Temperature Sensor

Three-pin header

1,000 ohm, ¼ watt resistor

LM335 temperature sensing IC

Small diameter heat-shrink tubing

¼ inch diameter heat shrink

Hot glue

Green model paint or green marker (internal version)

#24 AWG stranded wire (external version)

Note: Three different colored wires are recommended for the cable. If several temperature sensors are used in a single airframe, then use different colored wires for the signal wires to distinguish between the sensors plugged into each analog port.


Steps for the LM335 Sensor Head (needed for both variations)

( ) Orient the flat face of an LM335 towards you and cut off the left-most lead.

( ) Cut the middle lead to a length of 6 mm (¼ inch).

( ) Tin the two leads of the LM335.

( ) Cut the leads of a resistor to 6 mm (¼ inch) long (save the cut-off leads).

( ) Tin the leads of the resistor (including the ends of the cut leads).

( ) Place the center lead of the LM335 in contact simultaneously with the top lead of the resistor and free end of the cut resistor lead (you will probably need an extra set of hands to hold all three wires together).

( ) Solder all three wires together.

Figure 7. Steps for Making an Internal Temperature Sensor

Figure 8. The flat face of the LM335 faces you in this diagram.


( ) Tin the short pins of a three-pin header.

( ) Place the LM335 header's right-most lead in contact with the right-most pin of the header (GND) and solder them together.

( ) Place the lead of the resistor in contact with the center pin of the header (+5V) and solder them together.

( ) Solder the cut resistor lead to the left-most pin of the header.

( ) 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.

( ) Apply a green dot to the header's plastic base next to the ground pin.

Figure 9. The internal temperature sensor should look like this when complete.in The Citizen Scientist.


Part 2 will appear in the October installment of
The Citizen Scientist. 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 (04 September 2009).


 

   
Copyright © 2001-2009 The Society for Amateur Scientists