Testing (MPPT)

Testing (MPPT)

This test document is for V0.2.0 of the Sunscatter Gen II boards. Test instructions are not guaranteed to work with different versions of the hardware.


Electrical Tests

  1. Verify 3V3, 5V0 power testpoints report correctly when USB is plugged into the NUCLEO.

  2. Verify that 3V3, 5V0, 12V power testpoints report correctly when 12V is applied through the molex connector.


Firmware Tests

Test firmware can be found in the fw/tests folder. The tests should be loaded into MBED and flashed onto the NUCLEO that is plugged into the board prior to starting the test. Check whether the firmware listed in the main.cpp file matches that of this document prior to starting the test.

Tests are designed to build upon each other with minimal revision or changes in structure. I.E., the same functions and routines in sensor tests can be found in the following tests in the list.

  1. LED test

    1. Liveliness - verify that Error, Tracking, Heartbeat, CAN_TX/CAN_RX LEDs turn on and blink at 1 Hz.

  2. CAN tests

    1. Loopback - HEARTBEAT CAN message can be sent and received in loopback configuration.

    2. With a secondary device - HEARTBEAT CAN message can be sent and received between two devices.

  3. PWM tests

    1. Liveliness - verify that the gate driver can be actuated at a known frequency.

    2. Correctness - verify that driving the gate driver to a specific input results in the correct state of each switch.

  4. Sensor tests

    1. Liveliness - verify that measurements can be taken from each sensor.

    2. Variance - verify that the measurements taken at known test conditions remain stable with low variance according to requirements.

    3. Accuracy - verify that the measurements taken at known test conditions remain accurate according to requirements.

  5. Boost test

    1. Liveliness - verify that the converter boosts the output to an appropriate voltage when hooked up to a source and load.

    2. Performance - verify that the converter boosts at various input/output ratios and meets specific power transfer and efficiency requirements when hooked up to a source and load.

  6. PID controller test

    1. Liveliness - verify that the converter settles to a fixed boost ratio when hooked up to a source and a load.

    2. Stability - verify that the converter can accept input and output voltage noise of a known frequency and amplitude profile and remain stable according to requirements.

LED Test Instructions

  1. Ensure that the electrical tests pass as described.

  2. Ensure that the fw/tests/led_test/main.cpp is compatible with the hardware and reports in the code that it is for board revision v0.2.0.

  3. Flash the program fw/tests/led_test onto the STM32 Nucleo board.

  4. Plug in USB power.

  5. The five onboard LEDs, marked HRTBT, TRACK, ERROR, CANTX, and CANRX should toggle at 1 Hz simultaneously.

CAN Test Instructions

  1. Ensure that the electrical tests pass as described.

  2. Ensure that the fw/tests/can_test/main.cpp is compatible with the hardware and reports in the code that it is for board revision v0.2.0.

  3. Set the defines according to the test context.

    1. Loopback test: __LOOPBACK__ = 1.

    2. Interdevice test: __LOOPBACK__ = 0.

      1. Device A: __DEVICE_A__ = 1. (Sends)

      2. Device B: __DEVICE_B__ = 0. (Receives)

  4. Flash the program fw/tests/can_test onto the STM32 Nucleo board.

  5. Plug in USB power.

  6. Loopback test

    1. The five onboard LEDs, marked HRTBT, TRACK, ERROR, CANTX, and CANRX should flash at 1 Hz simultaneously.

  7. Interdevice test

    1. The HRTBT, ERROR LEDs should blink on Device A, and the TRACK LED should blink on Device B, in sync with each other. Based on the timing, they may blink alternatively or at the same time. The LEDs CANTX and CANRX should be on at all times.

    2. If both devices are not connected to each other, the ERROR LED on Device A will no longer turn off after one toggle.

PWM Test Instructions

  1. Ensure that the electrical tests pass as described.

  2. Ensure 8A fuses are added to the PCB.

  3. Ensure that the fw/tests/pwm_test/main.cpp is compatible with the hardware and reports in the code that it is for board revision v0.2.0.

  4. Set the defines according to the test context.

    1. Checking liveliness: PWM_DUTY = 0.5

    2. Checking correctness:

      1. Observing slew delay: PWM_DUTY = 0.5

      2. Low side switch closed, high side switch open: PWM_DUTY = 1.0

      3. High side switch closed, low side switch open: PWM_DUTY = 0.0

  5. Flash the program fw/tests/pwm_test onto the STM32 Nucleo board.

  6. Connect a logic analyzer (e.g. Saleae) to the board. Set CH1 to LOW side switch, with probes attached to SW1 and GND. Set CH2 to HIGH side switch, with probes attached to SW2 and VSW. Set CH3 to GATE signal, with probes attached to PWM and GND.

  7. Plug in USB power.

  8. Liveliness test

    1. The CH3 signal should be toggling at 50% duty cycle, at 50khz frequency.

    2. The high side output and low side output should be toggling at 50% duty cycle, at 50khz frequency.

  9. Correctness test

    1. When PWM_DUTY = 0.5, the signals at CH1 and CH2 should be alternating. With a high enough sample rate (> 5, 10MSPS), view the signals through the analog feature and zoom into the edge transitions. Both transitions should show a delay of 20ns, with both signals being low during the transition.

    2. When PWM_DUTY = ..., the signal at CH1 should be high, and a multimeter should identify VSW and GND as being shorted.

    3. When PWM_DUTY = ..., the signal at CH2 should be high, and a multimeter should identify VSW and VBATT as being shorted.