9. Final Testing - alanbjohnston/CubeSatSim GitHub Wiki

CubeSatSim Test Plan

Here is this page in PDF

Using the CubeSatSim

After rebooting or powering up your Pi, tune your radio or SDR to 434.9 MHz (unless another frequency has been set) FM, and you should receive a signal. If you are testing with only the Pi (no CubeSatSim Main board plugged in), you will just hear the Morse Code (CW) of your callsign once (or the default AMSAT if you didn't supply one to the install script run the ‘CubeSatSim/config -c’ command). If you have build the Main board and plugged it into your Pi, you will hear telemetry signals as well after about 30 seconds.

On the Main Board, the green LED near the RBF switch and USB-C connector will be on when the CubeSatSim software is running. The red LED will illuminate when charging is occurring through the USB-C cable. The blue LED will illuminate when the CubeSatSim is transmitting.

The pushbutton with the pi-power-button software will cause the Pi to reboot, change telemetry mode, shutdown, or change command and control mode. Pressing and holding the pushbutton will make the green power LED blink first once, then two times, then three times, then four times, then five times, then blink slowly, then blink even more slowly. Depending on when you release the button, different things will happen. Here's what happens if you:

  • Press and release (don't hold button in at all): reboots CubeSatSim. The green LED will go out, and after 30 seconds, the CubeSatSim will be transmitting again.

  • Press and release after one blink of green LED: switches to mode 1 which is APRS/AFSK telemetry mode. After about 30 seconds, the telemetry mode will switch to APRS.

  • Press and release after two blinks of green LED: switches to mode 2 which is FSK/DUV mode. After about 30 seconds, the telemetry mode will switch to FSK.

  • Press and release after three blinks of green LED: switches to mode 3 which is BPSK mode. After about 30 seconds, the telemetry mode will switch to BPSK.

  • Press and release after four blinks of green LED: switches to mode 4 which is SSTV mode. After about 30 seconds, a Scottie 2 SSTV image will be transmitted instead of telemetry. The first image transmitted is a stored image. If a Pi Camera is installed and enabled, a camera image will be transmitted every 30 seconds after that. Otherwise, a second stored image is repeatedly transmitted.

  • Press and release after five blinks of green LED: switches to mode 5 which is CW mode. After about 5 seconds, the telemetry mode will switch to CW (Morse code).

  • Press and release after green LED begins slow blinking: shuts down CubeSatSim.

  • Press and release after green LED begins even slower blinking: changes the CubeSatSim command and control mode and reboots. If command and control via RF was ON, it will be turned OFF. If it was OFF, it will be turned ON after the reboot.

Once the CubeSatSim shuts down, the RBF pin can then be safely inserted. Removing the RBF pin will cause the CubeSatSim to start up again. It will use the same mode it was running when it was shutdown.

You can also change the telemetry mode using the command line. Typing CubeSatSim/config will show you the configuration options including how to change the mode. For example CubeSatSim/config -s will change to SSTV mode.

If you want to stop the CubeSatSim software, you can type these two commands:

sudo systemctl stop cubesatsim

sudo systemctl stop rpitx

After rebooting, the CubeSatSim software will start unless you disable it by typing:

sudo systemctl disable cubesatsim

You can then re-enable it on the next boot by typing:

sudo systemctl enable cubesatsim

Quick Test

:white_square_button: Start with the CubeSatSim shut down and the RBF pin inserted.

:white_square_button: Remove the RBF pin to turn on the CubeSatSim. Within 30 seconds, the Green LED should come on, and a few seconds later the Blue LED should begin to blink.

:white_square_button: On power up, the CubeSatSim will automatically transmit on 434.9 MHz (unless a different transmit frequency has been set using the CubeSatSim/config -F command in the Raspberry Pi) when the Blue Transmit LED blinks. The first thing it will transmit is a Morse Code (known as CW for Continuous Wave) ID of HI HI DE CALLSIGN with FM modulation. (CALLSIGN will the the callsign you set by entering the CubeSatSim/config -c command in the Raspberry Pi. If you have never set it, it will be the default AMSAT) Listen with a radio or SDR on approximately 434.9 MHz FM demodulation to hear the Morse code callsign.

:white_square_button: Depending on what mode the CubeSatSim is in, after the CW callsign, there will be delay of a few seconds or 30 seconds and then you should hear the telemetry or SSTV signal being transmitted. The Blue Transmit LED will sometimes be on, sometimes off depending on the mode.

:white_square_button: Open FoxTelem in your Ground Station. If it isn't already stopped, click the Stop button. Go under the File menu then Delete Payload Files and click OK. The data in the CubeSatSim-FSK and CubeSatSim-BPSK tabs will now be all zeros. The Telem Format must be set to BPSK 1200bps (Fox1E) in the Input tab of FoxTelem and then click the Start button.

:white_square_button: Set the CubeSatSim to BPSK mode (three blinks of the Green LED or by typing the CubeSatSim/config -b command in the Raspberry Pi) In the FFT window (red line), you should see the BPSK signal after the CW ID. Click on the center of the peak if it isn't already centered. Within a few seconds, the Frames count at the bottom of the window should increase by one every 4 seconds or so, and Payloads count at the bottom of the window should increase by three every 4 seconds..

:white_square_button: Click on the CubeSatSim-BPSK tab then on the Health tab, and you should see some non-zero data and the Telemetry Frames Decoded count in the top right should be increasing every 4 seconds or so. In the box labeled Battery, look at the field for Battery Voltage (V). This value should be in the range 3.5 V to 4.2 V. The Battery Current (mA) should be a few hundred milliAmps.

:white_square_button: In the box labeled Experiments, it should say STEM Payload Status OK and there should be non-zero values in the fields below it. In the +X Panel, +Y Panel, or +Z Panel boxes, at least one of the Acceleration values should be non-zero.

:white_square_button: Plug in the USB-C charger and make sure it is plugged into the wall and switched on. The red LED should illuminate. In the box labeled Battery, the Battery Current (mA) should be negative indicating the charging is happening.

:white_square_button: Under the Computer Hardware box, if the Camera field says OK, then the Pi Camera is detected. To test SSTV and see the camera images, set the CubeSatSim to SSTV mode (four blinks of the Green LED or by typing the CubeSatSim/config -s command in the Raspberry Pi) and around 434.9 MHz FM. Run the SSTV decoding software. The first image should be the AMSAT logo with a white background. After that, images from the Camera should be transmitted. Camera images (not stored) display your callsign (or the default AMSAT) and the battery voltage and current (simulated battery voltage is not displayed) in black text.

Command and Control Tests

:white_square_button: To test the RF Command and Control features, you will need a radio which can transmit a FM modulated carrier in the amateur radio UHF band (default is 435 MHz but can be changed with the CubeSatSim/config -F command in the range 420 - 450 MHz). Always obey your local radio transmission rules and regulations. Command and Control can be used to change the telemetry mode instead of the pushbutton or Pi command or turn the beacon on or off.

:white_square_button: Command and Control is turned off by default in the CubeSatSim software, so you will need enable it either by a Pi command or using the pushbutton. The Pi command is CubeSatSim/config -T and then type y for Yes. Using the pushbutton, press and hold the button in until the green LED blinks slowly then even more slowly. You can then release the pushbutton and the CubeSatSim will reboot and Command and Control mode will be enabled. You can verify the Command and Control state by the Pi command CubeSatSim/config and looking for the line Radio carrier command and control is ON

:white_square_button: Command and Control can be done when the CubeSatSim is not transmitting, after the CubeSatSim has started up and transmitted the CW ID. You can tell this by looking for when the blue transmit LED is off or by listening on the receive frequency (434.9 MHz is the default, unless it has been changed). If you transmit for a few seconds as soon as the blue LED goes off, you should see the green LED blink a few times, and then the green LED and blue LED will go out, and the CubeSatSim will reboot. The number of times the green LED blinks tells you the new mode, which will be the next mode in sequence (the sequence is the same as when you press and hold the pushbutton: APRS->FSK->BPSK->SSTV->CW->APRS)

:white_square_button: To turn off Command and Control mode, either use the Pi command CubeSatSim/config -T and then type n for No or using the pushbutton, press and hold the button in until the green LED blinks slowly then even more slowly and the CubeSatSim reboots.

:white_square_button: For more Command and Control tests including using DTMF and APRS, see Command and Control wiki page

Full Test

Complete the Quick Test above then these tests:

AFSK (APRS) Mode Tests

:white_square_button: Set the CubeSatSim to AFSK mode (one blink of Green LED or by typing the CubeSatSim/config -a command in the Raspberry Pi) and around 434.9 MHz FM (unless a different transmit frequency has been set using the CubeSatSim/config -F command in the Raspberry Pi), you should hear the CW ID and then within 30 seconds you should hear short APRS packets of about 2 seconds duration and see the Blue Transmit LED blink on and off with the packets.

:white_square_button: A radio with an APRS TNC or a Ground Station with Direwolf or the OpenWebRX Web SDR set to DIG (Digital) Packet around 434.9 MHz will decode the APRS telemetry packets

:white_square_button: One packet is sent about every 30 seconds.

:white_square_button: The packets should contain: the CALLSIGN with a suffix of -11 and latitude and longitude coordinates (Direwolf will print the latitude and longitude numbers. OpenWebRX will map it if you click on the icon). The values should be the ones you set using the Raspberry Pi command CubeSatSim/config -c for the callsign and CubeSatSim/config -l (lower case L) for the latitude and longitude, of if you never set them, they will be the default callsign AMSAT and the default coordinates of Washington, DC, AMSAT's headquarters.

:white_square_button: The APRS icon should be a satellite, unless Balloon mode has been set using the CubeSatSim/config -B command in which case the icon will be a balloon.

:white_square_button: The telemetry string should be displayed in the Comments field and should begin "hi hi" and then the battery voltage and current followed by a string with the sensor data.

FSK/BPSK Mode Tests

:white_square_button: Set the CubeSatSim to FSK mode (two blinks of the Green LED or by typing the CubeSatSim/config -f command in the Raspberry Pi) and around 434.9 MHz (unless a different transmit frequency has been set using the CubeSatSim/config -F command in the Raspberry Pi) FM, you should hear the CW ID and then you should hear the telemetry signal, which sounds like a low rumbling sound. If you zoom into the waterfall with an SDR, you can see two peaks, which represents the two binary values being transmitted.

:white_square_button: Set the CubeSatSim to BPSK mode (three blinks of the Green LED or by typing the CubeSatSim/config -b command in the Raspberry Pi) and around 434.9 MHz (unless a different transmit frequency has been set using the CubeSatSim/config -F command in the Raspberry Pi) FM, you should hear the CW ID and then you should hear the telemetry signal a few moments later, which sounds like a buzzing sound. If you zoom into the waterfall with an SDR, you can see a rounded peak. Note that to hear BPSK properly, you should demodulate with USB (Upper Side Band).

:white_square_button: For both FSK and BPSK, after the startup sequence, the signal will be transmitted continuously. The Blue Transmit LED will mostly be on, but will blink off every 4 seconds when a new frame of telemetry data is being sent.

FSK/BPSK Mode FoxTelem Tests

:white_square_button: In FSK or BPSK mode, FoxTelem version 1.09 or later will decode the telemetry. Having FoxTelem control an RTL-SDR or FunCube dongle is the simplest, although you might have to display the FFT (Fast Fourier Transform) spectrum (red line towards the bottom of the window) and click on the signal peak to tune it. The FFT spectrum is at the bottom of the Input tab and is a red line. If it isn’t displayed, select Decoder/Show FFT and the red FFT line will be displayed. You might also need to drag a divider bar up from the bottom if your screen resolution is low. You may need to enter the Center Frequency of 434840 in the kHz box before clicking Start (don't enter 434900). You can also use an SDR or radio to tune the signal (FM demodulation for FSK and USB for BPSK) with the audio fed into FoxTelem, although this can be trickier to get working, especially with BPSK.

:white_square_button: On boot, you can see the CW ID, then the telemetry signal around 434.9 MHz. It is a good idea to have "Find Signal" enabled. If you see either "Scanning" or "Faded" in light grey letters in the FFT window, this means Find Signal is enabled. If not, go under the File menu then Settings and under the Decoder Options check the box Find Signal then click Save. If you have never set your latitude and longitude in FoxTelem, you may need to do it before you can save the settings.

:white_square_button: To decode the telemetry in FoxTelem, you need to have the CubeSatSim-FSK and CubeSatSim-BPSK spacecraft added on FoxTelem version 1.09 or later. If they don’t appear as a tab, you can add them by selecting Spacecraft then Add then clicking on the CubeSat_Simulator_DUV.MASTER file to add CubeSatSim-FSK or CubeSat_Simulator_PSK.MASTER file to add CubeSatSim-BPSK.

:white_square_button: With the CubeSatSim in FSK mode (two blinks of Green LED or CubeSatSim/config -f Pi Zero command), telemetry is easily decoded just by centering the decode on the signal. The Telem Format must be set to Fox-1 200 bps DUV in the Input tab of FoxTelem and the Start button clicked. In the Input tab, the Frames and Payloads counts at the bottom of the window should increase by one about every 4 seconds.

:white_square_button: If you click on the CubeSatSim-FSK tab then on the Health tab, you should see some non-zero data and the Telemetry Frames Decoded count in the top right should be increasing.

:white_square_button: FoxTelem decodes three types of telemetry frames: RT (Real-Time, instantaneous sensor readings), MIN (Minimum values stored since the last reboot or reset), and MAX (Maximum values stored since the last reboot or reset). Values of 0000 indicates no data has been decoded for this type of frames. MIN and MAX frames are sent about every 5 frames, so it might take up to 40 seconds to have received all three types of frames in FSK mode. If one of the columns stays at 0 for all the values, it means that type of frame has not been decoded.

:white_square_button: The battery voltage (Battery Voltage (V), which means the three NiMH cells in series) should read in the range of 3.5 V to 4.2 V. If it is 3.9 V or higher, it is fully charged. If it is 3.7 V or lower, it is low on charge.

:white_square_button: The Temperature field under Computer Hardware should vary slightly with each frame decoded, indicating that new values are being received.

:white_square_button: Under Radio, the TX Antenna and RX Antenna should show as Deployed, although they will briefly show as Stowed in the first frame sent after powering up or changing modes.

:white_square_button: Under Computer Hardware, the I2C Bus fields show the status of the two I2C buses. The normal state for a CubeSatSim is I2C Bus 1 OK, and I2C Bus 3 OK.

:white_square_button: The Camera field will show OK if a Camera is plugged in and working correctly.

:white_square_button: Your CubeSatSim will normally be sending real telemetry, as indicated by the Simulated Telemetry OFF setting. It can be configured to generate and send simulated telemetry using the Raspberry Pi CubeSatSim/config -t command then typing y for yes. If I2C Bus 3 shows as FAIL, the CubeSatSim will automatically switch to simulated telemetry.

:white_square_button: Under Computer Software, Normal Mode should be OK, unless the battery voltage is below 3.55 V when it will show FAIL to indicate Safe Mode.

:white_square_button: Under Battery, the battery voltage will be in the range 3.5 V to 4.2 V.

:white_square_button: When running under batter power, the battery current will be in the range of 200 - 450 mA and will vary between samples.

:white_square_button: When charging with the USB-C charging cable or through the micro USB cable attached to the Pico, the current will be negative and the battery voltage greater than 4.0 V. When the battery is fully discharged, the battery charging current will be over 500 mA. When fully charged, the battery charging current will be less.

:white_square_button: When the USB-C charging cable is unplugged, the battery voltage will always decrease. When the USB charging cable is plugged in, the battery voltage will always increase. If the battery is charged, it will be close to 4 V.

:white_square_button: Under Battery2 , the voltage and current will read zero unless you have a second battery board on your CubeSatSim.

:white_square_button: The +X Panel, +Y Panel, and +Z Panel boxes show telemetry of the solar panel voltage, current, and acceleration (gravity). The -X Panel, -Y Panel, and -Z Panel only show voltage and current.

:white_square_button: A voltage of 0 indicates the sensor is unavailable. Under no illumination or with no solar panel plugged in, the voltage will read around 0.8 V to 1 V.

:white_square_button: Under room illumination, you will see a voltage of around 2 V.

:white_square_button: Under lamp illumination or sunlight, you will see a voltage up to 5 V.

:white_square_button: You will only see a non-zero current under lamp illumination or sunlight. LED lamp illumination will be less than 10 mA, while sunlight or halogen lamp illumination can be up to 200 mA. Halogen lamps put out lots of heat - don't leave the CubeSatSim in front of a halogen lamp for more than a few seconds.

:white_square_button: Similar data can be displayed in FoxTelem when the CubeSatSim is in BPSK mode and BPSK 1200bps (Fox1E) is selected for the Telem Format. MIN and MAX payloads are sent every frame for BPSK, so they will update faster. The WOD tab will not show any data.

Sensor Tests

:white_square_button: In FoxTelem, under Experiments, if at least one of the BME280 or MPU6050 sensors is functioning, it will say STEM Payload Status OK. If neither are plugged in or functioning, it will show as STEM Payload Status FAIL. If it is OK, there will be non-zero data at least one of the two sensors. The rest of the tests in this section assume the status is OK.

:white_square_button: If the CubeSatSim is at rest, the Rotation under the +X Panel, +Y Panel, and +Z Panel will be close to zero.

:white_square_button: If the CubeSatSim is moved or bumped, the Rotation values will spike, perhaps as high as +/- 50 dps (degrees per second).

:white_square_button: With the CubeSatSim on the turntable on the Low setting, the Rotation rate will be about 7 -9 degrees per second. If it is sitting upright (+Z Panel facing up), the Rotation value will the in the +Z Panel.

:white_square_button: Turn the CubeSatSim on its side on the turntable, and the rotation axis will change to the side that is facing up (e.g. +/-X Panel or +/-Y Panel)

:white_square_button: If it is tilted at an angle on the turntable, more than one Rotation axis will show a non-zero value.

:white_square_button: If it is rotating, the Green LED on the +Y side of the Pico board will illuminate, and be off if it is still.

:white_square_button: If the CubeSatSim is at rest, the Acceleration field in the +X Panel, +Y Panel, and +Z Panel will indicate which way gravity is acting on the CubeSatSim. If it is flat on one side, one value will be around 1 g while the others will be close to zero.

:white_square_button: If it is tilted, more than one axis Acceleration will show a value. If the CubeSatSim is jostled, the Blue LED on the +Y side of the Pico board will illuminate, and be off if it is not being sharply moved.

SSTV Mode Tests

:white_square_button: If in SSTV mode (four blinks of the Green LED, or typing the CubeSatSim/config -s command in the Raspberry Pi), the sound of SSTV tones should start after the CW ID around 434.9 MHz FM (unless a different frequency has been set with the CubeSatSim/config -F command in the Raspberry Pi)

:white_square_button: The Scottie 2 SSTV image should be easily decoded using MMSSTV or QSSTV, with a short break between images.

:white_square_button: If no Camera is plugged in or not working, the first image should be the AMSAT Logo on a white background after reboot or reset. Then, after that, every 30 seconds an image of the CubeSatSim will be transmitted on a black background as the Blue LED illuminates.

:white_square_button: If a Camera is plugged into the Pi Zero, the first image after reboot or reset will be the AMSAT Logo on a white background. After that, every 30 seconds, the Camera will take a photo, then that photo will be transmitted as the Blue LED illuminates.

CW Mode Tests

:white_square_button: If in CW mode (five blinks of the Green LED, or typing the CubeSatSim/config -m command in the Raspberry Pi), you should hear Morse Code (CW) transmitted around 434.9 MHz FM (unless a different frequency has been set).

:white_square_button: The CW will be HI HI then a sequence of numbers representing the telemetry.

Button Tests

:white_square_button: Pressing and holding the button until the Green Power LED blinks once will put the CubeSatSim into APRS mode after a reboot. If it is already in APRS mode, nothing will happen.

:white_square_button: Pressing and holding the button until the Green Power LED blinks twice will put the CubeSatSim into FSK mode after a reboot. If it is already in FSK mode, nothing will happen.

:white_square_button: Pressing and holding the button until the Green Power LED blinks three times will put the CubeSatSim into BPSK mode after a reboot. If it is already in BPSK mode, nothing will happen.

:white_square_button: Pressing and holding the button until the Green Power LED blinks four times will put the CubeSatSim into SSTV mode after a reboot. If it is already in SSTV mode, nothing will happen.

:white_square_button: Pressing and holding the button until the Green Power LED blinks five times will put the CubeSatSim into CW mode after a reboot. If it is already in CW mode, nothing will happen.

:white_square_button: Pressing and releasing button will reboot, and CubeSatSim will start back up in 40 seconds in the same mode.

:white_square_button: To power back up a CubeSatSim, remove the RBF pin. If it is not powered up and the RBF pin is removed, the battery might be drained. Plug in the USB-C charger or micro USB cable to Pico and it should power up.

Advanced Tests

Configuration Command Tests

Note: These tests are for custom configuration of your CubeSatSim by logging into the Raspberry Pi Zero.

:white_square_button: Log into your Raspberry Pi Zero using a micro USB cable or over WiFi using ssh. See Step 2 Software for how to do this.

:white_square_button: Verify your CubeSatSim configuration by typing CubeSatSim/confg. The current settings and configurations will be listed. See all the possible settings and diagnostics by typing CubeSatSim/confg -h. The output will list all the possible commands by letter (note some are upper case and others are lower case).

:white_square_button: Verify you can change modes using commands. Change to FSK mode by typing CubeSatSim/config -f Then, after verifying that it is in FSK mode, change to BPSK mode by typing CubeSatSim/config -b

:white_square_button: Change the callsign by typing: CubeSatSim/config -c then entering the callsign, such as W3YP, in all capitals then Return.

:white_square_button: Change the latitude and longitude by typing: CubeSatSim/config -l then entering the numbers then Return. Change to AFSK mode to verify that it changed.

:white_square_button: Test manually reading the current and voltage sensors by typing CubeSatSim/telem You should see seven readings.

:white_square_button: Do a scan of the I2C buses by typing CubeSatSim/config -S (capital S). You should see multiple sensors listed at different addresses on each bus.

:white_square_button: Turn on Simulated Telemetry by typing CubeSatSim/config -t then typing y for yes. In FoxTelem you will see Simulated Mode ON and also the values changing. Make sure you change it back by running m then typing n for no or you will be confused next time you run your CubeSatSim!

Battery Discharge Tests

:white_square_button: To test the battery discharge, keep running in BPSK mode for at least 10 minutes. In FoxTelem, you will see the battery voltage fall over time.

:white_square_button: Plug in the USB-C charging cable. The Red Charging LED will illuminate and FoxTelem or v will show a negative battery current indicating charging.

APRS or CW Telemetry Decoding Test

:white_square_button: With the CubeSatSim in APRS or CW mode, copy the telemetry string beginning with "hi hi" followed by a string of 3 digit numbers.

:white_square_button: Copy and pasting the telemetry string starting with "hi hi" into even rows of Data Input sheet of the telemetry spreadsheet (https://cubesatsim.org/telem) should show some currents, voltages, and temperatures. Note that only solar panel current is displayed, so only strong illumination will generate charging current.