33
Page | 1 Florida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University Instructor: Dr. Janusz Zalewski CEN 4935 Senior Software Engineering Individual Project Final Version 9/13/2011

Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 1 

 

 

 

 

Florida University Satellite Project

Author: Jorge Ocañas Jr.

Florida Gulf Coast University

Instructor: Dr. Janusz Zalewski

CEN 4935 Senior Software Engineering Individual Project

Final Version 9/13/2011

Page 2: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 2 

 

1. Introduction

The Florida University Satellite (FUNSAT) project is a competition among universities in the

state of Florida to design and construct a pico-satellite(10cm x 10cm x 10cm) with a weight not

to exceed 1 kg. Figure 1 gives a good idea of the overall size of one of these CubeSats. The

limits provide a unique challenge for scientists.

Figure 1: An example of a commercially available CubeSat

Previously, a team made up of team leader, Jaime Zabala, and team members Tim Bennett,

Bradd Konert, and Michael Lekon designed and implemented a proof of concept. This

implementation had to make certain compromises in order to achieve a working model. The

overall size and weight are outside of the specifications for a CubeSat. An embedded computer

was chosen for its capabilities and form factor. The computer itself measured in at just over 35

mm tall. The microcontroller and telemetry modules could not be added without further falling

outside of specifications. The working implantation proved the software they designed worked

well. [1]

Page 3: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 3 

 

For 2011, the FUNSAT project is known as the Florida CubeSat Program or FloSat and is

being held by the NASA Florida Space Grant Consortium. According to their website:

“The CubeSat program strives to provide practical, reliable, and cost effective launch

opportunities for small satellites and their payloads.” [2]

“The goal of the program is to have a flight ready 1U CubeSat satellite built and ready to be

launched in 2013.” [3]

The Cubesat’s total size is 1U. Physically this is 10cm x 10cm x 10cm and must also weigh

less than 1 kg. The program will support 10 teams, 6 subsystems and 4 payload teams. The

original FUNSAT project was to design and implement the communications and telemetry

subsystem. The subsystem will provide ground computers with the data from all of the other

subsystems in the CubeSat. [3]

Page 4: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 4 

 

2. Definition of the Problem

The previous communications and telemetry module was outside of the required

specifications. The FLOSAT’s total size is to be no more than 1U. Physically this is 10cm x

10cm x 10cm and must also weigh less than 1 kg. The communications and telemetry subsystem

will provide ground computers with the data from all of the other subsystems in the FLOSAT.

The new communications and telemetry module must meet these requirements:

Overall size should be no more than 10 cm x 10cm with a maximum board height of 30

mm without the antennas.

It should have a RS232 serial interface to communicate with the flight computer and be

able to relay that information to the ground using an radio frequency transmitter and an

antenna. It must be able to accept packet size and frequency.

The module must be powered by one of three buses: 12v, 5v, or 3.3v that is provided by

the power and control module.

The module must not consume more than 2 Watts when transmitting and no more than

.5W when receiving.

Total weight is to be less than 300 grams with antennas.

The eBox’s physical dimensions are 115mm x 115mm x 35 mm. The weight of the eBox is

505g. [4]

Page 5: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 5 

 

Figure 2: eBox-2300SX

The phidget 1018 8/8/8 microcontroller used is 53.34 mm x 81.28 mm x 10.16 mm.

Figure 3: Phidget 1018 8/8/8 microcontroller [5]

Page 6: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 6 

 

The active robots RF telemetry module was 70 mm x 40 mm (6).

Figure 4: Active Robots RF Telemetry Module

Page 7: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 7 

 

3. The Solution

The goal of this project is taking the previous version and adapting it to a much smaller,

programmable, microcontroller platform. The analysis of a microcontroller market led to a

decision to use a widely popular platform in hobby applications, an Arduino. [7] The overall

board size, not including the antennas for the program should be 10cm x 10cm x 30mm. The

Arduino platform is based off of an Atmega AVR chip that can provide plenty of processing

power that is needed in simple RF communication. The AVR chip can run on 3.3v or 5v. With

regulation, the chip can be powered on a wide range of voltages. The CubeSat requirements

propose the communications run on one of three power buses: 3.3V, 5V, or 12V. Arduino has a

large selection of devices that are designed to interface with is directly; as well as the capability

to interface with almost anything with the right programming.

 

Figure 5: 9Xtend Module [8]

The Arduino must have a way to communicate with both the flight computer and base

stations on earth. Low orbit satellites travel at around 70 + miles above the earth’s surface. A

telemetry module that could easily and efficiently interface with the Arduino as well as a base

Page 8: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 8 

 

station is needed. The 9Xtend RF module is able to communicate with another 9Xtend module

at a range of 40 miles (with a high gain antenna and a clear line of sight). [8] This module was

readily available so was chosen for this project. A serial interface must also be provided for

communication between the Arduino and the flight computer. An Arduino is capable of 9600

baud standard serial communication using its tx/rx lines available on chip. The Arduino used for

this project is an Arduino Mega 2560. This development board is based off of an ATMega2560

AVR chip that is capable of communicating with up to four serial devices at a time and can store

up to 2560 Kbytes of information on board. The board has 54 digital I/O pins (of which 14

provide PWM output), 16 analog input pins, and up to 256KB flash memory. This chip however

is only capable of using TTL to communicate with the serial connection. TTL signals are only

5V peak to peak, whereas standard RS232 serial communications use +-12V swings in order to

communicate. This requires another device, a RS232 to TTL adapter. This adapter has

transistors, resistors, diodes, and a capacitor in order to charge the 5V pulses and boost them to a

12V range that is able to pulse 12V bits to the RS232 serial connection and charge back up

during low bits.

The Arduino software library is a relatively robust one that is always being improved upon

and added to by the community of Arduino users. The most basic Arduino source code is one

that includes a user defined setup function, setup(), which runs at power-up. It is in this setup

that most pins (input and output) are initialized. The setup() function does not return anything so

must be written “void setup (){}” with the user code in between the braces. For the telemetry

module, the serial ports are initialized here by running Serial1.begin (9600) and Serial2.begin

(9600). Each function initializing the second and third serial ports of the Arduino respectively,

to communicate at 9600 baud. Serial is reserved for the first serial port which is used for

programming the Arduino and can be used for communication as well. The Arduino Mega is

able to communicate with the serial ports using a simple set of functions that is taken care of by

the onboard UART (universal asynchronous receiver/transmitter). Printing the text “hello

world” to the first port is as simple as calling Serial.print(“hello world”). An example is shown

in Figure 6. Notice in the example, this code will print “hello world” multiple times a second to

the serial port and do this indefinitely until the Arduino is powered down. Do not run this code

as is. This code will make it difficult to reprogram the Arduino because it will clog the serial

interface used to program the code by not delaying or allowing the Arduino to read from the

Page 9: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 9 

 

interface. This is part of the reason why the satellite code does not use the first serial interface

for communication. The satellite code will setup the serial ports and then call the external

establishContact() function before it goes into the main loop().

 

Figure 6: Arduino “hello world” example

After running the setup function, the microprocessor will then enter the main function. This

main function must be called loop(), this is the loop that will run until the Arduino is shutdown.

From this loop, any other user defined function can be called. This loop also does not return

anything, this is also written as void loop () {} with the user code in between the braces. The

functions do not need to be declared beforehand in any header, but can be placed into header

files and treated just like any C++ code. Arduino code is very similar to C++ code and can in

fact run C++ source code and headers.

From within the main loop, the satellite source code will check to see how much data is

available from the flight computer by calling Serial1.available() and storing the return value as

an integer that it uses to control a loop. The code will first output five zeros to indicate that data

will follow. Each zero is followed by a delay that will allow the 9Xtend modules to properly

respond and receive. Another for loop executes right after the zeros and begins sending the

Page 10: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 10 

 

values from the flight computer one byte at a time to the ground station. After each byte a delay

is used again. After the completion of sending the flight computer data, the main loop will flush

both serial port buffers and call the external establishContact() function.

The establishContact() does not return anything either, it uses global variables initialized in

the setup() function. This function runs its own main loop that will loop until it receives data

from the flight computer. When it receives data, it will not reenter the loop, it will then return to

the Arduino main loop. While it is not receiving data, the establishContact() function will be

printing FGCU-1 out to the ground station one character at a time. A flow chart showing the

functions graphically is shown in Figure 7.

Power-up telemetry module

setup() loop establishContact()

Main loop()

The main loop will call the establishContact() after

sending data to the ground station

setup() calls establishContact(), the

Arduino normally runs loop() first when there are no previous function calls.

Data forLoop

The data is transmitted to the ground station

 

Figure 7: Satellite Software flowchart

Page 11: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 11 

 

4. Implementation

The fully assembled implementation can be seen in Figure 8, the overall setup is outlined in Figure 9.

Figure 8: Communication and Telemetry Module

Figure 9: Overall Setup for the communications and telemetry module

Page 12: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 12 

 

The telemetry module transmits and receives serial data via an RS232 connector from the

PC/Flight Computer. The Arduino board is also able to send that data along through the 9Xtend

board wirelessly to another 9Xtend board connected to the ground station. The 9Xtend board has

five pins that need to be connected to the host board in order to transmit and receive the data.

Pin 1 – Ground

Pin 2 – 5 Volts

Pin 5 – RX

Pin 6 – TX

Pin 7 - 5 Volts

The RX and TX lines of the 9Xtend board use a TTL voltage range of 5V-0V that is

compatible with the serial connections on the Arduino board. These connections can be made

directly to the Arduino board. The flight computer uses the standard RS232 protocol, which

does not use the TTL standard voltage ranges. These voltages can range from +13V and swing

all the way to -13V across the RX and TX lines. Because of this wide range of incompatible

voltages, a RS232-to-TTL adapter is necessary to connect the RS232 serial of the flight

computer to the serial port of the Arduino board. To connect all of these components together in

a way that allows for adjustment of components, is a standard sized breadboard. The breadboard

provides “rails” of pin holes that are connected together providing a common connection for

components without having to permanently solder down a design. (Figure 10)

Page 13: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 13 

 

 

Figure 10: Breadboard(all holes along the red and blues lines are connected, each numbered row is also 

connected and separated into two sections, a‐e and f‐j)

The Arduino’s 5V pin is connected to a common 5V rail on a breadboard. The ground pin is

connected to a common ground rail on the breadboard as well. As shown in Figure 11, the

common power rails power the 9Xtend module, the RS232 to TTL adapter, and the Arduino.

This power is supplied by the power command module that is being designed by another team.

For the purposes of this project, a standard USB A to B cable is used for both programming of

the Arduino and powering all of components. The Arduino is also capable of being powered by

an external supply of up to 18 V using its Vin barrel connector. The recommended range for that

power supply is 7-12v to avoid issues. [7] If the input voltage is below 7V, the 5V output of the

Arduino is not guaranteed to be stable or even 5V. If the voltage is higher than 12v, the voltage

regulator on the board may have overheating issues.

Page 14: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 14 

 

Figure 11: Module setup and connections

The RX/TX lines of the 9Xtend module are connected to the RX/TX lines of the serial2

port of the Arduino Mega. The RX and TX pins for this port are pins 17 and 16 respectively.

The RX pin of the Arduino is connected to the TX pin of the 9Xtend module. The TX pin of the

Arduino will be connected to the RX pin of the 9Xtend. The pins are visible in Figure 12.

Page 15: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 15 

 

Figure 12: Arduino Mega 2560 [7]

The RX and TX pins on the Arduino that is connected to the RX and TX pins of the

RS232toTTL adapter are pins 19 and 18 respectively. Similarly to the 9Xtend, the RX pin on the

Arduino is connected to the TX pin of the RS232toTTL adapter. The TX pin on the Arduino is

connected to the RX pin of the RS232toTTL adapter. Once these connections are made, the

software can then be loaded onto the Arduino for testing.

The first thing that must be done to program the Arduino is to install the Arduino IDE

software and the drivers for the FTDI chip that is on the Arduino. For instructions on how to do

this, please refer to this page: http://arduino.cc/en/Guide/HomePage (7). After successful

installation and setup of the Arduino IDE software, the first thing to do is to copy the satellite

source code as provided in Appendix A and paste it into the IDE. Save the sketch as a new file.

Click the upload button (highlighted in Figure 13) after ensuring the correct com port is chosen.

Once the upload is complete, you can then connect another computer or serial cable to the RS232

port on the module to communicate to another 9Xtend module.

Page 16: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 16 

 

 

Figure 13: Uploading a sketch to the Arduino board.

The 9Xtend development board used for testing and in this project has a RS232 serial

port for communications and programming. If the computer used for programming and

development does not have a serial port, it is necessary to procure a serial to USB cable for

communications with the module. The adapter needs to have the prolific 2303 USB-to-serial

adapter drivers installed. Once installed, the cable could be connected to the PC and recognized

as a new COM port. You can download and install the X-CTU software to be able to monitor

the serial port as well as program and configure the 9Xtend modules if necessary. The software

can be found here:

http://www.digi.com/support/productdetl.jsp?pid=3352&osvid=57&s=316&tp=5&tp2=0 [8] If

you are running Linux, the screen command will work to monitor communications from the

serial port.

The development board 9Xtend module was connected to a base station PC using a USB-

to-RS232 cable and powered by a 9V power supply. The serial monitoring software was opened

Page 17: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 17 

 

and the proper communications port was chosen. From another computer, a direct RS232 serial

connection is made to the communications and telemetry module, the port is opened, and sample

data can be transmitted through the port. The Arduino reads this data (up to a 128 byte buffer

that can be adjusted in the software) and then forwards that data into the 9Xtend module. The

Arduino 9Xtend module then makes a connection with the base station module and begins

transmitting the data. This data can be seen in the base station computer’s serial monitor.

Figure 14: Range test

Using this configuration, a range test was conducted. The 9Xtend module is advertised to

achieve an indoor range of up to 3000 ft. The path chosen to test this range was outdoors, but

without a clear line of sight. This lack of a clear line of sight would simulate an indoor

environment by providing obstructions such as buildings and trees. Figure 14 shows the path

taken to test the range of the 9Xtend module. The maximum range where communication was

achieved with no errors is shown as a green pin on the map. Using Google maps’ distance tool,

the range was measured to be about 2000 ft ± 20 ft.

Page 18: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 18 

 

The advertised range for this module with a high gain antenna and a clear line of sight is

40 miles. I was not able to test this range personally. A clear line of sight of 40 miles would

require the antennas to be several hundred feet from the ground and precisely pointed at each

other from that range.

Page 19: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 19 

 

5. Conclusion

The communications and telemetry module design is able to communicate up to 2000 ft

through several obstructions. The line of sight maximum range is undetermined. The equipment

necessary to test this was not available. Placing both antennas at a height of at least 100-200 feet

and attempting communication was not feasible in the environment I had available. The

southwest Florida terrain did not have readily accessible and well placed hills that could provide

adequate testing sites. The previous project tested and used a custom Yagi style antenna to try to

maximize the range of transmission. I was not able to adapt that antenna design to the Reverse

polarity Sub Miniature A (RP-SMA) connectors used by the 9Xtend modules due to time

restrictions. The Yagi antenna was also designed for the Active Robots RF telemetry modules

that were used with the first design. The RF modules used the 400 MHz frequency range instead

of the 900 MHz range used by the 9Xtend modules. The yagi is optimized for those frequencies

used by the Active Robots modules instead of the 9Xtend modules.

The module is powered by a 5V power supply. Arduino, RS232, and 9Xtend boards draw

less than a total of 2 W while the module is transmitting and while receiving, the entire setup

uses less than .5W total. Both are within specifications that were required in the problem

description.

Figure 15: Arduino Mega 2560 dimensions [9]

Page 20: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 20 

 

The physical size of just the Arduino Mega is 4000 x 3000 mils which is about 10.15 cm x

7.62 cm. According to the NASA document the 10 x 10 cm limit is approximate which should

allow for a small difference of only .15 cm. The weight is less than 300 grams including a basic

low gain antenna.

The code has plenty of room for improvement. It can be cleaned up and probably rewritten

to be more efficient.

Page 21: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 21 

 

6. References

1. Zabala, Jaime, et al. Florida University Satellite Project FOCSS Detailed Design Report. 

Department of Computer Science, Florida Gulf Coast University. Fort Myers : s.n., 2010. 

Detailed Design. 

2. CubeSat. CubeSat Mission Statement. CubeSat.org. [Online] 2011. 

http://www.cubesat.org/index.php/about‐us/mission‐statement. 

3. Florida Space Grant Consortium(FSGC). Florida Small Satellite ‐ FloSat. [Online] 2011. 

http://www.floridaspacegrant.org/. 

4. DMP Electronics Inc. eBox‐2300SX specification. DMP Electronics. [Online] 2008. 

http://www.compactpc.com.tw/ebox‐2300SX.htm. 

5. Phidgets Inc. 1018 PhidgetInterfactKit 8/8/8. phidgets. [Online] 2011. 

http://www.phidgets.com/documentation/Phidgets/1018Mechanical.pdf. 

6. Active Robots. RF Telemetry Products. Active Robots. [Online] 2011. http://www.active‐

robots.com/products/radio‐solutions/radio‐communication.shtml. 

7. Arduino. Arduino. Arduino. [Online] 2011. http://arduino.cc/en. 

8. Digi International. Digi. [Online] 2011. http://www.digi.com. 

9. Beckler, Matthew. arduino blog. Arduino. [Online] January 05, 2011. 

http://arduino.cc/blog/2011/01/05/nice‐drawings‐of‐the‐arduino‐uno‐and‐mega‐

2560/?lang=it. 

10. Aðalgeirsson, Sigurður Örn. Arduino ‐ Circular Byte Buffer. Siggi's Projects. [Online] 

September 2, 2010. http://siggiorn.com/?p=460. 

 

Page 22: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 22 

 

Appendix A. Arduino Project Code: satellite.pde

#include <ByteBuffer.h>

int inByte = 0;

int avail = 0;

int magVal = 0;

int magPin = 0;

int buffSize = 128;

ByteBuffer magBuff;

int timeDelay = 300;

void setup()

{

Serial1.begin(9600);

Serial2.begin(9600);

magBuff.init(buffSize);

establishContact();

}

void loop()

{

avail = Serial1.available();

Page 23: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 23 

 

if(avail > 0){

for(int f=0; f < 5; f++){

Serial2.print('0');

delay(timeDelay);

}

for(int i =0; i < avail; i++){

Serial2.print(Serial1.read(), BYTE);

delay(timeDelay);

}

for(int j = 0; j < magBuff.getSize(); j++){

Serial2.print(magBuff.get(),DEC);

delay(timeDelay);

}

magBuff.clear();

Serial2.flush();

Serial1.flush();

// for(int i=65; i<75; i++){

// Serial2.print(i,BYTE);

// Serial2.print(" ");

// delay(50);

// }

Page 24: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 24 

 

}

establishContact();

}

void establishContact(){

// Serial1.flush();

while(Serial1.available() <=0){

magVal = analogRead(magPin);

magBuff.put(magVal);

delay(5000);

Serial2.print('\r');

delay(timeDelay);

Serial2.print('F');

delay(timeDelay);

Serial2.print('G');

delay(timeDelay);

Serial2.print('C');

delay(timeDelay);

Serial2.print('U');

delay(timeDelay);

Serial2.print('-');

Page 25: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 25 

 

delay(timeDelay);

Serial2.print('1');

delay(timeDelay);

}

ByteBuffer.h

See reference [10]

Page 26: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 26 

 

Appendix B. Users Manual

This document outlines the steps necessary to connect the hardware together, install the

software and interface with the telemetry module necessary for successful communication. This

also outlines the steps to program the Arduino board with the software necessary for

communication between the host (ground station) 9Xtend module and the telemetry module.

This document assumes the host PC is a Microsoft Windows XP/2003/7 machine with the

newest service packs installed.

Hardware Setup for telemetry module:

In addition to a host PC, to set up the communications and telemetry module one needs

these parts:

1. (two) 9Xtend modules - one for the telemetry module and one for the

development board that will act as the host board on the ground station.

2. (two) 9V power supplies using a standard 2.1mm center positive barrel

connector to power both the 9Xtend module and the Arduino Mega

3. Arduino Mega 2560 – the Uno will not work since two serial interfaces

are needed (one for the 9Xtend board and another for the flight computer)

and the Uno only has one.

4. USB Type A to Type B cable

5. RS232 to TTL adapter (to connect the Arduino with the flight computer)

6. breadboard

7. (two) 900 MHz antennas for the 9Xtend boards

8. (two) USB-to-RS232 Serial adapters if the host PC does not have any

RS232 serial ports – one for the host module and one for the flight

computer serial port.

9. Several flexible breadboard pin wires for breadboarding the module

10. Arduino IDE – available at http://www.arduino.cc

11. X-CTU software for the configuration of the 9Xtend modules if necessary

– the modules should have a default configuration that allow them to

Page 27: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 27 

 

communicate out of the box. The Arduino serial monitor may be used if

one doesn’t need to configure the 9Xtend modules.

12. satellite.pde Arduino sketch available in the appendix section of the

project report.

13. ByteBuffer library available for download from the site listed in references

[10]

The Arduino, RS232-to-TTL adapter, and 9Xtend module will have to be set up

according to Figure 16.

Figure 16: Telemetry module setup

Page 28: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 28 

 

Figure 17: Breadboard

The breadboard provides connections to all of the components together. The +5V and

Gnd rails used are the two lines shown in red and blue in Figure 17. Red is +5V and blue is Gnd.

The +5V pin from the Arduino is to be connected to the red line of the breadboard supplying

power to both the RS232 and 9Xtend modules. The Gnd Pin of the Arduino is to be connected to

the blue rail for return current. There are two Gnd pins on the Mega, either one will work, for

example, the one closest to the 5V pin. This 5V is a regulated 5V supplied by the Arduino using

a built in voltage regulator on board that is supplied by the Vin on the back of the board from the

barrel connector. One can supply a 5V regulated source directly to this pin and power all of the

components on an outside power source and reduce the chances of the Arduino being overloaded

by the other devices it’s powering. If a 5V regulated source is provided, one does not need the

9V power supply for the Arduino.

The power and Gnd pins from the RS232-to-TTL adapter are connected to the +5V and

Gnd rails. Pin 7 and 2 from the 9Xtend are connected to the +5V rail, pin 1 is connected to the

Gnd rail. The RX2 pin on the Arduino is connected to pin 6 of the 9Xtend, TX2 is connected to

pin 5. TX-0 on the RS232-to-TTL adapter is connected to the RX1 pin of the Arduino, RX-I is

connected to the TX1 pin of the Arduino. The module setup is now complete.

Page 29: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 29 

 

Software setup for telemetry module

The first thing to do is to install the Arduino IDE to the host PC. Once the software is

installed, one is able to connect the Arduino using a USB cable. Windows will attempt to install

the drivers for the Arduino’s USB interface. When it fails and asks for the location of the

drivers, browse to the c:\arduino\drivers directory or wherever you installed the Arduino IDE

software earlier. If it doesn’t ask and simply fails, open the device manager in Windows and

right click on the Arduino Mega 2560 under the “other devices” directory. (See Figure 18)

Figure 18: Windows device manager screen

In that folder will be an INF file that Windows can use to install the drivers for the Arduino

Mega. After choosing this file (Figure 19), windows should successfully install the drivers as

Page 30: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 30 

 

well as assign a COM port to the Arduino Mega. Windows may show a warning about the

drivers not being signed, click install anyway.

Figure 19: Driver installation

 

Page 31: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 31 

 

Figure 20: COM port assignment

When the installation finishes (Figure 20), take note of the COM number windows has

assigned. This is the number you will choose in the Arduino software to program the Mega. In

the screenshot (Figure 20), notice at the top it was COM7 the demonstration host machine. The

number varies from machine to machine depending on which devices are already installed on

that machine.

You can now copy and paste the satellite.pde program code provided in the project report

into the IDE and save it to your drive. (Figure 21)

Page 32: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 32 

 

Figure 21: Arduino IDE

Click tools and then under choose board and then Arduino Mega 2560. Then click tools

again and then under Serial Port, choose the port that was assigned earlier. You must then copy

the ByteBuffer.h and ByteBuffer.cpp files (downloaded from Siggi’s site [10]) to a new folder,

“c:\arduino\libraries\ByteBuffer\” where c is the drive of your Arduino installation. You can

click the upload sketch button, the second from the left under the menu bar as can be seen in

Figure 21. If you hover the mouse over the icons, the name of the icon will appear, should the

icons be rearranged in future versions of the software.

Setup for the host (ground station) machine

For the host machine, if a Serial port is not available, the USB-to-Serial adapter drivers

must be installed and the adapter should be connected and assigned a COM port. Refer to the

manufacturer instructions of your particular device for directions on how to install. The drivers

to use for a Dynex USB-to-Serial adapter are the Prolific PL2303 drivers.

Follow these steps to put the communications to work:

Connect the 9Xtend development board to the Serial port of the host PC.

Connect power to the development board.

Open a serial monitor tool (hyper terminal, Arduino IDE serial monitor, etc) and choose

the appropriate port for the development board.

Page 33: Florida University Satellite Projectitech.fgcu.edu/.../cnt4104/projects/jorgereportfinal.pdfFlorida University Satellite Project Author: Jorge Ocañas Jr. Florida Gulf Coast University

P a g e  | 33 

 

Connect power to the Arduino board. The 9Xtend boards should now establish a

connection and begin communication.

Upon power-up, the Arduino board will send “FGCU-1” every few seconds until it receives

data from flight computer on the RS232-to-TTL adapter. When the Arduino board receives data,

it will store it in a buffer of up to 128 bytes, and then transmit what it has received over the

9Xtend wireless connection to the host at the ground station.