How It Works

 

This is a semi-technical overview of how the PITS board and software work.  You do not need to know this unless you want to modify the operation, however we do hope that all users find it interesting.  A separate page will follow to explain the software in more depth.

The board consists of the following:

  • Switched-mode power supply
  • UBlox GPS receiver
  • Radiometrix MTX2 FM radio transmitter
  • DS18B20 temperature sensor
  • A/D converter for battery voltage and current sensing

PSU

The power supply allows the PITS and Pi to be powered from 4 AA cells (Lithium Energizers for flight, but you can use Alkaline cells for testing).  The battery voltage is converted to 5V and then fed to the Pi (via the GPIO connector) which down-converts to 3.3V and other voltages for the processor.  The 3.3V is fed by the Pi to the GPIO connector where it then powers the rest of the electronics on the PITS board.

For testing you can use batteries or a standard USB PSU connected to the Pi power socket.  You can hot-swap between the two but we do not recommend leaving both connected at the same time.

UBlox GPS

We use the UBlox receivers as they work at up to 50km altitude (way more than you will achieve with a latex weather balloon) and are well tested in this role.

We supply a GPS antenna which screws into the SMA socket next to the GPS module.  The combination is very sensitive however use indoors will give varied results depending on proximity to a window.  We strongly recommend getting the aerial outside.

GPS receivers are normally connected to computers via a serial link, however the Pi only has 1 serial port and we use that for the radio transmitter (see below).  The UBlox module also offers an I2C connection however this is incompatible with the I2C port on the Pi (due to a Pi CPU hardware restriction).  So, we connect the I2C pins to a pair of Pi GPIO pins and not the I2C ones (which we bring out to a connector in case you want to connect external I2C sensors).  Our software therefore emulates I2C hardware in software, at the cost of some complexity and a modest amount of CPU usage.

As mentioned earlier, UBlox GPS modules can operate at up to 50km altitude, however to do this they need to be put into "flight mode", which our software does.  if you wish to write your own software for PITS, do not omit this function!

Radiometrix MTX2 Radio Transmitter

The MTX2 is an FM radio transmitter that features a TCXO (Temperature Compensated Crystal Oscillator) that means that the output frequency is very stable despite temperature changes.  This means that once you tune in to the transmission, you won't need to retune during flight even if the tracker gets very cold.

Basic operation of the MTX2 is very simple; we just connect the output of the Pi serial port to the data input on the MTX2.  This results in 2 different frequencies being emitted; a lower frequency for a "0" (low voltage - about 0V) from the port, and a slightly higher frequency for a "1" (high voltage - about 3.3V) from the port.  The difference between these frequencies is 600Hz - 910Hz depending on the PITS version.

The MTX2 a 10mW transmitter preset to a frequency in the 434MHz European ISM (Industrial, Scientific and Medical) band which allows for airborne operation.  Outside Europe it may not be legal to fly or even use the device without a licence.  For example, in the USA operation requires an amateur radio licence (Technician or above).  It is your responsibility to ensure that you are using the device legally.

The MTX2 frequency can be reconfigured in software, by sending a command to the "Enable" pin.  This pin is normally a "high" (3.3V) to enable the radio output, or a "low" (0V) to disable it.  However it is possible to send a serial command to this pin to set the output frequency.  As we only have 1 serial port on the Pi, some extra circuitry is used to send the port output to the enable pin when required, as well as the data pin for normal radio transmissions.  All of this is controlled by the tracker program, using the frequency set in the configuration file.

The radio output connects to an SMA socket near to the MTX2.  We supply a "pigtail" from which you can make a 1/4 wave antenna.  Do not be tempted to use a different type of antenna - these will generally have more gain (which will make the transmissions more powerful than is legal) and will make them more directional (which, for a balloon, is a bad thing).

Sensors

PITS includes a DS18B20 so it can report on the board temperature.  It would of course be possible to get an approximate reading by measuring the CPU temperature, but since we also bring the DS18B20 "one wire" bus out to a connector for you to add a second DS18B20 to measure the external (to the payload) air temperature, having a DS18B20 on the board means that the software can easily confirm that the bus is configured and working.

An ADC senses battery voltage and board current consumtion.  PITS boards for the model A/B did not have this chip; current PITS+ boards (for the A+/B+) have an SPI chip; the next batch of PITS+ boards will have an I2C chip instead.  The software auto-detects which Pi and which PITS/PITS+ you have so it uses the correct software.

The reason for the change is to free up the SPI bus for add-on boards.

Finally, the I2C bus is brought out to a connector, to which you can add any I2C sensor.  Our software supports the BMP085/180 pressure/temperature sensors; for others you would need to write your own code or wait till we add support.

Software

The software consists ot:

  • A camera script
  • The tracker program

Both are started automatically when the Pi boots.  You do not need to start them manually.

The camera script is very simple loop where each time round the loop it takes an image for the SSDV system (to send to the ground) and a large image for storage only.

The tracker program does everything else:

  • Reads the configuration file
  • Sets the SSDV image sizes
  • Sets the MTX2 frequency
  • Chooses the "best" image to send and converts it to SSDV format
  • Interleaves telemetry and image packets
  • Configures the GPS for flight mode
  • Reads the GPS position every second
  • Reads the ADC, DS18B20 and (optionally) BMP085/180 every 10 seconds

 

Published on