Docstoc

ICE Cube Project

Document Sample
ICE Cube Project Powered By Docstoc
					                     ICE-Cube Project
                  Communication Subsystem

                            Cornell University
                              Spring 2003




Mike Hammer       ldh3@cornell.edu

Nelson Li         nll4@cornell.edu
Keith Sinclair    kjs39@cornell.edu
Ryan Song         rs125@cornell.edu
Chase Million     ccm26@cornell.edu
Fawaz Allahwala   fa33@cornell.edu
Nicole Kalb       nk64@cornell.edu
Taneh Wonoloh     atw22@cornell.edu
Chongouk Kim      ck69@cornell.edu
                                SIGNATURE PAGE

Reviewed by:

               Name, Title, email                       Date

Reviewed by:

               Name, Title, email                       Date

Reviewed by:

               Name, Title, email                       Date

Reviewed by:

               Name, Title, email                       Date




Cornell University          Communications Sub-System          2
                          REVISION HISTORY



Revision   Description                    Author           Date      Approval
1          Draft                          Juan Jimenez     11/14/01 Pending
2          Draft                          Ryan Song        12/15/02 Pending
3          Draft                          Nelson Li &      5/13/03   Pending
                                          Keith Sinclair
4
5
6
7
8
9
10




Cornell University       Communications Sub-System                              3
                              TABLE OF CONTENTS

1.        EXECUTIVE SUMMARY                             6
          1.1 Work Breakdown Structure                  6
          1.2 Work Completed                            7
          1.3 Work to be Completed                      8


2.        LESSONS LEARNED                               9


3.        SPECIFICATIONS                                10
          3.1 Applicable Documents                      10
          3.2 Space Segment                             11
          3.3 Ground Segment                            16


4.        BLOCK DIAGRAMS                                19
          4.1 Functional Block Diagram                  19
          4.2 Structural Block Diagram                  20


5.        SPACE SEGMENT DESIGN                          21
          5.1 Antenna                                   21
          5.2 Board                                     24
          5.3 Software                                  56
          5.4 Prototype Changes                         80


6          COMMUNICATIONS PROTOCOL                      87


7         GROUND SEGMENT HARDWARE DESIGN                95
          7.1 Antenna                                   95
          7.2 Other Hardware                            96


8         GROUND SEGMENT SOFTWARE DESIGN               103



Cornell University         Communications Sub-System    4
           8.1 GSAT and PREDICT                            105
           8.2 Antenna Rotor Control                       107
           8.3 Ground Station Communications               112
           8.4 E-mail and Logging                          118
           8.5 Configuration                               120


9         REQUIREMENTS VERIFICATIONS                       124
          9.1 Space Segment                                124
          9.2 Ground Segment                               130


10        APPENDIX                                         137
          I. Parts Listing                                 137
          II. Command & Data Handling Protocol             139
          III. Antenna Design                              141
          IV. Rotor Control                                150
          V. Testing Document                              161
          VI. Datasheets                                   167




Cornell University             Communications Sub-System    5
1.            EXECUTIVE SUMMARY



1.1           Work Breakdown Structure


                                    Communications
                                      Sub-System              Mike Hammer


                        Space Segment                 Ground Segment



               Hardware            Software       Hardware             Software


      Communications                                   Chase Millions Fawaz Allahwala
         Board                 Keith Sinclair
                                                       Nicole Kalb      Ryan Song
                       Nelson Li
                                                       Taneh Wonoloh
      Amplifier

                  Chongouk Kim




The design was broken down into space and ground segment teams. Chase Million and Nicole

designed and built a helical antenna. They and Taneh were responsible for maintaining the RF

testing environment. Fawaz Allahwala and Ryan Song developed the ground station software.

Fawaz duties include implementing and testing the software. For the space segment, Nelson Li

designed the on-board circuit schematic and board layout.        Chongouk Kim designed the

amplification section. Debug of the design was done by Nelson and Keith Sinclair. Keith

designed and implemented the software component. Fawaz, Keith, and Ryan also devised the

communication link protocol to communicate from the ground station to the satellite.




Cornell University           Communications Sub-System                                     6
1.2            Work Summary

The work summary can be divided by the work completed by the space and ground segment,



1.2.1          Space Segment

Over the course of the year, the prototype Communications Board was designed, debugged, and

completed. The board design went through four iterations. The first iteration was the legacy

design from CubeSat 2002. The second iteration fixed all the digital and power supply issues,

but had major RF problems due to layout and not design. The third iteration resolved the layout

issues, but there were still problems with the frequency spectrum, amplifier, and transmitting and

receiving. The fourth iteration is still under development. It has solved all issues except

amplification as we are unable to achieve the required 1 Watt output power. All of the hardware

except the amplifier is able to meet the specifications.      The software uses three layers of

abstraction: physical, protocol, and application. The physical layer, which directly interacts with

the hardware, was completed and tested. The protocol layer, which implements the AX-25

protocol, is incomplete and untested because the code to interface between the protocol and

physical layer has yet to be written. Finally, the application layer communicates with the

Command & Data Handling sub-system, implements the communication link protocol, and

controls the systems power mode. This is complete but untested because of the delays caused by

hardware development.     The space segment communication system is close to completion. The

system is able to transmit and receive in the 70 cm amateur radio band using FSK modulation

with a bandwidth and peak power of approximately 120 KHz and 26 dBm, respectively.




1.2.2          Ground Segment



Cornell University            Communications Sub-System                                          7
At the beginning of the 2002-2003 year, the following tasks were left outstanding: antenna

tuning, software, network and internet access, database, and RF testing environment. After

month of attempts at antenna tuning, the Yaggi design was abandoned for the helical antenna

design because the helical design was easier to build, more commonly documented, tune, and

outperformed the Yaggi design. Currently, the helical antenna has been constructed, but not yet

turned, tested, or mounted. The software design was mostly completed except for the rotor

control and the communication link. The component for handling file download was complete

and tested with a simulator. However, due to poor documentation, software instability, and lack

of functionality in the previous code to handle abrupt connection loss, software development

from the 2002 design could not be continued and the previous work had to be abandoned. The

only part of the previous work which was salvaged was the low level rotor control component

which interfaces with the physical layer. The ground station software had to be re-written.

Presently, the communication link, rotor control, antenna alignment with satellite, database

interface, and Predict interface and the Graphical User Interface have been completed but

untested. Although the network antenna was completed and tuned, network connection could not

be established because the Linksys‟s wireless Ethernet adapter does not have Linux driver

support. The database was successfully installed but currently is not being used since the data

format specifications from other sub-teams have not been received. The RF testing environment

was completed as two TNC‟s were able to communicate wirelessly.



1.3           Incomplete Work

The work to be completed is sorted by the space segment and ground segment.




Cornell University           Communications Sub-System                                        8
1.3.1         Space Segment

                    Debug amplifier instability.

                    Increase amplifier gain to match output power requirement.

                    Manufacture and populate fourth board revision.

                    Finish and test the software protocol and applications layers.

                    Test with ground station.

                    Distance testing.



1.3.2         Ground Segment

                    Find wireless Ethernet adapter with Linux support

                    Establish network and internet access.

                    Test software design.

                    Handling the Doppler Effect for the radio frequency.

                    Tune and mount Helical antenna.

                    Set fields, file format, data format for the telemetry, battery, thermal, and

                     Attitude Determine and Control information.

                    Test with space segment.



2.            LESSONS LEARNED

                    Never assume that past designs, simulations, and tests are correct without

                     substantiation. A lot of time was wasted trying to make the legacy board and

                     ground station antenna and software from CubeSat 2002 work.




Cornell University              Communications Sub-System                                       9
                    For board design, validate individual component designs through development

                     board before integrating into one system. This has the advantages of testing,

                     reducing risk, and accelerating software development.



3             SPECIFICATIONS

These specifications establish the design, construction, performance, development, and test

requirements for the communication subsystem of the ICE Cube Satellite project.                 The

communication subsystem is divided into space and ground segments. The communication

subsystem will be responsible for determining when the satellite is in a communication window.

At such times, the communications subsystem must transmit telemetry data to the ground station

and receive commands from the ground station.



3.1           Applicable Documents

The following documents of the exact issue shown will form part of this specificaion to the

extent specified herein. In the event of conflict between the requirements of this specification

and any referenced document the order of precedence will be 1) this specification, 2) referenced

documents.



3.1.1         Government Documents. None.



3.1.2         Industry Documents.

CUBESAT Design Specifications Document, Revision III, March, 2001; P-POD Payload

Planner‟s Guide, Revision C-June 2000, Ryan Connolly




Cornell University              Communications Sub-System                                        10
3.1.3         Internal Documents.

Systems Design Document, Link Budget document, Download Analysis Document, Data

Budget.

3.2           Space Segment.

The space segment is composed of the on-board equipment that allows the satellite to send data

and receive commands.



3.2.1         Functional.

The space segment will contain the functionality of an antenna, radio, and TNC. In order to

transmit data, the space segment will packetize data using the AX.25 protocol. It will then

modulate, amplify, and transmit an RF signal. While receiving data, the space segment will

demodulate an RF signal and then parse the received AX.25 packets.



3.2.2         Components. The space segment is composed of:



3.2.2.1       Antenna. The antenna must:

                    Fit in an area no larger than one face of the satellite.

                    Transmit within the 70 cm amateur radio band.

                    Provide sufficient gain to communicate with the ground station.

                    Have a beam width of no less than 30.

                    Have an impedance matched to the amplifier. See 3.1.2.2.




Cornell University               Communications Sub-System                                 11
3.2.2.2       Amplifier. The amplifier must:

                    Output sufficient power to communicate with the ground station for the entire

                     duration of the communication window.

                    Have a low power mode.

3.2.2.3       RF Section. The RF section must:

                    Output an RF signal within the input range of the amplifier.

                    Have the ability to set the carrier frequency.

                    Have the ability to set the baud rate

                    Have a low power mode that still allows it to receive data.



3.2.2.4       Digital Section. The digital section must:

                    Form and parse AX-25 Packets.

                    Control the functionality of the RF section.

                    Communicate at 9600 baud to the RF section and to Command & Data

                     Handling (CDH).

                    Have a low power mode.



3.2.3         Characteristics: The following define characteristics that must be met by the

              entire space segment



3.2.3.1       Physical

                    Weight: Less than 140 g (Antenna: 60 g; Board: 80 g)

                    Dimensions:



Cornell University              Communications Sub-System                                      12
                        o The communication board must occupy a volume no more than 9  9.5

                             2.1 cm3 (length, width, height).

                        o The communication antenna must occupy an area no greater than 10 

                            10 cm2 square.

                    The communication board must fit the four mounting rods inside the satellite.

                     (For additional details on mounting and assembly, refer to the structural

                     specification document)



3.2.3.2       Electrical

                    All components must operate at 3.3V.

                    The orbit average power draw must be less than 500 mW.



3.2.3.3       Environmental: The communications subsystem will meet the requirements of

              this specification after exposure to the following worst-case conditions while

              stowed for launch.

                    Natural Environment

                        o Ambient temperature up to 30 C prior to launch.

                        o Relative humidity up to 80% prior to launch.

                        o Exposure to temperatures in the range of –40 to 80C prior to

                            deployment from the P-POD. (For additional details on expected

                            environmental      conditions,   refer   to   the   thermal   specification

                            document.)

                    Induced Environment



Cornell University              Communications Sub-System                                           13
                        o Static Loading: 7.7 g in any direction.

                        o The communications system will not cause undue electrical or RF

                            interference to the other subsystems of the satellite.

                        o The communication system will be able to tolerate 0.03-0.04 Nm/T

                            magnetic field induced by ADCS magnetic torquer coils.



3.2.3.4       Electromagnetic Interferences (EMI).

                    The communication system shall not cause electrical or RF interference to the

                     launch vehicle or its primary payload.

                    The communications system will not cause undue electrical or RF interference

                     to the other subsystems of the satellite.



3.2.4         Interfaces: The following define requirements for all the interfaces between the

              space segment and the ground segment and the space segment and other sub-

              systems



3.2.4.1       Physical.

                    The antenna must be screwed into the satellite‟s structure.

                    The antenna shall be attached to the earth facing side of the satellite.

                    The communication board must fit the four mounting rods inside the satellite.

                     (For additional details on mounting and assembly, refer to the structural

                     specification document)




Cornell University               Communications Sub-System                                      14
3.2.4.2       Electrical.

                    The antenna must be grounded to the satellite‟s chassis.

                    The communication board must be grounded only to the power subsystem.

                    The communication board requires two 3.3V electrical lines and three ground

                     lines.

                    The communication board requires two communication lines to command and

                     data handling.



3.2.4.3       Software.

                    Data between the communication board and CDH will be serial.

                    The baud rate of data being sent from the space segment to the ground

                     segment must be sufficient to allow for the download of all data.

                    Data between the space and ground segment must conform to the AX-25

                     protocol.



3.2.4.4       RF.

                    Communication link will use FSK modulation

                    Communication link will be in 70 cm band carrier

                    Communication link‟s frequency deviation will be less than 10 kHz.

                    Communication link must have a 6 dB margin.

                    Any signal content outside the bandwidth of the allotted bandwidth must be

                     30 dB below the max power output.




Cornell University               Communications Sub-System                                   15
3.3              Ground Segment.

The ground segment contains hardware to send commands to the satellite and receives data from

the satellite.

3.3.1            Functional Requirements. The ground segment shall:

                    Determine time and duration of communication windows.

                    Track the satellite during the communication window.

                    Initiate communication with the satellite.

                    Transmit commands to the satellite.

                    Download telemetry and data from the satellite.

                    Locally store downloaded telemetry and data.

                    Disseminate stored telemetry and data.



3.3.2            Components. The ground segment shall be composed of:



3.3.2.1          Ground Station Computer.



The ground station computer is divided into hardware and software components.



3.3.2.1.1        Ground Station Computer Software.

The ground station computer will be running two software packages.



3.3.2.1.1.1      Predict. The Predict software package must have the ability to:

                    Interface with the CubeSat software package. See 3.2.2.1.1.2.



Cornell University              Communications Sub-System                                 16
                    Provide accurate communication window times.

                    Provide real-time positional information relative to the location of the ground

                     station antenna.

                    Provide accurate Doppler shift of satellite communication signal.



3.3.2.1.1.2   CubeSat. The CubeSat software package must have the ability to:

                    Continuously track the position of the satellite.

                    Resume download of uncompleted telemetry and data sets.

                    Manually set the operating mode of the satellite.

                    Incrementally track the satellite with the ground station antenna through the

                     entire communication window without a loss of signal due to antenna beam

                     width constraints.

                    Determine in advance (prior to communication window) if satellite trajectory

                     passes through the South.

                    Track a satellite trajectory passing though South with the ground station

                     antenna.

                    Modulate the transmit frequency of the radio to compensate for Doppler shift.

                    Initiate communication with the satellite.

                    Determine if the satellite has sufficient power to download telemetry and data.

                    Download telemetry and data.

                    Store telemetry and data

                    Disseminate stored telemetry and data to remote users.




Cornell University              Communications Sub-System                                        17
3.3.2.1.2     Ground Station Computer Hardware. The ground station computer hardware

              must have the ability to:

                    Access the internet.

                    Interface directly with the Terminal Node Controller (TNC). See 3.2.2.2.

                    Interface directly with the radio. See 3.2.2.3.

                    Interface directly with the rotor control hardware. See 3.2.2.4.



3.3.2.2        Terminal Node Controller (TNC). The TNC must have the ability to:

                    Automatically switch between transmission modes.

                    Transmit at a baud rate sufficient to download 1 Mbit of telemetry/data per

                     day.

                    Transmit raw bit-streams.

                    Packetize ASCII commands with the AX.25 protocol.

                    Interface directly with the radio. See 3.2.2.3.



3.3.2.3       Radio. The radio must have the ability to:

                    Transmit within the amateur radio band.

                    Transmit at sufficient power to communicate with the satellite.

                    Modulate the carrier frequency to compensate for Doppler shift.

                    Receive the low-power signal sent by the satellite.



3.3.2.4       Antenna Rotors. The antenna rotors must have the ability to:

                    Sustain the weight of the antenna.



Cornell University              Communications Sub-System                                       18
                    Point the antenna to any position in the sky.

                    Track a satellite through any feasible path though the sky.

                    Sustain communication throughout entire communication window.

3.3.2.5         Antenna. The antenna must have the ability to:

                    Be mounted on the antenna rotors.

                    Transmit within the amateur radio band.

                    Transmit a signal to the satellite.

                    Receive the signal transmitted by the satellite.



4               BLOCK DIAGRAMS

This section details the design of the communication system by first generalizing the system with

functional and structural block diagrams and then detailing the design of the space segment,

communication protocol, and ground segment.



4.1             Functional Block Diagram.

The block diagram in figure 1 shows how each component of the communication sub-system

interacts. For example, the space segment must interact with the Command & Data Handling

subsystem via UART communications, the Power sub-system via 3.3 V and GND power lines,

and the ground segment via a wireless communications link. Furthermore, the functional block

diagram shows the major components of the ground segment and space segment that will be

detailed in the later in this section.




Cornell University               Communications Sub-System                                    19
                                            Tracking System




    SQL           Ground Station                                Transmitter/   Ground Station
                                         TNC
  Database          Computer                                     Receiver         Antenna



                                                                  GROUND SEGMENT

                                                                   SPACE SEGMENT
                                                 Command &
                                                Data Handling




                                                                                    RF LINK
               On-Board              On-board
               Computer              Storage


                     UART


                                      Transmitter/                                 Satellite
             Micro-controller
                                       Receiver
                                                                  Amplifier        Antenna



                       POWER

                                         Power




                      Figure 1: Communications System Functional Diagram



4.2            Structural Block Diagram.

The block diagram in figure 2 allocates some of the sub-system requirements to major

components. For example, the programmable frequency requirement is allocated to the

transmitter/receiver block in the space segment.




Cornell University              Communications Sub-System                                       20
     GROUND SEGMENT                                               Antenna Rotary Motor



              Ground Station Computer
                                                                             Transmitter/Receiver               Ground Antenna
              - SQL DATABASE                           TNC
                                                                             - 70 cm Amateur Radio           - Tuned to the 70 cm
              - Satellite Tracking algorithm        - 9600 Baud
                                                                               Band                          Amateur Radio Band
              - Antenna Rotary Control              - FSK Modulation
                                                                             - 147 dB sensitivity              - 30o Beam Width
                                                    - AX-25 Protocol
                                                                             - > 100 Watt Power




                                                                                                                        RF LINK
      SPACE SEGMENT

                 Micro-Controller                   Transmitter/Receiver                 Amplifier                  Antenna
              - 9600 BAUD UART                  - Programmable Baud Rate       - High Power Amplifier     - Tuned to 70 cm Amateur
              - AX-25 packet parsing            - Programmable Frequency       - > 1 Watt Output Power      Radio Band
                                                     - FSK Modulation          - Tuned to 70 cm Amateur   - Dipole Patch Antenna
                                                                                 Radio Band


                  DIGITAL SECTION                                                    RF SECTION




                           Figure 2: Communications System Structural Diagram




5.              SPACE SEGMENT DESIGN

The space segment design will be divided into three sections: antenna, board, and software.



5.1             Antenna.

The patch antenna is constructed on 1/16” FR4 epoxy glass with a copper foil layer on the

antenna side and an electroplated overlay on the ground-plane side. 60/40 tin-lead is

electroplated over the copper (See Figure 3). The RF signal is probed fed to the patch antenna

via a 50  coax cable.



An exception was given to the Cornell CubeSat to use the patch antenna on the bottom side of

the satellite as a wall panel to ease the assembly process and reduce unnecessary mass.




Cornell University                         Communications Sub-System                                                                 21
               Figure 3: The layout of the patch antenna. The red area indicates the copper

                          foil and the black area corresponds to the epoxy glass.



The VSWR vs. frequency graph (See Figure 4) shows that at approximately 435 MHz, the patch

antenna has the ideal SWR of 1.




Cornell University             Communications Sub-System                                      22
                                                            Tests Patch #2 VSWR


                6



                5



                4
         VSWR




                3



                2



                1



                0
                 420                   425           430         435             440         445         450            455
                                                                 Frequency (MHz)




                                                   Figure 4: VSWR vs. Frequency

Figure 5 shows the beam width of the antenna. At the 3 dB level, the antenna has a beam width

of approximately 60o (30o minus -30o).

                                                              Patch #2 Beam Pattern
                                                                       90                                      13

                                                     120                               60

                                                                       10



                                        150                                                        30

                                                                        5



                    Strength i                                                                                 1.0593
                                 180                                    0                                0




                                        210                                                        330




                                                     240                               300

                                                                       270
                                                                        i




                                              Figure 5: The gain pattern for the patch antenna.



Cornell University                               Communications Sub-System                                                    23
5.2             Communications Board.

The schematic and layout of the communications board was done through CadSoft‟s Easy

Applicable Graphical Layout Editor software (Eagle).                     The communications board is split

between a digital and RF section (See figure 20). Table 1 summarizes the major components and

their functions.



      Part     Description                                  Vendor        Manufacturing   Packaging   Quantity
                                                                               #
  Micro-       - Controls functionality and                  Atmel         AT90S8515       DIP-40        1
 Controller    interaction between components and
               sub-systems
               - Forms and parses AX-25 packets
  Memory       External memory address latch to               Texas        SN74HC473      SOIC-20        1
  Address      expand memory size.                         Instruments
   Latch
 NV-SRAM       External memory to expand memory              Maxim          DS1230W        DIP-20        1
               to size to 32Kbytes
Power Latch    Distribute power to the external               Texas         TPS-2103       SOIC-8        1
               memory SRAM and address latch to            Instruments
               conserve power during transmit,
               receive, and idle modes.
  Voltage      Ensure that the Micro-controller will         Maxim           DS1834        SOIC-8        1
  Detector     not turn if the voltage supplied to it is
               below 2.4 V.
Transmitter    RF Transmitter and Receiver chip              Atmel         AT86RF211      TQFP-48        1
and Receiver   capable of transmitting within the 450
               MHz Frequency Band for Amateur
               Radio communications
    RF         RF Amplifier to boast power from 4          RF Micro-         RF2117       SOIC-16        1
 Amplifier     dBm to at least 30 dBm.                      Devices
 RF Relays     RF switch to switch between the             RF Micro-         RF2436        SOT-5         2
               transmit and Receive Mode                    Devices
               - Transmit Mode – Connect the RF
                    transmitter and receiver chip to
                    the antenna through the RF
                    Amplifier
                - Receive Mode – Connect the RF
                     transmitter and receiver chip to
                     the antenna by by-passing the RF
                     Amplifier
                             Table 1: Component Description and Function




Cornell University                 Communications Sub-System                                                 24
5.2.1          Digital Section

The digital section includes a micro-controller (Atmel AT90S8515) that emulates the TNC

functions, controls the functionality of the RF section, and communicates at 9600 baud to the

Command & Data Handling sub-system. The TNC functions will be address later in the space

segment software section. There is also an address latch and non-volatile SRAM to expand the

micro-controller‟s memory capacity to buffer telemetry and data before transmitting to the

ground station. This section will describe all the digital connections to the micro-controller.

Table 2 summarizes where each input/output pin of the micro-controller is connected to. Table 3

details the other pin connections.

                    PORTA                 PORTB               PORTC               PORTD
   Pin 0          SN74HC573.2         NOT CONNECTED          DS1230A.25           CDH.TX
                   DS1230A.11                                                   (COMM RX)
   Pin 1          SN74HC573.3            RF2117.8            DS1230A.24           CDH.RX
                   DS1230A.12              (VPD)                                (COMM.TX)
   Pin 2          SN74HC573.4            TPS2103.3           DS1230A.21        AT86RF211.16
                   DS1230A.13               (EN)                                (DATACLK)
   Pin 3          SN74HC573.5            RF2436.4            DS1230A.23        AT86RF211.15
                   DS1230A.15             (TX/RX)                                (WAKEUP)
   Pin 4          SN74HC573.6        AT86RF211.12 (SLE)      DS1230A.2        AT86RF211.11
                   DS1230A.16                                                  (DATAMSG)
   Pin 5          SN74HC573.7          AT86RF211.14          DS1230A.26      NOT CONNECTED
                   DS1230A.17             (SDATA)
   Pin 6          SN74HC573.8         NOT CONNECTED          DS1230A.1          DS1230W.27
                   DS1230A.18                                                      (WE)
   Pin 7          SN74HC573.9           AT86RF211.13      NOT CONNECTED         DS1230W.22
                   DS1230A.19              (SCK)                                   (RE)
                     Table 2: Micro-Controller’s Input/Output Connections

                                 PIN               CONNECTION
                               RESET                  DS1834.7
                               XTAL1                   Crystal.1
                               XTAL2                   Crystal.4
                                 ICP            NOT CONNECTED
                                ALE                SN74HC573.11
                                OC1B            NOT CONNECTED
                                VCC                  3.3V (VCC)
                                GND                  0 V (GND)
                          Table 3: Micro-Controller Other Connections



Cornell University               Communications Sub-System                                    25
5.2.1.1        External Memory

The digital logic, schematic, and input/output port connections for the external memory are

adapted from the Atmel Corporation (www.atmel.com) data sheet for the AT90S8515 Micro-

controller (See Figure 6). The left, center, and right blocks are the micro-controller, address/data

latch (Texas Instruments SN74HC573), and external SRAM (Maxim IC DS1230W),

respectively. All of the micro-controller pins on port A and port C are dedicated to accessing the

external SRAM. When there is a valid address on the SRAM‟s A[15:0] and on the falling edge

of ALE, then data will be transferred between the micro-controller and the SRAM after a clock

cycle delay. The micro-controller will read or write when the outputs of RD (Port D.7) and WR

(Port D.6) are set to a logic low (i.e. RD and WR are active low), respectively. When bits 6 and

7 of the MCUCR register are set to one, the micro-controller will automatically disable the

normal port A and port C functions and allocate them for external memory. Other than setting

the relevant parameters in the MCUCR register and the parameters in CodeVision AVR

programmer, there is no additional software code needed to access the external memory (see

AT90S8515 documentation for more details). The design from figure 6 was implemented,

verified, and tested. VCC and GND connections are omitted from the schematic in figure 6.




                     Figure 6: External Memory Interface to Micro-controller


Cornell University            Communications Sub-System                                          26
5.2.1.2        Power Switch

When the space segment is operating in low power mode, all components must either be turned

off or have low power consumption (i.e. less than 1 mW). Neither the address latch or external

SRAM have a low power mode; therefore, those components‟ VCC connections are connected

through a power switch (Texas Instruments TPS2103) that switches between GND and 3.3V.

During the Transmit and Receive modes of operation, the power switch will supply 3.3V to the

address latch and SRAM, but in the modes of low power consumption, the power switch will

supply 0V to the address latch and SRAM. The micro-controller port B.2 controls the operation

of the power switch. The table below summarizes the operation of the power switch.



ENABLE (Port B.2 )                IN 1                  IN 2                         OUT
      1                          3.3 V                   0V                          3.3 V
      0                          3.3 V                   0V                           0V
                                 Table 4: Power Switch Control



5.2.1.3        UART Communications

UART communications to the command & data handling sub-system are serially connected. The

transmit pin (port D.1) and receive pin (port D.2) on the communications board are connected to

the receive pin and transmit pin on the command & data handling board, respectively. Because

the command & data handling sub-system runs at 5V, and the communications sub-system runs

at 3.3V, voltage level shifting had to be implemented to ensure proper communications. Figure 7

shows a simple bi-directional voltage level shifting circuit that was implemented.




Cornell University            Communications Sub-System                                      27
                                               3.3V
                         5V device                            3.3V Device




                                                   4.7 KOhm
                                         2.2 KOhm

                     Command & Data                           Communications
                        Handling


                     Figure 7: Bi-Directional Voltage Level Shifting Schematic



The level shifting depends on the threshold voltages of the 5V and the 3.3V devices for logic

high and logic low (see table 5). When the command & data handling sub-system transmits a

logic high, 5V, the 3.3V above the 4.7 KΩ resistor ensures that there will be a 1.7 voltage drop

across the 2.2 KΩ resistor.       The 5V logic high turns into 3.3V logic high.        When the

communications sub-system transmits a logic high, 3.3V, the Command & Data Handling sub-

system interprets it as logic high because 3.3V is above the threshold voltage, 2.0V. When the

command & data handling sub-system transmit a logic low, 0V, the circuit becomes a simple

voltage divider, and the voltage the communications sub-system will receive is 1 V, which is

below the logic low threshold voltage of 1.32V. When the communications sub-system transmit

a logic low, 0V, the command & data handling sub-system interprets that as a logic low because

it below the logic low threshold voltage of, 0.8V. When neither device is driving the circuit, the

voltage will be floating, and there is no interpretation on either side.




Cornell University              Communications Sub-System                                      28
                       Command & Data Handling                     Communications
                      Minimum           Maximum             Minimum           Maximum
  Logic Low             0.0V                0.8V                0               1.32V
  Logic High            2.0V                5.0V              1.98V             3.3V
                          Table 5: Digital Logic Threshold Voltages



In the above table, the minimum voltage threshold for the command & data handling system

receiving logic high is 2.0V. The communications sub-system can transmit 3.3V logic high and

still be interpreted correctly. Therefore, the voltage level shifting only needs to be implemented

on the communications sub-system receive line and not both transmit and receive lines.



5.2.1.4        Connections to the RF Section

There are three sets of digital connections to the RF section, RF switches, RF amplifier, and RF

transmitter/receiver module. There are a total of 8 digital connections for the RF section.



The RF switch (RF Micro Devices RF2436) requires an input to switch the connection from the

antenna to either the Receive or Transmit line. The micro-controller controls the modes of

operation of the RF section by controlling this input (RF2436 pin 4). This pin is connected to the

micro-controller‟s port B.3.



Because the RF amplifier (RF Micro Devices RF2117) consumes up to 2 Watts of power, there

must be a way to implement power saving. The micro-controller can control if the amplifier is

turned on or off by adjusting the voltage on the RF2117‟s Voltage Power Down pin (RF2117 pin

8) between logical zero and one (Section 5.2.2.2 has more information regarding the amplifier

and its behavior). This pin is connected to the micro-controller‟s port B.1.




Cornell University             Communications Sub-System                                        29
Finally, the RF transmitter/receiver module (Atmel AT86RF211) needs 6 digital connections to

properly operate; three connections for register programming, two for the data transfer, and one

for the wake-up function (the software design section will elaborate more upon this). Register

programming requires uses 3 lines on the RF transmitter/receiver module, SLE (pin 12), SCK

(pin 13), and SDATA (pin 14) which are connected to the micro-controller‟s port B.4, port B.7,

and port B.5, respectively. The micro-controller transfers data with the transmitter/receiver

module by connecting micro-controller‟s port D.2 and port D.4 with the transmitter/receiver

modules DATACLK (pin 16) and DATAMSG (pin 17), respectively.                           Finally, the

transmitter/receiver module wake-up function (pin 15) is connected to the micro-controller

through port D.3.



5.2.1.5        Other Connections

There are three other types of connections on the digital section, the crystal connection,

decoupling capacitors for voltage supply, and the voltage detector.



There are two connections from the micro-controller, XTAL1 and XTAL2, to the crystal‟s pin 1

and 4, respectively. The crystal supplies a 4 MHz clock to the micro-controller.



Decoupling capacitors are attached to the micro-controller‟s VCC pin. Tantalum capacitors are

used because their size is smaller than other capacitors of the same size. The decoupling

capacitors act as charge pumps to restore periodic drops in voltage across a shared VCC line (See

section 5.4.3 for more information regarding decoupling capacitors).




Cornell University             Communications Sub-System                                        30
Finally, there is a voltage detector (DS1834A) connected to the reset pin of the micro-controller.

During power on, the voltage supplied to the micro-controller might not be steady and oscillate

causing the micro-controller to power on and off. If the voltage supplied to the micro-controller

is below 2.4 volts, the voltage detector holds the reset pin of the micro-controller low and forces

the micro-controller to be in a reset state. If the voltage is above 2.4 volts, the voltage detector

holds the voltage on the reset pin high and forces the micro-controller to be in an active state.



5.2.2          RF Section

The RF section includes a transmitter/receiver module, amplifier, and relays.                       The

transmitter/receiver module has adjustable transmitting and receiving frequencies, programmable

baud rate, and adjustable power output. The RF amplifier is a high power amplifier integrated

circuit capable of 2 watt signal output. The relays help control the functionality of the RF

section by switching between the Transit and Receive modes of operation.



5.2.2.1        Transmitter/Receiver Module

This transmitter/receiver chip (AT86RF211) generates the RF message signal to communicate

data from the satellite to the ground station as well as receives RF messages from the ground

station in the 450 MHz frequency band.         This chip is also responsible for waking up the

communication system out of idle mode into transmission or receive mode.                 The Atmel

AT86RF211 datasheet gives a block diagram (see Figure 8) that describes the internal structure

of the transmitter/receiver chip. The chip‟s external circuit schematic is adapted from the Atmel

Corporation (www.atmel.com) AT86RF211‟s Applications Notes (See Figure 16).




Cornell University             Communications Sub-System                                             31
Pin     Name              Comments             Pin    Name              Comments
 1     RPOWER        Output Power Resistor     25    SKFILT     Threshold for external mode
                                                                      of data slicking
2      TXGND1                Ground            26       DSIN         Data Slicer Input
3         RF            RF Input/Output        27    DISCOUT       Discriminator Output
4      TXGND2                Ground            28     IF2VCC               3.3V
5      TXGND3                Ground            29     IF2GND              Ground
6      TXGND4                Ground            30       IF2IN            IF2 Input
7      TXVCC                   3.3V            31     IF2DEC       Decoupling Capacitor
8      TXGND5                Ground            32    DISCFILT       Discriminator Filter
9       DIGND                Ground            33     IF2OUT            IF2 Output
10      DIVCC                  3.3V            34     IF1DEC       Decoupling Capacitor
11    DATAMSG                  Data            35       IF1IN            IF1 Input
12       SLE         Serial Interface Enable   36     IF1OUT            IF1 Output
13       SCK         Serial Interface Clock    37      AGND               Ground
14      SDATA         Serial Interface Data    38      AVCC                3.3V
15    WAKEUP            Wale-up Output         39      CVCC2               3.3V
16    DATACLK              Data Clock          40     CGND2               Ground
17                    NOT CONNECTED            41      FILT1      PLL Loop Filter Output
18      EVCC1                  3.3V            42      VCOIN       PLL Loop Filter Input
19      EGND1                Ground            43      EVCC2               3.3V
20                    NOT CONNECTED            44     EGND2               Ground
21      CGND1                Ground            45       RXIN          Receiver Input
22      CVCC1                  3.3V            46     RXVCC                3.3V
23      XTAL1             Crystal Input        47     RXGND               Ground
24      XTAL2            Crystal Output        48     SWOUT           Switch Output


                            Table 7: Transmitter/Receiver Pin Out




Cornell University          Communications Sub-System                                    32
                     Figure 8: Transmitter/Receiver Chip Block Diagram



The diagram above shows that the synthesizer block is the heart of the chip‟s transmitting and

receiving functions. In order to successful transmit and receive, the chip must have a stable

clock frequency and be able to determine phase. The synthesizer has two external circuits that

are critical to the clock frequency and phase, the clock oscillator and Phase Locked Loop (PLL)

filter circuits.



Figure 9 shows that the clock crystal circuit is connected to the XTAL1 (pin 23) and XTAL2

(pin 24) as adapted from the Atmel AT86RF211 Datasheet (www.atmel.com).             While the

datasheet specifies the use of either a 10.24 MHz or 10.245 MHz crystal, availability limited


Cornell University           Communications Sub-System                                      33
choices to only 10.24 MHz. Crystal vendors specify the load capacitance needed for the crystal

to resonate at the specified frequency. The load capacitance works in parallel with the crystal

internal circuitry to form a LC tank circuit.         The LC tank circuit determines the resonant

frequency of the clock crystal. The communications board uses a crystal from Citizen America

Corporation (www.citizencrystal.com) to drive the AT86RF211 synthesizer.                 The vendor

specifies that the load capacitance for the crystal is approximately 15-16 pF. The AT86RF211

datasheet states that schematic in figure 9 will yield a load capacitance of 15-16 pF.


                                             XTAL1



                                                             XTAL2


                                           23                24

                                                     82 pF

                              10.24 MHz

                                                     15 pF           56 pF




                          Figure 9: 10.24 MHz Clock crystal schematic



The PLL filter circuit is used to determine the phase of the frequency that the clock oscillator

supplies. Atmel specifies different types of PLL filter to use, but the typical implementation was

used (see figure 10).




Cornell University             Communications Sub-System                                           34
                                                          VCOIN
                                             FILT1
                                                 41      42
                                                 27 KOhm

                                                      3.3 KOhm
                                    560 pF                   15 pF


                                                     5.6 nF




                             Figure 10: PLL Loop Filter Schematic



If the digital connections, clock crystal circuit, and PLL loop filter schematic are properly

connected to transmitter/receiver chip, then the chip should be capable of transmitting.

Connected from the chip‟s RPOWER (pin 1) to ground, there is an 18 KΩ resistor that limits the

range of the transmitted signal‟s output power from 0 dBm to 13 dBm.                      The

transmitter/receiver‟s CTRL1 register controls the specific output power.



Figure 11 is a spectrum analyzer screen shot of the band-limited frequency spectrum of the

transmitter/receiver‟s output.    The two distinct peaks centered at approximately 433 MHz

exemplify FSK modulation. The MHz per division and center frequency are 0.2 MHz and 432.9

MHz.    The bandwidth of the signal is approximately 140 KHz.




Cornell University               Communications Sub-System                                 35
                                                                 433 MHz



                                                                             140 KHz


                       Figure 11: Frequency Spectrum of the Transmitted Signal



The AT86RF211 receive function follows the principle of demodulation. Figure 12 diagrams the

demodulation and data slicing stages.



 Received Signal      Mixer 1                                   Mixer 2                              FSK Demodulator
                                        IF1 Filtering                          IF2 Filtering
                                                                                                          Discriminator


                        X                                         X                                          F to V
                                                                                                            Converter




       Fc                                10.7 MHz                                455 KHz
                   Down-convert to                         Down-convert to
                     10.7 MHz        Bandwidth = 180 KHz      455 KHz
                                                                                    Data Slicer

                                                                                               VCC

                                                 Data Message
                                                                                               GND



                                                                                                                           Data Slicer
                                                   Data Clock                                                           Threshold Voltage




                                       Figure 12: Demodulation Principle




Cornell University                   Communications Sub-System                                                                        36
When the chip receives a message on the RF input/output pin (pin 3), the chip connects the RF

pin to the RF filter, located between SWOUT (pin 48) and RXIN (pin 45). The RF filter

removes any out-of-band interferences, such as other amateur radio users or other satellite

communications.



The AT86RF211 then down-converts the filtered RF signal to the first Intermediate Frequency

(IF1) of 10.7 MHz. The IF1 signal is then band-passed filtered to remove replicas and other out-

of-band interferers. The IF1 filter is attached to IF1IN (pin 35) and IF1OUT (pin 36). After the

IF1 filtering, the signal is down-converted to the second Intermediate Frequency (IF2), 455 KHz,

close to base-band. The IF2 filter selects a narrower channel than the IF1 filter because the

bandwidth of the IF2 filter is tens of KHz wide, while the bandwidth of the IF1 filter is 180 KHz

wide. In this implementation, the bandwidth of the transmitted signal is approximately 120 KHz.

Consequently, the additional IF2 filter would remove signal content because the bandwidth of

the filter is shorter than the bandwidth of the signal. The AT86RF211 datasheet suggests that the

IF2 filter can be replaced with 5.6 nF capacitor. In the frequency domain, a capacitor acts like a

high-pass filter. This will allow for none of the IF2 signal content to be lost.



Following the IF2 filter, is the FSK demodulator.          The demodulator has its own internal

oscillator and external PLL filter. The internal oscillator has its own natural frequency F D, which

it uses to demodulate the 455 KHz signal. An external PLL filter is attached to DISCFILT (pin

32) to track the phase of the signal.       Once the 455 KHz signal has been stabilized, the

demodulator outputs a data stream, or a square wave, to the data slicer.




Cornell University             Communications Sub-System                                         37
                                       32               22 KOhm        1 nF
                       DISCFILT


                                                        100 pF



                                Figure 13: Discriminator PLL Filter



Figure 14 shows the pins DISCOUT and DSIN (pin 25 and 26). An optional low-pass filter may

be between DISCOUT and DSIN.                The optional filter provides extra noise immunity. For

simplicity, this filter was omitted.

                                                             Optional Filter
                                       26
                     DISCOUT
                                                           47 KOhm      68 pF
                                       25
                          DSIN

                                       24
                        SKFILT
                                                  4.7 nF




                                  Figure 14: Data Slicer Schematic



If the receiver is able to receive an RF message correctly, then attaching an oscilloscope probe to

these pins will reveal a square wave at approximately the set data rate. In this case, the

oscilloscope should show a square wave at 9600 bits per second. The range of the amplitude of


Cornell University              Communications Sub-System                                       38
the square wave will not be from 0V to 3.3V. At this point, the transmitter/receiver chip must set

a threshold voltage for data slicing, either by the internal or external mode. Any square wave

higher than the threshold voltage will be evaluated as logic high, while any square wave below

the threshold will be evaluated as logic low. The data slicer will reshape the square wa ve from

the FSK demodulator into CMOS voltage level at the programmed baud rate. This is the data

message that the transmitter/receiver chip will return to the micro-controller via the digital

interface as described in section 5.2.1.4.



Figure 15 shows an oscilloscope screen capture when probing the discriminator output (pin 26),

data clock (pin 15), and data message (pin 11). The vertical cursors show one bit or one square

wave per data clock cycle. The green text box points to the recovered data clock rate. The

recovered data rate is approximately 9615 bits per second. The volts per division of the data

message, data clock, and discriminator are 2V, 5V, and 500 mV, respectively. The data clock

and data message signal have CMOS voltage levels, while the discriminator amplitude ranges

from 0V to approximately 1V.         An appropriate threshold voltage must be set to correctly

evaluate logic high and logic low bits.        In this case, the threshold voltage should be

approximately 125 mV.




Cornell University             Communications Sub-System                                       39
              Data Message


                                                                               Data Rate
                                                                               (9.615 KHz)

              Data Clock




              Discriminator




              Figure 15: Discriminator, Data CLK, and Data Message Waveforms



Attached to SKFILT (pin 25), there is a 4.7 nF capacitor (See Figure 14). This value of the

capacitor controls the data rate in the external comparison mode of data slicing. While this

design utilizes the internal mode of data slicing rather than the external mode of data slicing, this

capacitor value was changed in the event that the external mode was needed (refer to the

software design section for more details regarding the comparison mode).             Recall that all

capacitors have a charging and discharging time, which is proportional to its capacitance. Bigger

capacitors take longer to charge and discharge than smaller capacitors. Therefore, the higher

data rates will need a smaller capacitor so that the charge and discharge time do not interfere

with the data rate. Table 8 shows the practical capacitance values for given baud rates.




Cornell University             Communications Sub-System                                          40
                                                   Data Rate (Bits per Second)
                                    2400             4800              9600         19200
     Capacitance (nF)                22                10               4.7          2.2


                          Table 8: Data Rate vs. SKFILT Capacitance



Figure 16 shows all of the external circuitry that the AT86RF211 requires to function properly.

There are several important notes about the design in figure 16.



The red circles indicate decoupling capacitors along the VCC connection for the chip. In the

layout, those capacitors must be within a few millimeters of the chip, or the spectrum of the

output will show additional noise and signal replicas.




Cornell University            Communications Sub-System                                     41
                     Figure 16: 433 MHz Transmitter/Receiver Application



The blue circles indicate that those resistors were replaced with 1 μH inductors because the 1 μH

inductors provide more impedance in the megahertz range than resistors.          The impedance

formula for an inductor is given below.

                                          Z  j  2  f  L




Cornell University            Communications Sub-System                                       42
At DC the inductors have zero impedance and increasing impedance as frequency increases. The

inductor will decrease the transmitter/receiver chip sensitivity to noise along the shared VCC

line.



5.2.2.2        RF Amplifier



The transmitter/receiver chip can only generate a maximum of 14dBm power. This is not enough

power to successfully transmit to the ground station. The signal must be amplified to more than

30 dBm (1 Watt) in order to establish a reliable communication link. Since the signal power from

transmitter/receiver ranges from -4 to 10 dBm, the amplifier must be able to boost a -4 dBm

signal up to 30 dBm, which is equivalent to about 33 to 34 dB amp gain. Also the allocated

power to the amplifier is limited; thus, the amplifier must be more than 50% power efficient.



The space segment uses an amplifier (RF2117) from RF Micro Device (www.rfmd.com). The

amplifier can be operated at 433MHz and have approximately 33 dB gain with more than 50%

power efficiency. The size, mass, and temperature tolerance of this device meet our requirement.



Figure 17 shows RF Micro Devices‟ typical implementation of the amplifier as found in the

device‟s datasheet. There are several things to note about that design.




Cornell University            Communications Sub-System                                         43
                          Figure 17: RF2117 Typical Implementation



On pin 1, 4, 6 and 8, the ferrite beads L1, L2, L3 and L4 are inductors that have the following

characteristics at high frequency range; RF shielding, parasitic/noise suppression and RF

decoupling. Especially any RF noise that can be possibly introduced by an RF source through pin

6 and voltage sources through pin 1, 4 and 8 is successfully eliminated by the ferrite inductors.

On pin 6 and 12, the capacitor C1 and C16 are DC blocking capacitors that allow high frequency

AC signals to pass through. The capacitors C4, C5, C6, C7, C9, C10, C11, C13, C17, C18, and

C19 are decoupling capacitors that help to stabilize the amplification process by providing a

bypassing route. On pin 3, the inductor L5 completes a tank circuit that tunes the inter stage

matching point of the amplifiers; 2.2nH (tuned for 450MHz) is replaced by 2.7nH (tuned for

433MHz). On pin 12, L6, C14 and C15 together form an output filter.




Cornell University            Communications Sub-System                                       44
Also on pin 6 (RF input) and 12 (RF output), the 50 Ω μ-strips are a transmission structure to

provide guided waves over limited distances. If the distance between components is less that a ¼

wavelength, the 50 Ω μ-strips can be omitted.         Because the dimensions of these μ-strips

(calculated based on a conductor material used and an insulating substrate) are not small, the four

μ-strips are omitted for the space segment‟s prototype board. The 50 Ω μ-strip between pin 14

and VCC is replaced by a 59nH inductor. In conjunction with the capacitors C9, C10 and C11,

this inductor chokes any RF signal that might flow back to the power supply (Vcc).



VCC and VREG must be a stable 3.3 Volt and 2.8 Volt, respectively. The micro-controller can

power down the amplifier by supplying a voltage below 1.4V to VPD . If the micro-controller

supplies a voltage between 1.4V and 2.3V to V PD, then the amplifier will power-on. VPD affords

a measure of power control. This response is not linear across 1.4 to 2.4 Volts. Higher V PD

allows more output power of the amplifier and, thus, is set at 2.3 Volt (1.0 voltage drop across 68

Ω from 3.3 Volt line).




                     Figure 18: A thermal metal slug at the bottom of RF2117




Cornell University            Communications Sub-System                                         45
As seen in Figure 18, the amplifier dissipates heat through the metal slug at the underneath the

device. In addition to pin 5, the metal slug provides a way to ground the chip. The board layout

must present an area of foil that will be touching this thermal metal slug. This foil is connected to

a ground plane and an extra solder blob exposed to the air so that the heat can conduct away.



5.2.2.3           RF Relays

If the transmitter/receiver chip is connected to the antenna through the amplifier, then the

transmitter/receiver chip will not be able to receive because the amplifier only allows signals to

pass through it to the antenna and not through it from the antenna. One option is to have two

paths that lead from the transmitter/receiver to the antenna, a direct receive path and a transmitter

path through the amplifier. This introduces problems with feedback and multi-path connections

to the antenna.



The solution was to use two relays (RF Micro Devices RF2436) that either connect a direct

receive path from the transmitter/receiver chip to the antenna or a transmit path from the

transmitter/receiver through the amplifier to the antenna. The behavior of the relays is described

later in the software design section.




                              Figure 19: Relay Typical Implementation




Cornell University              Communications Sub-System                                         46
Figure 19 shows the RF Micro Devices‟ typical implementation of the relays as found in the

device‟s datasheet. There are several things to note about that design. On pins RX OUT (pin 1),

TX IN (pin 2), ANT I/O (pin 5), the capacitors C1, C2, and C3 are DC blocking capacitors that

allow high frequency AC signals to pass through.



The device receives power through the ANT I/O (pin 5).         RF Micro Devices is employing a

technique called super-positioned where the DC signal is added to the AC signal. In this case,

the voltage from VDD is being superimposed on to the AC signal flowing to or from the antenna.

The DC blocking capacitors prevent DC from leaking into the antenna, receive, and transmit

paths, but what prevents AC from leaking into VDD from pin 5? Recall the formula below for

the impedance of a capacitor.

                                                    1
                                        Z 
                                              j  2  f  C

For a 1 nF capacitor, the equivalent impedance at 433 MHz is 2.72 Ω, which is a factor of 3

smaller than the impedance of the resistor. Therefore, the 2 KΩ resistor effectively acts like AC

blocker so that the AC signal does not leak into VDD. This is of particular relevance because all

the electrical sub-systems share common supply voltages. If the communications sub-system

was transmitting and the blocking resistor was not present, then the amplified RF signal would

flow through the relay and through VDD. This could possibly cause undesired EMI to other sub-

systems. The 2 KΩ resistor is very important in preventing EMI.



The 50 Ω μ-strip blocks on RX OUT (pin 1), TX IN (pin 2), and ANT I/O (pin 3) are

transmission lines that match the impedance of the antenna.          The 50 Ω μ-strip are not

commercial products but strips of copper on the board. Their implementation will be discussed


Cornell University              Communications Sub-System                                     47
in section 4.3.1.2.4, board layout, of the document. If the RF devices are placed within a few

millimeters of each other, the 50 Ω μ-strips can be omitted.



5.2.3          Board Connectors

There are four sets of connections on the board: UART, board power, amplifier power, and

antenna connection. The UART, board power, and amplifier power connectors use a friction

locking mechanism. They provide more reliability and sturdiness in situations of dynamic

loading (i.e. satellite launch). The UART consists of two pins for transmitting and receiving

information from the Command & Data Handling sub-system. The board power is also two pins,

3.3V and ground. The amplifier uses 3 pins, 3.3V and two ground connections. It needs its own

power connection because it consumes so much more current than the other components on the

board. The antenna connection is a 50 Ω SMA coax connection. The SMA connector was

chosen because of the small size and weight as compared to the BNC type.



Figure 20 compiles all of the aforementioned designs into one circuit schematic. This is the

design for the Communications sub-system space segment hardware.




Cornell University            Communications Sub-System                                    48
                     Figure 20: Communications Sub-System Space Segment Circuit Schematic


Cornell University   Communications Sub-System                                              49
5.2.4            Board Layout

Figure 21 and 22 show the front and back views of the board layout, respectively. The green

dots, red lines, and blue lines are vias, electrical paths on the top layer, and electrical paths on the

bottom       layer,   respectively.     The       board   was     manufactured    from     PCBexpress

(www.pcbexpress.com)         and      populated    with   parts   and   components    by   BSU     Inc.

(www.bsuinc.com). Appendix 1 gives the resistance, capacitance, inductance, and part numbers

for all the resistors, capacitors, inductors, and devices of the communications board, respectively.

All components are surface mount devices to reduce board space and mass. There are three

sections to the board layout, physical characteristics, digital section, and RF section.



5.2.4.1          Physical Characteristics.

The board has the following physical characteristics.

         The board dimensions are 83.5 mm x 90 mm.

         The mounting holes are 3.81 mm in diameter.

         Figure 22 gives the exact locations of the 4 mounting holes (Note that the lower left hole

          is 3.5 mm from the lower edge).



The green text boxes in figure 22 show the location of the 4 board connectors. Because the GPS

sub-system‟s board and power sub-system‟s board are located directly above the

communications board in the assembled satellite, the location of the board connectors takes

advantage of the space offered by the stacking of smaller boards.




Cornell University                 Communications Sub-System                                         50
5.2.4.2         Digital Section.

Parts placement and path routing are the only two issues that affect the layout of the digital

section. The blue text boxes and arrows indicate where digital devices are located in the layout.

For greater stability of the signal as it travels along the wire, wire thickness should be as thick as

possible. The maximum thickness of the wire is a trade off between signal stability and routing.

In this case, the minimum wire thickness of the board is 0.007 inches, while the maximum

thickness is 0.020 inches.



The EAGLE layout editor supports a utility called Auto-routing. Given that all components are

placed properly on the board and air-wires are placed, the Auto-router will route the air-wires at

a set minimum width. The air-wires are un-routed paths that show where each device pin is

connected to.



5.2.4.3         RF Section

The Auto-router can be used to route electrical paths for the digital section, but not in the RF

section because the Auto-router does not route efficiently. Wire lengths need to be less than a ¼

of the frequency wavelength because wire lengths that are longer than a ¼ wavelength will cause

signal loss as the signal travels. Components must be placed within millimeters of each other so

that the wire distance between them can be as short as possible.            Furthermore, RF signal

reliability and stability can be improved by increasing the thickness of the wire where possible.



The yellow text boxes and arrows indicate the location of the RF devices. Section 4.3.1.2.2, RF

section, documents the RF device‟s functionality and external circuits.         The top and bottom




Cornell University             Communications Sub-System                                            51
layers of the board have ground planes (orange text box) that maintain RF stability by shielding

components and paths from EMI. The layout of the space segment design was implemented in a

manner such that the distance between components is minimized. This allowed for the all the 50

Ω μ-strips to be omitted except for receive line, which directly connects the transmitter/receiver

chip to the antenna. The purple text box in figure 21 shows the 50 Ω μ -strip. On page 2 of

“Microstrip Design Techniques for UHF Amplifiers,” (copyrighted 1993 by Motorola Inc.) the

following formula relates the impedance of the μ-strip (Z0), thickness of the dielectric (h),

dielectric constant (εr), and width of the μ-strip (W).




PCBexpress uses the following specifications for two layer boards. The dielectric material,

dielectric constant, and thickness of the dielectric constant are FR-4 laminate, 4.6, and 0.062

inches, respectively. The width of the μ-strip was found to be approximately 0.112 inches.




Cornell University             Communications Sub-System                                       52
                                          Voltage Detector             Address Latch




     10.24 MHz Crystal


      Transmitter/Receiver




                 Ground
                 Plane


                      RF Switch
                                          Micro-Controller                  Non-Volatile
                                                                            SRAM
                     50 Ω μ-strip




                            Amplifier
   Ground
   Plane                                  4 MHz Crystal

                                                             Power Switch

                         RF Switch




                 Figure 21: Top Layer of the Communications Board Layout




Cornell University          Communications Sub-System                                      53
                          3.0 mm                                       3.0 mm
95 mm




             Amplifier
             Power

                                                                                      UART
                                 Ground Plane




                                                  Antenna


                                                                           Board Power

             14.5 mm         3.5 mm            43 mm                   3.0 mm        26 mm

                                               83.5 mm

                         Figure 22: Bottom View of the Communications Board Layout




        Cornell University            Communications Sub-System                              54
5.3            Space Segment Software Design.

The function of the on-board software is to implement and control the tasks necessary for

communicating with the ground station. Successful communication constitutes the upload of

ground station commands to the satellite and the download of all science data and status

telemetry to the ground station. The basic structuring of the software of the communication

board uses layering to manage the complexity of the code. The required functionality can be

broken down into three layers: physical, link, application.




                                                Physical Layer



                                                 Link Layer



                                         Application Layer




                                Figure 23: Software Layer Model



The lowest layer is the physical layer. This layer connects the software to the hardware and

transmission medium. Next, the link layer is responsible for ensuring reliable communication

via error correction and session control.      Finally, the application layer is responsible for

controlling the top-level functions of the comm. board. Information between adjacent layers is

passed bi-directionally.




Cornell University            Communications Sub-System                                      55
The reason for using a layer model to implement the space segment software is two-fold. First, it

allows for a logical break-up of functionality at different levels of abstraction. Secondly, we can

be assured that data passing from a lower to higher layer is reliable via the build-in control

mechanisms.



5.3.1     Physical Layer.

In order to generate the actual RF signal, the software must be able to control the communication

board‟s hardware. The physical layer of software is concerned with transmitting and receiving

the individual raw bits over the communication channel. In order to ensure correct coding and

decoding of the individual bits, the transceiver chip (AT86RF211) and microcontroller (MCU)

must be initialized and controlled correctly for both reception and transmission.



5.3.1.1          Configuring the AT86RF211 Transceiver Chip.

In order for data to be successfully modulated and demodulated Configuration of the

AT86RF211 transceiver chip is done by writing data to the 16 internal registers of the

AT86RF211 via a serial digital interface. For a complete description of the serial protocol for

communicating with the transceiver chip, read AT86RF211‟s datasheet or the application notes

for the AT86RF211: “Using the AT86RF211 ISM Band Transceiver as an AVR Peripheral.”



Table 9 summarizes the transceiver chip‟s internal registers and functions.




Cornell University            Communications Sub-System                                         56
        Register                                   Function
        CTRL1        Main Control Register. Controls the over-all state and
                     operation of the transceiver.
        CTRL2        Secondary Control Register. Controls the accepted data rates of
                     received signals, and phase lock loop (PLL) lock conditions.
        F0           F0 Frequency Register. Sets the frequency assigned to F0.
        F1           F1 Frequency Register. Sets the frequency assigned to F1.
        F2           F2 Frequency Register. Sets the frequency assigned to F2.
        F3           F3 Frequency Register. Sets the frequency assigned to F3.
        DTR          Data Slicer Control Register. Allows the user to adjust the
                     discriminator offset (data slicer input) and to change the data
                     slicer threshold value.
        WUC          Wake-Up Control Register. Controls the chip’s wake-up
                     behavior.
        WUR          Wake-Up Data Rate Register. Controls the allowable data rate
                     of a wake-up message.
        WUA          Wake-Up Address Register. Contains the expected address of a
                     wake-up message.
        WUD          Wake-Up Data Register. Contains the expected data field of a
                     wake-up message.
                             Table 9: AT86RF211 Register Descriptions



During initialization the control registers must be programmed to define the correct behavior and

response of the AT86RF211. This involves setting the carrier frequency properties, signal

strength threshold, demodulation techniques, and power output level.



5.3.1.1.1      Carrier Frequency.

One of the reasons the AT86RF211 was chosen as the transceiver chip was the ability to

dynamically program the carrier frequency for both received and transmitted signals anywhere

between 400 and 480 MHz. This is an essential feature of the design because frequencies will

not be assigned until a launch date has been specifically set. Once a launch date has been set

CalPoly will assign a transmit frequency to Cornell in the 70cm amateur frequency band (400 –

480 MHz).



Cornell University            Communications Sub-System                                       57
Per specifications, the AT86RF211 uses FSK (frequency shift keying) modulation. This means

that binary logic levels are coded via the transmission of two different frequencies. These

frequencies are set to be plus and minus a given offset from a central carrier frequency.


                                                          Carrier Frequency




                                                          Frequency Deviation


                                   Figure 24: FSK Modulation

The AT86RF211 can be programmed to store 4 frequency values in registers F0, F1, F2, and F3.

F0 and F1 are selected to be the transmission frequencies as shown in the figure above. F0

corresponds to the frequency for transmitting a „0‟, and F1 corresponds to the frequency for

transmitting a „1‟. Based on the assigned central carrier frequency, F0 will be programmed with

the hexadecimal value corresponding to the desired carrier frequency minus the desired

frequency deviation offset. F1 will be programmed with the hexadecimal value corresponding to

the desired carrier frequency plus the desired frequency deviation offset. The required minimum

frequency deviation is chosen based on the number of transitions per second (data rate). Using a

data rate of 9600 bps requires a frequency deviation of 10 kHz. F2 corresponds to the received

signal, and will get programmed with the hexadecimal value corresponding to the desired carrier

frequency plus or minus the IF stage central frequency.




Cornell University            Communications Sub-System                                      58
   In order to find the hexadecimal value that corresponds to each frequency, Atmel provides a tool

   that accepts the central frequency and the deviation and outputs the hexadecimal value for each

   of the frequency registers. This tool is provided in the communication sub-system directory of

   the ICE-Cube Design Document CD.



   5.3.1.1.2         Received Signal Strength.

   In order to have the AT86RF211 differentiate between signal and noise, it is necessary to set a

   received signal strength indicator (RSSI) threshold. The expected power level of the received

   signal can be computed using the link equation on the uplink as shown in the table below:



                                          Variable    Value     Units   Description

Transmitter Power                           Pt       43.979     dBm     25 W Output
Line loss from transmitter to antenna       Ll       -1.143      dB     7.5dB/100m over 50ft (15.24m)
Transmitter Antenna Gain                    Gt         12        dB     Peak gain
                                                                        Effective Isotropic Radiated Power:
Terminal EIRP                              EIRP      54.836     dBm
                                                                        P t+Ll+Gt


Carrier Frequency                            f         433      MHz     Approximate 70 cm band frequency
Propagation Path Length                      S         450      km      Orbit altitude
Space Loss                                  Ls       -138.244   dB      use 147.55-20log(f x 106)-20log(S x 103)
Fade Allowance                              La1         -4      dB
Other Losses                                La2         -4      dB
Total Atmospheric Loss                      La          -8      dB      La1 + La2

Received Isotropic Power                     Pr      -91.408    dBm     EIRP - Ls - La

Receiver Antenna Gain                       Gr          -1       dB     Patch Antenna
Edge of Coverage Loss                       Lo          -2       dB     Due to horizon losses and pointing errors

Received Signal Power                       Pr       -94.408    dBm     P r+Gr+Lo

                             Table 10: Link Analysis of Received Power Strength




   Cornell University                   Communications Sub-System                                                   59
The RSSI has a dynamic range of 50dB from –95 dBm to –45 dBm. The RSSI threshold is

stored as a 6 bit value, which means to ensure reception of signal and not noise we should set the

threshold value to be 19, or „010011‟.


                 19
                                                -94.408




                        Figure 25: RSSI Output vs. Received Power Level



5.3.1.1.3       Data Slicer Reference Mode.

The final step for correctly decoding a received signal into bits is quantifying the demodulated

signal into CMOS level data. This is achieved within the AT86RF211 using a data slicer, which

compares the data against a reference level. If the signal level is above the reference threshold, it

is quantified as a „1‟. If the signal level is below the reference threshold, it is quantified as a „0‟.

The AT86RF211 has two modes for comparison. The first option is external mode, which uses

the average value of the demodulated signal as the comparison level. The other option is an




Cornell University              Communications Sub-System                                            60
internal mode, which uses a fixed threshold as the comparison level. The threshold level is

determined by a programmable DAC output.



While external mode is preferable, it requires the use of a DC-free modulation scheme, such as

Manchester Coding. Such a scheme would guarantee an approximately equal number of zeros

and ones were transmitted.       However, the ground station TNC cannot generate a DC-free

modulation. Using external mode, long strings of ones or zeros would cause the average value of

the signal and the value of the actual signal to become very close to one another and the decision

cannot be made reliably anymore. Thus, to ensure correct handling of strings of ones or zeros,

the internal data slicer mode must be used.



Using the internal mode requires defining the discriminator offset and data slicer threshold. The

data slicer control register should be initialized based on testing done between the comm. and the

ground station. One method for testing the necessary discriminator shift value and the data slicer

threshold value is as follows:



   1) Transmit an unmodulated signal at central frequency from the ground station.

   2) Read the ADC output of the discriminator. This can be done by setting CTRL1[24] to „1‟

       and CTRL1[1] to „1‟. The discriminator value is then stored in the status register in bits

       18 to 23.

   3) If the discriminator value is less than 0x11, then shift the discriminator level up by setting

       DTR[1:0] to 0x2.




Cornell University               Communications Sub-System                                       61
       If the discriminator value is more than 0x15, then shift the discriminator level down by

       setting DTR[1:0] to 0x1.

       If the discriminator value is between 0x11 and 0x15, then do not shift the discriminator

       level by setting DTR[1:0] to 0x0.

   4) Next, transmit a message from the ground station.

   5) Starting from the lowest threshold value (DTR[5:2] = 0x0), adjust the threshold upwards

       until the message is correctly decoded.      Continue increasing the threshold until the

       message is no longer correctly decoded.

   6) The data slicer threshold value (DTR[5:2]) should be set to be midway between the

       minimum and maximum thresholds that yielded correct decoding.



To further ensure correct decisions, the discriminator is used in narrow bandwidth mode. Since

the output swing of the discriminator is proportional to the input frequency deviation, small

frequency deviations, such as 10 kHz, will lead to smaller peak-to-peak value of the

discriminator output. In narrow band mode, the gain (mV/kHz) of the discriminator is twice as

high as standard mode.      Hence, the peak-to-peak swing will be large, and this will make

decisions easier and more robust.



5.3.1.1.4      Data Rate.

The AT86RF211 must also be programmed to receive data at 9600 bps as this is the rate that the

ground station will transmit commands. 9600 bps was chosen because it is the minimum baud

rate that allows for complete download of all data collected. While higher data rates would be

preferable, it would increase power consumption on the satellite.




Cornell University            Communications Sub-System                                     62
Along with the data rate, it is important to set a tolerance for the data rate. This tolerance

compensates for the difference between the read data rates from transmitter and receiver. The

tolerance should be chosen to allow for fast convergence to the correct data rate and stability

once the data rate has been found. The typical recommendation to meet these conditions is 2%.



5.3.1.1.5      Power Output.

In order for the signal created by the AT86RF211 to be within the accepted power level range for

input into the amplifier, the signal must be between 2 and 6 dBm. The power level is selected by

both hardware implementation and software control.



5.3.1.2        Configuring the Microcontroller.

In order for the MCU to be able to both generate and receive data bit by bit from the

AT86RF211, two interrupt service routines (ISRs) are needed. To receive bits, an external

interrupt is needed, and to generate bits, an internal timer interrupt is needed. These interrupts

work by executing a portion of code whenever an interrupt event occurs.



5.3.1.2.1      Receive Interrupt Service Routine.

Received bits are clocked into the MCU using an external interrupt. By enabling data clock

recovery, the AT86RF211 chip generates a data clock that is synchronized to the incoming data

when placed into receive mode.




Cornell University            Communications Sub-System                                        63
                            Data Clock



                            Data
                            Message

                                   Figure 26: Data Clock Recovery




The external interrupt is configured such that at each positive edge of the data clock the value of

data message is recorded by the MCU. The bits clocked in by the ISR are passed to the link

layer of the software. The data clock should have a frequency of 9600 Hz corresponding to the

expected data rate.



5.3.1.2.2      Transmit Interrupt Service Routine.

In order to transmit bits at 9600 bps, the MCU must output a new bit every 0.10417 ms. This is

achieved using one of the MCU‟s internal timers, timer1. The timer is configured to reset itself

every 0.10417 ms. Each time the timer resets, an interrupt is fired that calls a routine to output

the next bit value onto the Data Message line. The bit value at each interrupt is set by the link

layer of the software.



5.3.1.3        Configuring the RF Relays and Amplifier.

Between the AT86RF211 and the antenna, there are two paths for a signal to travel. When

receiving, the signal bypasses the amplifier and goes directly from the antenna to the

AT86RF211. When transmitting, the signal is routed through the amplifier to be boosted to the

required 1W signal strength.




Cornell University             Communications Sub-System                                        64
                                             Amplifier




                                                                             RF211


                     RF Relay                                   RF Relay




                                Figure 27: RF Functional Block Diagram



The RF relays are controlled by toggling an output of the MCU.



        0 = Receive Mode

        1 = Transmit Mode



When transmitting, the amplifier must also be powered on. The MCU turns the amplifier on and

off by toggling an output.



        0 = Amplifier On

        1 = Amplifier Off



5.3.2          Link Layer (AX.25 Protocol).

The link layer software is responsible for ensuring a reliable communication link between the

ground station and satellite. This is achieved through error control, frame sequencing, and

session control.




Cornell University                Communications Sub-System                               65
To guarantee the reliability of the communication link, the AX.25 (version 2.0) protocol was

implemented as the link layer mechanism. The AX.25 protocol was chosen for a few reasons.

First, the protocol is reliable. Because of the connection oriented nature of the protocol, lost or

incorrect packets can be recovered through retransmission.          Secondly, the protocol has

commercial TNC support (See Ground Station Documentation). This second feature is very

important because it allows the use of an off the shelf TNC in the ground station.



The one drawback to using AX.25 was the complexity of the full protocol. While many of the

protocols elements were vital, others added unnecessary complication. For this reason, certain

features of the protocol were not implemented on the satellite.



The AX.25 protocol can be thought of as being composed of two elements: the frames passed

between systems and the data link state machine that controls connections between systems.



5.3.2.1        AX.25 Frame Structure.

Using AX.25, link layer transmissions are sent in small blocks of data, called frames. Each frame

is made up of several smaller groups, called fields. Within AX.25 there are 3 types of frames:

              Unnumbered (U frame)

              Supervisory (S frame)

              Information (I frame)




Cornell University            Communications Sub-System                                          66
These frames have the following structure:

U & S frame construction:


                 Flag      Address       Control        Info          FCS         Flag

I frame construction:


          Flag       Address      Control         PID          Info         FCS          Flag



Flag:

Since packet radio is a bit-oriented protocol, the only way to tell with certainty when one frame

ends and another begins is to delimit each frame with a specific bit sequence at both the

beginning and the end. This is the job of the flag field. A flag consists of a zero followed by six

ones followed by another zero, or 01111110 (0x7E). In order to prevent this sequence from

accidentally occurring anywhere else in the frame, bit stuffing is used by the transmitter.

Bit stuffing works by monitoring the number of consecutive “1” bits. Any time five contiguous

“1” bits are sent, the transmitter inserts a “0”. During reception of a frame, any time five

consecutive “1” bits are encountered, if the next bit is a “0” bit, it is discarded.




 For example:
        0 1 0 1 1 1 1 1 1 1 0 1 0
 becomes:
        0 1 0 1 1 1 1 1 0 1 1 0 1 0




Cornell University              Communications Sub-System                                       67
Address Field:

The address field uniquely identifies both the source and destination of the frame. Frames will

only be accepted if both the destination and source address match those assigned to the satellite

and ground station. The satellite will be assigned a call sign once a launch date has been fixed.

The ground station is identified as W2CXM.



Control Field:

The control field identifies the type of frame (U, S, or I) being passed. Among other information

included, the control fields of S and I frames contain frame sequence numbers. These numbers

are used to keep track of track of frames and serve as a means for detecting and recovering lost

frames.



Information Field:

The information field contains the data that is passed to the application layer. For uploaded

frames, the information field contains a command. For downloaded frames, the information field

contains data.



FCS Field:

The Frame Check Sequence (FCS) is a sixteen-bit number that is calculated by both the sender

and receiver of a frame. Comparing the value computed by both the sender and receiver ensures

that the frame was not corrupted by the transmission medium.




Cornell University            Communications Sub-System                                       68
5.3.2.2             AX.25 Frame Types.

The control field described in the frame structure above defines a number of frames for each of

the frame format categories: unnumbered, supervisory, and information.



Information Format

I frames are used to reliably download all data from the satellite to the ground station. The

information field of I frames are filled with data passed from the application layer, which

consists of either science data or telemetry. Each I frame is assigned a sequential frame number

in order to track and retransmit lost frames.



Supervisory Format

S frames provide supervisory link control such as acknowledging or requesting retransmission of

I frames. There are four individual S frames:

         RR – Receive Ready: This frame indicates that the sender is ready to receive more

          frames.

         RNR – Receive Not Ready: This frame indicates that the sender is not ready to receive

          more frames.

         REJ – Reject Frame: This frame is sent as response to out of sequence or duplicate

          frames, and rejects all frames past the frame sequence number contained in the REJ

          frame‟s control field.

         SREJ – Selective Reject: This frame rejects a single frame and acts as a request of the

          single frame indicated by the SREJ‟s frame sequence number.




Cornell University                 Communications Sub-System                                  69
Unnumbered Format

U frames are responsible for maintaining additional control over the link beyond what is

accomplished with S frames. Only some of the U frame types are used

      SABM – Connect Request: Connection sessions are initiated by the ground station by

       sending a SABM command frame satellite.

      DISC – Disconnect Request: Connection sessions are ended by the ground station by

       sending a DISC command frame to the satellite.

      UA – Unnumbered Acknowledge: The UA response frame acknowledges the reception

       and acceptance of a SABM or DISC command frame.

      UI – Unnumbered Information Frame: The UI is used to transfer all application layer

       commands from the ground station to the satellite. UI frames are used for uploads to

       reduce the complexity of the code required on board the satellite. Because UI frames

       work outside the connection oriented session, there is no mechanism for frame rejection

       or retransmission requests at the link layer level. However, if a command sent in a UI

       frame fails to be received error free by the satellite, the application layer will handle the

       retransmission of the command after a specified time-out period (See Ground Station

       Documentation for more details).

      However, since UI frames pass information outside the normal information controls it is

       necessary for the application layer to ensure that commands are received.

      DM – Disconnected Mode: The DM frame is the response to any frame other than the

       SABM frame until a connection is established.




Cornell University            Communications Sub-System                                          70
5.3.2.2        AX.25 Data Link State Machine.

The reason that AX.25 can provide a reliable link is the connection oriented nature of the

protocol. Once a connection has been established, the satellite‟s data link state machine keeps

track of the frame sequence of information frames. By using frame sequence numbers and

numbered acknowledgements, it is possible to keep track of lost or erroneous frames.



The state machine implement on-board the satellite is a simplified version of that described by

the AX.25 protocol. To keep the state machine simple, the satellite is not able to initiate or

terminate a connection session. By not allowing certain frame types and forcing the avoidance

certain states the state machine has been simplified down to two states: connected and

disconnected



Disconnected

When in the disconnected state, three events can happen. If a SABM frame is received, the state

machine variables are initialized and the state becomes connected. If a UI frame is received, the

information is passed to the application layer and the state remains disconnected. Any other

frame arrival causes no action and no change to the state machine. The actions followed are

shown in the event graph below.




Cornell University            Communications Sub-System                                       71
                                                                     Disconnected




                                                                                                 Receive
                                       Receive UI                    Receive SABM
                                                                                               Anything Else




                                     Send Data to
                                    Application Layer




                                          Poll ?                       Send UA
                            No
                                               Yes



                                                                     Initialize State
                                        Send DM
                                                                        Variables




                                      Disconnected                    Connected                Disconnected




                      Figure 28: AX.25 Data Link Disconnect State Machine



Connected

When in the connected state, the possible events break down into three groups. The first possible

event is the reception of a UI frame.                   When these are received, the data is passed to the

application layer to be processed further.



                  Receive         Send Data to                                          Send
   Connected                                              Poll   ?                                             Connected
                    UI           Application Layer                         Yes           RR

                                                         No




                 Figure 29: AX.25 Data Link Connect State Machine-UI Frame



The second category of events relates to the download of data from the satellite to the ground

station. The mechanism described provides the ability to recover lost or erroneous packets.


Cornell University                   Communications Sub-System                                                             72
Each time the application layer provides the link layer with data for download, if the link layer is

currently busy transmitting another frame, the download request is queued until the transmitter is

free. The data is then packetized into an I-frame. Upon transmission, the state variables, such as

frame sequence number, are updated.

During download, the ground station periodically responds to the download information frames

every eight frames. The ground station can have four possible responses.

   1) RR: If every frame is received correctly and the ground station is not busy, it will respond

       with a RR frame. When the satellite receives an RR frame, it updates its state variables

       to indicate that all frames up to and including the frame number contained within the RR

       frame. Furthermore, the RR frame tells the satellite that the ground station is ready to

       accept more data.

   2) RNR: If every frame is received correctly by the ground station, but it is busy, it will

       respond with an RNR frame. The satellite responds to an RNR in the same way that it

       responds to an RR frame, but will not try and transmit more data until an RR frame is

       received indicating that the ground station is ready to receive again.

   3) REJ: In the event of multiple frames getting corrupted or lost, the ground station will

       respond with a REJ frame. The satellite responds to a REJ frame by retransmitting all

       data frames beginning with the first frame that was not received correctly.

   4) SREJ: If the ground station only receives a single frame incorrectly, it will respond with

       an SREJ frame. Reception of an SREJ frame causes the link layer to request the data

       included in the lost frame from the application layer. This information frame is then

       retransmitted.




Cornell University            Communications Sub-System                                          73
                                                Yes
                  Data Transmission
                                                   Transmitter                                      Update State
                    Request from                                             Send I                                           Connected
                                                     Busy?         No                                Variables
                  Application Layer




                  Receive             Clear GS receiver
                    RR                      busy

                                                                       Need to     Yes       Send              Update State
                                                                                                                              Connected
                                                                      Respond?                RR                Variables

                  Receive             Set GS receiver                 No
   Connected
                   RNR                     busy




                                                                             Yes
                  Receive        Clear GS receiver                Need to             Send                   Invoke
                                                                                                                              Connected
                   REJ                 busy                      Respond?              RR                Retransmission

                                                                 No



                  Receive        Clear GS receiver          Request Data from                             Update State
                                                                                         Send I                               Connected
                   SREJ                busy                 Application Layer                              Variables




                    Figure 30: AX.25 Data Link Connect State Machine-I Frame



The final category of events that can occur while in the connect state relate to session control.

Three frames can be received from the ground station that can affect the state of the session. If a

SABM frame is received, the ground station believes that the connection was lost and is trying to

reestablish it.   When the satellite receives a SABM frame and is in the connect state, all

connection state variables are reset and any data in queue to be transmitted is cleared. If a DISC

frame is received, the ground station is ending the session. At this time, the satellite will end all

communication and will enter the disconnected state. The final frame that can be received is a

DM frame. This indicates that the ground station already believes that the session has ended.

When the satellite receives a DM frame, it enters the disconnected state.




Cornell University                           Communications Sub-System                                                                    74
                   Receive      Need to   Yes   Send    Initialize State
                                                                                         Connected
                    SABM       Respond?          RR        Variables

                               No


                   Receive      Need to   Yes   Send
   Connected                                                                         Disconnected
                    DISC       Respond?          RR

                                No


                   Receive
                                                                                     Disconnected
                     DM




                     Figure 31: AX.25 Data Link State Machine-Session Control



Timeout Timer (T1)

An integral part of the state machine not shown in the above figures is the T1 timeout timer.

After transmission of an I frame, the data link state machine starts its T1 timer. If the T1 timer

expires before receiving an acknowledgement, the satellite restarts its T1 timer and sends an RR

frame is sent to the ground station polling for a response. This ensures that the satellite does not

wait indefinitely for a response.



If the satellite receives a supervisory (RR, RNR, REJ, or SREJ), the satellite restarts its T1 timer

and resumes transmission or retransmission of I frames from the frame sequence number

included in the ground station‟s response. If timer T1 expires before a supervisory response

frame is received, the satellite will restart T1 timer and retransmit the RR frame. Retransmission

will be tried 8 times after which the satellite will return to the disconnected state.



The value of T1 should be greater than the round trip time for a maximum length frame. As

shown in the transmission diagram below, the round trip time is composed of propagation time

of the signal, transmission time, and processing time at the ground station.




Cornell University              Communications Sub-System                                            75
                                                              T1
                     Satellite




            Ground Station
                                      tprop   ttran   tproc    ttran   tprop


                                  Figure 32: Transmission Diagram

When these are computed and summed, the worst case round trip time for 450 km orbit, 9600

bps data rate, and 0.5 second processing time is approximately 1 second. To avoid unnecessary

timeouts, the value of T1 is 3 seconds.



5.3.3.1        Application Layer.

The application layer contains all the high level functionality of the comm. board. This includes

the code required for the comm. board to process ground station commands and interact with

CDH. In order to talk with both the ground station computer and CDH, higher level protocols

were developed that defined specific interactions. The application layer also includes code for

power control and handling fault modes.



5.3.3.1.1      Ground Station Protocol.

As mentioned earlier, the information field of the UI frames sent from the ground station to the

satellite is passed on to the application layer. The information contained in these fields are

commands directing the behavior of the comm. board.            These commands conform to the

communication protocol described in section 6. Viewed from the satellite, the communication




Cornell University               Communications Sub-System                                    76
protocol is solely commands and responses. When a command is received, a case statement is

used to look-up the desired response.



5.3.3.1.2      Communications-CDH Protocol.

All of the commands defined in the communication protocol require interaction with CDH.

While the mechanism for UART communication is build into MCU, a protocol is needed to

define commands and responses between the Communication board and CDH.

Each of the commands sent from the ground station, after being parsed, is translated into a

command that can be sent to CDH. The commands that are sent to CDH are defined in Appendix

3. When data or telemetry is received from CDH, it is sent to the link layer to be packetized and

transmitted.




5.3.3.1.3      Sleep Mode.

In order for the communication subsystem to meet its power requirements, a low power sleep

mode is needed. Because of careful component selection, the hardware has been designed so

that a low power mode can be enabled or disabled by the software.



Three events can trigger low power mode

   1. The ground station has ended the session via a DISC frame.

   2. The communication session is ended because no response is received after 8

       retransmission attempts.

   3. The Communication board has been idle for more than 4 minutes. This idle timeout

       period was chosen because the average communication window is around approximately



Cornell University            Communications Sub-System                                       77
        7 minutes long.         Waiting 4 minutes before entering the sleep mode keeps the

        communication board active for the majority of a communication window.



When such an event occurs, a number of changes take place to put each component in low power

mode.

   1. Power relays are switched to power down external memory and the address latch by

        toggling the output on PORTB.2 to a low level (0).

   2. Amplifier is powered down (if not already off) by toggling the output on PORTB.1 to a

        low level (0).

   3. The RF relays are switched to receive mode by toggling the output on PORTB.3 to a low

        level (0). This is done so that any signal received by the board while asleep is passed to

        the transceiver chip.

   4. The transceiver chip is put into sleep mode by writing to the wake-up control register

        (WUC). While in sleep mode, the AT86RF211 periodically checks for radio activity.

   5. The MCU places itself into power-down sleep mode by executing the „SLEEP‟ assembly

        instruction. In this mode, only the external interrupts and watchdog timer (if on) are

        enabled. Only an external level interrupt or reset can wake-up the MCU.



Once asleep, the communication board can only be woken via reset or the reception of a hello

packet from the ground station. As outlined in the communication protocol, when the satellite

enters a communication window, the ground station transmits the bit sequence „1010100001.‟

During the AT86RF211‟s period radio activity checks, the signal will be detected. Once the




Cornell University               Communications Sub-System                                     78
header has been checked, the AT86RF211 activates the wake-up line.            The wake-up line

interrupts the MCU, which powers up.



5.3.3.1.4      Watch-Dog Timer.

One failure mode for the comm. board is that MCU can freeze. In such a case, no data could be

uploaded or downloaded. Such an event would constitute a mission failure. To prevent such an

occurrence, the MCU has a built in watch-dog timer. The watch-dog timer is a hardware down-

counter that automatically causes an MCU reset when the timer expires.



During configuration, the watchdog timer is configured and turned on by programming the

WDTCR. The pre-scalar for the timer is set so that the timer takes 6 seconds to time out. This is

the largest available timeout period. Before enabling the timer, it is reset by executing the

assembly command “WDR.” This ensures that the timer is in a known state before power on.



Once enabled, the timer must be reset at least once every 6 seconds to prevent a watch-dog timer

reset. Because the software is structured as an infinite while loop, the timer is reset using the

“WDR” instruction at the beginning of the loop. This ensures that the period between each timer

reset even in the event of interrupts is far less than 6 seconds.



Because of the low-power sleep mode, the watch-dog timer must be disabled before going to

sleep to prevent unwanted resets while sleeping. If the communication board should hang while

asleep, the CDH board is responsible for monitoring the time since last communication with the




Cornell University              Communications Sub-System                                     79
comm. board. If CDH has not received a command from comm. within the last day, CDH

automatically resets the comm. board.



5.4            Prototype Changes.



5.4.1          Communications Board 1.0.

This was the legacy design of the board as inherited from Communications 2002 team (See

Figure 33), but several problems were found that related to the design and board layout.




                             Figure 33: Communications Board 1.0



The AT86RF211 datasheet stated that the max voltage for VCC is 3.75 volts, while all other

components on the board are meant to run at 5 volts. Communication between components must

be at the same voltage level, or bi-directional voltage leveling will have to be implemented.

Because of the number of connections between components, bi-directional voltage leveling was


Cornell University            Communications Sub-System                                    80
not an easily option to implement on the current board. The only real solution here was to run

the other components are 3.3 volts, but the minimum voltage for VCC on many of the

components was approximately 4.2 volts. Therefore, new parts were needed. For new layouts

and schematic design, a requirement was derived that all parts must be able to run at 3.3 volts.



The chip carrier for the micro-controller is un-reliable. While connections between the chip

carrier board connectors and board solder pads have a stable connection, the connections

between the micro-controller‟s pins and the chip carrier‟s chip pins do not have a stable

connection. The PLCC-44J packaging of the micro-controller limits the choices of chip carriers.

None of these chip carriers can supply a reliable connection. Therefore, the micro-controller was

soldered directly to the board‟s solder pads to ensure a stable connection. This will make it very

difficult to switch the micro-controller if it gets damaged during the prototype process or testing.

For future implementation, the communications board will use a 40-dip chip carrier with the

40P6 AT90S8515 packaging because it provides more reliability, stability, and durability.



With the current board layout, programming the micro-controller was difficult. After months of

debugging, it was easier to program the micro-controller through a development board than to

program through the current prototype board. However, because the micro-controller is soldered

directly to the board, this makes programming the micro-controller through the board nearly

impossible.



In addition, this revision of the board lacks the RF relay and RF amplifier to boast the output

power to at least 1 Watt (30 dBm).




Cornell University            Communications Sub-System                                            81
5.4.2          Communications Board 2.0.

This is the initial design of the board from the Communications 2003 team (See Figure 34). This

board revision includes the missing RF relay and RF amplifier and incorporated solutions to

digital problems from the communications board 2.1.          For example, there are no digital

communications problems because all components on this board revision are designed to be

operated at 3.3V.




                             Figure 34: Communications Board 2.0



In this revision of the communications board, the PLCC44-J packaging was replaced with the

40P6 packing of the AT90S8515 micro-controller.        As mentioned in the previous section, this

allowed for a more stable and reliable connection for the micro-controller.




Cornell University            Communications Sub-System                                       82
Because communications with the Command and Data Handling sub-system could be

accomplished with UART communications, the RS232 chip was removed. This would save both

power and board space.



All digital communication between components (UART communications, external memory, and

digital communications to the RF transmitter and receiver) were verified.



This revision of the board also includes the RF amplifier and RF relays that were previous

omitted from the first revision. However, there are extreme RF problems with the board due to

wires that were to thin and too long and a lack of a ground plane around the RF network. While

the RF transmitter/receiver chip is able to transmit a message, it was not able to receive or to

amplify an RF message. A spectrum analyzer revealed that the RF signal was attenuated and

modulated through the long network to the antenna. These are major problems resulting from

the layout implementation that prevented debugging of the RF section. The only solution was to

develop a new layout and board that would fix the RF problems.



During the assembly of the prototype satellite there were two problems discovered. First, the

length of the board was discovered to be too long. While the board was designed to the

maximum dimensions as allowed from the structural model of the internal configuration of the

satellite, there board should have been design with some slack in case of assembly problems.

Therefore, the upper left hand section of the board had to be filed down to ensure that board

could be mounted (See Figure X). Secondly, the board didn‟t allow enough space for wiring.

Specifically, the power sub-system needed space to allow wires to be connected from the




Cornell University            Communications Sub-System                                      83
adjacent side‟s solar cells to the power board. Hence, the upper right hand section of the board

was removed.



5.4.3          Communications Board 2.1.

In this board, the majority of the problems that we saw that caused the attenuation and

modulation were fixed (See Figure 35).         Long wire leads are dramatically reduced, wire

thickness is increased, and RF networks are surrounded with ground planes. Furthermore, this

revision also includes solution to making assembly of the satellite easier.




                              Figure 35: Communications Board 2.1



The length of the board was reduced to ensure that no physical modifications had to be done to

assembly the satellite and allow spacing for wiring. Furthermore, the wire connectors to the

board were relocated and changed. Given that the position of the GPS board was directly above

the Communications board (Refer to the Structures specification document about the satellite’s


Cornell University             Communications Sub-System                                     84
internal configuration), the board connectors were repositioned to the top and bottom sections of

the board. Furthermore, all the connectors are now vertical instead of right angle to help in the

internal wiring of the satellite. The board connector type was changed from a friction lock to a

connector with an actual locking mechanism. This would increase the reliability that connectors

do not become undone during testing and launch.



An examination of the frequency spectrum of the transmitted signal showed a dramatic

improvement in the amount of echo and attenuation. When transmitting at max power from the

RF transmitter and receiver chip, we are able to see approximately 12-13 dBm of power, which

matches the specification of the AT86RF211.        However, there are still problems with the

frequency spectrum because we saw replicas occurring approximately every 8 MHz, but was

broadband and limited to approximately + 75 MHz.



The cause is believed to be because the digital devices do not have decoupling capacitors and the

decoupling capacitors on the RF section are too far away. Devices that are in parallel with each

other will see periodic voltage drops across the shared VCC line. In this case, this seems to be

occurring at a frequency of 8 MHz to 16 MHz. This is not a problem for applications that

operate at low frequencies (approximately 50-60 Hz), but for RF applications these are issues.

The decoupling capacitors act as charge pumps, that quickly restore drops in voltages across

VCC, but they have to be in the immediate proximity to the devices. Each digital device will

have 2 sets of capacitors, 47 F for lower frequencies and 47F for higher frequencies.    After

adding decoupling capacitors to the digital section and moving the decoupling capacitors in the




Cornell University            Communications Sub-System                                       85
RF section closer to the chips, the replicas at + 8 MHz disappeared and the bandwidth of the

signal was much smaller.



After fixing the bandwidth and oscillation, the board was still unable to receive a transmitted

message. When the transmitter/receiver module receive a signal at 433 MHz, that message is

demodulated to an Intermediate frequency (IF) and filtered through a band-pass filter remove

noise. If the bandwidth of the filter is not wide enough to pass the bandwidth of the signal, then

transmitter/receiver module will be unable to recover the message content. The filter was carried

over from the legacy design in revision 1.0. The bandwidth of the filter was discovered to be 15

KHz, which is too small. Once the filter was replaced with another filter of bandwidth 180 KHz,

this revision of the board was able to transmit and receive RF messages.



The RF amplifier (RF Micro Devices RF2117) is boosting the RF input signal with

approximately 24 dB gain (from 1mW to 250mW). When it is operating, the settings are:



                        Vcc = 3.3 Volt, VPD = 2.3 Volt, VREG = 2.81 Volt

                             ISTANDBY = 239mA, IOPERATING = 520mA



Since the system requirements require gain more than 30 dB, the amplifier must be optimized to

increase the gain further. Since the current amplifier layout is entirely based on the development

board that serves wide range of frequency (from 400 MHz to 500MHz), it may not be optimized

for operation at 433MHz. The 2.2nH (tuned for 450MHz) LTUNE inductor at pin 3 was

replaced by 2.7nH to shift down in frequency to 433MHz, which power by 1 dBm.




Cornell University            Communications Sub-System                                           86
The following tables show the allocated mass and power versus the current mass and power

information. The average power assumes a duty cycle of 12.03%, 0.82%, and 87.14% for the

transmitting, receiving, and idle modes, respectively.



             Mass (grams)                            Average Power (mW)
           Allocated Actual         Net         Allocated             Actual                  Net
                                            TX      RX IDLE       TX    RX IDLE
 Board         80          54     - 26    480.75 2.76 0.095 246.13 2.706     -
Antenna        60          18     - 48       -       -     -       -     -   -
                                Table 11: Mass and Power Budget




6              COMMUNICATIONS PROTOCOL

The Communication Protocol has been designed to take the following into consideration:

       Communication can drop at any point. It must be resilient enough to recover from it

       The ground station and satellite can get rebooted resulting in inconsistent state. The

        protocol should have an automatic mechanism to reconcile these inconsistencies.

       The communication window will vary. So the protocol should have a mechanism to

        resume the interrupted download after the connected is reestablished. There should be no

        need to restart everything over again but simply start from the point where connection

        was lost.

       The protocol should take low power requirement into consideration.

       The data size can be arbitrarily large


Cornell University              Communications Sub-System                                      87
The following table describes the communication protocol

Phase Name                                  Sequence of Commands
Initialization and connection setup            1. Ground Station sends initialization
                                                  string (Modem) command.
                                               2. Satellite receives the Hello
                                                  Command.
                                               3. Satellite responds with
                                                  ACK_HELLO (Modem)
                                                  Command.
                                               4. Ground Station switches to Ax25
                                                  mode.
Check Status                                   5. Ground Station sends the Status
                                                  Command.
                                               6. Satellite receives the Status
                                                  Command.
                                               7. Satellite sends the current
                                                  Status(power, # of data sets, # of
                                                  telemetry file sets, flag for data file
                                                  resume, flag for telemetry file
                                                  resume) .
                                               8. Ground Station receives and
                                                  determine if sufficient power is
                                                  available.

Download File                                   9. Ground Station sends the „set file to
                                                    Data‟ flag.
                                                10. Satellite saves the flag at its end
                                                11. Ground Station sends
                                                    resume/download command
                                                12. Satellite receives the command
                                                13. Satellite sends the file.
                                                14. Ground Station receives the file
                                                15. Ground Station sends the delete
                                                    command
                                                16. Satellite deletes the file

Disconnect and Connection Tear Down
                                               17. Ground Station sends the
                                                   disconnect command
                                               18. Connection Closes
                          Table 12: Communication Protocol Summary




Cornell University            Communications Sub-System                                     88
6.1          Initialization Phase

The satellite receiver unit is in sleep mode and can only be interrupted out of it if a special

sequence of bits is sent to it. The sequence is 1010100001xxxxxx where x denotes any value.

This sequence is labeled as the “HELLO” sequence for future reference.



Since the satellite can only be alerted by this bit sequence it is necessary to send this sequence

raw (not packetized) from the ground station. This means that the ground station cannot use any

transport protocol (AX.25) and rather simply broadcast this bit sequence towards the satellite.

As no transport protocol is being used error-free delivery is not guaranteed. Hence, the ground

station will keep on broadcasting this sequence at an interval of 2 seconds until it receives an

acknowledge packet, “ACK_Hello”, from the satellite. When this occurs, the ground station will

switch to AX.25 mode and make a formal connection request (three way handshake) with the

satellite.



The satellite needs to send the “ACK_Hello” message to the ground station to inform it that it is

interrupted from its sleep. Since no reliable transport protocol is being used, the “ACK_Hello”

will be broadcasted each time it receives the “HELLO” message from the station.


      Flow Control /pseudo Code
      Ground Station                              1. Send “HELLO” string. No other
                                                  terminator string is attached.
                                                  2. Loop until an “ACK_HELLO” is
                                                  received from the satellite. Delay for 2
                                                  second in each loop.
                                                  3 Switch to AX.25 mode and make a
                                                  formal connection to satellite. Send
                                                  SABM frame.
                                                  4. If formal connection fails go back to
                                                  Step 1.



Cornell University             Communications Sub-System                                          89
      Satellite                                    1. Listen/Sleep mode for “HELLO”
                                                      string.
                                                   2. If at this Step then Its up from sleep
                                                      mode.
                                                   3. Send “ACK_HELLO” string. No
                                                      terminator string is attached.
                                                   4. Check the next message received.
                                                           a. If “HELLO” then go back to
                                                               step 2.
                                                           b. Else make AX.25
                                                               connection. Send UA frame.

                          Table 13: Communication Link Initialization Phase



Message                                         Format
HELLO                                           1010100001xxxxxx where x denotes any
                                                value.
ACK_HELLO                                       String in 7 bit ASCII (TBD)
                             Table 14: Initialization Message Format


6.2               Check Status Phase

From this point onwards, the communication link will use a reliable transport protocol so that

there will be no need for retransmission to be explicitly handled by the ground station

application. However, retransmission due to connection drop still needs to be handled.



The ground station first inquires about the status of the satellite. The satellite responds by

sending the power status and the number of data entities it has. The ground station first

determines if the satellite has enough power to proceed with download. If yes, then it downloads

data; otherwise, it will simply terminate the link. The data download can either be for generic

data or telemetry files. The ground station requests what kind of data download by sending a flag

using the „set command.‟ If the previous download was interrupted, then the resume flag is set.

In that case, the download of the old data set is resumed.


Cornell University             Communications Sub-System                                       90
Pseudo Code/ Flow Control
Ground Station                                 1. Send Status Command.
                                               2. Receive the status from the satellite.
                                               3. Check if Satellite power is
                                                  sufficient
                                                      a. If yes then proceed with
                                                          download.
                                                      b. Otherwise BYE.
                                               4. For download, set the data type flag
                                                  to either data or telemetry. The
                                                  instruction is „set file to telemetry.‟
                                               5. Check if any resumes are available.
                                                      a. If yes then go to resume
                                                          phase.
                                                      b. Else go to download phase.

Satellite                                      1. Receive status command.
                                               2. Send status back to ground station.
                                               3. Wait for next instruction. Timeout
                                                  after 5 seconds to go back to sleep
                                                  mode.

                        Table 15: Communication Link Status Phase


Exception:
Connection dropped at any step:
Ground Station                                 1. Wait for 5 seconds to confirm
                                                  connection drop.
                                               2. Start with initial connection setup
                                                  phase.
Satellite                                      1. Wait for 5 seconds to confirm
                                                  connection drop.
                                               2. Go back to sleep mode.

                      Table 16: Communication Link Connection Drop

6.3           Download Phase

At this stage, the download type is set to either data or telemetry. When the ground station

requests a download, the satellite sends an okay command and begins transmitting the data




Cornell University          Communications Sub-System                                       91
length and data. The data transmitted is the data and the end of file delimiter, Carriage Return

Line Feed (CRLF). The figure below diagrams the download phase.

                                                            File
                                                  OK       Length     Data
                     Satellite



                     Ground
                     Station       Data
                                  Request

                                  Figure 36: Data Download Phase



If the connection drops, then the satellite marks its Resume flag. In this case, if the ground

station asks for a fresh download, then the satellite responds with “Error, resume available.” If

the ground station requests a resume and no file of the current type (data or telemetry) is

available for download, then the satellite responds with “Error, no file available.”


Pseudo Code/ Flow Control
Ground Station                                     1. Send download instruction
                                                   2. Get Response
                                                   3. Check if response is OK
                                                          a. If OK then proceed.
                                                          b. Else if “Error, resume available,”
                                                              then go to resume state.
                                                          c. Else if “Error, no file available,”
                                                              then go back to .status phase.
                                                   4. Set Resume flag=true.
                                                   5. Get file length + CRLF.
                                                   6. Receive data till file length.
                                                   7. Send Delete command.
                                                   8. Set Resume flag=false.
Satellite                                          1. Receive download instruction.
                                                   2. Check if Resume Flag Set.
                                                          a. If Resume Flag set then respond
                                                              “Error, resume available,” and go



Cornell University               Communications Sub-System                                         92
                                                                 back to status phase.
                                                             b. Else proceed.
                                                    3.   Check if file available.
                                                             a. If file available then proceed
                                                             b. Else respond “Error no file
                                                                 available,” and go back to status
                                                                 phase.
                                                    4.   Set Resume flag=true.
                                                    5.   Send file length + CRLF.
                                                    6.   Send data.
                                                    7.   Receive the Delete instruction.
                                                    8.   Delete file.
                                                    9.   Set Resume flag=false.

                         Table 17: Communications Link Download Phase


      Exception

      1. If connections drops before Resume flag is marked then simply repeat the process from

         the connection establishment.

      2. If connection drops after the Resume flag is set then repeat the process and go to the

         resume phase.




6.4               Resume Phase

This phase is used when the connection is dropped during the download. In this case the ground

station starts the resume phase, informing the satellite of the point it wants the download to start

from. If the resume fails, the ground station must delete (backup the file in some secondary

storage and report it to administrator as data unrecoverable) the last file it received since this is

an incomplete file for which no resume is available and it should consider that data for it has

been lost. Figure 37 diagrams how resume phase.




Cornell University              Communications Sub-System                                            93
                                                        File
                                               OK      Length     Data
                     Satellite



                     Ground
                     Station      Data
                                 Request

                                 Figure 37: Data Resume Phase




Pseudo Code/ Flow Control
Ground Station                                1. Send resume position XXX where
                                                 XXX is some unsigned integer
                                                 specifying the file read position.
                                              2. Receive response.
                                              3. Check response.
                                                     a. If OK then proceed
                                                     b. Else if “Error, no resume
                                                        available,” then delete last
                                                        file and go to download
                                                        phase.
                                              4. Receive file.
                                              5. Send Delete command
                                              6. Set Resume flag=off

Satellite                                   1. Receive resume instruction
                                            2. Check if resume available
                                                    a. If available then OK.
                                                    b. Else send “Error, no resume
                                                        available,” and go to status
                                                        phase.
                                            3. Send data from the point specified
                                                in the resume instruction
                                            4. Receive Delete instruction
                                            5. Delete file
                                            6. Set Resume flag=false.
                         Table 18: Communications Resume Phase




Cornell University          Communications Sub-System                                  94
6.5           Additional Specifications

                    All numeric data in command must be in unsigned integer

                    All string data in command is in 7 bit ASCII.

                    All data is in little-endian style.

                    All commands ends in Carriage Return Line Feed (CRLF).

                    All command are in block letters.

                    If no reply in 5 seconds the timeout and go back to initial phase.

                    If any of the node determines that the connection has been lost then it must

                     wait twice the timeout time before it tries to re-establish the connection or

                     reply to any packet.



7.            GROUND SEGMENT HARDWARE

The ground segment hardware consists of the antenna and other hardware.


7.1           Ground Segment Antenna
A high gain helical antenna was designed for the 70cm amateur radio band. The principles used
in its design were drawn from The ARRL Antenna Book (copyright in 1988 by The American
Radio Relay League, ISBN: 0-87259-206-5). In completed form, it should provide 11-14dB of
gain.




Cornell University               Communications Sub-System                                           95
                           Figure 38: 440MHz helical antenna design.


The booms and cross pieces are constructed of 1x1” fiberglass and held together with fiberglass
mesh and epoxy. The coil is made of ¼” copper “refrigerator” tubing. The ground plane is made
of a hatched ground plane mesh to cut down on wind resistance.


An appropriate counterbalance for the weight of the antenna needs to be constructed
recommended to use a compression device to extend the effective length of the satellite boom
such that a minimal counter mass must be used. A method of attaching the antenna feed point to
ground plane also needs to be devised such that the solder joints here take no load due to winds
or antenna motion (or else they will break).


The antenna needs to be tuned to have a minimum SWR (1.7 or lower) at the satellite operating
frequency. Tuning depends upon several factors including, most importantly, the length of the
radiating element (the helix), the distance between helical coils, and the distance between the
final half turn of the helix and the ground plane. Once satisfactory tuning is obtained, the copper
coil should be heated using a blowtorch, which will make the copper heavily resistant to
bending.


7.2            Ground Segment Hardware
The Ground Segment Hardware consists of the TNC, the Radio, the Computer, and the Tracking
System.


Cornell University            Communications Sub-System                                         96
7.2.1         Terminal Node Controller (TNC)
The Ground Segment uses a Kantronics KPC-9612 TNC to packetize ASCII commands with the
AX.25 protocol. The TNC interfaces directly with the Radio through a DB-15 connector for
9600 baud packets via the following pin connections:


                            TNC PIN            RADIO CONNECTION
                             DB-15                     ACC2 13-pin
                             1. PTT                        PTT
                           2. Receive                    Data Out
                         3. Transceive                   Data In
                          11. Ground                   Data Ground
                              Table 19: TNC-Radio Connections


The TNC interfaces directly with the Computer through the TNC‟s DB-25 computer port, which
connects to the Computer‟s DB-9 serial port in the following manner:


                      TNC Computer Port            Computer Connection
                             DB-25                       DB-9 Serial
                               2                           3. TXD
                               3                           2. RXD
                               4                           7. RTS
                               5                           8. CTS

                               7                            5. SG

                            Table 20: TNC-Computer Connections


7.2.2         Radio
The Ground Segment uses a Kenwood TS-790A radio to communicate with the satellite. The
Radio connects to the TNC with an ACC2 connector using the pins specified in Table 19. The
Radio connects to the Antenna via a 50 ohm coax cable.


Cornell University           Communications Sub-System                                 97
7.2.3           The Computer
The ground station computer connects to the TNC and to the rotor control box via the
connections specified in sections 7.2.1 and 7.2.2, respectively.


The ground station computer will access the internet through a 2.4GHz wireless connection to a
node in Phillips Hall. A 19dB helical antenna was constructed for this frequency and has been
verified to work. The antenna has also been mounted to the ceiling of the radio shack, 401
Barton Hall, pointed towards Phillips Hall.


A 2.4GHz wireless PCMCIA card with appropriate support and drivers still needs to be acquired.
The card should have an appropriate antenna feed point to be connected to the helical antenna.
Usable signal strength from Phillips cannot otherwise be guaranteed.


7.2.4           Tracking System
The tracking system controls the direction of the ground station antenna such that it faces the
satellite during data transfer.     The system is divided up into the following components:
Computer Software, Rotor Motors / Control Boxes, and Interface Board.             These three
components interact in the following manner:




 Desired Position        +                                                          New Position
                                      Proportional         Driving
                         Error
                                       Controller          Circuitry
                         -                                                     (i) R
                                                                                   o
                                                                                   t
                                                                                   o
              Sensed
              Position                                                             r
                                    Analog/Digital        Rotor Position
                                     Converter               Sensor



                                    Figure 39: Control Diagram




Cornell University               Communications Sub-System                                   98
                         Figure 40: Tracking System Functional Diagram


7.2.4.1        Computer Software
The computer software performs calculations necessary to determine the satellite‟s position and
sends the necessary signals to the interface board. The main function responsible for the control
of the system is antennaseek(int vdeg, int hdeg). This function takes the desired vertical and
horizontal position in degrees and activates the appropriate motors to move the antenna to those
positions while repeatedly checking the antenna positions using the function readadc(int ch, int
oldout). It returns a 0 on successful completion or a -1 in any other case. This function takes the
channel number (0-3) and the current value of the DATA register (so as not to disturb motor
movement while reading the ADC). The function setdata(int data) simply sets the DATA
register to the specified value and pauses a prescribed amount of time. Much of the apparent
complexity of the antennaseek function is due to the need to change particular bits in the DATA
register without altering the others. Otherwise it is essentially a while loop.


The various parameters corresponding to the rotors are specified in const variables at the
beginning of the antennaseek function. This is where the correspondences of the motor line


Cornell University             Communications Sub-System                                        99
number to the rotor and direction are established. The only variables that are likely to be
changed are VDEGtol, VDEGwait, HDEGtol, and HDEGwait. The tol variables establish the
error margin of the antenna position. Since the ADC has 8-bit precision, there is not enough
resolution to represent 360 degrees of position. In the case of the 180 degree rotor, there still
needs to be an error margin. The wait variables determine how often to check the ADC for the
antenna position. This should be approximately equal to the time that it takes for the rotor to
cross one edge of the error margin (thus, if it checks once just before it enters the margin, it will
stop right on the degree mark). The margin needs to be wide enough to prevent excessive
oscillation of the rotor as it overcorrects.


7.2.4.2          Rotator motors / Control Boxes
The antenna rotators / rotors are devices in which the antenna mounts; thus, they control the
direction that the antenna is pointing. There are two rotors: a vertical and a horizontal (azimuth
and elevation). They interface to their control box, and have potentiometers to sense position.
The rotor control box interfaces directly with the computer via a standard parallel port
connection, and with the rotor motors via screw terminals as follows:




Figure 41: Connector on hardware interface board                Figure 42: Connector on
                                                                horizontal control box




                                         Figure 43: Connector on vertical control box

Cornell University                Communications Sub-System                                      100
                        Hardware                  Rotor Connection
                      Interface Pin
                           1,2                    Motor channel 0
                           3,4                    Motor channel 1
                            5                         Ground
                            6             Antenna position channel 0 (0-5V)
                           7,8                    Motor channel 2
                          9,10                    Motor channel 3
                           11                         Ground
                           12             Antenna position channel 1 (0-5V)
                       Table 21: Connector on hardware interface board




                     Horizontal Control            Rotor Connection


                             1,2                     CCW rotation
                                3                       Ground
                                4               Antenna position (0-5V)
                             5,6                      CW rotation
                         Table 22: Connector on horizontal control box


                     Vertical Control             Rotor Connection

                            1                 Antenna position (0-5V)
                            2                          Ground
                           3,4                       Up rotation
                           5,6                     Down rotation
                          Table 23: Connector on vertical control box




Cornell University              Communications Sub-System                     101
Motor channel 0, 1, 2, and 3 on the hardware interface board are arbitrarily defined in software to
correspond to Up, Down, CW, and CCW, respectively. Antenna position channel 0 goes to the
vertical control box, and channel 1 goes to the horizontal control box.


As stated above, the connection to the PC uses the Parallel port. The function of each pin is as
follows:

             Pin Number              Function          Signal Name        Location

               2,3,4,5           Motor control             Data           DATA 0-3

                  6            ADC Clock (CLK)             Data         DATA 4
                  7            ADC Data In (DI)            Data         DATA 5
                 11              ADC SARS                  Busy        STATUS 7
                 12           ADC Data Out (DO)         Paper End      STATUS 5
                 17            ADC Chip Select         Select Input   CONTROL 3
                18-25               Ground                Ground          --
                              Table 24: Parallel port pin assignments


7.2.4.3        Interface Board
The interface board connects the software and the rotor control boxes / rotors. The interface
board allows software to directly control the movement of the antenna and to sense position via
the parallel port of the computer.


We considered several possible designs for the tracking system before choosing the design
described in this document.


Initially, we planned on using a data acquisition card to do the analog to digital conversions
necessary. However, we chose against this design when we realized that we would have to write
the drivers for these cards, which would take considerable time and effort. We then considered
building an interface board that connected via the serial port to the computer. The interface
board would be microcontroller based, using a PIC microcontroller. All controls would be done
internally on the microcontroller, which has an internal A/D unit as well as the capability to drive
the rotor. We prototyped this design, however we had trouble programming the chip (we



Cornell University             Communications Sub-System                                        102
prototyped two different programmers) and we felt that pursuing this path would simply take too
long. We also considered buying a controller and just using that. However, we found that these
commercial controllers were simply too expensive, and we couldn‟t find one with driver support
for Linux. Thus buying a controller would force us to switch operating systems and sacrifice the
use of “Predict” (the satellite tracking software) which would be a shame since it is open source
and thus very modifiable.


What we finally decided on was a design that we had considered previously but that we had felt
was less elegant and somewhat complex. However, it turned out to work very well. We built an
interface board that connects to the PC via the parallel port. A serial A/D converter (TLC0834)
gets the position of the rotor. Triacs and transistors are used to drive relays that were added to
the controller boxes. The circuit takes in 12V and regulates this down to 5V.


The control circuit currently contains some flaw, which has not been specifically identified.
When connected to the rotor control boxes (even when not connected to the computer), the
control circuit causes the elevation rotor to slowly torque to 180 degrees, where it gets stuck.
Manually manipulating the rotor does not fix the problem. The only solution is to unplug the
control circuit. It is believed that the control circuit contains a short. It should be compared to the
final version circuit diagrams, and the error should be fixed. It is recommended that a
commercial print of the control circuit be made to reduce the chance of errors such as this in the
future.



8                GROUND SEGMENT SOFTWARE

The ground station software is composed of four components
   The GSAT and Predict Visual Shell.
          o Calculate the satellite path from Keplarian data using Predict.
          o Display it on screen in the GSAT Visual Shell.
   The Antenna Rotor Control component.
          o Update Predict Database using data from NORAD.
          o Query out the satellite path from the Predict.



Cornell University              Communications Sub-System                                          103
       o Point the antenna towards satellite and track it as passes over the sky from AOS
          acquisition of signal) till LOS (Loss of signal).
       o Tune the antenna to compensate for the Doppler Effect.
   The Communication component.
       o Communicate with satellite.
       o Download data.
       o Send commands.
   The logging and emailing component.
       o Email the downloaded files to remote users.
       o Log everything the system is doing.
       o Give feedback to the visual Shell.




Cornell University           Communications Sub-System                               104
                                                               Start
                                                              Main()
                                                              main.c
              Ground
              Station
             Software                                     GSAT Thread
                                                       timeout_callback()
            Control Flow


                                          Antenna Thread
                                                                            Gsat Control
                                        centralAlignAntenna
                                                                             comms.c
                                         SatelliteControl()




                          GS Communication
                                Thread                  Antenna Control
                        central_communication              antenna.h
                               _control()




                                         GS Communication
              Emailer thread
                                              Control
                emailer()
                                            gs_comm.h




                 Emailer
                 logger.h




                            Figure 44: Software Control Flow Diagram



8.1       The GSAT and Predict Visual Shell

The Predict is a open source software which calculates the trajectory for satellites based on

Keplarian data provided to it. The Keplarian database can be updated using data available from

NORAD via the internet (www.norad.mil) .


Cornell University             Communications Sub-System                                   105
GSAT is a visual shell to run over the Predict. It is also open source software. It simply queries

the satellite trajectory out from Predict and displays it in its visual shell. It has the capacity to

tune the antenna for the Doppler Effect but is ignored in this implementation because it requires

a plug-in which we don‟t have.



The predict software should be installed and run in server mode. The predict code is not

modified. The GSAT code is however modified and included in the source code provided. The

only portion of GSAT code which is modified is its main loop to fork a thread for the antenna

control and its interface code so that a visual feedback textbox can be inserted into its visual shell

so that the rest of the software (antenna control and communication control) can send some

feedback to the GSAT.



GSAT Files                                          Modifications if any
Interface.c, Interface.h                            In the file interface.c the textbox is added to
                                                    the GUI so that logger can send feedback to the
                                                    Visual Shell
Comms.c,Comms.h                                     None


Graphics.h, Globals.h                               None


Main.c,                                             The only files which have been modified are
                                                    the main.c file to insert a pthread_create() call
                                                    to fork a thread for Antenna Control
Support.c , Support.h                               None
Callbacks.c,Callbacks.h                             None
                                       Table 25: GSAT Files




Cornell University             Communications Sub-System                                          106
8.2            Antenna Rotor Control

This component runs in its own thread and is forked by the GSAT thread main loop. It is forked

as soon as the system GSAT starts running. This Thread will keep running as long as the

trackSatelliteAndDirectAntennaIfVisible flag is marked true. This variable is always marked true

and is provided in case future expansion may require some control of the execution of this

thread.



The Antenna Control Component initially first downloads the data from the NORAD website. It

then feeds this data to the Predict database and then get the next pass data from the Predict. All

these steps are done using the system commands. The next pass data is kept in a file from which

it is read later. The next pass data starts from the AOS (Acquisition of Signal) time and ends at

LOS (Loss of Signal) time. It contains the time , elevation and azimuth of the satellite. This data

is parsed line by line from the file and fed into the remaining portion of the Antenna Control

Component. For each line read, the antenna is positioned to the provided elevation and azimuth

and then the thread goes to sleep till that time. It then wakes up parse out the next line from the

file and repeats the loop. The GS Communication component thread is forked as soon as the

AOS point is reached. At LOS it is marked for termination.



Before the line by line parsing of the path file is done, the path is first scanned to check if it

passes through south. If it does then the antenna is flipped and from that point onwards all points

are translated to accommodate for this flip.

                      Transalated Azimuth= (Acutal Azimuth +180) % 360

                          Transalted Elevation=180 - (Actual Elevation)




Cornell University            Communications Sub-System                                        107
Once this LOS point is hit, the communication thread is terminated and the Antenna Control

thread loops back and starts again from the point where it downloads data from NORAD.



File                                                         Description
Antenna.h                                                    All functionality resides in this file
Rotor.h                                                      Conatins the Antenna Rotor
                                                             Control Functionality
Global.h                                                     For interdepencies with other
                                                             components
Config..h                                                    For the configuration parameters
                         Table 26: File Listing for Antenna Rotor Control


       Function                     File                        Description
       centralAlignAntennaSat       Antenna.h                   This is the main function
       elliteControl()                                          for thread entry. It
                                                                controls the entire
                                                                algorithm for the Antenna
                                                                control. Other functions
                                                                are simply the helper
                                                                functions
       flipAntennaCoordinates       Antenna.h                   Flip the actual antenna
       ()                                                       coordinates for pass south
                                                                or pass north purposes
       setActualAntennaAzimu        Antenna.h                   Check if antenna is
       thFromVirtualAntenna                                     flipped . if yes then
       Azimuth()                                                translate virtual to real
                                                                else real=virtual
       setActualAntennaElevat       Antenna.h                   Check if antenna is
       ionFromVirtualAntenna                                    flipped . if yes then
       Elevation()                                              translate virtual to real



Cornell University            Communications Sub-System                                        108
                                                        else real=virtual
      moveAntennaToActual       Antenna.h               Given actual coordinates,
      Coordinates()                                     move the antenna to it.
                                                        Make sure that eh
                                                        coordinates are within the
                                                        sensible range
      moveAntennaToVirtual      Antenna.h               Do virtual to real
      Coordinates()                                     transalations if reuired
                                                        and move antenna
      makeAntennaPassSouth      Antenna.h               Check if antenna is
      Ready()                                           already flipped. If no then
                                                        flip it
      makeAntennaPassNorth      Antenna.h               Check if antenna is
      Ready()                                           flipped. If yes then unflip
                                                        it
      freshStartAntenna()       Antenna.h               Unflip antenna and point
                                                        to 0,0
      extrapulateAntennaCoo     Antenna.h               Extrapolate the antenna
      rdinates()                                        coordinates so that you
                                                        always over correct so
                                                        that you don‟t have to re
                                                        orient the antenna very
                                                        frequently
      isAntennaMovementFea      Antenna.h               Detemine if the antenna is
      sible()                                           off-target by acceptable
                                                        margin and is still in
                                                        transmission beam
      parseCoordinatesFrom      Antenna.h               Read coordinates from the
      Buffer()                                          file
      isPassSouthInPredictOu    Antenna.h               Go through the path file




Cornell University          Communications Sub-System                                 109
      tputFile()                                            and check if it contain a
                                                            pass through south
      getNextPassDataFromP       Antenna.h                  Download data from
      redict()                                              NORAD.
                                                            Upload it to Predict
                                                            Get next path data from
                                                            predict
      sleepIfNecessary()         Antenna.h                  Sleep only if wakeup time
                                                            is still far away
      Setdata()                  Rotor.h                    Rotor Control Function.
                                                            Not to be used by anyone
                                                            else
      readadc()                  Rotor.h                    Rotor Control Function.
                                                            Not to be used by anyone
                                                            else
      Antennaseek()              Rotor.h                    Directs antenna to the
                                                            given coordinates. Does
                                                            not handle the pass south
                                                            problem.
      initializeParallelPort()   Rotor.h                    Acquires a lock over the
                                                            parallel port so that no
                                                            one else can interfere with
                                                            the rotor control.
      shutdownParallelPort()     Rotor.h                    Releases the lock over the
                                                            parallel port
            Table 27: Function Listing and Description for Antenna Rotor Control




Cornell University           Communications Sub-System                                    110
                                                                                 Once Antenna Flipped all
                                                   Start
     Antenna                                                                     coordinates are translated


     Control                                 Initialize Antenna
                                                                                 Getting Data from predict also
                                                                                 involves updating predict with
                                                                                 data from NORAD
                                                   and port
      Flow                                                                       Each query from predict last one
      Chart                                                                      Orbit Pass. From AOS till LOS

                                             Get Next path Data                  Flipped
                                                                                 azimuth=(actual+180)%360
                                                from predict
                                                                                 flipped Elevation=180-actual




                                               Determine if
                                                                  On
                                               passes south       Yes
                                                                             Flip antenna




                                                   On No


                                             Move Antenna To
                                             Coordinates and
                                              sleep till time

                      Loop
                     forever                  Fork thread for
                                              communication
                                                  control



                                                 Read next
                                                coordinates
                            Loop till end
                         of predict Output
                                             Move Antenna To
                                               Extrapulated       On end
                                             Coordinates and       of file
                                              sleep till time


                                             Shut Down Parallel
                                                   Port



                                Figure 45: Antenna Control Flow Chart




Cornell University               Communications Sub-System                                                          111
8.3            Ground Station Communication

This component runs in its own thread and is forked by the Antenna Control thread main loop.

The ground station communication component is responsible for implementing the entire

communication protocol as described above. This communication protocol is used for

communication with the Satellite. It is forked only when the satellite AOS point has reached. It

will keep running as long as the satellite_is_visible flag is marked true. This flag is marked and

unmarked by the Antenna Control software to control the functioning of the Communication

thread.



The ground station communication thread first sends the satellite initialization string. This string

basically wakes the satellite from its sleep mode. It then waits for 3 seconds to receive a reply

from the satellite. On failure to receive an ACK from the satellite in the given time it resends the

Init message to the satellite. This init attempt is repeated 20 times before the thread finally gives

up and reports the failure and terminates till next AOS.



If the satellite sends the acknowledgement message then the ground station software initiates the

AX.25 connection with it. After that it sends the Status message to determine the status of the

satellite. If the power is insufficient then it simply terminates the connection and report

accordingly. If there is sufficient power then it simply continues to the download and resume

phase.



In the download and resume phase it first tries to download and resume for the DATA and then it

downloads and resume for the telemetry. In each download and resume, it first checks if it has




Cornell University             Communications Sub-System                                         112
any resume flag marked for it . If no then it resumes the last download. On failure to resume it

reports an error and continues to the download phase. In download phase it tries to download the

file. If satellite sends that a resume is available then it reports an error and goes to the resume

phase. It keeps downloading once file after the other till it receives a no more file message from

the satellite. At this it leaves this phase. After each download, the emailer thread is forked so that

these files could be emailed to the remote users. All downloaded are copied to the path specified

in the configuration file (described later).



Once everything is done, it sends a BYE message to the satellite and the thread terminates.

Please check the communication protocol portion of this document for further details of the exact

protocol.



File                               Description
Gs-comm.h                          The main file which contains all functionality
Portcontrol.h                      The file which controls the way the component communicates
                                   to the TNC
Global.h                           For interdependencies with other components
Config..h                          For the configuration parameters
                      Table 28: Ground Station Communications File Listing


Function                                File                           Description
central_communication_control() Gs_comm.h                              The main file which
                                                                       contains the entire
                                                                       algorithm. This is entry
                                                                       point of the
                                                                       gs_Communication thread




Cornell University              Communications Sub-System                                         113
contact_and_hello_Sat()         Gs_comm.h             Initialize satellite and keep
                                                      retrying till success or 20
                                                      failures
connect_to_satellite()          Gs_comm.h             Establish an Ax25
                                                      connection with the satellite
check_status()                  Gs_comm.h             Check satellite status
integer_to_string()             Gs_comm.h             Given a number convert it to
                                                      string. Used for making a
                                                      unique file name.
make_new_file_name()            Gs_comm.h             Produce a unique filename
                                                      for the current data set
Download()                      Gs_comm.h             This function contains the
                                                      entire download
                                                      functionality
Resume()                        Gs_comm.h             This function contains the
                                                      entire resume functionality
resume_and_download()           Gs_comm.h             Handles all switches
                                                      between download and
                                                      resume depending on the
                                                      error response from any of
                                                      them. Also implements the
                                                      loop for repeated download.
My_alarm()                      Portcontrol.h         Detects timeout and reacts
                                                      accordingly. It allows
                                                      recovery from permanent
                                                      blocks and sleeps
my_alarm_sig_handler()          Portcontrol.h         Dummy Handler for
                                                      my_alarm
check_port ()                   Portcontrol.h         Check if data stream
                                                      contains data to read from




Cornell University        Communications Sub-System                                 114
read_string()                        Portcontrol.h               Reads a complete string
                                                                 from the input stream
write_string                         Portcontrol.h               Writes a complete string to
                                                                 the output stream
write_string_integer                 Portcontrol.h               Writes a string followed by
                                                                 an integer to the output
                                                                 stream
port_init                            Portcontrol.h               Initializes the TNC port
                                                                 serial port connection for
                                                                 baud rate and parities
open_radio_fd()                      Portcontrol.h               Opens a serial connection to
                                                                 the TNC
close_radio_fd()                     Portcontrol.h               Closes the serial connection
                                                                 to the TNC
                   Table 29: Ground Station Communications Function Listing




Cornell University           Communications Sub-System                                        115
                                                      Start


      Ground Station                              Establish                                On Event
      Communication                            connection to tnc                         Connection Lost

         Control
                                                                                    te
                                                  Send hello                   nitia
                                                  message to                Rei
                                                                                             On Connection Lost
                                                   satellite                                 on any stage goto
                                 If NACK
                                                                                             the contact satellite
                                                                                             phase again
                                         On Receipt of ACK from Satellite
                                                                                             No Response for 10
                                                                                             Seconds is
                                                  Make ax25                                  considered a
                                                 connection to                               connection Lost
                                                   satellite                                 Send Hello attempts
                                                                                             limited to max 20
                                                                                             tries

                                                 Check Status                                Each Send Hello
                                                                                             attempt waits for 3
                                                                                             seconds to get a
                                                                                             response

                                                                         Too many failures
                                               Set Flag to Data                 or
                                                                           LOS sent from
                                                                       Antenna Control Thread



                                                 Resume and
                                                  download
                          If No power
                           of data set

                                                  Set Flag to
                                                  Telemetry



                                                 Resume and
                                                  Download



                                              Close connection
                                               to satellite and
                                                    TNC


                                                      End

              Figure 47: Ground Station Communication Control Flow Diagram




Cornell University          Communications Sub-System                                                                116
    Resume And                                   Start                                            On Connection Lost
                                                                                                  on any stage goto

   Download Flow                                                                                  the contact satellite
                                                                                                  phase again
                                               Resume
      Control                                  Flagged                                            No Response for 10
                                                                                                  Seconds is
                                               Marked?
      for GS                                                                                      considered a
                                                                                                  connection Lost
                                           If Resume Flag=true
   Communication
                                               Resume
                       If Error
                     no Resume
                                                                                      Goto
                                                                                     Resume
                                                                 If Resume flag
                                                                      =false
               Report                          Save and
               Resume                           email
                error


                                             Send delete
                                              to satellite

                                                                                               Report
                        Goto                                                                  Download
                      Download                                            If error              Error
                                              Download                   resume
                                                                        available



                                              Save and
                                    Loop
                                             Fork emailer
                                                thread
                                                                   Error No
                                                                  More Files


                                             Send delete
                                              to satellite



                                                  End


                     Figure 48: Data Download and Resume Flow Diagram




Cornell University                Communications Sub-System                                                               117
8.4            The E-mailing and Logging Component

The E-mailer thread is invoked by the GS communication thread after each complete download.

The thread simply emails the file downloaded to the users email addresses specified in a

configuration file (described later). The file contains one email address per line. The E-mailer

thread uses the system „mail‟ command to send the email.

The Logging Component does not run as a separate thread. It rather runs in the same thread as

the „Caller‟ as a function call. Its purpose is to provide a central place for controlling all the

messages being sent by the user and provide synchronization. Without synchronization the

messages cannot be displayed to the visual shell or written to a file. It writes all messages to their

respective file as specified in the configuration file (described later), then displays in a textbox in

the Visual Shell. It also pushes it into the database.

File                                                 Description
Logger.h                                             Contains the entire logic.
Global.h                                             For interdependencies with other components
Config..h                                            For the configuration parameters
                            Table 30: E-mailer and Logger File Listing


Function                           File                               Description
LogMessage()                       Logger.h                           Logs the given message,
                                                                      synchronize, displays it on
                                                                      GUI and sends to permanent
                                                                      storage. This function is called
                                                                      by others for logging purposes
Emailer()                          Logger.h                           Emails the received file to
                                                                      address given in the specified
                                                                      configuration file
                          Table 31: E-mailer and Logger Function Listing



Cornell University              Communications Sub-System                                            118
                     Figure 49: Logging System Flow Diagram




Cornell University     Communications Sub-System              119
8.5             Installation, Compiling, Configuration, and Running Directions



8.5.1           The Operating System and Machine Platform

The machine is a standard Intel x86 Architecture machine with 256 MB RAM to support all the

required components. The Operating System is Linux RedHat 7.2 installed complete with source

code. The complete kernel source code tree is required for the installation of pcmcia and wireless

package. The computer is linked to the Internet. It is also required to have a SendMail server

running on it. This software is needed since the GSAT software as for now is only available for

Linux platform. The Predict is however available for the Windows Win32 Platform as well.

Predict is also required to be installed.



8.5.2           The Configuration files

The config.h files contains all the parameters which needs to be defined before compilations

ParamName                                   Description                Suggested Value
RELOOP_DELAY                                Satellite is repeatedly    3 seconds
                                            send an initialization
                                            string until it responds
                                            or there are too many
                                            errors. This variable
                                            defines the delay in
                                            seconds between each
                                            attempt
TIMEOUT_DELAY                               This defines the time      10 seconds
                                            span in seconds after
                                            which the connection is
                                            considered to be




Cornell University              Communications Sub-System                                        120
                                        dropped if there is no
                                        response during this
                                        time . A new
                                        connection is not
                                        initiated till twice this
                                        amount to flush out
                                        any delayed messages
RADIO_DEVICE                            The device port at          “/dev/ttyS0”
                                        which the TNC can be
                                        contacted
cubeSatName                             Cubesat name as             N.A.
                                        defined by NORAD in
                                        its data. This is used in
                                        querying orbit data
                                        from predict
predictOutputFileName                   the dump file in which      “predictOutput.txt”
                                        predict data is copied
EastOfNoCoverageSouthPoint              The East end of the arc     170
                                        to which the antenna
                                        cannot be rotated due
                                        to the South Pass
                                        problem
WestOfNoCoverageSouthPoint              The West end of the         190
                                        arc to which the
                                        antenna cannot be
                                        rotated due to the
                                        South Pass problem
generalExtrapulationFactor              The factor in degrees       3
                                        with which the antenna
                                        coordinates are over
                                        shot to accommodate


Cornell University           Communications Sub-System                                    121
                                   and capitalize on the
                                   transmission beam
                                   width.
earlyWakeTime                      Time in seconds which      0
                                   defines how early the
                                   antenna thread should
                                   wake before the
                                   satellite comes over the
                                   pointed direction. This
                                   is to accommodate
                                   systems in which
                                   thread takes long to
                                   acquire „Context-
                                   Switch‟ after the wake
                                   up time
stringURLForNoradDownload          The URL at which the       “www.celestrak.com
                                   NORAD keeps the            /NORAD/elements
                                   keplerian data             /amateur.txt”
NoradToPredictTransferFileName     The file which             “keplerianData.txt”
                                   temporarily holds the
                                   data while transferring
                                   the data from NORAD
                                   to Predict
FILE_PATH                          The path to directory      “download_files/”
                                   where all the
                                   downloaded files
                                   should be dumped
LOG_DIRECOTRY                      The path to the            “log/”
                                   directoy where all log
                                   files should be dumped
COMMON_LOG_FILE                    The filename which         “commonLog.txt”


Cornell University      Communications Sub-System                                   122
                                        logs all messages
GS_COMMUNICATION_LOG_FILE The filename which                     “gSCommunication.txt”
                                        logs all messages for
                                        GS communication
                                        thread
PORTCONTROL_LOG_FILE                    The filename which       portControl.txt
                                        logs all messages from
                                        the TNC itself
ANTENNA_CONTROL_LOG_FILE                The filename which       antennaControl.txt
                                        logs antenna control
                                        messages
SATELLITE_COORDINATES_FILE              The filename which       satelliteCoordinates.txt
                                        logs satellite
                                        coordinates as read
                                        from Predict.
ANTENNA_COORDINATES_FILE                The filename which       antennaCoordinates.txt
                                        logs messages for
                                        antenna coordinates
EMAILER_FILE                            The filename which       emailer.txt
                                        logs emailer messages
EMAILER_MAILINGLIST                     The filename which       Mailinglist.txt
                                        contains the list of
                                        email address to which
                                        all downloaded files
                                        should be mailed.
                                        There should be one
                                        entry per line
                           Table 32: Configuration Information


8.5.3         The Build/Compilation/Make directions




Cornell University         Communications Sub-System                                        123
The MakeFile has been created for ease of compilation. Simply configure the configuration file

and then type

         Make clean

         Make

This will produce the output file cubesat which is the executable file



8.5.4             Running Directions

Make sure that all the directory paths exists as specified in the config.h file. The paths are

relative to the execution point. Type

         Predict –s

         ./cubesat

to execute the the software. For auto execute the software at each boot-up simply make the

above entry into the /etc/initd/rc.d file



9                 REQUIREMENTS VERIFICATION

Use the descriptions below to fill out the table. Add wording below the table to describe how the

requirement has been met or not met. In the verified columns, use I for inspection, D for

demonstration, A for analysis, T for test, and TBD for to be determined.



9.1               Space Segment

      Name              Requirement                   Preliminary Design                     Verified
      SS-Patch Ant.     Use patch antenna             Patch antenna attached as wall panel   I
                                                      for bottom side of satellite.
      SS-Antenna Freq   Antenna tuned to 70 cm band   See VSWR results                       T
      SS-Antenna        Antenna gain = -1 dB          See Antenna Gain Pattern results and   T
      Gain                                            Link Analysis
      SS-Beam Width     Antenna beam width = 30 -     See Antenna Gain Pattern results       T



Cornell University                Communications Sub-System                                             124
                     45
   SS-Antenna        Antenna impedance = 50           See VSWR results                        T
   Impedance
   SS-Amplifier      Amplifier > 30dBm                 RF2117 achieves 33dB gain.              TBD
   Gain
   SS-Amplifier      Amplifier has low power           Supply voltage controlled by MCU.       I
   Sleep             mode
   SS-First Stage    Output RF signal = 2 - 6dBm       RF output power controlled by MCU.      I
   Output
   SS-Program Freq   Programmable frequency            RF211 allows for frequency carrier to   I
                                                       be programmed.
   SS-RF Sleep       RF section has low power          RF211 has standalone sleep mode and     I
                     mode                              wakeup procedures
   SS-Packets        Form and parse packets            C Code                                  I
   SS-Control        Control RF section                SPI interface and code on MCU used to   I
                                                       talk to RF211
   SS-Baud Rate      9600 baud to RF section and       C Code: MCU interrupts and ISRs         I
                     to CDH
   SS-MCU Sleep      Low power mode                    AT90S8515 MCU has a built in sleep
                                                       mode.
   SS-Mass           Less than 140 g                   Easily under                            T
   SS-Board Size     Board < 9  9.5  2.1 cm3         PCB designed to specification.          T
   SS-Antenna Size   Antenna = 10  10 cm2 square      Designed to specification               T
   SS-Supply         Components operate at 3.3V.       Components selected based on required   I
   Voltage                                             supply voltage.
   SS-Power Draw     Power Draw < 500 mW               Power Draw = ____mW                     T
   SS-Pre Launch     Ambient temperature up to         Rated Components                        TBD
   Temp              30 C prior to launch.
   SS-Launch         Relative humidity up to 80%       Rated Components                        TBD
   Humidity          prior to launch.
   SS-Launch         Exposure to temperatures in       Rated Components                        TBD
   Temp              the range of –40 to 80C prior
                     to deployment.
   SS-Static Load    Static Loading: 7.7 g in any                                              TBD
                     direction
   SS-Dynamic        Dynamic Loading: 0.64 g at 2-                                             TBD
   Load              20 Hz in any direction
   SS-Acoustic       Acoustic Loading: 140dB                                                   TBD
   Load              sound pressure
   SS-EMI 1          Will not cause electrical or RF                                           I
                     interference to the launch
                     vehicle or its primary payload
   SS-EMI 2          Will not cause undue electrical                                           I
                     or RF interference to the other
                     subsystems of the satellite
   SS-Mag            Tolerate 0.03-0.04 Nm/T                                                   TBD
   Tolerance         magnetic field
   SS-Antenna        Antenna screwed into chassis      4 corner holes for mounting             I
   Mounting
   SS-Antenna Dir.   Antenna attached to the earth     Antenna is side 6 of satellite.         I
                     facing side.
   SS-Board          Board mounted securely            4 corner holes for rods                 I
   Mounting
   SS-Antenna Gnd    Antenna grounded to chassis       Screws ground antenna                   I



Cornell University              Communications Sub-System                                            125
    SS-Board Gnd       No structural grounds.         No grounding at mounting points.   I
    SS-Power Lines     Board requires 2 3.3V and 3    Schematic includes lines.          I
                       grounds.

    SS-CDH Lines       Lines to CDH                   2 UART (Rx & Tx) lines             I
    SS-CDH             Serial protocol with CDH       Use 9600 bps UART.                 I
    Protocol
    SS-Link Protocol   Protocol with GS               AX.25                              I
    SS-Modulation      FSK modulation                 RF211 uses FSK                     I
    SS-Carrier Freq.   Comm. link in 70 cm band.      Programmable carrier.              T
    SS-Bandwidth       Frequency deviation < 10 kHz   Programmable frequencies.          T
    SS-Link Margin     Comm. link has a 6 [???] dB    [???]                              T
                       margin.



9.1.1       Functional.

The space segment of the communication system is composed of a patch antenna and a

communication board that implements functionality of both a radio and TNC. Implementation of

the AX.25 protocol is carried out on the MCU by the link layer of the software.. The RF signal

is transmitted and received by the AT86RF211 transceiver chip, which is controlled by the

physical layer of the software.



9.1.2       Components.

9.1.2.1     Antenna.

               The antenna is a 10 x 10 cm patch antenna that is attached to the earth facing side

                of the antenna.

               The antenna is tuned to 436 MHz. See VSWR Results.

               The patch antenna has a gain of -1 dB, which is sufficient for communication with

                the ground station per the link analysis.

               The beam width of the patch antenna is approximately 30.

               The antenna has an impedance of 50 Ohm, which matches the output of the

                amplifier and the bypass circuitry.


Cornell University                Communications Sub-System                                     126
9.1.2.2   Amplifier.

             The power output of the amplifier should be 33 dBm, which is greater than the

              required 30 dBm output.

             The low power mode for the amplifier is controlled by the MCU, which can turn

              the amplifier off by driving a low level on the amplifier‟s v pd input pin.



9.1.2.3   RF Section.

             The physical layer of the software can control the output power of the

              AT86RF211, which is capable of generating a signal between 2dBm and 6dBm.

             The physical layer of the software can dynamically program the transmission and

              reception frequencies for the AT86RF211 once a carrier frequency has been

              assigned.

             The physical layer of the software can set the data rate.

             The AT86RF211 is capable of entering a passive listening mode that has minimal

              power draw. In this mode the transceiver chip periodically checks for radio

              activity.



9.1.2.4   Digital Section.

             The link layer software is responsible for forming and parsing AX.25 packets and

              is implemented on the MCU.

             The physical layer software controls the AT86RF211, amplifier, and RF relays.




Cornell University           Communications Sub-System                                        127
             The application layer software is responsible for following the protocol for

              communication with CDH.

             The MCU enters low power mode by entering power down sleep mode. This is

              achieved by having the application layer execute the instruction „sleep.‟



9.1.3     Characteristics.

9.1.3.1   Physical.

             The communication board weighs 54 g, and the antenna weighs 18g.

             The communication board is exactly 9 x 9.5 x 2.1 cm3.

             The communication antenna is sized to fit the bottom side of the satellite.

             The mounting holes are placed according to structures specifications.



9.1.3.2   Electrical.

             Each active component on the communication board is rated to run at 3.3V.

             The average power draw is within budget.



9.1.3.3   Environmental.

             The environmental requirements have not been tested.



9.1.3.4   EMI.

             Inspection with a spectrum analyzer reveals that no stray RF signals are caused by

              the communication board that might interfere with the launch vehicle or other

              subsystems.



Cornell University           Communications Sub-System                                        128
             Inspection of all lines leaving the communication board with an oscilloscope

              showed that no undesired signals were present.



9.1.4     Interfaces.

9.1.4.1   Physical.

             Assembly of the frame and attachment of the outer wall panels proves that the

              communication antenna fits onto the bottom side of the satellite.

             During prototype assembly, the communication board was able to be mounted

              into the board stack using the four mounting rods.



9.1.4.2   Electrical.

             The satellite is grounded to the chassis via the mounting screws.

             The mounting holes on the communication board are electrically isolated to

              ensure that no grounding occurs between the communication board and the

              structure.

             The RF and Digital Section are powered via single 3.3V and ground lines. The

              amplifier is powered via a single 3.3V line and two ground lines.

             The UART transmit and receive pins of the MCU are routed to a connector for

              interfacing with command and data handling.



9.1.4.3   Software.

             The serial protocol defined in the appendix details the interaction between the

              communication board and command and data handling over a UART connection.



Cornell University           Communications Sub-System                                          129
                   All RF data will be transmitted at 9600 bps. The data budget and simulation show

                    that this is enough to download all collected data.

                   The link layer software ensures that all data being download or upload confirms

                    to the AX.25 protocol.



9.1.4.4       RF.

                   The AT86RF211 uses FSK to modulate the digital data it receives.

                   The AT86RF211 is designed for operation between 400 and 480 MHz, which

                    contains the 70 cm band.

                   Using a baud rate of 9600 bps requires an FSK frequency deviation of 10 kHz.

                   The link analysis shows the both uplink and downlink have a margin greater than

                    6 dB.

                   Analysis of the spectrum created by the communication board and antenna using a

                    spectrum analyzer resulted in verification that out of band signal content is at or

                    below -30dBm.



9.2                 Ground Segment.

      Name                  Requirement                     Preliminary Design                       Verified
      GS-Func-Comm          Determine time and duration     Predict provides time and duration of    I
      Window Time           of comm windows.                comm windows.
      GS-Func-Track         Track satellite with the        Antenna tracking algorithm.              I
      Sat                   antenna during the comm
                            window.
      GS-Func-Initiate      Initiate comm. with the sat.    Wake-up command.                         I
      Comm
      GS-Func-              Transmit commands to the        Commands defined.                        I
      Commands              satellite.
      GS-Func-              Download telemetry and data     Telemetry and dataset formats defined.   I
      Download              from the satellite.
      GS-Func-Store         Locally store downloaded data   Parses and stores downloaded telem       I
      Telem/Data            and telem.                      and GPS data on GS computer.



Cornell University                    Communications Sub-System                                                 130
   GS-Func-            Disseminate stored data and         Emails telemetry and datasets to remote      I
   Disseminate         telem.                              users.
   Data
   PR-Intfc w/         Interface with Cubesat              UDP connection                               I
   Cubesat             software
   PR-Comm             Provide accurate comm               Provides AOS and LOS times.                  I
   Window Times        window times.
   PR-Position Info    Provide positional information      Provides elevation and azimuth relative      I
                       relative to the GS antenna.         to location of GS antenna.
   PR-Doppler Info     Provide Doppler shift of            Provides real-time Doppler shift of          I
                       satellite comm signal.              satellite comm signal.
   CS-Track            Continuously track position of      Continuously queries Predict for             I
   Satellite           satellite                           positional information of the satellite.
   CS-Initiate         Initiate communication with         Transmits 10-bit binary wake-up              I
   Comm                the satellite.                      message.
   CS-Sufficient       Determine if satellite has          Receives status from satellite and           I
   Power               sufficient power for                determines from current counter
                       download.                           reading if there is sufficient power.
   CS-Download         Download telemetery and data        Transmits download command to                I
   Telem and Data      sets.                               satellite.
   CS-Store Telem      Store downloaded telemetry          Stores telemetry and data locally on         I
   and Data            and data.                           ground station computer hard drive.
   CS-Resume           Resume download of                  Sets a resume download flag if               I
   Download            uncompleted telemetry and           communication is interrupted before
                       data sets.                          completion of download.
   CS-Operating        Manually set the operating          Allows the ground station operator to        I
   Mode                mode of the satellite.              transmit commands to switch the mode
                                                           of the satellite.
   CS-Track            Track the satellite with ground     Tracks the satellite with the ground         I
   Satellite           station antenna without loss of     station antenna to within 3 of
                       signal.                             accuracy.
   CS-Pass South       Determine if satellite              Queries Predict for satellite positions to   I
                       trajectory passes through           determine if satellite‟s trajectory passes
                       South.                              through South.
   CS-Track South      Track a satellite‟s trajectory if   Uses redundant rotor elevation range.        I
                       it passes through South.
   CS-Modulate         Modulate the transmit               Doppler info from Predict is sent to         I
   Frequency           frequency of the radio to           radio via serial connection.
                       compensate for Doppler shift.
   CS-Disseminate      Disseminate stored telemetry        Email.                                       I
   Data                and data to remote users.
   CH-Internet         Access to the internet              2.4 GHz wireless LAN.                        I
   Access
   CH-TNC              Interface directly with the         Serial connection.                           I
   Interface           TNC.
   CH-Radio            Interface directly with the         Serial connection.                           I
   Interface           radio.
   CH-Rotor            Interface directly with the         Parallel connection.                         I
   Control Interface   rotor control hardware.
   TNC-                Automatically switch between        Switch between AX.25 and modem               TBD
   Transmission        transmission modes.                 mode by the Cubesat software.
   Modes
   TNC-Baud Rate       Transmit 1 Mbit of data per         9600 baud.                                   I
                       day.
   TNC-Raw Bit         Transmit raw bit streams.           Modem mode.                                  I


Cornell University                 Communications Sub-System                                                  131
    Stream
    TNC-Protocol      Packetize ASCII commands         AX.25 link-layer protocol.               I
                      with an efficient link-layer
                      protocol.
    TNC-Radio         Interface directly with the                                               TBD
    Interface         radio.
    RD-               Transmit within the amateur      440 MHz.                                 I
    Transmission      radio band.
    Band
    RD-Power          Transmit at sufficient power     ≥ 25 W.                                  I
                      to communicate with the
                      satellite.
    RD-Doppler        Modulate the carrier             Controlled by Cubesat via serial         I
    Shift             frequency to compensate for      connection to ground station computer.
                      Doppler shift.
    RD-Receive        Receive the low-power signal     -140 dB receiver sensitivity.            I
    Signal            sent by the satellite.
    AR-Antenna        Sustain the weight of the                                                 TBD
    Support           antennas.
    AR-Full Range     Point the antenna to any         360 azimuth, 180 elevation.            I
                      position in the sky.
    AR-Track          Track a satellite through any    Redundant elevation range.               I
    Satellite         feasible path through the sky.
    AR-Comm           Sustain communication            AOS: -3 elevation.                      I
    Window            throughout entire comm           LOS: -3 elevation.
                      window.
    ANT-Mounting      Mounted on antenna rotors.                                                I
    ANT-Transmit      Transmit within the amateur      Tuned to 437 MHz.                        TBD
    Band              radio band.
    ANT-Transmit      Transmit a signal to the         11 dB gain over isotropic.               TBD
    to Satellite      satellite.
    ANT-Receiver      Receive the signal transmitted   ±30 beam width.                         TBD
    from Satellite    by the satellite.



9.2.1            Functional Requirements.

The ground segment:

   Uses information provided by the Predict software package to determine the time and

    duration of communication windows.

   Uses the Cubesat software package along with information provided by Predict to determine

    the direction to point the antenna as the satellite moves through the sky.

   Sends a 10-bit binary wake-up command to the satellite to initiate a communication window.




Cornell University               Communications Sub-System                                            132
     Uses control logic in the Cubesat software package to determine the appropriate command

      (status, set file, download, delete, error, etc.) to send to the satellite.

     Instructs satellite to send stored telemetry (timestamps, magnetometer values, ADCS outputs,

      temperature, battery current and voltages, current counter readings, solar cell voltages) and

      GPS datasets.

     Parses and stores downloaded telemetry and GPS data on local drive in the ground station

      computer.

     Emails telemetry and datasets to users.



9.2.2             Components.

The ground segment is composed of:



9.2.2.1           Ground Station Computer.

The ground station computer is divided into hardware and software components.



9.2.2.2           Ground Station Computer Software.

The ground station computer is running two software packages.



9.2.2.2.1         Predict.

    The Predict software package:

     Interfaces with the Cubesat software package via a UDP connection.

     Provides the acquisition of signal (AOS) and loss of signal times (LOS) times which can be

      used to determine communication window duration.



Cornell University                 Communications Sub-System                                      133
   Provides elevation and azimuth of the satellite relative to the location of the ground station

    antenna.

   Provides real-time Doppler frequency shift of satellite communication signal.



9.2.2.2.2      Cubesat.

The Cubesat software package:

   Continuously queries Predict for positional information of the satellite and displays the

    information on the graphical user interface (GUI).

   Switches the TNC into modem mode and transmits a 10-bit binary sequence to initiate

    communication window.

   Transmits a status command prompting satellite to respond with its current power status

    (current counter).

   Uses current counter information to determine if there is sufficient power for download.

   Sends commands to the satellite instructing it to transmit telemetry and data.

   Stores telemetry and data locally on the ground station computer hard drive.

   Sets a resume download flag if communication is interrupted before completion of download

    of telemetry or data set.

   Allows the ground station operator to transmit commands that switch the satellite mode

    (science – control logic on, science – control logic off, power save).

   Tracks the satellite with the antenna to within 3 of accuracy.

   Queries Predict for satellite position through entire next communication window to

    determine if satellite‟s trajectory crosses South.




Cornell University              Communications Sub-System                                        134
   Capitalizes on redundant rotor elevation range to compensate for limited azimuth range for

    satellite trajectories passing through South.

   Receives real-time Doppler information from Predict and controls transmit frequency of the

    radio.

   Automatically emails downloaded telemetry and data sets to users.



9.2.2.3      Ground Station Computer Hardware.

The ground station computer:

   Is networked via a 2.4 GHz wireless LAN connection to a nearby wireless node.

   Interfaces with the TNC via a direct serial connection.

   Interfaces with the radio via a direct serial connection.

   Interfaces with the rotor control hardware via a direct parallel connection.



9.2.2..4     Terminal Node Controller.

The TNC:

   Can be switch between the modem and AX.25 modes by the Cubesat software.

   Can transmit at 9600 baud.

   Can transmit raw bit-streams in the modem mode.

   Can packetize ASCII commands received from the ground station computer with the AX.25

    link-layer protocol.

   Interfaces with the radio via a ????



9.2.2.5      Radio.



Cornell University             Communications Sub-System                                     135
The radio:

   Transmits at the 440 MHz amateur radio band.

   Transmits at a power equal to or in excess of 25 W.

   Modulates the carrier frequency based on data provided by the Cubesat software to

    compensate for Doppler shift.

   Has a receiver sensitivity of -140 dB or better.



9.2.2.6      Antenna Rotors.

The antenna rotors:

   Can support an antenna weighing ????

   Have an azimuth range limited to 360 (180 to 360/0 to 180) and an elevation range of

    180.

   Uses the redundant elevation range to compensate for the limited azimuth range in order to

    track a course that crosses 180.

   Have the ability to track a satellite from acquisition of signal at -3 elevation to loss of signal

    at -3 elevation.



9.2.2.7      Antenna.

   Is mounted on the antenna rotors.

   Is tuned to transmit and receive at the designated satellite frequency near 437.0 MHz in the

    amateur 70 cm band.

   Has no less than 11 dB of gain over isotropic.

   Has a beam width of no less than 30.


Cornell University              Communications Sub-System                                          136
10.           APPENDIX

I.            Parts Listing

 Part     Value               Package   Library   Digikey #        Position (mm)       Orientation
 C1       5.6pF               C0402     rcl       311-1011-1-ND    (18.415 58.1406)    R270
 C2       10pF                C0402     rcl       PCC103BVCT-ND    (18.8214 55.2196)   R0
 C3       2.7pF               C0402     rcl       399-1005-1-ND    (19.4564 61.6712)   R0
 C4       100pF               C0402     rcl       PCC101CQCT-ND    (21.3614 56.6674)   R270
 C5       100pF               C0402     rcl       PCC101CQCT-ND    (22.7838 56.642)    R270
 C6       10nF                C0603     rcl       PCC103BVCT-ND    (25.7302 77.0636)   R0
 C7       100nF               C0805     rcl       399-1168-1-ND    (23.1902 81.2038)   R270
 C8       2.2nF               C0402     rcl       PCC1725CT-ND     (21.59 79.7052)     R270
 C9       100pF               C0402     rcl       PCC101CQCT-ND    (20.1676 79.7814)   R270
 C10      1nF                 C0402     rcl       PCC102BQCT-ND    (18.7452 79.6798)   R270
 C11      4.7nF               C0402     rcl       PCC472BQCT-ND    (17.1704 75.2856)   R0
 C12      100pF               C0402     rcl       PCC101CQCT-ND    (34.3916 68.961)    R270
 C13      4.7nF               C0402     rcl       PCC472BQCT-ND    (35.814 68.8594)    R270
 C14      100nF               C0805     rcl       399-1168-1-ND    (31.3944 69.9516)   R0
 C15      10nF                C0603     rcl       PCC103BVCT-ND    (37.7698 68.7832)   R270
 C16      82pF                C0402     rcl       PCC820QCT-ND     (27.813 72.136)     R270
 C17      1 nF                C0402     rcl       PCC102BQCT-ND    (8.7884 40.9956)    R0
 C18      15pF                C0402     rcl       PCC150CQCT-ND    (28.5242 75.4634)   R0
 C19      56pF                C0402     rcl       PCC560QCT-ND     (26.035 74.4982)    R270
 C20      100pF               C0402     rcl       PCC101CQCT-ND    (26.0858 55.1434)   R0
 C21      1nF                 C0402     rcl       PCC102BQCT-ND    (23.279 59.8544)    MR0
 C22      100pF               C0402     rcl       PCC101CQCT-ND    (23.2536 61.4546)   MR0
 C23      100nF               C0805     rcl       399-1168-1-ND    (33.3248 59.3344)   R0
 C24      100nF               C0805     rcl       399-1168-1-ND    (14.1478 75.7936)   R90
 C25      100nF               C0805     rcl       399-1168-1-ND    (14.2748 71.4502)   R270
 C26      100pF               C0402     rcl       PCC101CQCT-ND    (12.0396 71.0946)   R270
 C27      1nF                 C0402     rcl       PCC102BQCT-ND    (12.0396 75.565)    R90
 C28      560pF               C0402     rcl       399-1026-1-ND    (5.8166 72.3392)    R270
 C29      5.6nF               C0402     rcl       PCC562BVCT-ND    (4.9276 74.803)     R0
 C30      15pF                C0402     rcl       PCC150CQCT-ND    (5.1054 66.9036)    R270
 C31      100pF               C0402     rcl       PCC101CQCT-ND    (9.8806 66.802)     MR90
 C32      4.7nF               C0402     rcl       PCC472BQCT-ND    (8.5852 66.802)     MR90
 C33      1.5pF               C0402     rcl       PCC1R5CQCT-ND    (11.9634 64.4398)   R270
 C34      8.2pF               C0402     rcl       399-1009-1-ND    (10.7696 60.8584)   R270
 C35      100pF               C0402     rcl       PCC101CQCT-ND    (13.2842 61.7728)   R0
 C36      1nF                 C0402     rcl       PCC102BQCT-ND    (8.128 60.1726)     R0
 C37      100pF               C0402     rcl       PCC101CQCT-ND    (13.9446 65.024)    MR0
 C38      4.7nF               C0402     rcl       PCC472BQCT-ND    (13.9446 63.3476)   MR0
 C39      5.6nF               C0402     rcl       PCC1707CT-ND     (20.2184 83.8708)   R0
 C40      15pF                C0402     rcl       PCC150CQCT-ND    (48.18 29.58)       R0
 C41      15pF                C0402     rcl       PCC150CQCT-ND    (48.18 31.2)        R0
 C42      100nF               C0402     rcl       PCC2164CT-ND     (43.751 88.93)      R270
 C43      13pF                C0402     rcl       PCC120ACVCT-ND   (18.7134 25.9236)   R0



Cornell University            Communications Sub-System                                 137
C44       30 pF       C0402    rcl       PCC300CQCT-ND      (18.7134 27.3136)   R0
C45       100pF       C0402    rcl       PCC101CQCT-ND      (18.7134 24.2036)   R0
C46       100pF       C0402    rcl       PCC101CQCT-ND      (12.1134 41.0636)   R270
C47       100pF       C0402    rcl       PCC101CQCT-ND      (20.9366 41.483)    R0
C48       47uF        KEMET    rcl       399-3003-1-ND      (76.708 9.144)      MR90
C49       100pF       C0402    rcl       PCC101CQCT-ND      (17.4134 44.5536)   R0
C50       1nF         C0402    rcl       PCC102BQCT-ND      (17.4674 43.3076)   R0
C51       47 pF       C0402    rcl       PCC470CQCT-ND      (72.898 9.652)      MR90
C52       100pF       C0402    rcl       PCC101CQCT-ND      (25.2282 38.0376)   R0
C53       1nF         C0402    rcl       PCC102BQCT-ND      (25.2822 39.6392)   R0
C54       47uF        KEMET    rcl       399-3003-1-ND      (61.722 87.63)      R90
C55       1nF         C0402    rcl       PCC102BQCT-ND      (9.4814 30.135)     R0
C56       3,3uF       C0805    rcl       PCC1841CT-ND       (9.1274 31.9252)    R0
C57       100pF       C0402    rcl       PCC101CQCT-ND      (11.5102 26.6342)   R270
C58       1nF         C0402    rcl       PCC102BQCT-ND      (15.6134 14.4936)   R270
C59       1nF         C0402    rcl       PCC102BQCT-ND      (14.6134 51.6936)   R270
C60       47uF        KEMET    rcl       399-3003-1-ND      (79.756 76.454)     R180
C61       47pF        C0402    rcl       PCC470CQCT-ND      (80.518 73.914)     R0
C62       1nF         C0402    rcl       PCC102BQCT-ND      (11.4056 19.141)    R180
C63       47pF        C0402    rcl       PCC470CQCT-ND      (58.674 86.614)     R270
C64       100 pF      C0402    rcl       PCC101CQCT-ND      (8.6812 39.4184)    R0
C65       1 uF        C0805    rcl       PCC1849CT-ND       (24.6126 41.2242)   R0
L1        4.7nH       C0603    rcl       PCD1290CT-ND       (16.099 26.9236)    R90
L2        1.5nH       C0402    rcl       PCD1266CT-ND       (19.4564 60.4012)   R0
L3        33nH        C0402    rcl       PCD1282CT-ND       (15.5194 53.9496)   R0
L4        12nH        C0402    rcl       PCD1277CT-ND       (18.8214 53.9496)   R0
L5        1uH         C0805    rcl       PCD1184CT-ND       (25.7556 57.3786)   R0
L6        2.7 nH      C0603    rcl       PCD1143CT-ND       (18.3674 38.662)    R270
L7        18nH        C0402    rcl       PCD1279CT-ND       (21.2852 58.928)    R0
L8        220 Ohm     C0603    rcl       www.murata.com     (14.1134 40.9316)   R270
L9        220 Ohm     C0603    rcl       www.murata.com     (10.2812 37.816)    R0
L10       47nH        C0402    rcl       PCD1302CT-ND       (10.4394 64.4144)   R270
L11       47nH        C0402    rcl       PCD1302CT-ND       (14.4526 64.4144)   R270
L12       22 Ohm      C0603    rcl       www.murata.com     (13.6034 38.2836)   R0
L13       68 nH       C0603    rcl       TKS3721CT-ND       (13.589 27.305)     R0
L14       220 Ohm     C0603    rcl       www.murata.com     (22.1034 38.1736)   R0
L15       1 uH        C0603    rcl       PCD1184CT-ND       (33.782 72.136)     R0
L16       1 uH        C0603    rcl       PCD1184CT-ND       (23.114 76.2)       R270
L17       1 uH        C0603    rcl       PCD1184CT-ND       (9.398 71.12)       R0
L18       1 uH        C0603    rcl       PCD1184CT-ND       (5.334 60.706)      R270
L19       1 uH        C0603    rcl       PCD1184CT-ND       (29.464 57.404)     R0
L20       1 uH        C0603    rcl       PCD1184CT-ND       (29.464 59.436)     R0
                               Citizen
Q1        10.24 MHz   MM39SL   America   300-8052-1-ND      (30.988 82.6516)    R90
                               Citizen
Q2        4 MHz       MM39SL   America   300-8042-1-ND      (60.1448 24.5804)   R270
R1        27 KOhm     R0603    rcl       RR08P27.0KBCT-ND   (16.9164 63.7032)   R0
R2        27 KOhm     R0603    rcl       RR08P27.0KBCT-ND   (7.5946 68.4276)    R270
R3        3.3 KOhm    R0603    rcl       RR08P3.3KDCT-ND    (4.9276 69.6468)    R0



Cornell University    Communications Sub-System                                 138
 R6        22 KOhm                R0603        rcl         RR08P22.0KDCT-ND          (19.5072 77.0382)    R0
 R11       68 Ohm                 R0603        rcl         RR08Q27DCT-ND             (24.1354 45.5368)    R0
 R13       2K                     R0603        rcl         RR08P2.0KDCT-ND           (13.3834 15.6636)    R180
 R14       2K                     R0603        rcl         RR08P2.0KDCT-ND           (16.9834 50.3236)    R0
 R15       2.2K                   R0805        rcl         P2.2KACT-ND               (53.07 26.58)        R0
 R16       4.7K                   R0805        rcl         P4.7KACT-ND               (48.57 26.47)        R0
 R17       100 KOhm               M0805        rcl         P100KCCT-ND               (42.541 91.59)       R180
 R19       68 Ohm                 R0603        rcl         RR08P100DCT-ND            (8.7354 45.0286)     R0
 IC2       AT90S8515P             DIL40        Atmel       2-641268-1-ND             (54.7744 59.02)      R270
 U$1       AT86RF211              TQFP48       Atmel       AT86RF211DAI-ND           (21.8104 68.4852)    R90
 U$2       RF2117                 SOIC-16      RFMD        www.rfmd.com              (16.5034 32.8236)    R180
 U$3       RF2436                 SOT-5        RFMD        www.rfmd.com              (14.5734 19.1236)    R180
 U$4       RF2436                 SOT-5        RFMD        www.rfmd.com              (14.1534 47.9436)    R270
                                               Texas
                                               Instrume
 U$5       SN74HC573              SO-20DW      nts         296-1203-5-ND             (73.969 85.6058)     R270
                                               Maxim
 U$6       DS1834A                SO08         IC          DS1834AS-ND               (49.501 91.87)       R90
                                               Toko
 U$7       FILTER                 FILTER       America     TK2307-ND                 (16.637 82.0674)     R90
                                               Maxim
 U$8       DS1230W                DIL28-6      IC          DS1230W-150-ND            (73.97 53.65)        R270
                                               Texas
                                               Instrume
 U$9       TPS2103                SO-08        nts         296-2589-5-ND             (75.8066 29.044)     R0
                                  BU-SMA-
 X1        R/A SMA                V            con-coax    J501-ND                   (20.32 13.716)       R0
 JP1       Locking Connector      1X02         pinhead                               (80.041 19.7398)     R270
 JP2       Locking Connector      1X02         pinhead                               (80.2132 11.6586)    R270
 JP3       Locking Connector      1X03         pinhead                               (7.2136 25.1206)     R270

           Note: (0,0) Refernce Point is located on the lower left hand corner adjacent to the SMA coax
           connector



II.            Command & Data Handling Protocol

Data Protocol: Comm & CDH
Keith Sinclair (Comm.), Farez Alibay (CDH)

The following documents define the character sequence required for communication
compatability between the comm. board and command and data handling board of the ICECube
satellite.

All commands are case sensitive




Cornell University                Communications Sub-System                                               139
Comm  CDH

 Data Request:

                              d             n or r                 #             /r

           This command request either a new part of the latest data set or request retransmission
           of an already retrieved part.

           n: stands for new data
              if 2 nd byte is n, ignore # (0 by default).
           r: stands for retransmit data
              if 2 nd byte is r, locate the 256 chunk of data that corresponds to offset #.


 Telemetry Request:

                          t              n or r               #             /r

           (See Data Reqest)


 Delete:
                                     x               d or t            /r

           This command requests the deletion of the most recent data set from CDH‟s memory.
           d: delete the latest science data set
           t: delete the latest telemetry data set



 Reset:
                                           r                  \r

           This command request a complete reset of the satellite


 ADCS mode:
                                     a               0 or 1            /r

           This command switches between different adcs control modes. The meanings of the
           different modes have not been specified yet.




Cornell University                Communications Sub-System                                     140
 GPS on/off:
                                  g           0 or 1            /r

        This command selects whether the satellite follows its control algorithm for turning
        GPS on and off or whether GPS is always off (except when collecting a new navigatin
        solution to update propagator).

        0 = off, don‟t collect science data
        1 = on, normal mode, collect data




CDH  Comm

The only communication provisioned from CDH to comm. is data to be transmitted. The form of
the data packet used is as such:

             D or T     E or C      # bytes        Data (1-256 bytes)             \r

       D: The data is science data
       T: The data is telemetry data

       E: This packet is the end of the data set (# bytes = variable, 1 - 256)
       C: This packet has more packets following it. (# bytes = 256)

       It is necessary to state the length of the data in bytes before the data field because any
       flagged used to delimit the end of the data could occur in the data. The „\r‟ flag at the end
       of the packet is present to make sure that the expected last byte is correct.


III.           Antenna Design

               Specification for Patch Antenna of Communication Subsystem

1.     SCOPE
1.1    General. This specification establishes the design, construction, performance,
       development, and test requirements for the Patch Antenna of the communication
       subsystem in the ICE CubeSat, (herein referred to as the patch).


2.     APPLICABLE DOCUMENTS
       The following documents of the exact issue shown shall form part of this specificaion to
       the extent specified herein. In the event of conflict between the requirements of this



Cornell University            Communications Sub-System                                         141
        specification and any referenced document the order of precedence shall be 1. The
        contract, 2. This specification, 3. Referenced documents.
2.1     Government Documents.
2.2     Industry Documents.
2.3     Reference Documents. Handbook of Microstrip Antennas, Vol I, 1989, JR James & P S
        Hall; Microstrip Antennas: The analysis and design of microstrip antennas and arrays,
        1995, David M. Pozar, Daniel H. Schaubert


3.      REQUIREMENTS

3.1     Item definition. The patch shall be the transmitting and receiving antenna used on the
        satellite for all telemetry between ground station and communication subsystem of ICE
        CubeSat in the 440MHz amateur radio band.

3.1.2   Interface Definition. See diagram below:




3.1.2.1.Physical.

        a) The patch shall become the bottom side of ICE CubeSat that will orient toward earth
           while in orbit

        b) Mechanical group indicates patch will be fastened by epoxy. This has not yet been
           tested.

        c) The patch shall be soldered to the radio board via a mini-RG50 coax cable with
           Teflon dielectric

3.1.2.2.Electrical.

        a) The patch shall radiate maximum of 5W of power


3.2     Characteristics.



Cornell University            Communications Sub-System                                        142
3.2.1   Performance Characteristics.
        a) The patch shall be frequency tuned to 435-437MHz (Exact freq. will be assigned by
        CubeSat launch coordinator)
        b) The patch shall be impedance matched to 50Ω at its operating frequency, and have
        VSWR < 1.2
        c) The patch shall have a 3 dB beam width > ±30 deg.
        d) The patch shall have a maximum gain of -1dB compared to isotropic dipole antenna
        e) The patch shall have minimum operating temperature range of -40°C to 85°C
3.2.2   Physical characteristics.
        a) The patch shall have overall dimension of 10 x 10 cm so it can be a side of the
           satellite
        b) The patch shall be composed of 0.031” FR4 PCB material
        c) The ground plane of the patch shall face inside of satellite while radiating plane shall
           face the outside.
        d) The patch and connecting coax shall weigh no more than 25g
3.2.5.1 Natural Environments.
        The patch shall meet the requirements of this specification during and after exposure to
        any combination of any of the following worst case conditions while stowed for launch:
         Ambient temperature up to 30°C prior to launch
         Relative humidity up to 80% prior to launch
         Exposure to temperatures in the range of -40 to 80°C prior to deployment from the P-
              POD.
3.2.5.2 Induced Environments.
        The patch shall meet the requirements of this specification during and after exposure to
        the following launch conditions while stowed for launch:
         Static Loading: 7.7g in any direction.
         Dynamic Loading: 0.64g at 2-20Hz in any direction
         Acoustic Loading: 140 dB sound pressure
               For additional details on expected loading, refer to the structural specification
               document.
3.2.4   Cleanliness.
        See system specification document.
3.3.1   Electromagnetic interference (EMI).
               a) The patch will not cause electrical or RF interference to the launch vehicle or its
                  primary load. RF wave is only radiated when the onboard radio is operating.


Cornell University             Communications Sub-System                                           143
The patch shall not cause undue electrical or RF interference to the other subsystems of the satellite.


                                               Preliminary Design
        A patch antenna is essentially two metal surfaces separated by a thin layer of air or insulator;
typically one surface will be smaller than the other one. And the smaller surface (radiating surface)
is driven electrically against the larger surface (ground plane). The size difference is due to the fact
that patch acts as waveguide and some E&M energy fed to it would exit thru its boundaries. Having
a smaller radiating surface would leave “room” for the E&M waves to escape and allow the patch to
radiate efficiently as an antenna.
        It is well known that rectangular patch antenna exhibit omni-directional beam pattern, thus
making it an ideal candidate for the satellite‟s comm. antenna. But typical rectangular patch design
requires one side to be half wavelength of the desired operating frequency. At the frequency of the
current COM subsystem, the resulting patch will be too big for the satellite. We found a solution in
an online article1, which briefly described how the resonant frequency of a rectangular patch can be
lowered by cutting many thin strips into the radiating surface and then reducing the number of strips.
       Using the method described in the article and through trial and error, we constructed two
patches:
Patch #1:




Notes on dimension:
              - The overall dimension is 10 x 10 cm
              - The radiating surface has been cut down to 7.75 x 9.7 cm
              - The square hole in the center of the patch is 3 x 3 cm
              - The four strips are each approx. 1/16” wide and ½” in separation
              - The feed point used is approx 1 1/8” from bottom edge in the pic.
Notes on material:
              - This first patch is made out of standard FR4, 0.026” double sided PCB

This first patch had a resonant frequency of 420 MHz with a VSWR of 1.4. The back side of the
first patch (i.e. ground plane) is left completely coppered except for the square hole in the
middle. We made the hole because according to one technical reference, removing material out
of the patch could reduce its resonant frequency.

Patch #2:

1
    Check with Laurence D. Hammer (ldh3@cornell.edu) for the website.


Cornell University                  Communications Sub-System                                    144
        Based on the first patch design, we made few modifications, and found the following
configuration worked: (note the square hole has been removed due to concerns about structural
integrity)




Notes on dimensions:
             - The overall dimension is still 10 x 10 cm (size of the PCB)
             - Radiating surface also have the exact same overall dimension
             - The two thin strips are 0.063” in width
             - The three thick strips are 0.1” in width
             - The distance from the top side to the top edge of the 1st strip, the bottom edge
                 of the 1st strip to the top edge of the 2 nd strip, bottom of 2 nd strip to top of 3rd
                 strip and so on are: 0.937”, 0.3”, 0.196”, 0.461”, 0.16”

Notes on material:
              - Patch #2 is made out of the same type of PCB as Patch #1, the final prototype,
                   however; will be constructed out of 0.031” PCB. This shouldn‟t matter too
much               as minute variation in patch thickness will not affect its frequency.

Notes on feed point:
         Both patches are probe fed through coax cable, and the feed position will determine the
input impedance. We found a long winded formula 2 that calculates the input impedance as a
function of feed position for regular rectangular patch, and it can be used to establish a good
initial feed point from which one can then experimentally determine more optimal positions.

Notes on theory of operation:
        To the best of my understanding, for a regular rectangular patch operating in the TM 01
mode, it would have half-cycle current variation along its radiating edge, and constant current
along its non-radiating edge. Thus one can cut many thin strips into the patch w/o having any

2
    See appendix


Cornell University              Communications Sub-System                                          145
effects on its operation. But as we reduce the number of strips, it would disrupt the overall
current distribution on the patch surface, possibly large enough to make the patch exhibit current
distribution similar to that of a patch operating at lower frequencies. Of course, formulating the
exact quantitative relationship between number of strips, width, separation between the strips 3
and frequency is temporarily beyond my abilities and will have to be left to more capable
individual (or until I gain more background in antenna theories and designs).

                                             Requirements Verification

Numbe             Name                   Requirement                   Prelim Design          Met           Not
r                                                                                                           Met
3.2.1 a)          Resonant Freq.         435 – 437MHz                  436MHz                   T
3.2.1 b)          Impedance              50Ω                           ≈50Ω                     T
                  Match
3.2.1 c)          Beam Width             > ±30 deg                     ±45 deg                  T
3.2.1 d)          Ant. Gain              -1 dB                         -2 dB                                 T
3.2.1 e)          Temp. Limit            -40°C – 85°C                  N/A                                  TBD

3.2.1 a) The resonant frequency requirement was verified using MFJ-269B antenna analyzer.
Below is the VSWR curve collected using the analyzer:
                                              Tests Patch #2 VSWR

           6




           5




           4
    VSWR




           3




           2




           1




           0
            420        425         430           435             440        445         450           455
                                                   Frequency (MHz)




3
  The online article did briefly mention modeling the patch as microstrips and using a program to predict its
frequency w/ varying number of strips, unfortunately it did not provide any useful details.


Cornell University                       Communications Sub-System                                                146
3.2.1 b) As can be seen on the VSWR plot above, the antenna is well matched at its resonant
frequency.

3.2.1 c) To verify the beam width of the patch, we performed some field tests by putting large
distance (approx. 2 mi.) between a Kenwood TS-790 transceiver and a handheld radio connected
to the patch. We then measured the relative signal strength from the patch when it‟s oriented at
different angles (using s-meter on the transceiver):

                                   Patch #2 Beam P attern
                                                                                  13




 Strengthi




                                           i

Note the plot is in units of mV, converted from signal strength measurements in S-unit (each S-
unit corresponds to a change of 6dB). The plot should be more symmetric than it is. The apparent
dip in signal strength at 45 degrees is due to several inconsistent measurements.

3.2.1 d) To determine and verify antenna gain, we used the same equipment as for beam pattern
measurement. But we now simply compared the signal strength of the patch when it‟s pointing
straight at the transceiver with that of half-wave dipole, quarter wave and 5/8 monopole. Below
are the field test results:

              Antenna Type             Signal Strength in S-    Power
                                       unit                     Transmitted


Cornell University           Communications Sub-System                                        147
              Quarter-wave             S7                        0.5W
              monopole
              Half-wave dipole         S3                        0.5W
              5/8- monopole            S5                        0.5W
              Patch                    S3                        1W

As one can see, the patch requires twice as much power as the other antennas to get the same
signal strength reading as half-wave dipole, which has maximum gain of 2dB (isotropic). So this
means the patch has at most -1dB gain, but considering the limited accuracy and sensitivity of
the s-meter on the receiver, we rated the patch gain to be -2dB.

3.2.1 e) We originally planned to test the operation of the patch at various temperatures (-40°C
up to 90°C) to ensure its operating parameters would vary within tolerable limits in space
environment (i.e. VSWR fluctuates within ±0.5). Unfortunately due to oversight and time
constraint, we never got chance to conduct this test. Thus it should be something to keep in mind
for the design and construction of future patches.




Appendix:
A.1 Patch Impedance Formula & Sample Calculation


Cornell University            Communications Sub-System                                       148
                                                                                      Patch Input Impedance Calculations

r  2.05 Typical dielectric constant for FR4 epoxy at VHF/UHF freq.
                                                                                                           inches 2.54cm
             8 m
c  3.010 
                 sec
        26
h        inches l  7.75cm                        Various dimension of the patch: h - substrate thickness (i.e. PCB
       1000                                            thickness), t - stripline thickness (i.e. copper thickness),
           6               w  3.35cm               l/w - length and w idth of the patch. I'm not using the overall
t  3510       m                                    dimension of the patch since w e have tw o smaller patches
                                                       connected through striplines.

        w r                   o                                                         Effective Width:
o               m                      Free-space w avelength and
         0.49                     r         w avelength in dielectric
                                                                                                      t        2 h  
o  0.098m
                                2 
                                                                                          We  w      1  ln  
                                                                                                           t 
                                m
                                                                                            We  0.034m

         Note: the follow ing formula assumes the patch is in TM mode (see w aveguide theory)
                                                               0, n

                        2
                   We                                                                                      W
                                         Self conductance, it can take three different values depending one:
         Gr 
                            2            We2/90lambda o2, We < 0.35lambda o; We/120lambda o - 1/(60pi2),
                 90o                   0.35lambda o < We < 2 lambda o; We/120lambda o, 2lambda o < We

                                   
                                           2
                              w   
                          sin     cos  
                       
                                            sin   3J0  2  lsin    d
                                                                                              Mutual conductance,
                 1
                      
                              o
         Gm                                                                               w here J0 is zeroth order
               120
                     2 
                                cos  
                                         2                         o                       bessel function.
                       0


                            cos  x
                                         2
                                                       Finally, input impedance as function of x, distance from the edge
         Zin( x) 
                       Gr  Gm cos                 of the radiating surface




                                             Zin( x)




                                                                           x
                                                        A distance of about 2cm from the edge gives us approx 50
                            
                 Zin( 0.0202m)                         ohms input impedance




Cornell University                                Communications Sub-System                                                   149
IV.             Rotor Control

                                Ground Station Antenna Tracking System

1.      SCOPE
1.1     General
        This specification establishes the design, construction, performance, development, and
        test requirements for the ground station antenna tracking system, (herein referred to as the
        tracking system).


2.      APPLICABLE DOCUMENTS
2.1     Industry Documents
        Texas Instruments TLC-0834C data sheet: The TLC-0834C is the analog to digital
        converter used in the system to interface the computer to the rotor. The datasheet
        specifies pinouts, timing specifications, and so on. The datasheet can be found at:
        http://www-s.ti.com/sc/psheets/slas094e/slas094e.pdf


3.      REQUIREMENTS

3.1     Item definition

        The tracking system controls the direction of the ground station antenna such that it faces
        the satellite during data transfer. The following is an item listing for the system.
           a)   Computer Software: Performs the orbital calculations necessary to determine the satellite‟s position and sends the
                necessary signals to the interface board

           b)   Rotator motors / Control Boxes: The antenna rotators / rotors are devices in which the antenna mounts; thus, they control
                the direction that the antenna is pointing. There are two rotors: a vertical and a horizontal (azimuth and elevation). They
                interface to their control box, and have potentiometers to sense position.

           c)   Interface board: The interface board connects the software and the rotor control boxes / rotors. The interface board allows
                software to directly control the movement of the antenna and to sense position via the parallel port of the computer.




3.1.1   Functional Diagram

                                                    Section 1.02 I                                   Rotor Control Circuit
      (a) Rotor                                       nterface
          Positi
          on
                                                         Figure 1: Block diagram




Cornell University                     Communications Sub-System                                                                       150
Desired Position        +                                                              New Position
                                        Proportional             Driving
                        Error            Controller              Circuitry
                        -
                                                                                 (iii) R
                                                                                       o
             Sensed                                                                    t
             Position                                                                  o
                                      Analog/Digital            Rotor Position         r
                                       Converter                   Sensor


                                                 Figure 2: Control Diagram




                              Figure 3: Tracking System Functional Diagram




3.1.2     Interface Definition

3.1.2.1            Physical

          Not Applicable

3.1.2.2            Electrical




Cornell University                   Communications Sub-System                                   151
          Except for the computer connection, which is a standard parallel port connection (IEEE-
          1284), all connectors are screw terminals:




          Figure 4: Connector on hardware interface board
                                                                Figure 6: Connector on
                                                                horizontal control box


                  1,2       Motor channel 0
                  3,4       Motor channel 1
                   5        Ground
                   6        Antenna position channel 0 (0-5V)
                  7,8       Motor channel 2
                 9,10       Motor channel 3
                  11        Ground
                  12        Antenna position channel 1 (0-5V)
          Table 1: Connector on hardware interface board

                   1,2                   CCW rotation
                    3                       Ground
                    4                Antenna position (0-5V)
                   5,6                    CW rotation
          Table 2: Connector on horizontal control box
                    1                Antenna position (0-5V)         Figure 5:
                                                                     Connector on
                    2                       Ground                   vertical control
                   3,4                    Up rotation                box
                   5,6                   Down rotation
          Table 3: Connector on vertical control box

          Motor channel 0 on the hardware interface board is arbitrarily defined in software to
          correspond to Up, 1 to Down, 2 to CW, and 3 to CCW. Antenna position channel 0 goes
          to the vertical control box, and channel 1 goes to the horizontal control box.

3.1.2.3           Functional

          As stated above, the connection to the PC uses the Parallel port. The function of each pin
          is as follows:




Cornell University                  Communications Sub-System                                    152
                 Pin Number         Function                Signal Name        Location
                   2,3,4,5        Motor control                 Data          DATA 0-3
                      6         ADC Clock (CLK)                 Data           DATA 4
                      7          ADC Data In (DI)               Data           DATA 5
                     11            ADC SARS                    Busy           STATUS 7
                     12         ADC Data Out (DO)            Paper End        STATUS 5
                     17          ADC Chip Select            Select Input     CONTROL 3
                    18-25           Ground                    Ground              --


                                    Table 4: Parallel port pin assignments

         The low-level software driver has only one exposed function:

         antennaseek(int vdeg, int hdeg)

         This function takes in the desired vertical elevation and horizontal direction, and moves
         the antenna to those positions. It returns 0 on successful completion or -1 in any other
         case. See the design section for more information on the software.
3.2      Characteristics
3.2.1    Performance Characteristics
         a) The satellite completes a pass, crossing the 180 degrees of the sky, in approximately
            12 minutes, so the approximate minimum angular speed of the rotors shall be at least
            0.25 per second.
         b) The accuracy with which the antenna is pointed shall be +/- 3. This number is
            determined by the sensing accuracy of the rotors themselves.
         c) The antenna shall track the satellite smoothly and not oscillate.
         d) The entire system shall be usable with US standard 110 VAC 60 Hz power.
         e) The computer used shall be capable of multitasking and sufficient speed to move the
            antenna at the proper rate. A Pentium-100 with 16 MB RAM is sufficient.
         f) The system shall be able to be overridden using hand controls.
      a) Physical characteristics
         Not applicable
      b) Environments
      c) The electronic components of the system shall be operable in standard indoor conditions,
         10 – 46 C, and in minimal moisture.
      d) The rotor components shall be operable in temperate outdoor climates, in wind, sun,
         snow, rain, and temperatures from –40 to 50C.
      e) Cleanliness



Cornell University              Communications Sub-System                                       153
        No special cleanliness requirements.
    f) Electromagnetic interference (EMI)
        The system shall meet standard FCC requirements for consumer electronics.

                                  Preliminary Design / Prototypes

        Note that currently we have a functional antenna tracking system. All hardware has been
prototyped and implemented successfully, and all software drivers have been written. The software has
been passed on to the Ground Station team so that they can integrate the antenna control into their design.
The section describes the design decisions and results.

a) Low-level Driver Code

        Hardware Connections:

                The parallel port, through which the computer connects to the hardware interface
        board, looks like three one-byte registers in software, DATA, STATUS, and CONTROL.
                See the functional interface definition, 3.1.2.3, for a description of the uses of the
        parallel port pins.
                The motor control lines simply turn on the motor that they are connected to when
        they are set high. The rest are used to communicate with the analog-to-digital converter
        that reads the current antenna position. The protocol for communicating with the
        converter is in the TLC-0834C Datasheet. In brief the ADC is initialized with a series of
        command bits sent over the DI line, which specify the channel from which the ADC is to
        read. The ADC then returns the digital value of the input signal MSB first over the DO
        line.

        Program Structure

                The main function responsible for the control of the system is
        antennaseek(int vdeg, int hdeg). This function takes the desired vertical and horizontal
        position in degrees and activates the appropriate motors while repeatedly checking the
        antenna positions using the function readadc(int ch, int oldout). This function takes the
        channel number (0-3) and the current value of the DATA register (so as not to disturb
        motor movement while reading the ADC). The function setdata(int data) simply sets the
        DATA register to the specified value and pauses a prescribed amount of time. Much of
        the apparent complexity of the antennaseek function is due to the need to change
        particular bits in the DATA register without altering the others. Otherwise it is
        essentially a while loop.
                Usage of the antennaseek function is demonstrated in the sample main() function
        given at the end. Note that the port needs to be reserved using the function ioperm()
        before it can be used. It should not be released until the program stops running, since this
        is a dedicated application and other programs should not have access to the port at the
        same time.

        Adjustable Parameters


Cornell University               Communications Sub-System                                             154
                  The various parameters corresponding to the rotors are specified in const
          variables at the beginning of the antennaseek function. This is where the
          correspondences of the motor line number to the rotor and direction are established. The
          only variables that are likely to be changed are VDEGtol, VDEGwait, HDEGtol, and
          HDEGwait.
          The tol variables establish the error margin of the antenna position. Since the ADC has
          8-bit precision, there is not enough resolution to represent 360 degrees of position. In the
          case of the 180 degree rotor, there still needs to be an error margin. The wait variables
          determine how often to check the ADC for the antenna position. This should be
          approximately equal to the time that it takes for the rotor to cross one edge of the error
          margin (thus, if it checks once just before it enters the margin, it will stop right on the
          degree mark). The margin needs to be wide enough to prevent excessive oscillation of
          the rotor as it overcorrects.

Low-level driver code: rotor.c
#include <stdio.h>
#define extern static
#include “/usr/include/asm/io.h”
#undef extern
#include “/usr/include/time.h”

#define DATA 0x03bc
#define STATUS DATA+1
#define CONTROL DATA+2

#define   CS 8
#define   DO 32
#define   SARS 128
#define   CLK 16
#define   DI 32

struct timespec pausetime,remtime;

void setdata(int data)
{
        outb(data,DATA);
        nanosleep(&pausetime,&remtime);
}

int readadc(int ch, int oldout)
{
        int stat,x,indata=0;
/*
    g) command[] is the set of command bits, defined as follows:
    h) Start bit is always high
    i) Next three bits determine channel number according to table
 *   |   Mux Address                 | Channel Number         |
    j) |-------------------------------|------------------------|
    k) | SGL/DIF | ODD/EVEN | SELECT 1 | CH 0 CH 1 CH 2 CH 3 |
    l) |---------|----------|----------|------------------------|
 *   |   L     |    L      |    L    | +      -               |
 *   |   L     |    L     |     H    |              +     -   |
 *   |   L     |    H     |     L    | -      +               |
 *   |   L     |    H     |     H    |              -     +   |
    m) |---------|----------|----------|------------------------|
 *   |   H     |    L     |     L    | +                     |
 *   |   H     |    L     |     H    |              +        |
 *   |   H     |    H     |     L    |        +              |
 *   |   H     |    H     |     H    |                    +   |
    n) |--------------------------------------------------------|
    o) There are always two zero bits on the end.
 */




Cornell University               Communications Sub-System                                        155
       int oddeven=(ch&1)?DI:0;
       int select1=(ch&2)?DI:0;
       int command[]={DI,DI,oddeven,select1,0,0};
       // Defines pause time, for hold times, etc.
       pausetime.tv_nsec=0;

       // Reset chip
       outb(0,CONTROL);
       nanosleep(&pausetime,&remtime);

       // Enable chip
       outb(CS,CONTROL);
       nanosleep(&pausetime,&remtime);

       for(x=0;x<14;x++)
       {
               stat=inb(STATUS);
               if(x<6)
               {
                       setdata(command[x] + oldout);
                       setdata(CLK+command[x] + oldout);
               } else {
                       // The SARS line needs to be off during
                       // the read process, otherwise, something
                       // is wrong.
                       If(x<13 && (stat&SARS)) return –1;

                          // Read in byte, MSB first
                          indata+=(stat&DO)?(1<<(13-x)):0;
                          setdata(oldout);
                          setdata(CLK+oldout);
                }
       }

       setdata(oldout);

       return indata;
}

int antennaseek(int vdeg, int    hdeg)
{
        const int VDEGt=180;     //   Total vertical degrees
        const int VDEGup=2;      //   DATA bit to raise vertical
        const int VDEGdown=1;    //   DATA bit to lower vertical
        const int VDEGch=0;      //   ADC channel for vertical
        const int VDEGtol=1;     //   Degrees vertical error tolerance

       //Nanoseconds to wait between checks of the ADC; this should be
       //equal to the time it takes for the rotor to go VDEGtol    //degrees.
       //In other words, VDEGtol divided by approx. deg/nsec of rotor
       const int VDEGwait=VDEGtol/(3e-9);

       int VDEGpos=0;       // current vertical position
       int currout=0;              // current parallel port output
       int VDEGprev,VDEGv=0; // to make sure that the rotor is moving

       const   int   HDEGt=360;
       const   int   HDEGup=4;
       const   int   HDEGdown=8;
       const   int   HDEGch=1;
       const   int   HDEGtol=3;
       const   int   HDEGwait=HDEGtol/(6e-9);

       int HDEGpos=0;
       int HDEGprev,HDEGv=0;

       if(vdeg<0 || vdeg>VDEGt) return –1; // Check input
       if(hdeg<0 || hdeg>HDEGt) return –1;




Cornell University               Communications Sub-System                      156
       //Find out current position
       VDEGpos=readadc(VDEGch,currout);
       HDEGpos=readadc(HDEGch,currout);

       while(abs(VDEGpos-vdeg)>VDEGtol || abs(HDEGpos-hdeg)>HDEGtol)
       {
               if(abs(VDEGpos-vdeg)>VDEGtol)
               {
                       // Move down
                       if(VDEGpos > vdeg)
                       {
                               setdata((currout&(255-VDEGup))|VDEGdown);
                               currout=(currout&(255-VDEGup))|VDEGdown;
                       }
                       // Move up
                       else if(VDEGpos < vdeg)
                       {
                               setdata((currout&(255-VDEGdown))|VDEGup);
                               currout=(currout&(255-VDEGdown))|VDEGup;
                       }
                       pausetime.tv_nsec=VDEGwait;
                       VDEGprev=VDEGpos;
                       VDEGpos=readadc(VDEGch,currout)*VDEGt/255;
                       //Check to see if rotor is moving
                       if(VDEGprev==VDEGpos) VDEGv++;
                       else VDEGv=0;
                       if(VDEGv==20) //If rotor hasn’t moved, return error
                       {
                               setdata(0);
                               ioperm(0x03bc,3,0);
                               return –1;
                       }
               } else {
                       //If within tolerance, don’t move the rotor
                       setdata((currout&(255-VDEGdown))&(255-VDEGup));
                       currout=(currout&(255-VDEGdown))&(255-VDEGup);
               }
               if(abs(HDEGpos-hdeg)>HDEGtol)
               {
                       // Move “down” (counterclockwise)
                       if(HDEGpos > hdeg)
                       {
                               setdata((currout&(255-HDEGup))|HDEGdown);
                               currout=(currout&(255-HDEGup))|HDEGdown;
                       }
                       // Move “up” (clockwise)
                       else if(HDEGpos < hdeg)
                       {
                               setdata((currout&(255-HDEGdown))|HDEGup);
                               currout=(currout&(255-HDEGdown))|HDEGup;
                       }
                       pausetime.tv_nsec=HDEGwait;
                       HDEGprev=HDEGpos;
                       HDEGpos=readadc(HDEGch,currout)*HDEGt/255;
                       //Check to see if rotor is moving
                       if(HDEGprev==HDEGpos) HDEGv++;
                       else HDEGv=0;
                       if(HDEGv==20) //If rotor hasn’t moved, return error
                       {
                               setdata(0);
                               ioperm(0x03bc,3,0);
                                return –1;
                       }
               } else {
                       //If within tolerance, don’t move the rotor
                       setdata((currout&(255-HDEGdown))&(255-HDEGup));
                       currout=(currout&(255-HDEGdown))&(255-HDEGup);
               }
       }
       // Stop rotors
       setdata(0);




Cornell University            Communications Sub-System                      157
}

int main()
{
        ioperm(0x03bc,3,1); //Get control of parallel port
        antennaseek(90,100);
        ioperm(0x03bc,3,0); //Release control of parallel port
}


b) Interface Board

                We considered several possible designs for the tracking system before choosing the
       design described in this document.
                Initially, we planned on using a data acquisition card to do the analog to digital
       conversions necessary. However, we chose against this design when we realized that we would
       have to write the drivers for these cards, which would take considerable time and effort. We then
       considered building an interface board that connected via the serial port to the computer. The
       interface board would be microcontroller based, using a PIC microcontroller. All controls would
       be done internally on the microcontroller, which has an internal A/D unit as well as the capability
       to drive the rotor. We prototyped this design, however we had trouble programming the chip (we
       prototyped two different programmers) and we felt that pursuing this path would simply take too
       long. We also considered buying a controller and just using that. However, we found that these
       commercial controllers were simply too expensive, and we couldn‟t find one with driver support
       for Linux. Thus buying a controller would force us to switch operating systems and sacrifice the
       use of “Predict” (the satellite tracking software) which would be a shame since it is open source
       and thus very modifiable.
                What we finally decided on was a design that we had considered previously but that we
       had felt was less elegant and somewhat complex. However, it turned out to work very well. We
       built an interface board that connects to the PC via the parallel port. A serial A/D converter
       (TLC0834) to get the position of the rotor. Triacs and transistors are used to drive relays that
       were added to the controller boxes. The circuit takes in 12V and regulates this down to 5V.
                The circuit diagram is depicted below. The circuit diagrams have been created in
       “Protel”, and a PCB design has been created as well.




Cornell University              Communications Sub-System                                             158
c) Rotor Control Boxes

               Some additions were made to the rotor control boxes. Note that the horizontal rotor
       controller has different modifications to it than the vertical rotor controller, as it has AC as
       opposed to DC inputs. These circuit diagrams have been created in “Protel”, however a PCB has
       not been designed yet. The circuit diagrams are depicted below.




Cornell University             Communications Sub-System                                           159
Cornell University   Communications Sub-System   160
                                   Requirements Verification

Number Name                 Requirement                                          Met Not Met
1      Angular Speed        Angular speed of rotors shall be at least 0.25     IDAT
                            per second.
2         Pointing Accuracy The pointing accuracy of the antenna shall be       IDAT
                            in error no more than 3
3         Oscillation /     The antenna shall follow the satellite               IDA        T
          Control Algorithm smoothly without oscillation.
4         Power             The system shall be operable using standard         IDAT
                            110 VAC 60 Hz power.
5         Computer          The computer shall be of sufficient speed to        IDAT
                            compute the desired position of the antenna.
6         Manual Override The system shall be able to be overridden             IDAT
                            using manual controls.
7         Operating         The system shall be functional in the               IDAT
          Conditions        described operating conditions.
8         PCB               PCB‟s shall be printed to increase the                        IDAT
                            reliability of the hardware.


    As can be seen, most of the requirements for the system have been met. There are a couple of
issues outstanding, however.
   First of all, the actual tracking algorithms have not been tested. It must be ensured that the
tracking system can smoothly follow the (or any) satellite across the sky smoothly and without
oscillation. It seems that some control of this type may be include in the rotor control box
already, however it is likely that a some gain will be needed in the system, and possibly the
algorithm may need to be a PID.
   Secondly, PCB‟s of the interface hardware and rotor hardware must be created. These will be
essential components of a reliable and functional design. A PCB has been designed for the
interface hardware already.

V.             Testing Document


     1. Board Dimensions and Screw Holes

This test entails Structures sub-system to measure the physical dimensions of the board to see if
they match specification as required to fit within the satellite. If the dimensions of the board and
screw holes match, then the final test will be to see if the board fit properly within the satellite.

Appendix V shows the measurements that structures took on the board to verify that board and
communications antenna met specifications. Furthermore, during satellite assembly, the
communications board was successfully mounted on the board screws.

     2. Antenna Dimensions and Functionality


Cornell University             Communications Sub-System                                         161
The patch antenna is designed to fit within side 6 of the satellite (the bottom side). The
Structures sub-system will take measurements to verify that the antenna can fit on to the satellite.
For the prototype satellite, the patch antenna will use epoxy to adhere to the wall panel. For the
flight units, CalPoly gave the Communications sub-system an exception so that the antenna can
be used as a wall panel. This will reduce mass as well as make assembling the satellite easier.

The antenna was successfully adhered to a side panel and mounted on to the satellite (See
Appendix VI). A ground wire had to be connected from the side panel to the ground connection
of the antenna to ensure that no capacitance from the epoxy would contribute to the load
impedance of the antenna.

Measurements were taken to confirm that the antenna has the correct beam width, gain, and
impedance of 50 ohms (See Spring 2002 Specifications document).

   3. Communications Board Layout

This test involves a detailed check of the communications board layout to ensure that it meets all
design specifications as designed and on component data sheets. This includes pin layouts,
component size checks, circuit path verification, proper path sizes for voltage and current levels,
and parts placement verification.

A professional vendor, BSU Incorporated, was selected to populate the Communications boards
because professional build-out of the board reduces population time, soldering errors, and board
debugging time.

   4. Micro-Controller

First, the micro-controller is powered on by checking the voltage on the VCC pin to be 3.3 volts,
voltage on the GND pin to be 0 volts, and the voltage on the reset pin to be 3.3 volts. Second,
the crystal ports of the micro-controller are connected to an oscilloscope to examine the crystal
output. It should be oscillating at a frequency of 4 MHz. Third, a simple test of the micro-
controller operations is to toggle the ports and examine the ports on an oscilloscope.

Pin                               Theoretical Voltage               Actual Voltage
VCC                               3.3 V                             3.35 V
GND                               0.0 V                             0.035 V
Reset                             3.3 V                             3.316 V

The above table shows the results of the reading the voltage on pins VCC, GND, and Reset. The
second test resulted in sinusoid oscillating at 4 MHz with a mean voltage of 1.48 volts. The third
test had PORTB oscillate from high to low and low to high. The oscilloscope showed a pulse
train that proved that the micro-controller will operate correctly.

   5. Voltage Detector




Cornell University            Communications Sub-System                                         162
The voltage detector will hold the micro-controller in a reset state if the voltage supplied to the
micro-controller is not held above 2.4 volts. The first part of the test will be to supply some
voltage below 2.4 volts to the micro-controller, and to check the voltage on the micro-
controller‟s reset pin if it is 0 volts, consistently. The second part of the test will be to supply
some voltage above 2.4 volts. If the voltage on the reset pin is consistently 3.3 volts, then the
voltage detector is full-filling its function. The final test is to supply 3.3 volts to the micro-
controller and vary that voltage between 2 volts and 3.3 volts. If the voltage detector is behaving
as required, then the voltage detector is operating properly.

   6. UART Communications

The transmission and receive lines of the micro-controller are connected to an RS-232
transmitter and receiver circuit (adapted from the Maxim MAX563 Datasheet). This circuit
connects to the serial line of the computer. The UART communications can be verified through
code that communicates to the hyper-terminal of the computer at a 9600 baud. In the hyper-
terminal we can send data to the micro-controller, and the micro-controller will return that data
back to the hyper-terminal window.

The code was written that allowed the user to type text in the hyper-terminal window. This is a
check of the micro-controller‟s UART because the text that the user typed is sent to the micro-
controller through the UART Receive‟s line, and the micro-controller outputs that text to the
UART Transmit‟s line. Because what the user typed matches what was displayed on the hyper-
terminal, the UART is able to communicate properly.

Once the communication sub-system UART has been verified, communications with the
Command and Data Handling sub-system needs to be checked. Because the Command and Data
Handling system uses 5 volts to communicate via the UART, and the communications system
uses 3.3 volts to communicate, a voltage divider circuit was used to ensure that a transmitted 5
volts did not exceed 3.3V and damages communications. In short, a voltage divider was used to
ensure that when Command and Data Handling transmitted 5 volts, it would be interpreted as 3.3
volts on the Communications side of the UART. When the Communications sub-system
transmits a logic high as 3.3 volts, the Command and Data Handling sub-system can correctly
interpret that as a logic high because the voltage region for a logic high is from 2.8 volts to 5.2
volts.

The code accepts an integer as a character followed by an end character, multiplies the integer by
two, and returns the integer as a character followed by a new line character. The Command and
Data Handling board sends a „3‟ and a „p‟ as the delimiter character, and it received a „6‟
followed by a new line character. This was exactly what the code predicted it should have done.
Furthermore, because communications was established, the voltage issues between Command
and Data Handling and Communications sub-systems were solved.

   7. External Memory




Cornell University            Communications Sub-System                                         163
The code will allocate variables to addresses found only in the external memory. A simple copy
of data from variables found in the micro-controller‟s internal memory to the variables in the
external memory will show if data was successfully written to the external memory.

The data from the variables in the internal memory to the copied data from the variables in the
external memory to the hyper-terminal of the computer matched exactly. This showed that the
external memory is working properly.

   8. Power Latch

The test consists of two parts. The micro-controller will supply a logic high to the power latch‟s
select pin to supply 3.3 volts to the external SRAM and address latch. If the external SRAM‟s
VCC pin and address latch‟s VCC pin all are supplied 3.3 volts, then the power latch is able to
supply the power to those components. Secondly, the micro-controller will supply a low voltage
to the power latch‟s select pin to signal that the power latch is to supply GND to the VCC pins,
only when the external memory is not being accessed. The external SRAM‟s VCC pin and the
address latch‟s VCC pin should show 0 volts. If both these tests are successfully, than the power
latch‟s functionality will be verified.

We were able to verify that power was supplied to the memory latch and external memory by
supplying logic high to the power latch‟s select pin. Second, power was cut off to the memory
latch and external memory‟s VCC pins because a GND voltage was measured as a logic low was
supplied the power latch‟s select pin.

   9. RF Transmitter and Receiver

This test consists of multiples parts: verification of digital communications, verification of RF
communications, and frequency and spectrum analysis.

Writing values to specific registers of the RF transceiver and receiver chip tests the digital
communications. Reading those registers and comparing to the values that were written test
digital communication. If the values match consistently, then the digital communication is
verified. The chip powers on when the clock frequency on XTAL1 and XTAL2 (pins 23 and 24,
respectively) has a stable clock. The micro-controller will read the AT86RF211‟s status register.
The MVCC field of the status register gives the measured VCC voltage on the chip and should
be a non-zero value.

Generating an RF signal tests the RF communications. A PLL (Phase Locked Loop) must first
be achieved in order to properly transmit. A PLL means that the AT86RF211 had a stable
crystal frequency and phase. RF communications is tested by broadcasting a message between
the communications prototype board and another communications prototype board at 9600 baud
and verify that the transmitted message and the received message are the same.

The final test is to examine the frequency spectrum and check to see if the carrier frequency and
the bandwidth are correct. The frequency spectrum should be band-limited to a bandwidth of




Cornell University            Communications Sub-System                                       164
approximately 120 KHz with bimodal peaks (i.e. FSK modulation). If this test passes, then RF
communications is possible.

During the test, the micro-controller wrote the following Hexadecimal data to the AT86RF211
CNTL1 register and CNTL2 register, 0x91E11260 and 0x10A88057, respectively. When the
micro-controller reads these data values, the registers showed the exact same values. In short,
this means that the RF transceiver and receiver chip can accept commands and communicate
digitally. The MVCC field of status read 0b100011 for 3.33 volts supplied to the chip. Because
the value is non-zero, it can be interpreted that the clock frequency was stable and that the chip
receives power.

The AT86RF211 was able to establish a PLL lock. This means that the chip had a stable clock
frequency being used to modulate the message to RF. The application was able to transmit and
receive an RF message at 9600 baud.

An examination of the frequency spectrum of the outputted message on the AT86RF211
development boards showed two bimodal peaks centered at the carrier frequency of 433 MHz
with a bandwidth of 800 KHz at approximately 14 dBm (max output power). The development
boards also showed oscillations. The communications board produced a spectrum analogous to
the development board. There are bimodal peaks centered at approximately 432.4 MHz. The
bandwidth of the signal is 120 KHz, which is smaller than that on the development board.
Furthermore, there are fewer oscillations as the communications board seems more stable than
the AT86RF211 development board.

If the transmitter/receiver chip is able to pass the above three tests, then the chip is verified to
work properly.

   10. RF Relays

The RF relays have the function of connecting the transmitter/receiver chip directly to the
antenna, by bypassing the amplifier (Receive), or correct the transmitter/receiver chip to the
antenna through the amplifier (Transmit).

If the relays connect the transmitter/receiver chip along the Receive line, then the output should
show signal content. However, when the transmitter/receiver transmits along the Transmit line,
then the output should show no signal content, if the amplifier is turned off. The test starts with
the relay switched along the Receive line and the transmitter/receiver continuously transmitting.
If the relay switches to the Transmit line, then there should be no output signal content as the
amplifier is not turned on.

If the results of the test match the behavior as described above, then RF Relay functions and
requirements are verified.




Cornell University            Communications Sub-System                                         165
   11. RF Amplifier

This test consists of three parts: verification of the amplifier functionality, frequency and
spectrum analysis of the amplifier input and output, and power down mode.

By supplying a RF input signal of approximate 4 dBm, 2.8 volts to V REG and 2.3 volts to the
amplifier VPD pin, the RF amplifier should boast the signal power to at least 30 dBm, or 1 watt.
This can be verified using a spectrum analyzer to measure the output power. The next test is a
distance test to see how far the amplified RF signal can go.

Second, the frequency spectrum of the input of the RF amplifier has already been analyzed for
frequency content and bandwidth. This part of the test entails examining the output from the RF
amplifier with a frequency spectrum analyzer for its frequency content and bandwidth. The
carrier frequency should be approximately 433 MHz with a bandwidth of approximately 100
KHz. The input and output of the RF amplifier should have approximately the same frequency
content and bandwidth.

Lastly, the RF amplifier has voltage power down mode to conserve power during the
communications idle mode and receive mode. Supplying a voltage low to the amplifier VPD pin
will verify that the RF amplifier will power down. This should turn off the functionality of the
amplifier. By supplying a voltage high, the amplifier should power on and boast a RF signal
from 4 dBm to 30 dBm.

The functionality of the amplifier has yet to be verified.

   12. Power, Mass, and Temperature

Connecting a voltage supply to the communications board and testing the power consumed in all
the modes can test the amount of power consumed. A comparison between the actual power
consumed and the allocated power will test if the system meets the power constraints.

The mass of the on-board communications system is measured when all components have been
physically completed on a mass scale. A comparison between the communications system‟s
actual mass and allocated mass is then compared for verification of the mass.

The temperature capabilities of the system are harder to test than the previous two. Changing the
temperature around the temperature range will show for what actual range the system can still
function. This requires accurate temperature control.


   13. Communications System Integration and Test

The final test involves testing the satellite‟s communications system with the ground station‟s
communication system. This involves taking the satellite outside and test transmitting and
receiving information with the ground station. If the satellite is able to successful transmit and
receive information outside the CubeSat lab in Rhodes Hall, then a distance test will be



Cornell University             Communications Sub-System                                      166
+ Driving
Sensed
Desired
RF Rotor
Proportional
Analog/Digit
     Position
NewSwitch
10.24 MHz
Error
  Position
alCircuitry
 Controller
   Converter
Position R
    (ii)
Crystal
- Sensor
RF Switch
        ot
10.24 MHz
        or
Crystal
                conducted. A 500 kilometer test is difficult to test, but testing if the communication system to
                see if it can transmit and receive information from beyond Cayuga Lake to the ground station at
                Cornell University is believed to be an adequate test. This test will yield information such as
                SNR, BER, channel noise, reliability, etc.

                This is untested.


                VI.            Datasheets




                Cornell University           Communications Sub-System                                      167

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:51
posted:4/17/2010
language:English
pages:167