05 June 2009

Poorman's Space Program

 

The BalloonSat Easy Flight Computer

Part 2. Finalizing the Computer

L. Paul Verhage


Part 1 described the assembly of the BalloonSat Easy Flight Computer. Follow Paul at Twitter.


5. Camera and Switch Cables

Cut six wires and strip 6 mm (¼ inch) of insulation from their ends. The lengths of the wires depend on the size of your BalloonSat; however, 15 cm (six inches) ought to be long enough). Insert each wire into the PCB as you did for the battery snap and holder (for strain relief) and then solder.

Slide 13 mm (½ inch) of heat shrink tubing over the ends of the switch wires and push them up to the PCB. Then strip about 20 mm (¾ inch) of insulation from the ends of the four switch wires. Twist the ends tightly (so they won't fray) and pass the end of the first wire through the hole in one of the pins on the bottom of a switch. Solder the wire and pin. Repeat for the other wire to the switch. After the solder cools, slide the heat shrink over the soldered connection and shrink it with the a heat gun. Repeat a second tie for the other switch.

How you terminate the camera cable depends on the connector you use for your camera.

_ Main Power Switch Cable

_ Servo Power Switch Cable

_ Camera Cable


6. IC Sockets

To protect the PICAXE and the memory from heat damage by the soldering iron, solder IC sockets to the PCB and not to the ICs themselves. Electrically speaking, the orientation of the IC sockets doesn't matter. However, solder the sockets with their notches aligned with the notches on the top silk graphic. The notch in the IC sockets indicates the proper orientation of the PICAXE and memory when you install them. Do not install the PICAXE or memory into their sockets before soldering the sockets to the PCB – this defeats the purpose of using the socket. Do not insert the PICAXE or memory until after testing is complete.

_ U1 18-pin IC socket

_ U2 8-pin IC socket


7. Capacitor

The capacitor is polarized, so look for a plus (+) mark stamped on its body and the + sign on the top silk graphic. The capacitor will probably resist being set flush to the PCB, so don't force it.

_ C1 22 microfarads


8. Voltage Regulator

The voltage regulator is polarized, so install it with the flat face of the regulator aligned with its top silk illustration. This is another component that will not sit flush on the PCB, so don't force it.

_ U3 LM2940


9. LED

The LED is another polarized component, but, unlike the others, if it is installed backwards, the flight computer will still function; it just won't provide a light that indicates the BalloonSat Easy is running. Look for the flat edge on the LED's plastic lens, which is usually on the side with the short lead. That flat edge indicates the negative lead of the LED, or its cathode. The other lead is the anode and it goes into the pad marked with the letter A. Push the LED down until it is flush with the PCB and then solder.

_ D2 LED


10. Relay

The pattern of pins on the underside of the relay makes the proper orientation apparent. The relay sits flush to the PCB surface.

_ L1 Reed relay


11. Receptacle

The orientation of this component is unimportant, just insert it and push it flush to the PCB before soldering its leads.

_ 3 by 3 Receptacle


12. 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.

_ J1 3-pin Straight Pin Header


Checking Your Work

This completes the assembly of the BalloonSat Easy. Now it's time to perform these five checks to test the operation of the system.

1. Check the Soldering

Check the underside of the PCB for any blobs of solder that may have bridged the gap between two pads. If there appears to be such a bridge, briefly apply some heat to the pads with your soldering iron and “pull” the molten solder into two separate cones. Or lay a solder wick across the solder bridge, heat it with the iron and try to wick up the excess. Do these actions quickly as too much heat can damage copper traces on the PCB.

2. Check for Shorts

Set the multimeter to continuity and apply the test leads to the two contacts in the nine volt battery snap (with the power switch turned on). There should be no ringing. If there is, then there's a short in the PCB that needs to be located and fixed. Pretty much the only way a short can exist in the PCB is through a solder bridge. So look over the underside of the PCB again for a solder connection that has overflowed its pad.

3. Check the Voltage

Set the multimeter to measure DC voltage. Snap a nine-volt battery into the BalloonSat Easy and measure the voltage across pins 5 and 14 of the IC socket. With the red lead on pin 14 and the black lead on pin 5, the multimeter should display a voltage between +4.75 and +5.25 volts.

Figure 5. The order of the pins in an 18-pin socket/IC.

Figure 6. The order of the pins in an 8- pin socket/IC.


Check the commit header voltage by leaving the black test lead on pin 8 and moving the lead test lead to pin 4. The multimeter should display between +4.75 and +5.25 volts. Next, place the shorting block on the commit header and repeat the same measurement. The multimeter should now display close to zero volts.

Finally check the voltage on the memory chip socket. Place the red test lead on pin 8 and the black test lead on pin 1. Again, the voltage should read 5.0 volts, plus or minus 0.25 volts. Placing the black test lead on pins 2, 3, or 4 should give the same readings.

Check the voltages on the I/O ports. To make an electrical contact with the receptacle, insert cut resistor leads into an opening of the receptacle. The openings marked in red are +5 volts and the ones marked in green are ground, or zero volts. Insert one cut resistor lead into a +5 volt opening and a second resistor lead into a ground opening. Touch the test leads of the multimeter to the resistor leads sticking out of the openings, and it should display a voltage between +4.75 and 5.25 volts.

Figure 7. The I/O Port Connections.


4. Check I/O Continuity

Disconnect the battery and set the multimeter back to continuity test. The white lines in the diagram above indicate the connections between the receptacles and the PICAXE socket. Touch one test lead of the multimeter one pin in the IC socket and use a cut resistor lead to make contact with the appropriate opening in the I/O receptacle. The multimeter should ring for each connection.


Servo Header Note

The servo header tests a bit differently than the rest of the I/O ports. Instead of +5 volts, it should read closer to 4.5 volts. The resistance between PICAXE pin 9 and the servo header pin should be around 330 ohms (and probably too high for a continuity test). So measure the resistance instead of checking for continuity.


5. Check the PICAXE

Insert a PICAXE-18X into the IC socket and plug a serial programming cable into the programming header on the BalloonSat Easy. Connect a battery and turn on power. Type the command DEBUG and download it into the PICAXE by clicking the Download Button (the diagram below points to the Download button).

Figure 8. Screen shot of the PICAXE Editor pointing out the download button and circling the number of replies from the PICAXE.


If the PICAXE has not been damaged and the programming header is making proper contact between the program header and the PC serial port, there will be a single debug message indicating that the PICAXE's memory bytes (B0 to B13) are set to zero.


Protecting the BalloonSat from Short Circuits

Protect the underside from short circuits by gluing a sheet of ¼ inch thick Foamcore to the bottom of the PCB with hot glue. After the glue cools, seal the open gaps on the edges of the PCB with additional hot glue.


Camera Cable Termination

The proper termination for your BalloonSat Easy's camera cable depends on the method used to terminate the camera's shutter cable. What ever terminator is used, make it a standard and use it to terminate all of your cameras. A Dean's Micro Plug works well for a standard terminator. They are available from many hobby stores that carry RC cars and airplanes.


I2C Notes

IIC (or I2C) is a form of synchronized serial communications that relies on two independent PICAXE pins to send signals to the memory IC. One is the clock, which sends square waves to coordinate communications between the slaves and master ICs. Communications takes place over the second pin.

The command below instructs the PICAXE on the proper way to communicate with the 24LCxx memory IC on the BalloonSat Easy. This command should be one of the first lines of code in the flight program.

i2cslave %10100000,i2cfast,i2cword

The memory IC used in the BalloonSat Easy expects data to be stored in one word, or two byte records. Therefore, if the READADC command collects sensor data, then fly two sensors on the mission and store readings from both sensors together in memory. A more complex program can store readings taken from the same sensor at different times. Alternatively, the BalloonSat Easy can carry a single sensor as long as the READADC10 command is used. This is because the READADC command only returns a single 8-bit (or one byte) record for each reading, and the READADC10 returns a reading 10-bits wide, which is to large for a single byte. The benefit of using the 10-bit reading is that the sensor data contains more details.

The amount of data that can be stored inside the memory IC depends on the particular version of the IC plugged into the socket. The table below is a list of the valid BalloonSat Easy memory ICs and their maximum memory.

24LC32A 2kb

24LC65 4kb

24LC128 8kb

24LC256 16kb

24LC512 32kb

There are 27 parts in the programmable BalloonSat Easy flight computer. The heart of this flight computer is the PICAXE-18X with 2,048 bytes of memory, or enough memory to store between 600 and 1,000 lines of code. Data collected during the mission is stored in a separate 24LCxx family memory chip. Depending on the specific memory chip used, over ten thousand mission readings can be stored. Although a separate memory chip stores mission data, this doesn't preclude the PICAXE-18X from also storing data. A single nine-volt battery is all it takes to operate the flight computer, but there is a separate 3 “AAA” battery pack in case a servo is part of the BalloonSat. The weight of the BalloonSat Easy and its batteries is only 125 grams. That leaves a lot of available weight for the BalloonSat airframe and its sensors.

_____________________________
The Citizen Scientist (05 June 2009).