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.
TESTING
Electrical Tests
Verify 3V3, 5V0 power testpoints report correctly when USB is plugged into the NUCLEO.
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.
LED test
Liveliness - verify that Error, Tracking, Heartbeat, CAN_TX/CAN_RX LEDs turn on and blink at 1 Hz.
CAN tests
Loopback - HEARTBEAT CAN message can be sent and received in loopback configuration.
With a secondary device - HEARTBEAT CAN message can be sent and received between two devices.
PWM tests
Liveliness - verify that the gate driver can be actuated at a known frequency.
Correctness - verify that driving the gate driver to a specific input results in the correct state of each switch.
Sensor tests
Liveliness - verify that measurements can be taken from each sensor.
Variance - verify that the measurements taken at known test conditions remain stable with low variance according to requirements.
Accuracy - verify that the measurements taken at known test conditions remain accurate according to requirements.
Boost test
Liveliness - verify that the converter boosts the output to an appropriate voltage when hooked up to a source and load.
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.
PID controller test
Liveliness - verify that the converter settles to a fixed boost ratio when hooked up to a source and a load.
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
Ensure that the electrical tests pass as described.
Ensure that the
fw/tests/led_test/main.cppis compatible with the hardware and reports in the code that it is for board revisionv0.2.0.Flash the program
fw/tests/led_testonto the STM32 Nucleo board.Plug in USB power.
The five onboard LEDs, marked HRTBT, TRACK, ERROR, CANTX, and CANRX should toggle at
1 Hzsimultaneously.
CAN Test Instructions
Ensure that the electrical tests pass as described.
Ensure that the
fw/tests/can_test/main.cppis compatible with the hardware and reports in the code that it is for board revisionv0.2.0.Set the defines according to the test context.
Loopback test:
__LOOPBACK__= 1.Interdevice test:
__LOOPBACK__= 0.Device A:
__DEVICE_A__= 1. (Sends)Device B:
__DEVICE_B__= 0. (Receives)
Flash the program
fw/tests/can_testonto the STM32 Nucleo board.Plug in USB power.
Loopback test
The five onboard LEDs, marked HRTBT, TRACK, ERROR, CANTX, and CANRX should flash at
1 Hzsimultaneously.
Interdevice test
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.
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
Ensure that the electrical tests pass as described.
Ensure
8Afuses are added to the PCB.Ensure that the
fw/tests/pwm_test/main.cppis compatible with the hardware and reports in the code that it is for board revisionv0.2.0.Set the defines according to the test context.
Checking liveliness:
PWM_DUTY= 0.5Checking correctness:
Observing slew delay:
PWM_DUTY= 0.5Low side switch closed, high side switch open:
PWM_DUTY= 1.0High side switch closed, low side switch open:
PWM_DUTY= 0.0
Flash the program
fw/tests/pwm_testonto the STM32 Nucleo board.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.
Plug in USB power.
Liveliness test
The CH3 signal should be toggling at 50% duty cycle, at 50khz frequency.
The high side output and low side output should be toggling at 50% duty cycle, at 50khz frequency.
Correctness test
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 of20ns, with both signals being low during the transition.When
PWM_DUTY= ..., the signal at CH1 should be high, and a multimeter should identify VSW and GND as being shorted.When
PWM_DUTY= ..., the signal at CH2 should be high, and a multimeter should identify VSW and VBATT as being shorted.