Documentation for Controller and Sensor

Documentation for Controller and Sensor

Rashmi Shah

METEOR IP 2006-07

Documentation for Controller and Sensor


The main controller in the IP was TI MSP430F169. The primarily purpose why this controller was found because it has what was needed. That is:

  • Enough analog ports for all the analog sensors.
  • I2C bus for digital sensors that were I2C compatible.
  • 2 USART which gave the opportunity to dedicate one UART to communication from ground control.
  • SPI Bus for interfacing with the SD card.
  • Enough other pins for other purposes.

Problems and Future change at System level:

One of the major problem that was encountered was that the signals coming out of the

Communication Buses and protocol

The main communication buses were I2C, SPI and UART. This is how the two available USART for distributed.

I2C: This bus was available only in USART0. The major sensors that were on this bus were: Temperature, Accelerometer, and Compass.

SPI: The SPI bus of USART1 is used for the purpose of interfacing with the SD card. All the connections required were laid out. However this was not implemented in software. In order to implement in software, please refer to:

This program works well. However modification needs to be made to make is not interrupt driven or interrupt every minute right after it has sent the data to the modem for radio transmission.

UART: The UART modes of both USART were used. USART0 UART is used to poll data from the GPS in the RX port. In the TX port it is supposed to transmit data to OSD system. However, because of the modification on the OSD system, this port was not used.

USART1 UART is used to TX data to the modem for radio transmission and RX ground control command through the modem.

The communication system as a whole worked like this: USART0 switched between I2C and UART for data acquisition from all the sensors. USART1 always stays on UART mode so that is always listening to ground. After every minute (70 sec to be exact) it sends data packet to the ground. (Future Improvement: Right after it sends packet to modem, switch to SPI mode and send the same data packet to the SD card).

COMMUNICATION PROTOCOL: Because of the complexity of AX-25 protocol, this protocol was not used. Hence APRS packet was not created. The data packet that was created was GPA packet of GPGGA form at 1200 baud. This is transmitted to the ground as plain text. (Future Consideration: Linux Kernal had AX-25 protocol implemented by Amateur radio: For further information, talk to Jim Stefano since he mentioned about this to me).

On Screen Display: The packet is created for OSD every 20 seconds. And the part of the package that is lined up to displayed on the OSD is sent to the OSD. Because of the modification in the OSD system, a pseudo SPI mode was made for the transmission of the data. One pin was used to generate a clock, one pin to send data and the third one went high to indicate to the OSD microcontroller that the data was being sent. Refer to software function: CreateOSDPacket, send, OSD_TX to see how the data was transmitted.

TV Transmitter: There are 3 pins dedicated to communicate with the new generation TV transmitter designed by Jessica DeSignor.

Sensor and Gps

GPS: The data from the GPS is acquired through UART at 4800 baud. This data was parsed to look for GPGGA and GPRMC format data. The data acquired from EM408 GPS are in the form:


Where RMC: Recommended Minimum Sentence C

005142.000: Time 00:51:42 UTC

A: Status A=active or void

4304.7754, N: Latitude 43 degree 04 minute 7754 sec N

07741.1764: Longitude 077 degree 41 minute 1764 sec W

0.27: Speed over ground in knots

218.44: Track angle in degree, true

100407: Data 10 April 07

Hence, RMC format is used for Time, Date, Latitude, Longitude, Speed and Heading data acquisition.


Where 169.3 is the altitude in m. So use this format to acquire altitude data.

Temperature: TI TMP100 I2C sensor was the first design. Although these sensors failed while prototyping. So Fairchild FM20 analog temp sensor was used in the platform. Although the schematic and layout does not include the modified analog sensor. The beauty of FM20 analog sensor was that the range of voltage output was form 0-2.5 V. MSP430 internal voltage reference was programmed as 2.5V (rather than 1.5). So no voltage divider was needed on this sensor. The analog sensor was data was received in 12 bit format by MSP430 so it was converted to integer with 2.5 being all 12 bits having value of ‘1’. This voltage was then converted to temp. Refer to datasheet and the code for this conversion.

Pressure: The original pressure sensor in the design was I2C compatible DSDX. But the company that sold the sensor never responded with a quote. So analog pressure sensor was used. The pressure sensor outputted in the range from 0-5V. Since MSP430 internal reference was 2.5V, a voltage divider was used (this is not on the layout. Modification was made in the PCB before the launch to fix this issue) to have the output of the pressure sensor to range between 0-2.5. For the formula to convert from voltage out to pressure in kpa, refer to datasheet. Two pressure sensors were used. This was because one of the pressure sensor did not do down to 0kPa. As this is will what the pressure would be at 100,000 ft, another pressure sensor was added to cover that range. After pressure has reached 20kPa, the pressure data from the other sensor is acquired.

Compass: The compass used was I2C compatible. However this was not implemented in the software. Since it was decided that GPS heading was more reliable than the data acquired form this compass.

Humidity: Humidity sensor was same as last year’s platform. This sensor outputs data in the range of 0-5V so voltage divider is used for this sensor too. However, the temperature data out of this thermistor sensor was not used because it was highly nonlinear and inaccurate.

Accelerometer: There is an on-board accelerometer that it I2C compatible.

Ground command

The main purposes of the ground control commands are switch between different cameras; turn on and off the transmitter. In future this will send PWM signal to rocket when command is sent and cutdown for zero pressure balloon when command is sent.

Camera Mux

There are three pins that is used to mux between different cameras. These line serves as MUX select signals.


For debugging purposes, MAX232 and the switch are on-board so when debugging needs to be done using the computer, MAX232 can be used.

Clock System

There are two crystals on board for various clock speed need. Although if the crystal is not used, then external resistor 100K is used for 2Mhz. This was used in the platform that was launched.

Other future improvements

One of the major problems was that MSP430 transmitted data between 0-3.3V and a lot of systems needed data with 0-5V range. Placing a up converter is recommended.