Project METEOR, Instrumentation Platform

Total Page:16

File Type:pdf, Size:1020Kb

Project METEOR, Instrumentation Platform

Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0 RIT Project METEOR: Instrumentation Platform MICROCONTROLLER Design Strategy of Processor Architecture The instrumentation platform is meant to go about 100K feet up in the atmosphere. The system will be subjected to random bit errors induced by cosmic radiation that would usually be filtered out by the earth’s atmosphere. The system needs to be designed so that it is tolerant to these errors. Research was done to address this issue by the previous instrumentation platform team. After considering all of the options, it was concluded that the costs of error-resistant hardware were greater than the potential benefits. Hence none of these options has been implemented at hardware level. However, redundancy was added in the software to make sure that the data obtained were valid. One the major changes at the microcontroller level was the decision to replace the existing PIC microcontroller with a TI MSP430. The advantages of using the MSP430 are numerous: source and destination addressing modes are encoded within the op code, which can yield dense code; and internal memory is accessible at both the word and byte level.

Design Strategy of Interrupt Subroutines The platform controller needs to be able to implement two special functions regardless of its current mode of operation. These two critical functions are:  Process a command sent by ground control  Send and APRS packet to TNC at regular intervals. One method of doing this was just adding these two functions in a loop and processing it with the other functions performed. This does not adequately represent the importance of these functions. Hence, the alternate method of interrupt subroutines has been chosen in order to execute the desired functionality. Since I2C was implemented in the platform and I2C is only available in USART0, USART1 was chosen for transmit and receive of data to and from the radio. This was done because if the USART is in a different mode and not monitoring the UART continuously, a command will get dropped and never processes. The interrupt vector for Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0 USART1 for receive is 3 and transmit is 4 i.e. lower than USART0 interrupt vector, all the other maskable interrupts vector beside watchdog timer was masked and hence not implemented. Commands sent by the ground control through the TNC have the highest interrupt priority. Whenever a command is sent, the controller goes into a subroutine and performs the desired action. Some of the important commands that are to be implemented in this subroutine are:  Switch between cameras, which will transmit the optimum view for different phases of operation  Reset the OSD screen in case it gets corrupted  Adjust the frequency of APRS packet transmission  Cutdown command, need to implement when a zero pressure balloon is used  Fire rocket command or other payload-specific commands The transmission of an APRS packet at a regular interval is important for the consistency in data acquisition. Hence this is also an interrupt subroutine in the program. If a certain amount of time has been passed since the last APRS packet was sent to the TNC, the controller is supposed to finish the current instruction it is working on and send the APRS packet. The advantage of making this an interrupt subroutine rather than including this in the loop is that the controller does not wait till it has gone through the whole loop to send the packet. Adding more code in the main loop, otherwise, would have increased the waiting period before the data is sent. Also when the data gets sent out to the ground, a copy of it is saved in the SD card as a back-up on the platform. For this the USART mode needs to be changed from UART mode to the SDI mode.

Design Strategy for Sensors For inputs from analog sensors that measure quantities such as temperature, pressure, acceleration, or humidity, sensor data needs to be converted into digital form and mathematical formulae needs to be applied to convert the data to an appropriate value before it can be appended to the APRS data packet. In order to do the conversion, precise voltage references need to be provided to the controller. There are various ways to create a precise reference. After experimenting with several these methods on the old platform, it was concluded that they were Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0 all unreliable. The MSP430 has an internal reference voltage, which can used to implement desired functions without adding external components. Hence the internal reference voltage will be used. Another caution that needs to be taken is giving enough time for the acquisition of data. The capacitor also needs to hold the data for long enough for the conversion to take place accurately. An appealing alternative method is to use only sensors that use the I2C mode of the USART which greatly reduce the load on the microprocessor. This will allow the processor to take on other functions that would normally require extra circuitry or even another controller to implement. Hence all the sensors that are compatible with I2C are used in this platform. Each of these sensors has unique address for the I2C bus. Since the temperature sensors have up to 8 unique address, 6 temperature sensors has been placed on this platform for 3 external and 3 internal thereby giving us triple redundancy. The pressure, humidity and compass sensors has only 1 unique address and since there is only 1 I2C bus in this microcontroller, only one of each sensors was placed. Thermistor sensor was one sensor that wasn’t found compatible with I2C bus. Hence this sensor is placed in an analog pin and the data is converted into digital through the ADC of the microcontroller.

Design Strategy for Crystals, GPS, OSD DATA and JTAG The internal clock of the microcontroller, DCO is an integrated ring oscillator with RC- type characteristics. As with any RC-type oscillator, frequency varies with temperature, voltage, and from device to device. Since our scenario requires vast fluctuations in temperature, the internal clock is not reliable. Hence external crystals are provided to provide precise frequency. There are two crystals, 32.768 KHz which will be used when the microcontroller is in low power mode and 7.2 MHz when the microcontroller is working in high speed. The GPS outputs in 4800 baud which is received by the UART0 and UART0 transmits to OSD in 4800 baud. The programming is done through JTAG. Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0 RIT Project METEOR: Instrumentation Platform Senior Design I, Created: 10/19/2006 List of Commands to be implemented COMMAND LIST DESCRIPTION $COSDS Recreate the OSD screen. Helpful if the OSD screen gets corrupted $VCAM1 Choose the camera channel 1. Desired in order to see particular view. $VCAM2 Choose the camera channel 2. Desired in order to see particular view. $VCAM3 Choose the camera channel 3. Desired in order to see particular view. $VCAM4 Choose the camera channel 4. Desired in order to see particular view. $VCAM5 Choose the camera channel 5. Desired in order to see particular view. $VCAMR Roll camera channel to the next one. $CUTDN Cut down the platform from the zero pressure balloon $APRSx Change APRS packet period to 10x seconds $TNCUx Change APRS packet in TNC refresh period to 2x seconds $CAMPx Change Video Camera Channel Roll period to 20x seconds $NAMES Print names of the team members $TESTS Testing the Command Functionality $FIRER Fire the Rocket $RESET Resets the Microcontroller

Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0 RIT Project METEOR: Instrumentation Platform MSP430 Software Outline Main Software Functions: 1. Transmit APRS Packet  Prepare the packet i.e. append the sensors data at the end of GPS data  Transmit data to UART for transmission to Tiny Track 2. GPS Data  Get GPS data in UART if the GPS string line is GPGGA and GPRMC  Read Time, Speed and Course from the GPRMC format and store it  Read Latitude, Longitude and Altitude from the GPGGA format and store it 3. Sensor Data  Get Data from various locations  Convert the data to Digital format if the incoming data is in Analog format  Prepare to put all the data in the packet 4. On Screen Display  After the data has been collected from GPS and all the sensors, send OSD all the data in packet form 5. Camera Control and Data  If the timer counter for camera roll has expired, roll the camera to the next one. Should be able to switch between 5 different cameras

Interrupt Subroutines 1. Command from ground control  If the command has been received from the ground control, interrupt occur  Check if the command is valid, if yes process it 2. APRS Packet Send to TNC Interrupt Subroutine  Has enough time passed after the last APRS packet was send, send the packet  Change from UART Mode to SDI Mode and Resend the Data to the SD Card

Rashmi Shah Senior Design I Created on 11/3/2006 11:00:00 AM Modified 11/02/2006 Rev. 2.0

Recommended publications