03 July 2009

Poorman's Space Program


The BalloonSat Extreme

Part 1. When "One Experiment-One BalloonSat" Just Isn't Enough

L. Paul Verhage
Follow Paul at Twitter.


The goal behind the BalloonSat is to give an individual (or a small group, if the students are very young) the opportunity to create an experiment for near space and then to have it sent there. The student shouldn't be concerned with launching, tracking, or recovery. He or she should just focus on developing a great experiment that is suitable for the flight into near space.

What if the student wants to develop a fairly complex set of experiments or several students want to collaborate on the construction of a single= airframe for an array of experiments? These situations lead to a BalloonSat that's big and heavy. Therefore, I have developed a suitable flight computer for such an Extreme BalloonSat that I'll describe in this column and next month. Appropriately enough, the name of this flight computer is the BalloonSat Extreme.

Figure 1. A close up of the BalloonSat Extreme. As explained in this article, the BalloonSat Extreme flight computer is suitable for controlling multiple experiments housed in a single, very large (hence extreme) BalloonSat. It's just one notch below a full near spacecraft flight computer.


The heart of the BalloonSat Extreme is the BASIC Stamp 2pe (BS2pe), a version of the BASIC Stamp optimized for battery operated data loggers. The BS2pe has 16 memory banks of 2 kb each. Eight of the banks can only store data while the remaining eight memory banks can hold flight code and/or data. At least one memory bank has to hold flight code or else the BalloonSat Extreme can't collect and store data. I find that a single 2 kb memory bank is more than enough space to store the necessary flight code (partly due to the fact that BASIC Stamps store their programs in a compressed form called tokens). This means a BalloonSat Extreme can store as much as 30 kb worth of data. If you're smart about how you store data onboard the BS2pe, you can collect enough data to stay busy for a week analyzing your data swag from near space.


Onboard the BalloonSat Extreme

Experiments interface to the BalloonSat Extreme through these five ports.

1. Three camera connections

Using three cameras, a BalloonSat could take photographs pointing up, down, and sideways. Alternatively, the BalloonSat could take infrared and visible light images of the ground simultaneously. Or a camera onboard the BalloonSat could document the results of an experiment while leaving the other two cameras available for near space photography.

2. Three servo connections

The Servo Port has its own power supply (battery pack), separate from the one used for the BS2pe and experiments. Therefore, a hard working servo can't reset the flight computer through a brown-out (a momentary drop in voltage). The separate battery pack also creates a graceful failure mode for the BalloonSat Extreme should the servos drain the battery sooner than expected. In other words, the flight computer will continue to function even if the servos can no longer. Servos onboard a BalloonSat can serve to position or activate experiments.

3. Eight channels of 12-bit analog input

The Analog Port is an input only port that digitizes sensor voltages with a resolution of 12-bits, or to 4,096 counts or parts. The MAXIM-186 ADC used in the Analog Port is limited to 4.096 volts; therefore, it can resolve a voltage difference of one millivolt. That equates to a voltage difference of 0.1%. With that kind of resolution, you'll need the BalloonSat Extreme's 30 kb of memory capacity to store your fight data. The pins in the port's receptacles supply any experiment plugged into it with five volts and ground.

4. Five channels of digital I/O

The Digital Port , like the Analog Port , provides five volts and ground to every experiment plugged into it. However, unlike the Analog Port , the Digital Port is a two-way (bi-directional) port; experiments can send data to the flight computer and receive instructions from the flight computer.

5. One serial GPS connector

Something a bit different is that the BalloonSat Extreme allows you to connect a GPS receiver. That makes it possible to correlate experimental results to variables like time, altitude, ascent rate, horizontal speed, or course heading. An inexpensive Garmin Etrex is a perfectly suitable GPS for the BalloonSat Extreme (just use lithium batteries because of the cold in near space).


Theory of Operation

Perhaps the best way to see how the BalloonSat Extreme operates is to view it as seven separate ports. The ports are:

1. Analog Port

The Analog Port consists of eight three-pin headers and a MAXIM-186 analog to digital converter (ADC). The MAX186 is a successive approximation ADC that converts an analog voltage into a twelve bit digital value. Twelve bits is equivalent to 212 (or 4,096), and, since the MAX186 has a maximum input voltage of 4.096 volts, each of its 4,096 counts is a voltage difference of 0.001 volt (or one millivolt). The MAX186 converts a specific channel voltage into a digital value upon command from then BS2pe. Conversion instructions and voltage values are sent between the BS2pe and the MAX186, synchronized with a clock pulse emitted by the BS2pe. The three pins in each of the eight analog headers provide +5 volts, ground, and a voltage input to a specific channel of the MAX186. The placement diagram below illustrates the arrangement of the ground, power, and voltage input.

2. Camera Port

There are three single pole, single throw (SPST) relays on the BalloonSat Extreme. Each relay consists of a magnetic SPST switch and a coil of wire. When the BS2pe applies a voltage to a relay coil, the coil becomes magnetic, triggering the switch in the relay to close. The camera connected to the cable from the relay then senses it has been “clicked” and it takes a picture. When there is no longer a voltage applied to a coil, its magnetic field collapses creating a new current that flows in the opposite direction. To protect the BS2pe from this reverse current, a diode connected across the coil of the relay sends the reverse current to ground, rather than letting it reach the BS2pe.

3. Commit Port

The Commit Port consists of a pull up resistor and ground connection. The function of the pull up resistor is to ensure there is a solid five volts on the BS2pe's I/O pin P3 unless the Commit Pin shorts the circuit. Physically, the Commit Port is a 1/8 inch mono receptacle. The Commit Pin is a 1/8 inch mono jack with its base and tip soldered together. When inserted into the receptacle, the shorted jack sends (shunts) current from the pull up resistor to ground, rather than to the BS2pe. As a result, the BS2pe's I/O pin P3 is at ground (a logic low) rather than +5 volts (a logic high). Incorporating a Commit Port allows the onboard GPS to get a proper satellite lock before the BalloonSat starts recording data. Only after the Commit Pin is pulled does the BalloonSat Extreme begin recording data or operating its experiments. This, quite frankly, beats having the Ballo= onSat record 20 minutes of data while it just sits on the ground waiting for launch.

4. Digital Port

The digital Port is a direct connection to BS2pe I/O pins P11 through P15. The port has five 3-pin headers that function identically to the Analog Port headers. However, in the case of the Digital Port , the connection to the BS2pe is two way or bidirectional. This allows the BalloonSat to operate experiments like a Geiger counter that output digital data and experiments like a MAX1820 that requires instructions from the BS2pe to produce an output. The arrangement of pins in the Digital Port 's headers is identical to the servo headers (signal, +5V, and ground). The placement diagram below illustrates which column of pins are ground, power, and voltage input.

5. GPS Port

The male DB-9 at the bottom of the BalloonSat Extreme is a serial port for a GPS receiver. The BalloonSat Extreme expects the GPS signal on pin #2 and ground on pin #5. In addition, there's +5 volts on pin #4 should the GPS require an external source of power rather than have an internal battery. Just plug in the GPS and the BS2pe can use the SERIN command to dump NMEA sentences into scratch pad memory for later parsing. The BS2pe receives the GPS signal over I/O pin P7.

6. Program Port

The female DB-9 at the top of the BalloonSat Extreme is where programs and data are sent to and from the BS2pe.

7. Servo Port

There are three servo headers on the BalloonSat Extreme. These are male headers with a spacing of 0.1 inches between pins. The arrangement of pins in the Servo Port is the same as the Analog and Digital Port, with signal (from the BS2pe), positive voltage, and ground. Servos require a voltage between +4.5 volts and +6 volts. Unless an extreme amount of speed or power is required for the servos, use three fresh “AAA” batteries to provide 4.5 volts. The Servo Port has a power switch that's separate from then main logic power switch. When the switch is turned on, an indicator LED is illuminated. BS2pe I/O pins P4, P5, and P6 command the servos.

Figure 2. Circuit diagram of the BalloonSat Extreme.

Voltage Regulation

This is not a port, but it is a vital subassembly. It consists of a LM2940 voltage regulator and electrolytic capacitor. The voltage regulator steps down the supply voltage and keeps it around 5.0 volts, give or take 0.25 volts (as required for the BS2pe). The regulator also provides power to the GPS receiver plugged into the GPS Port (if it uses the DB-9 pin #4) and any experiments plugged into the Analog and Digital Ports . The size of the capacitor depends on the amount of work expected of the BalloonSat Extreme. At a minimum, the LM2940 requires a 22 uF capacitor. However, experiments that can load the flight computer when they operate will require a larger value capacitor to maintain proper voltage regulation. Probably a 220 uF capacitor will do in most cases. In addition to the voltage regulator and capacitor, there is a switch, resistor, and LED connected to the voltage regulator. The switch allows you to power up the flight computer. The LED and resistor are the power indicators that verify the flight computer is operating.


Assembling the BalloonSat Extreme

The BalloonSat Extreme requires the following parts:

BASIC Stamp 2pe

MAXIM-186

3 by 8 receptacle

3 by 5 receptacle

3 by 3 header

Male DB-9 connector

Female DB-9 connector

20-pin IC socket (300 mils wide)

Three 5-volt reed relays (SPST)

Three 1N4001 diodes

24-pin IC socket (600 mils wide)

Four 1k-ohm resistors (1/4 W)

0.01 uF capacitor

Two 0.01 uF capacitors

Two 4.7 uF capacitors

LM2940 voltage regulator

Two battery packs (4 “AAA” and a 3 “AAA”)

Two toggle switches

Two LEDs

1/8 inch mono jack

1/8 inch mono receptacle

Six jumper wires

Three terminations (for camera port)

Heat shrink tubing

#24 AWG Stranded Wire

30 mil thick plastic sheet (available at many hobby stores)

Plastic tube (3/16 inch diameter)

Two sets of #2-56 hardware (1/2 inch long bolt, washer, and lock nut – nylock)

Figure 3. This is the copper mask for the BalloonSat Extreme PCB. I published an article on making PCBs at home in the January 2001 issue of Circuit Cellar Inc that you might want to read. Shrink the above mask to a size of 3.55 inches by 3.35 inches and copy it to a transparency. The pattern is a positive, so, depending on your PCB making procedure; you may need to reverse the colors.


After shooting the PCB, check it for shorted traces (cut them away with an Exacto knife if necessary) and then drill the lead holes. I use a #67 drill bit for small stuff like resistor leads and a #64 drill bit for larger stuff like diodes and the voltage regulator leads. I use a 1.5 mm drill bit for the wire pass through holes and a 2 mm or larger drill bit for the four holes in the corners (used to mount the flight computer). See the= first image in this month's column for an explanation on how I drilled the holes for the cabling.


Part 2

Part 2, which will appear in the August installment of The Citizen Scientist, will explain how to solder the components to the PCB and test the assembled circuit. Until then, Onwards and Upwards. Your Near Space Guide

_____________________________
The Citizen Scientist (03 July 2009).