ScratchRadio Library

Democratising Wireless Innovation
Revision as of 15:36, 25 July 2018 by ChrisHolgate (talk | contribs) (Added block descriptions for all source and sink blocks.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Data Source Blocks

Radio Source Block

The radio source block takes data samples that are supplied by the LimeSDR-Mini receiver and forwards them as a stream of complex data values, each of which is an I/Q pair of single precision floating point values. The radio source block has two configurable parameters:

  • Centre Frequency - This is the front-end mixer frequency used by the LimeSDR-Mini. It specifies the centre frequency of the 400kHz wide spectrum segment which is mixed down and presented at the block output.
  • Fixed Input Gain - This is the front-end amplifier gain used by the LimeSDR-Mini. It sets the amount by which the radio input is amplified before being sampled.

The output of the radio source block is compatible with inputs to the radio sink block, the spectrum display block, the low pass filter block, the band pass filter block and the OOK demodulator block.

Message Source Block

The message source block takes text messages that are supplied via the send message block and formats them as a stream of data bytes at the message source block output. Each message is made up of a length byte that specifies the number of bytes in the message (1 to 255) followed by the message body consisting of the specified number of bytes. When no message is available for transmission, zero valued padding bytes are inserted. A typical "Hello World!" message complete with padding bytes would be formatted as follows:

 ... 00 00 0C 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 00 00 ...

The output of the message source block is compatible with inputs to the message sink block and the simple framer block.

Data Source Tap Block

The data source tap block is used to tap into the data stream at the output of other blocks, replicating the data so that it can be processed in two or more parallel datapaths. The block has a single configurable parameter that specifies the name of the source block from which the output data is being derived. The output of the data source tap block will be compatible with the same set of downstream blocks as for the original data source.

Data Sink Blocks

Radio Sink Block

The radio sink block accepts a stream of complex data values, each of which is an I/Q pair of single precision floating point values, and forwards them to the LimeSDR-Mini transmitter. The radio sink block has two configurable parameters:

  • Centre Frequency – This is the front-end mixer frequency used by the LimeSDR-Mini. It specifies the centre frequency of the 400kHz spectrum segment which is presented at the block input.
  • Fixed Output Gain – This is the front-end amplifier gain used by the LimeSDR-Mini. It sets the amount by which the radio output is amplified before being transmitted.

The input of the radio sink block is compatible with outputs from the radio source block, the low pass filter block, the band pass filter block and the OOK modulator block.

Spectrum Display Block

The spectrum display block accepts a stream of complex data values, each of which is an I/Q pair of single precision floating point values, and displays the associated frequency spectrum. Two graphical representations are supported – a conventional power spectral density plot and a colourised waterfall plot. The appropriate representation can be selected using the block’s drop down menu as spectrum and waterfall respectively. The block also has an additional configurable parameter which sets the centre frequency to be used when labelling the frequency axis of the plots.

Message Sink Block

The message sink block accepts messages that are formatted within a stream of data bytes at the block input and converts them for use within the Scratch programming environment via the receive message block. Each input message is made up of a length byte that specifies the number of bytes in the message (1 to 255) followed by the message body consisting of the specified number of bytes. When no message has been received, zero valued padding bytes are inserted. A typical “Hello World!” message complete with padding bytes would be formatted as follows:

 ... 00 00 0C 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 00 00 ...

The input of the message sink block is compatible with outputs from the message source block and the simple deframer block.