Phase 1B - CR03 Behaviour

From XinaBox Wiki!
Jump to: navigation, search

State Machine Operation

The CR03 ☒CHIP operates as a Finite State Machine during boot.

The CR03 has two possible states namely:

1 - Ground Station: The Ground Station is responsible for communicating with the WeatherSat for data retrieval.

2 - WeatherSat: The WeatherSat collects data as it travels through the clouds and accepts commands wirelessly sent over RF using a LoRa radio.

The CR03 is programmed to operate in the State 2 - WeatherSat on a timed default. Once booted the CR03 will remain in an idle state waiting for an acknowledge signal from the CW01. This idle state is will remain active for 10 seconds. Once the 10 seconds has elapsed the CR03 will move into State 2 - WeatherSat. If an acknowledge is received from the CW01 the CR03 will immediately move into State 1 - Ground Station.

RGB Debugging

Once booted the CR03 is in an idle state awaiting an acknowledge signal to be sent from the CW01. During this idle state, the RED LED on the RGB LED will light up.

Once a state transition has occurred, the RED LED will power down. When in State 2 - WeatherSat the BLUE LED will power on, this indicates that the state has been locked. When in State 1 - Ground Station the GREEN LED will power on, this indicates that the state has been locked.

During radio transmissions when in State 1 - Ground Station, a flashing BLUE LED indicates successful data transmission. In State 2 - WeatherSat a flashing GREEN LED indicates successful data transmission. In both cases, a solid RED LED indicates that the CR03 has received no feedback or commands.

In the case of a faulty or broken radio, the RED LED will flash at a frequency of 10Hz continuously.

Serial Debugging

In State 1 - Ground Station the CR03 outputs no data over the UART as this is occupied by the CW01 for debugging.

In State 2 - WeatherSat the CR03 will output its Radio ID, state, commands received over the radio and the reply sent to the ground station.

I2C Communication

The CR03 ☒CHIP operates as a I2C slave in State 1 - Ground Station. Accepting commands from the CW01 which acts as the I2C master.

Alternatively, the CR03 ☒CHIP operates as a I2C master in State 2 - WeatherSat.


Back Virginia Space STEM Programme