Skip to main content

Subsystem Verification (SSV)

DOCUMENT SCOPE

The aim of this document is to explain the subsystem verification tests to carry out on Attitude Determination & Control Subsystem, in order to obtain/discard any anomaly that the subsystem could suffer during the performance of these test.

TEST 1: Electrical check

Test Description and Objectives

The aim of this test is to verify that none of the components or connections were damaged during assembly, ensuring the integrity and reliability of the board. This involves checking for any physical defects or misalignments that could impact performance, as well as measuring electrical parameters to ensure that the components operate efficiently. Conducting this test helps to identify any potential issues that could lead to failure in the field, thereby ensuring the overall functionality and longevity of the assembled device.

Requirements Verification

Requirement IDDescription
ADCS - SSV - 00All external physical aspects, such as scratches, soldering, or joint issues, of the PCB must be inspected.
ADCS - SSV - 01Each lateral pin must establish a secure connection.
ADCS -SSV - 02All active components must be ensured to operate correctly, with no short circuits or open connections, and each pin, must meet the specified value.
ADCS -SSV - 03The positioning and fitment of each component mounted on the PCB must be verified.

Test Set-Up

  • ADCS payload full soldered
  • Microscope
  • Power Supply
  • Wires
  • Soldering machine
  • Tin
  • Flux
  • Multimeter
  • Calculator, pen and paper
  • Laptop

Pass/Fail Criteria

In order to pass the test all the requirements must be met.

Test Plan

**Step ID****Description**
Test1 - 10With the help of the microscope, look at the PCB looking for any outer physical parameters, such as scratches, soldering or joint issues. If any anomaly is detected, re-solder or fix the encountered error.
Test1 - 20Check the correct connection with the corresponding component of the 40 pins (10 in each lateral side) with the multi-meter.
Test1 - 30Check the value with the multi-meter of all the passive components and compare it to the one in the schematic.
Test1 - 40Verify the active components, checking one by one all the pins with the multi-meter in order to find shorts, open ends, and correct connections among the various pins.
Test1 - 50Check the connections between all of the components and pins of the PCB.

Test Results

The test for the ADCS PCB has been done during the 09/03/2023.

The test passed the visual inspection since the outer physical checking was successful.

The pins', passive and active components' connectivity were successfully accomplished considering that there were no open ends or shorts, and the component values were correct.

The in-circuit testing was passed since the connections between all of the components and pins of the PCB were verified.

Anomalies

Power Supply problems

Problem encountered: When putting the 3.3V into the 3.3_PERM pin of the PCB, the voltage measured in the pin is not 3.3V. Follow these steps:

  1. Check the board again with the multimeter searching for any short circuit
  2. Check the schematic to see if there is any mistake
  3. If not anomalies are detected, resolder the PCB

Solution:

Once the first two points were made and since the problem was no resolved it became necessary to desolder certain blocks of the PCB, with the operational amplifiers being the first among them. After removing the amplifiers the voltage was tested using a multimeter, marking the needed 3.3V.

Conclusions

The PCB passed the electrical test and is ready to do more complex tests.


TEST 2: GYROSCOPE

Test Description and Objectives

The purpose of this test is to validate that the gyroscope integrated into the PCB operates in accordance with the specified requirements and successfully communicates with the computer using the I2C protocol. This includes assessing the gyroscope's performance metrics and ensuring reliable data transmission between the gyroscope and the computer.

Requirements Verification

Requirement IDDescription
ADCS - SSV - 10The gyroscope must be tested using a reliable tool capable of reproducing constant angular velocities accurately.
ADCS - SSV - 11The gyroscope must be able to switch between specific full scale ranges of angular velocities.
ADCS - SSV - 12The gyroscope produced bits, must be translated in degrees per second or radians per second.
ADCS - SSV - 13The data from the gyroscope must closely match the theoretical value corresponding to the rotation of the rotary platform.

Test Set-Up

  • ADCS PCB
  • STM32L476RG nucleo board
  • Power Supply
  • Wires
  • Multimeter
  • Oscilloscope
  • Calculator, pen and paper
  • Reliable tool capable of reporducing constant angular velocities. In example a rotating platform with motor.
  • Power supply.
  • Chronometer, you can use a mobile application
  • Desired programming software used, in this test STM32CubeIDE is used

Pass/Fail Criteria

The gyroscope will be verified if the requirements mentioned before are fulfilled. If in one of them it is detected any anomaly it will have to be corrected, otherwise the board can not pass to the other tests.

Test Plan

**Step ID****Description**
Test2 - 10Connect the power supply to the STM32 nucleoboard.
Test2 - 20Open the STM32CubeIDE program.
Test2 - 30Prepare a code that can read from the gyroscope using I2C.
Test2 - 40Connect the nucleoboard to the ADCS PCB correctly.
Test2 - 50Run the code into the nucleoboard in the debug mode checking step by step if the connection with the ADCS board is working correctly.
Test2 - 60Connect the rotating platform with motor to the power supply, inject the voltage and intensity needed for the proper operation of the engine.
Test2 - 70Place the gyroscope in the rotation platform and run the code. Write down the values of the data.
Test2 - 80Measure with the chronometer how long the platform takes in rotating 360 degrees, then compute how many degrees per second it is equivalent to.
Test2 - 90If the values of the gyroscope and the computed value corresponds with the values computed before, the gyroscope is working correctly.

3.5.1 I2C communication and registers

The device address of the IIM-42652 is AD = 0b1101000X where the last bit "X" is chosen depending in what function we are conducting in the chip register, reading X=1 or writing X=0.

The registers modified and used in the code are the following ones:

**REGISTER NAME****ADDRESS****FUNCTION**
SENSOR\_CONFIG00x03Disables and enables the gyroscope axis.
 PWR\_MGMT00x4EEnables and disables all sensors of the chip. We are only enabling the temperature sensor and the gyroscope.
GYRO\_CONFIG\_STATIC20x0BDisables and enables Anti-Aliasing/low pass filter and notch filter. In our case we are using only the Anti-aliasing and low pass filter.
GYRO\_CONFIG00x4FConfiguration register for the gyroscope, the full scale range and the ODR frequency can be modified. We are using the default frequency of the ODR and a full scale range that fluctuates depending on the situation (this can't be configurated via registers, it has to be coded).
GYRO\_DATA\_X1/X00x25/0x26X1: Upper byte of Gyro X-axis data. X0: Lower byte of Gyro X-axis data.
GYRO\_DATA\_Y1/X00x27/0x28X1: Upper byte of Gyro Y-axis data. X0: Lower byte of Gyro Y-axis data.
GYRO\_DATA\_Z1/X00x29/0x2AX1: Upper byte of Gyro Z-axis data. X0: Lower byte of Gyro Z-axis data.
TEMP\_DATA1/00x1D/0x1EX1: Upper byte of temperature data. X0: Lower byte of temperature data.

For more information about I2C and registers read the datasheet of the IIIM-42652.

An implementation of a register reading:

    /*Device address*/
    uint8_t IIM_GYRO_ADR = 0x68;
    /*Device actions*/
    uint8_t IIM_GYRO_READ = (0x68 <<1)|0x1
    uint8_t IIM_GYRO_WRITE = (0x68 <<1)
    /*Registers addresses*/
    uint8_t GYRO_DATA_X1_UI = 0x25;
    /*Data buffer declaration*/
    uint8_t buflenght =6;
	uint8_t buf[buflenght]; 
    /*Config register of the chip*/
    buf[0]=GYRO_DATA_X1_UI; 
    /*I2C Transmision*/
    HAL_I2C_Master_Transmit(status.i2c_h, IIM_GYRO_WRITE, buf,1,HAL_MAX_DELAY );
    /*I2C Reception*/
    HAL_I2C_Master_Receive(status.i2c_h /*I2C pointer*/ ,IIM_GYRO_READ,buf,1,HAL_MAX_DELAY);

An implementation of a register writing:

    /*Device address*/
    uint8_t IIM_GYRO_ADR = 0x68;
    /*Device actions*/
    uint8_t IIM_GYRO_READ = (0x68 <<1)|0x1
    uint8_t IIM_GYRO_WRITE = (0x68 <<1)
    /*Registers addresses*/
    uint8_t PWR_MGMT0 = 0x4E;
    /*Register modifications*/
    uint8_t SET_GYRO_LOWNOISE_MODE = 0x0C;
    /*Data buffer declaration*/
    uint8_t buflenght =6;
	uint8_t buf[buflenght];             
    /*Bits to modify in the register*/
    buf[0]=PWR_MGMT0;
    buf[1]=SET_GYRO_LOWNOISE_MODE; 
   /*I2C Transmision*/
  HAL_I2C_Master_Transmit(status.i2c_h/*I2C pointer*/, IIM_GYRO_WRITE, buf,2,HAL_MAX_DELAY);

3.5.2 Data acquisition

The output of the gyroscope only give us an integer of 16 bites. In order to convert the integer into data, you have to divide the integer, where you have stored the data of the axis, by the sensitivity scale factor corresponding to the full-scale range that is used to measure the current data. The result will be the gyroscope rotation in degrees/second.

Test Results

The following data has been obtained in each axis of the gyroscope:

x_nocalibrated.jpgy_nocalibrated.jpgz_nocalibrated.jpg

The obtained data is not calibrated, therefore, a calibration test has been made.

Conclusions

With all requirements met, the gyroscope has successfully passed the test, and the ADCS PCB is now prepared for further testing.


TEST 3: Magnetometer

Test Description and Objectives

The purpose of this test is to validate that the Magnetometer integrated into the PCB operates in accordance with the specified requirements and successfully communicates with the computer using the I2C protocol. This includes assessing the Magnetometer's performance metrics and ensuring reliable data transmission between the Magnetometer and the computer.

Requirements Verification

Requirement IDDescription
ADCS - SSV - 20The magnetometer data for each axis should display an elliptical shape.
ADCS - SSV - 21Test measurements should be conducted in an area free from any potential magnetic sources.

Test Set-Up

  • ADCS PCB
  • STM32L476RG nucleoboard
  • Power Suppply
  • Wires
  • Multimeter
  • Oscilloscope
  • Calculator, pen and paper
  • Laptop
  • Magnet

Pass/Fail Criteria

The magnetometer will be verified if the requirements mentioned before are fulfilled. If in one of them it is detected any anomaly it will have to be corrected, otherwise the board can not pass to the other tests.

Test Plan

**Step ID****Description**
Test3 - 10Prepare the power supply with 3.3V and 800mA.
Test3 - 20Connect the power supply to the PCB.
Test3 - 30With the help of the multimeter, check that the VCC inputs pins has the correct value.
Test3 - 40Disconnect the power supply and turn it off.
Test3 - 50Turn on the computer and open the STM32CubeIDE program.
Test3 - 60Prepare a code that can read from the magnetometer using I2C.
Test3 - 70Connect the nucleoboard to the ADCS PCB using SCL and SDA pins.
Test3 - 80Run the code into the nucleoboard and look in the memory register to see if the communication between the nucleo and the PCB has been done.
Test3 - 90Run again the code and conduct measurements of the magnetometer being rotated randomly to all directions.

4.5.1 I2C communication and registers

The device address of the MMC5983MA chip is the AD=0b0110000. The following registers are modified and used in the code:

**REGISTER NAME****ADDRESS****FUNCTION**
Internal Control 00x09This register is mainly used for initiating a measurement event of the magnetic field or the temperature. Among other things.
Status 0x08This register is used for checking if the measurement event of the magnetic field or the emperature, is completed.
Xout0, Yout0, Zout00x00, 0x02, 0x04X,Y,Z-axis output in unsigned format. Bits \[17:10\]
Xout1, Yout1, Zout10x01, 0x03, 0x05X,Y,Z-axis output in unsigned format. Bits \[9:2\]
XYZout20x06X,Y,Z-axis output in unsigned format. Bits \[1:0\]

For more information about I2C and registers read the datasheet of the MMC5983MA .

4.5.2 Data acquisition

The registers will provide a 18 bits number. This

3.5.2 I2C Problem

5. Posible errors

If the error is in the Start Flag of the I2C communication, check if you are using the correct hi2c Pointer to a I2C_HandleTypeDef structure that contains the configuration information for the specified I2C.

If the error is in the Stop Flag of the I2C communication, the ADCS board is not responding, follow the steps of the section

Test Results

 WhatsApp Image 2024-10-25 at 2.53.34 PM (1).jpegWhatsApp Image 2024-10-25 at 2.53.34 PM.jpeg

The obtained data is not calibrated, therefore, a calibration test has been made.

Anomalies

With the electrical test complete and all hardware functioning properly, if measurements remain unchanged or varely do not change. Try exciting the magnetometer with a magnet. Bring the magnet close to the magnetometer chip and rotate the PCB randomly. This should resolve the issue.

Conclusions

With all requirements met, the gyroscope has successfully passed the test, and the ADCS PCB is now prepared for further testing.


TEST 4: Photodiode and Operational Amplifiers

Test Description and Objectives

The purpose of this test is to validate that the Photodiodes integrated into the lateral boards operate in accordance with the specified requirements. The Photodiodes block include the Operational amplifiers and also the photodiode multiplexer. The test involves evaluating the performance metrics of the photodiode and ensuring dependable data transmission between the magnetometer and the computer.

Requirements Verification

Requirement IDDescription
ADCS - SSV - 30The photodiodes must only generate current proportional to the exposed light source. If there is no light source the photodiode must not generate any current.
ADCS - SSV - 31The operational amplifiers must convert the provided intensity of the photodiodes into voltage and amplify the signal.
ADCS - SSV - 32The analog to digital converter of the STM32 must convert the output of the operational amplifiers into bits.

Test Set-Up

  • ADCS PCB
  • Photodiodes
  • Multimeter, alligator clips ,cables and jumpers for the connection between the photodiodes and the ADCS board.
  • Power supply
  • A computer
  • Black coated box.
  • An halogen bulb with its correct power source.
  • Rotating platform.

Test Plan

**Step ID****Description**
Test4 - 10Prepare the black coated box with the halogen bulb inside in one side of the box.
Test4 - 20On the other side prepare the photodiode on the rotating platform pinting towards the halogen bulb.
Test4 - 30Turn on the bulb and measure the output value with the help of a multimeter.
Test4 - 40Connect the photodiode to the operational amplifier and repeat stem 3.
Test4 - 50Connect the rotating platform to a power supply and do a complete round measuring the data and storing it in the computer. You can use the Analogic inputs from the STM32 board.
Test4 - 60Repeat the previous step, but in this case with the platform rotating in the opposite direction.
Test4 - 70Repeat step 4. and 5. rotating the photodiode 90 degrees.
Test4 - 80Plot the results.

Photodiode test.jpg

Connection schematic

The schematic is simple, the pinouts SEL_PH from the vertial connectors of the ADCS board control the photodiode multiplexer. In the following picture you will have the truth table of the photodiode multiplexer used:

tmux chose.JPG

Pin A0 corresponds to SEL_PH0, A1 to SEL_PH1, and A2 to SEL_PH2. For this test, the output required is S2.

chematic.png

Test Results

Ph_2V5_normal.jpgPh_2V5_90.jpg

Ph_menos2V5_normal.jpgPh_menos2V5_90.jpg

In this test, data was measured with a sampling frequency of 100 milliseconds, and the power supply for the rotating platform was set to 2.4 volts. The Y-axis represents the voltage levels recorded and quantified by the STM32, while the X-axis indicates time in seconds.

Regarding the plots, it can be observed that the photodiodes generally measure similar maximum power gains. However, in the bottom left plot, where the photodiode is oriented in the opposite direction of rotation at 0 degrees, the maximum power detected is significantly higher than in the other cases.

Anomalies

INo anomalies has been found in the test.

Conclusions

The photodiode and operational amplifier have fullfilled all the requirements so that, the test has been completed.


TEST 5: Magnetorquer actuator

Test Description and Objectives

The aim of this test is to verify that when the computer communicates with the magnetorquer actuator, specifying a current and the output pin, the output value of this block generates a constant current flow with the value and in the output pin what it was specified.

Requirements Verification

Requirement IDDescription
ADCS - 31Sensor correctly supplied with 3.3V
ADCS - 32The device need to establish a connection with the computer using I2C
ADCS - 33The output values of the magnetorquer actuator block must be a constant current, with the specified value

Test Set-Up

  • ADCS payload
  • STM32L476RG nucleoboard
  • Protoboard
  • Resistances of 10K, 20K and 30K Ohm
  • Power Suppply
  • Wires
  • Multimeter
  • Oscilloscope
  • Mobile Phone
  • Calculator, pen and paper
  • Laptop with STM32CubeIde and Ki-Cad installed

Pass/Fail Criteria

The magnetorquer actuator block will be verified if the requirements mentioned before are fulfilled. If in one of them it is detected any anomaly it will have to be corrected, otherwise the board can not pass to the other tests.

Test Plan

**Step ID****Description**
Test5 - 10Prepare the power supply with 3.3V and 800mA.
Test5 - 20Connect the power supply to the PCB using the ADCS\_POWER input.
Test5 - 30With the help of the multimeter, check that the VCC inputs pins has the correct value.
Test5 - 40Disconnect the power supply and turn it off.
Test5 - 50Turn on the computer and open the STM32CubeIDE program.
Test5 - 60Prepare a code that can configure the output values and pins of the BD2606MVV.
Test5 - 70Connect the nucleoboard to the ADCS PCB using SCL and SDA pins.
Test5 - 80Run the code into the nucleoboard and look that the write and read functions return a "HAL\_OK" value, confirming the correct communication.
Test5 - 90Disconnect the nucleo board.
Test5 - 100Connect a protoboard to the output LEDA1 and to the 10K Ohms resistance.
Test5 - 110Prepare the code in order to configure the output with 1 mA and to the output LEDA1.
Test5 - 120Connect the nucleo board and run the code.
Test5 - 130With the help of the multimeter validate that the current is 1 mA.
Test5 - 140Disconnect the nucleo board and change the resistance to the 20 Ohms one.
Test5 - 150Connect the nucleo board and run the code.
Test5 - 160With the help of the multimeter validate that the current is still 1mA.
Test5 - 170Repeat the same process with the 30 Ohms resistance.
Test5 - 180Repeat the steps from 9 to 17 with the 6 outputs and for current valors of 10 mA, 20 mA and 35 mA.

3.5.1 Code

The first thing that it is necessary to look at is the device address of BD2606MVV. This address can be found in page 7 of its datasheet or in the I2C address map from the nanosatlab wiki. This address is the "1100110". In the register map on page 8 of the datasheet it can be seen the memory register address for the configuration of the output pins:

LEDA1: 0x03, Data: D0 LEDB1: 0x03, Data: D2 LEDC1: 0x03, Data: D4

LEDA2": 0x03, Data: D1 LEDB2": 0x03, Data: D3 LEDC2": 0x03, Data: D5

In the same page it can be seen the address for the current settings of the leds output:

imagen.png

Lastly, on page 9 of the datasheet it is shown a with the address to configure the current value.

The protocol that it is followed by the device is the basic protocol on the I2C communications :

Gyro_Protocolo.png

A possible code implementation is the following one:

imagen.png

3.5.2 I2C Problem

There is a problem with the I2C communication that makes the code fail. To solve this problem the next tests has been done:

1. Verify the connections

All the I2C connections are well connected with the corresponding PINS

2. Check the components

The components connected are the corresponding ones and in the correct positions according to the Ki Cad schematic. Furthermore no component has any short circuit.

3. Verify the addresses of the device

The device address is the correct one. It can be seen in the I2C Addresses document of the nanosatlab wiki or in the datasheet of the device

4. Check step by step that all the connections are working fine

  • Disconnect the intern pull up / pull down resistances of the nucleoboard and connect it in a protoboard with a value of 20K ohms. Check now the SCL transmission with an oscilloscope
  • The SCL signal was correctly seen in the oscilloscope
  • Check now the SDA transmission and check that it is transmitting the correct address of the sensor device
  • The transmission of the SDA line, send by the nucleo board, is correct.
  • Connect now the PCB, if it do not have its own pull up resistance connect it using the protoboard and the 20Kohms resistances.
  • With the oscilloscope check if the device is responding The device is not responding with the expected ACK

Test Results

Anomalies

The anomalies detected during this test is the I2C problem, that are explained in detail in 3.5.2

Conclusions

This test remains to be redone with a more deeply debug proce