Skip to main content

Subsystem Description

Document scope

This document aims to give insight into the design choices taken in the development of the P/L 1, a video graphics array camera (VGA) conceived originally to monitor the deforestation of the Indonesian rainforest, but later repurposed to collect data of ice levels in polar regions as well as take pictures during the deployment of other artificial satellites.

Camera selection and requirements

Camera selection

Aligned with the original goal of this payload the camera selected was one which could, first of all, be interfaced with the OBC and offered a resolution higher than 640x480 pixels. Therefore an array of cameras were considered:

NAME RESOLUTION >= 640x480 INTERFACE CHANGEABLE FOV
GalaxyCore GC0308 Y USB 2.0 Y
CMT-0.3MP-MK0806-R016 Y USB 2.0 N
SC13MPA Y TTL, RS232, RS485 N
SC03MPA (VGA) Y TTL, RS232, RS485 Y
PTC06 Y TTL, UART Y*
SCB-1 Y TTL, RS232 N

Table 1: Camera comparison.

*Through manual adjustment

Highlighted in blue, the selected camera was the PTC06 manufactured by Putai Electronic Technology, Ltd., as it could be interfaced with the OBC, offered the aforementioned resolution and, as a differential factor, it provided serial JPEG compression and data transmission. The datasheet of the PTC06 is provided here, and further information provided by the manufacturer can be found here. A rudimental translation can be downloaded here Translated PTC06. Some relevant specifications are provided in the following table:

SPECIFICATION VALUE
Size The camera module size is 20x28x9 (not counting the connector height) mm.
Resolution (pixels) VGA (640x480), QVGA (320x240), QQVGA (160x120) but we will preferably use the VGA.
FOV Diagonal 64°
Distortion 0.38%
Relative illumination >53%
Operating conditions The camera will work in the range of -20°C to 85°C.
Weight 3g
Operating voltage The camera can work from 3.3V to 5V.
Current consumption The operation current will be 100mA.
Data format JPEG, stored as an array of HEX bytes.

Table 2: PTC06 Main Specifications

Requierements

A list of high-level requirements was elaborated so as to determinate clear guidelines within which the camera payload must operate in order to achieve reliable and quality performance.

  • S-CAM-0010: Interface with OBC.
  • S-CAM-0020: Minimum #pixels (640 x 480).
  • S-CAM-0030: Changeable FOV*.
  • S-CAM-0040: Lens made of glass.
  • S-CAM-0050: Temperature range -20 to +60 °C.
  • S-CAM-0060: SNR of the images larger than 45dB.
  • S-CAM-0070: The resolution should be good enough to notice 100m differences.
  • S-CAM-0080: Camera works with 3V3.
  • M-CAM-0010: Robustness of the camera in the PCB.
  • M-CAM-0020: SNR images larger than 45 dB.
  • M-DATA-0010: Acquire 2 images per day.

Due to the selection of the PTC06 some criteria are already successfully meet. The following table provides more insight into the matter:

REQUIREMENT STATUS
S-CAM-0010 Successfully interfaced through UART
S-CAM-0020 Implemented, further testing required
S-CAM-0030** Small change is achieved, but causes bad focalization, further testing required**
S-CAM-0040 Met
S-CAM-0050 Met, environmental testing required
S-CAM-0060 -
S-CAM-0070 Not meetable
S-CAM-0080 Yes
M-CAM-0010 -
M-CAM-0020 Met
M-DATA-0010 Many more can be acquired although not sent due to the data budget bottleneck

Table 3: Camera Requirements Status

Communications protocol

The communication protocol used to transfer data between the camera module and the OBC is UART (Universal Asynchronous Receiver-Transmitter). In concordance with its name, there is no clock usage on the protocol, which means that the communication is simplified as a Serial Communication Scheme. A serial communication consists of transmitting all the information only using two cables, RX-TX and TX-RX.
In general, the main characteristics of UART protocol are:

  • Due to its simplified structure, it can be easily implemented.
  • The protocol does not depend on any clock.
  • The protocol uses only two wires.
  • As with any serial communication, the information is transmitted between the TX-Transmitter pin to the RX-Receiver pin and vice versa.

Interface

The transmitting UART is connected to a controlling data bus that sends data in a parallel form. From this, the data will now be transmitted on the transmission line (wire) serially, bit by bit, to the receiving UART. This, in turn, will convert the serial data into parallel for the receiving device.

The UART lines serve as the communication medium to transmit and receive one data to another. Take note that a UART device has a transmit and receive pin dedicated for either transmitting or receiving.

For UART and most serial communications, the baud rate needs to be set the same on both the transmitting and receiving device. The baud rate is the rate at which information is transferred to a communication channel. In the serial port context, the set baud rate will serve as the maximum number of bits per second to be transferred. The used baud rate in our communications is of 11520 bps.

uart.png

Data transmission

In UART, the mode of transmission is in the form of a packet. The piece that connects the transmitter and receiver includes the creation of serial packets and controls those physical hardware lines. A packet consists of a start bit, data frame, a parity bit, and stop bits.

captura.pngOur data frame will be of 8 bits, and it'll include a parity bit in order to ensure more reliable communications.

More information about the UART protocol can be found here: UART.

System Description

The OBC is the main transmitter who sends the information from the STM32 to the camera, and the camera responds to this information. The camera is expected to receive a command and will act depending on the command it receives. The camera has different functions:

  • Capture image.
  • Read image data length.
  • Read image data.
  • Stop capture.
  • Setting image compressibility.
  • Setting image resolution.

The commands are different for each function. Here is an example of a communication between the OBC and the camera with the function “Reset”. The OBC sends a command to the camera saying that it wants to use this function, the command that will be sent is: 0x56 0x00 0x26 0x00. If the communication is correct and the camera has received the command properly, it will send another command to answer the OBC that he has done it, and to make sure that it has worked. The command that the camera will send the OBC is: 0x76 0x00 0x26 0x00.

Command Protocol (Hex format data)

For each function there are different commands, so in order to understand which is needed to be sent and to be received, a summary is presented in the following table.

FUNCTION TRANSMITTED COMMAND RECEIVER TRANSMITTED COMMAND
Reset 0x56 0x00 0x26 0x00 0x76 0x00 0x26 0x00
Set image compressibility 0x56 0x00 0x31 0x05 0x01 0x01 0x12 0x04 0xXX (*) 0x76 0x00 0x31 0x00 0x00
Set image resolution 0x56 0x00 0x31 0x05 0x04 0x01 0x00 0x19 0xXX (**) 0x76 0x00 0x31 0x00 0x00
Capture an image 0x56 0x00 0x36 0x01 0x00 0x76 0x00 0x36 0x00
Read image data length 0x56 0x00 0x34 0x01 0x00 0x76 0x00 0x34 0x00 0x04 0x00 0xXX 0xYY
Read image data 0x56 0x00 0x32 ... 0x0A 0x76 0x00 0x32 ... 0x00
Stop capture/Clear image cache 0x56 0x00 0x36 0x01 0x03 0x76 0x00 0x36 0x00 0x00

Table 4: Command Protocol

(*) The 0xXX is the value of compression that will be set to the image. The range of values that are available are from 0x60 to 0XFF. The 0x60 refers to the minimum compression, and the 0xFF to the maximum compression.
(**) The 0xXX is the value of resolution that will be set to image. This variable can only take three values: 0X00, 0x11 and 0x22, where 0x00 refers to the highest resolution (VGA) of 640x480p, 0x11 offers a QVGA resolution of 320x240p and 0x22 the minimum possible resolution (QQVGA) of only 160x120p.

The camera offers other functions such as sending its version, modify it's baud rate and others, but due to their relevance and memory constraints it has been decided not to implement them. More information about these functions is found on Translated PTC06.

Figure 1: PTC06 V3.1 Camera Module