OBDH - ADCS Interface

Retrieving data

The ADCS system is currently connected to the board as follows.

[P1] Yellow Reset H2:24 P2.0
[P2] Red +3.3v H2:28 VCC_SYS
[P3,P5,P8] Black Digital Ground H2:30 GND
[P4] Green Channel 1 (Reading) H2:1 P6.7
[P6] Blue Max 10 (Control) H2:22 P2.2
[P7] White Max 9 (Control) H2:20 P2.4

The reset pin requires a 2 microsecond pulse, this has not yet been tested, however based upon the processor's clock speed it should be possible to do so using nop() processes. This will be tested with the logic analyser.

The following steps must be taken to cycle through each axis.

  • Set MAX 9 high, MAX 10 low
  • Read X value from ADC
  • Set MAX 9 low, MAX 10 low
  • Read Y value from ADC
  • Set MAX 9 low, MAX 10 high
  • Read Z value from ADC
  • Set MAX 9 low, MAX 10 low

The last instruction is necessary to prevent the boards output entering a transitional state which will cause problems with the ADCS.

Analysing data from the ADC

Output voltages from the ADCS system are currently estimated to fall between 1.3v to 1.9v when using 3.3v power. The ADC is capable of converting voltages within the range of ±2.5v natively, or alternatively more specifically using external reference voltages. To enable this reference voltage these bits in the registry ADC12CTL0 must be set: REFON=1 and REF2_5V=1. The reference voltage can be powered off when not in use to conserve power using REFON=0, however it requires 17ms to enable due to capacitor charge stabilising.

For a reference voltage range of 2.5v, the ADC output should represent the voltage input to an accuracy of 6x10-4v.

A program (ADCoutputconversion.c) is used to calculate the original voltage from the ADC output. It also converts that value to a temperature, should the temperature sensor be sampled.

All code can be found on our Google Code project.

ADCS accessing code

A description of each function in the ADC and ADCS accessing code can be found in the Function List

The MCU automatically ends the pulse that initiates samples and should not be done manually.

The ADCS Y axis has been successfully sampled with the output roughly matching the predicted values based upon a reference voltage of 0-2.5v on the ADC. A graph of the samples taken is shown below. There are large errors due to the possibility that the reference voltages or board voltages are inaccurate.

PLM-OBDH-ADCSGraph-210-1

Interfacing Testing

18/02/2009

The ADCS was tested using a source voltage of 5v (H2.26), it will need further testing with 3.3v (H2.27), which the ADCS team is using for their calibration tests.

A low accuracy voltmeter was used, the picologger should be used in future to increase accuracy and ensure that the voltage is stable by the time it is sampled.

Only the Y axis was sampled during this test, as values from the other axis' cannot be stored yet.

Increased delays were used, 10000 cycles for the ADC reference to stabilise and 50000 cycles for the ADCS voltage to stabilise (A few seconds in total).

A graph plotted confirms the correlation between vin and the output from the ADC.

The results for this test can be found in this spreadsheet.

11/02/2009

The modifed code ran correctly and produced a varying value from the ADC with a varying voltage from the ADCS. The value produced did not always decrease or increase with a corresponding increase or decrease of voltage, a graph plotted shows some correlation but does not confirm it.

This may be due to incorrect delays in the code used. Observation showed that after a manual reset of the board, the ADCS took several seconds to settle into the correct voltage. During the ADC sampling, the reading from the ADCS may also have varied, as very slight changes in its position changed the pd.

The test showed a greater range of values from the ADC than from the last test which is more coherent with the predicted vref- of 0v.

The code will be modified to include greater delays, the channel switching on the ADCS will also be removed to simplify testing.

The results for this test can be found in this spreadsheet.


Some useful reading (perhaps)
http://focus.ti.com/lit/an/slaa045/slaa045.pdf (Architecture and function of the msp430 14 bit adc)
http://cnx.org/content/m11850/latest/ (Adc converter of the msp430) - this is kind of a brief introduction, but might be a little gem

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.