Poorman's Space Program
The BalloonSat Mini
L. Paul Verhage
The BalloonSat Mini is the simplest BalloonSat flight computer. Flight computers control experiments inside a BalloonSat and record the results. However, unlike the data loggers described in previous chapters, the flight computer can actively control experiments and change the intervals at which data is collected and stored. A single nine-volt battery is all that is needed to operate the BalloonSat Mini, which can record data from up to three sensors and operate a camera shutter. The weight of the BalloonSat Mini and its battery is only 64 grams, which leaves lots of weight free for the BalloonSat airframe and sensors.

Figure 1. Assembled BalloonSat Mini flight computer.
The heart of the BalloonSat mini is a microcontroller called the PICAXE-08M. The PICAXE-08M's internal memory is limited to 256 bytes, or about 60 lines of code. That same 256 bytes is also used to store data. This gives the impression that the BalloonSat Mini is not a very capable flight computer. However, the PICAXE's BASIC programming language is powerful, and only a fraction of the memory is required to operate most near space missions. A well written program will leave the BalloonSat Mini capable of collecting over 170 pieces of data. With two sensors attached, the BalloonSat Mini can record data every minute from both sensors for the entire ascent of the mission.
Parts List
Below is a list of the components in the BalloonSat Mini kit and their references on the printed circuit board.
C1 22uF tantalum capacitor
D1 Green light-emitting diode (T1-3/4)
D2 1N4001 diode
J1 2-pin right angle header
J2 3- pin straight header
J3 3 by 3 receptacle
L1 6V reed relay
R1 1k ohm resistor (brown, black, red, gold)
R2 10k ohm resistor (brown, black, orange, gold)
R3 22k ohm resistor (red, red, orange, gold)
R4 10k ohm resistor (brown, black, orange, gold)
U1 PICAXE-08M
U2 LM2940 +5 volt regulator (TO-92)
The remaining items are required to complete the BalloonSat Mini, but they are not referenced on the PCB.
8-pin IC socket
Wire #24 AWG
Nine-volt battery snap
Shorting block
Printed Circuit Board
Note: A kit of parts for the BalloonSat Mini will be available at http://nearsys.com/
Theory of Operation
Every component on the BalloonSat Mini allows the PICAXE-08M to operate experiments and collect and store their data.

Figure 2. The BalloonSat Mini schematic.
The voltage regulator (marked LM-2940) converts the slowly declining voltage of the nine-volt transistor battery into the constant five volts that the PICAXE prefers. The 22 uF capacitor (marked either as 226 or 22 uF) behaves like a temporary battery that helps the voltage regulator maintain a more constant five volt output. The voltage regulator and capacitor holds the voltage to five volts, give or take ¼ of a volt (or between 4.75 and 5.25 volts) as long as the current demand does not exceed 100 mA.
The only function of the light emitting diode's (LED) is to turn on when the nine volt battery is snapped into place. Since there is no visible indication that the BalloonSat Mini is powered up and running, the LED is required as a power indicator. The 1k resistor connected to the LED prevents the current flowing to the LED from damaging the voltage regulator or LED.
The program for the BalloonSat Mini is written on a PC and downloaded into the PICAXE through the download cable. The connector for the download cable is called a header and it consists of three straight pins. Each pin has a specific function: read data in, send data out, or ground. The 22k resistor limits the amount of current flowing between the PC serial port and the PICAXE during the program download. The 10k resistor ensures that the PICAXE won't accidentally detect false data.
The Commit Header is a two pin, right angle header. The first pin is the five volt pin and is connected to the PICAXE and five volts from the voltage regulator (via a 10k resistor to protect the voltage regulator and PICAXE). The second pin is the ground pin and is connected to ground or 0 volts. The spacing between the two pins of the Commit Header allows a shorting block to fit over them. When the shorting block is not in place over the Commit Header, the PICAXE detects five volts from the five volt pin in the Commit Header. When the header is shorted with the shorting block, current from the pull up resistor bypasses the PICAXE and travels straight to ground through the Commit Header's ground pin. The PICAXE detects zero volts instead of five volts when the shorting block is in place. The PICAXE is programmed to monitor the Commit Header and will not begin recording data until after the shorting block is removed. This means the BalloonSat Mini can wait for hours before it begins operating experiments and recording data.
The three channel input-output (I/O) ports on the BalloonSat Mini provide five volts, ground (or 0 volts), and a unique connection to the PICAXE for each experiment (up to three) plugged into them. Data from sensors can be either a voltage that varies in response to a particular environmental condition, a voltage that is either on or off based on conditions, or digital data consisting of meaningful pulses. The program downloaded into the PICAXE analyzes the output from the sensors plugged into the I/O ports and records the results. The stored data is downloaded after recovery. The I/O ports will also support experiments that require instructions from the flight computer to operate.
The camera relay is an electrically-controlled switch (it looks like a blue cylinder with black caps). When the PICAXE is programmed to take a picture, a coil of wire inside the relay becomes magnetic. The coil's magnetic field closes the switch inside the relay, triggering the shutter of the camera attached to the Camera Cable. After the PICAXE has triggered the camera shutter, it stops powering the magnetic field inside the relay. When the magnetic field collapses, it can potentially induce a backwards flowing current towards the PICAXE. In a large coil the current can be large enough to damage the PICAXE. The diode next to the relay protects the PICAXE by grounding induced reversed currents before they can reach the PICAXE. The relay used in the BalloonSat Mini is pretty small and probably safe for the PICAXE. However, to be absolutely safe, the diode is included on the BalloonSat Mini.
Assembly Steps
The particular order that the electronic components are soldered to the PCB is not particularly important. However, it's easier to assemble the BalloonSat Mini if the lowest lying components are soldered before the taller ones.
The diagram below illustrates the proper placement and orientation of the components that are soldered to the BalloonSat Mini PCB. Be sure to check off each step listed below as you complete them.

Figure 3. Parts layout for the BalloonSat Mini.
1. Resistors
Form (bend) the resistor leads before inserting them into the PCB. Each resistor's position is indicated by its R-number.
? R1 (brown, black, red, gold)
? R2 (brown, black, red, gold)
? R3 (red, red, orange, gold)
? R4 (brown, black, orange, gold)
2. Diode
Note that the diode has a white stripe on one end. Orient the diode's stripe according to the diagram above. If it's backwards, the relay will never trigger the camera and the PICAXE could be damaged. Form the leads of the diode before you begin inserting the first lead into the PCB.
? D2
3. Commit Header
Insert the short leads into the PCB and leave the longer pair hanging over the edge of the PCB. Push the plastic base of the header flush with the surface of the PCB before you solder it.
? J1
4. Cables
A cable is a collection of wires dedicated to a single task. The wires in the BalloonSat Mini cables solder to the PCB a bit differently than the rest of the electronic components. Strip ¼ inch of insulation from one end of each wire. Now note the large diameter holes next to the solder pads for the wires in each cable. The large holes act as a strain relief that prevents the wires in the cables from breaking off of the PCB. So thread each wire from the bottom of the PCB and through the large strain relief hole. Then bend the wires over and insert them into their proper solder pads. Push the stripped wires flush against the pad and solder them in place. There should be very little, if any, bare wire exposed above the PCB. Trim the wire after the solder cools. The nine volt battery snap cable is polarized--its red colored wire is positive nine volts and its black wire is ground (or 0 volts). Look at Fig. 2 to ensure that these two wires are inserted into the proper pads before you solder them. The camera cable is not polarized and the wires can be soldered in any order.
? Battery Snap
? Camera Cable
5. IC Socket
To protect the PICAXE from heat damage, an IC socket is soldered to the PCB in place of the microcontroller. The orientation of the IC socket doesn't matter, however; solder the socket with its notch aligned with the notch on the top silk graphic. The notch in the IC socket will specify the proper orientation of the microcontroller when it comes time to plug it in.
? U1 socket
6. Capacitor
The capacitor is polarized-- there's a plus sign (+) printed on the body of the capacitor to indicate the positive lead. Orient the capacitor according to Fig. 2. The capacitor stands a short distance above the surface of the PCB and is not flush against the surface.
? C1
7. Voltage Regulator
The voltage regulator is another polarized device. Install it with the flat face of the regulator's body aligned with the illustration on the top silk screen. The voltage regulator is another device that stands a short distance above the surface of the PCB.
? U2
8. LED
LEDs are polarized components. However, soldering one backwards does not prevent the BalloonSat Mini from working--the LED just won't emit light. The LED's negative lead is indicated by the flat edge on the LED's plastic lens. The other lead is soldered to the pad labeled with the A. Push the LED down until it is flush with the PCB before you solder it.
? D1
9. Relay
The pattern of pins on the underside of the relay makes its proper orientation very obvious. The relay sits flush to the PCB surface.
? L1
10. 3X3 Receptacle
The orientation of this component is unimportant, just insert it and push it flush against the PCB before soldering its leads.
? Receptacle
11. Program Header
Insert the short ends of the header's pins into the PCB and push it until its plastic base sits flush to the PCB.
? J2
Check your Work
That completes the assembly of the BalloonSat Mini. However, don't plug in the PICAXE-08M and battery just yet. First perform the following five tests to verify the BalloonSat Mini is properly assembled.
1. Solder Check
Look under the PCB for blobs of solder. Solder should be in the form of neat little cones and not rounded blobs or overflow bridges between pads. You can try to fix solder bridges two different ways. One is to briefly heat the pads with a soldering iron and “pull” the molten solder into two separate cones. The other is to remove the excess solder with solder wick or a solder suckers. Do these steps quickly as heat will damage the copper traces on the PCB.
2. Short Check
Perform a continuity check of the BalloonSat Mini with a multimeter. Apply the test leads to the two battery contacts in the nine-volt battery snap. There should be no ringing when the power switch is turned on or off. If there is a short, the most likely cause is a solder bridge. So look over the underside of the PCB again for a solder connection that was missed in the last check.
3. Voltage Check
A. Set the multimeter to measure DC voltage, snap a nine-volt battery to the battery clip, and measure the voltage across pins 1 and 8 of the IC socket. With the red lead on pin 1 and the black lead on pin 8, the multimeter will display a voltage between +4.75 and +5.25 volts.

Figure 4. IC pinout.
B. Leave the black lead on pin 8 and move the red lead to pin 4. The multimeter will display between +4.75 and +5.25 volts. Next place the shorting block on the Commit Pin and repeat the same measurement. With the shorting block in place, the multimeter will display close to 0 volts.
C. Make electrical contact with the +5 volt and ground rows in the I/O receptacle by inserting cut resistor leads into one of the +5 volt and one of the ground openings of the receptacle. It's not important which opening in the rows you use for this test. The I/O port's +5 volt row is indicated by the +5V on the PCB top silk and the ground row is indicated by the G. Do not let the two resistor leads touch each other during this test. Tap the resistor leads with the multimeter test leads and the meter should display a voltage between +4.75 and +5.25 volts.
If the voltages you measured are not at their proper values, look for component leads that are not soldered.
4. Continuity Check
Disconnect the battery from the BalloonSat Mini flight computer and set the multimeter to measure continuity. The white lines in Fig. 5 indicate the connections that exist between the I/O port receptacle and to pins in the PICAXE IC socket. Use a cut resistor lead to make contact with the openings in the receptacle. Tap the multimeter test leads to the appropriate pin in the IC socket and the I/O receptacle. The multimeter will ring for each connection. If not, look for a missing or inadequate soldered connection.

Figure 5. Receptacle connections.
5. PICAXE Test
Insert a PICAXE-08M into the IC socket (align the notch on the IC with the notch on the socket) and plug in a nine-volt battery. Type the following program title into the PICAXE Editor and connect the download cable to the download header on the BalloonSat Mini.
DEBUG
Download the program by clicking the Download Button and observe the result. The debug window will open and display a single return as circled in Fig. 6.

Figure 6. The PICAXE debug screen.
Protecting the BalloonSat from Accidental Short Circuits
Soldered connections on the bottom of the BalloonSat Mini PCB are exposed and could short out if the flight computer is placed on a metal surface or laid on top of metal debris, like cut wires. To protect the flight computer against short circuits, glue a sheet of ¼-inch thick Foamcore to the bottom of the PCB with hot glue. For greater protection, fill the gaps between the edge of the PCB and the Foamcore with more hot glue.
Camera Cable Termination
Terminate the BalloonSat Mini's camera cable to fit the termination on your camera shutter cable. What ever terminator you use, make it a standard and use it to terminate all your cameras. NearSys recommends a Dean's Micro Plug. They are available at many hobby stores that carry RC cars. For information on modifying cameras for microcontroller operation, search online.
|