QRP Labs U4B Ultimate4 Operating Manual

Balloon tracker

Advertisement

U4B – Ultimate4 Balloon tracker
Important information
This is the operating manual for the U4B and should be read in conjunction with the relevant
hardware manual. On the U4B page
and video links.
This operating manual contains a comprehensive description of everything in the firmware. It might
be a little overwhelming. However, remember that U4B is both extremely simple, extremely
complex, and everywhere in between – whatever you want it to be.
For the simplest possible flight, a basic tracking application program is already installed. The
following steps will get your U4B tracker ready and tracking set up:
1. Connect a micro-USB cable between U4B and your PC; run a terminal emulator on the PC
(see section 2 of this manual) and connect to U4B
2. Enter your callsign in the U4B configuration screen (see section 3.1 of this manual) and
make a note of the channel number
3. Set up your flight tracking in the QRP Labs shop account (see section 5 of this manual),
which will give you a tracking map page at http://qrp-labs.com/tracking
4. Assemble your system hardware (refer to the hardware manual) – consisting of U4B, GPS
antenna (twisted #28 wire), HF (e.g. 20m) antenna, solar cells and small LiPo battery
5. Test thoroughly on the ground, before snapping off the USB connector tab along the line of
holes (refer to hardware manual)
6. Remember: SAFETY first (refer to hardware manual), then select your launch site, launch
day (good weather!), inflate your balloons (refer to documentation at
http://qrp-labs.com/u4b) and fly!
Contents
1. Introduction.................................................................................................................................................................3
2. Terminal connection....................................................................................................................................................4
2.1 Drivers and PC setup..............................................................................................................................................4
2.2 PC terminal emulator............................................................................................................................................4
3. Terminal applications..................................................................................................................................................6
Operating manual
http://qrp-labs.com/u4b
U4B operating manual Rev 1.00
U4B
there are other helpful documents
1

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the U4B Ultimate4 and is the answer not in the manual?

Questions and answers

Summary of Contents for QRP Labs U4B Ultimate4

  • Page 1 2. Enter your callsign in the U4B configuration screen (see section 3.1 of this manual) and make a note of the channel number 3. Set up your flight tracking in the QRP Labs shop account (see section 5 of this manual), which will give you a tracking map page at http://qrp-labs.com/tracking 4.
  • Page 2: Table Of Contents

    4.9.5 Transmit statements: CW, HELL, JT9, JT65, WSPR, TELE................40 4.9.6 OUT statement.............................44 4.9.7 I2CW, I2CW16 statements..........................45 4.9.8 File handling statements: FILE, FILEWR, FILERD, FILEDEL................46 FILEWR statement..............................47 FILERD statement..............................47 FILEDEL statement..............................48 5. QRP Labs tracking..............................50 6. Resources.................................. 55 7. Document Revision History............................55 U4B operating manual Rev 1.00...
  • Page 3 Automated tracking maps and utilities are available on the QRP Labs website, both for simple tracking purposes and downloading your own telemetry. The U4B PCB contains: 33.0 x 12.7mm PCB (plus removable protrusion with micro-USB connector)
  • Page 4 Terminal connection The U4B tracker contains a Virtual COM Serial port USB device, for accessing QDOS (QRP Labs Disk Operating System) via a terminal emulator program running on your PC. This connection is used for initial configuration, and all BASIC programming, development and testing that you may wish to do, if you are pursuing more advanced flight goals.
  • Page 5 by U4B. There is also a guide to identifying the serial port at http://qrp-labs.com/qlg2 (scroll down the page). Set the size of the terminal window to 80 columns and 24 rows. Set the PutTTY configuration as per the above, then click “Open” to start the connection. You will see a blank screen.
  • Page 6: Configuration

    With the left and right arrows you can choose the operating band. Channel: The QRP Labs tracking system uses 600 channels numbered 0 to 599. Each U4B tracker is uniquely assigned three possible channels to use. You can choose which of the three possible channels to use.
  • Page 7: Run Program

    (0-9). All other characters of the WSPR callsign, locator and power will be substituted by the QRP Labs telemetry. Start minute: the minute past the hour, repeating every 10 minutes, at which the first WSPR transmission will be sent.
  • Page 8: Text Editor

    In this example, I set up a very simple program called TRACKER that just uses a FOR NEXT loop to iterate a variable from 1 to 10 and prints the variable value at each step: FOR I = 1 TO 10 PRINT I NEXT Any errors that occur during the program execution will also be displayed on screen.
  • Page 9 Ctrl-A: Save As: saves a copy of the file to a new filename on disk • Ctrl-C: Compile the BASIC program filename • Ctrl-D: Switch to debugging mode • Ctrl-Q: Quit the text editor application. • Control keys supported by the editor: Home: Moves the cursor to the start of the current line •...
  • Page 10 The full BASIC syntax is described in a different section of this manual. Pressing Ctrl-S will save the file if there are any changes; if it is a new file which does not yet have a file name, then Ctrl-S is equivalent to pressing Ctrl-A and will show you a similar screen to the above, to choose what directory to use and to enter the new file name.
  • Page 11 Now pressing Ctrl-C compiles the file, and writes it to disk as a Compiled file. If there are any errors, the compilation will fail without writing to disk, and the error will be identified on the bottom line. Note that the size of the compiled file is generally significantly less than when it was a text file.
  • Page 12 In this example, the S key has been pressed several times. The “Variables” windows hows variable I and its current value, 5. The Output window shows the PRINT statements that have been executed so far. The program text itself (left panel) is in plain font; there are three possible colours as follows: Cursor position –...
  • Page 13: File Manager

    3.4 File manager As its name suggests, this application is used for managing files on the disk. The “disk” on U4B is implemented as a FAT12-ish file structure on the 128K I2C EEPROM chip. There are 1024 blocks, each of which is 128 bytes long. A program that is longer than 128K is stored in multiple blocks.
  • Page 14 directory. Following this is the listing of sub-directories, followed finally by any actual files in this directory. A directory is a line on the list which for which all the columns except Name are empty. A normal file, has the name specified as well as all the other columns. Directory and file names in the U4B system must be 1 to 12 characters long and contain only letters and numbers.
  • Page 15: Command Line

    Red: The first few blocks on the disk are the File Access Table. They specify the allocation and linkage of the remaining blocks on the disk. Pale blue: System. There is a single, reserved, system block right at the end of the disk. It contains system variables, including storing information that you edit in the Configuration application such as your Callsign.
  • Page 16 List contents of the current directory EXIT Quit the Command line application QUIT Quit the Command line application Clear screen Change Directory – for example if there is a sub-directory called TEST, CD TEST will make TEST the current directory. The command prompt will change from $ (meaning root directory) to TEST$.
  • Page 17: Hardware Test

    3.6 Hardware test The Hardware test screen provides a comprehensive diagnostic of your hardware. All 19 IO signal states are shown; both the digital readings of the pin (0 or 1) and the analog level 0 to 4095 for GPIO pins 0 to 8. Date, Time and the GPS parameters are all derived from the serial data stream arriving from the GPS module.
  • Page 18: Factory Reset

    Before doing a factory reset, you are asked if you are sure; press Y to continue, or any other key to quit. 3.8 Update F/W (Firmware) On occasion QRP Labs may make available updated firmware for QDX, in order to deliver bug fixes or functionality enhancements. QDX contains a new firmware update procedure for STM32-series microcontrollers, called QFU (QRP Labs Firmware Update) which provides the following features: Easy –...
  • Page 19 Secure: firmware files are published on the QRP Labs website and are encrypted using • 256-bit AES encryption technology Selecting firmware update, then pressing the Y key proceeds with putting the U4B into bootloader mode. You must then remove the power, and re-apply power; when power is applied in bootloader mode, the U4B onboard LED will flash steadily.
  • Page 20 Click the OK button. The File Manager window will then open, and on my system looks like this: U4B appears as a removable USB Flash device named “U4B”, and the folder contains two files. The firmware file shows as a single file which in this example is named 0_38_001.U4B. The EEPROM file is always named EEPROM.
  • Page 21 Or copy and paste it, however you wish. The file on the QRP Labs website is a ZIPPED file, please be sure to unzip it to get the .U4B file before copying it to U4B.
  • Page 22: U4B Basic

    U4B BASIC The U4B implements a simple yet powerful Operating System called QDOS (QRP Labs Disk Operating System). compiled very simple virtual machine as the flight computer. The virtual machine runs compiled BASIC programs that are stored in a simple file system implemented on a 128K EEPROM.
  • Page 23 FOR I = 1 to 10 PRINT I NEXT are completely equivalent. However, if your program uses GOTO or GOSUB, these statements require a line number; therefore the target (destination) line for a GOTO or GOSUB actually must have a line number. Indentation: Indentation (spaces or tabs) can be used to make a program more readable.
  • Page 24: Variables

    the angle of incidence on the solar panels increases, it will take longer to reach the point where there is sufficient power for the High Power mode. Similarly in the evening, the U4B will stop working sooner. If you are really clever, you can measure the battery voltage and use BASIC commands to choose between low and high power modes.
  • Page 25: Tags In Strings

    These two statements produce the same result. Here we briefly introduce the PRINT statement (described in more detail later); when used in a PROGRAM that is running in DEBUG mode or RUN mode, it prints the prescribed string to the terminal screen. It’s very useful when coding, to test the code.
  • Page 26 2114 Analog channel 3, value 0 to 4095 for voltage 0-3.3V 1927 Analog channel 4, value 0 to 4095 for voltage 0-3.3V 2087 Analog channel 5, value 0 to 4095 for voltage 0-3.3V 1920 Analog channel 6, value 0 to 4095 for voltage 0-3.3V 2081 Analog channel 7, value 0 to 4095 for voltage 0-3.3V 1919...
  • Page 27: Operators

    BASIC general purpose variable F BASIC general purpose variable G BASIC general purpose variable H BASIC general purpose variable I BASIC general purpose variable J BASIC general purpose variable K BASIC general purpose variable L BASIC general purpose variable M BASIC general purpose variable N BASIC general purpose variable O BASIC general purpose variable P...
  • Page 28: Let Statement (Assignment)

    Addition Subtraction Multiplication Division & Bit-wise AND of two 32-bit variables Bit-wise OR of two 32-bit variables Modulus Assignment These may be used in Expressions and assignments (see below). 4.5 LET statement (assignment) A value is assigned to a variable using the LET statement. Example: LET A = 5 This sets the value of variable A to 5.
  • Page 29: Ina Function

    LET P = 6 LET A = IN P LET A = IN 4 + 2 Both of these examples also read the digital value from pin 6 and put it in variable A. 4.7.2 INA function Reads the analog value of one of the 9 GPIO pins numbered 0 to 8. These pins are capable of both analog input and digital input.
  • Page 30: Val Function

    4.7.4 VAL function Converts the contents of a string to a number. Additionally, start and end characters in the string may be optionally specified. The conversion continues until the first non-numeric character is encountered; if there are no numeric characters, the value is 0. Syntax: VAL <string>...
  • Page 31: Instr Function

    4.7.5 INSTR function Returns the position of a sub string within a string, or 0 if not found. Syntax: INSTR <string to be searched> <string to look for> INSTR <string to be searched> <string to look for> <start position expression> <start position expression>...
  • Page 32: I2Cr Function And I2Cr16 Functions

    4.7.7 I2CR function and I2CR16 functions Reads from an device attached to the I2C bus. Some devices have 8-bit registers (such as the Si5351A and LM75 chips), others have a much larger register space and a 16-bit address format (such as the I2C serial EEPROM chip). I2CR is for 8-bit devices. I2CR16 is for 16-bit devices. Syntax: I2CR <device address expression>...
  • Page 33: Loops, Conditionals And Program Flow

    Example LET F = FILEEOF 2 sets variable F to 1 or 0 depending on whether the end of file 2 has been reached or not. 4.8 Loops, Conditionals and Program Flow 4.8.1 FOR..NEXT loop structures The FOR..NEXT loop structure is useful where you want to run a certain block of statements several times.
  • Page 34 You can nest a maximum of 4 loops within each other. 4.8.2 IF..ELSE..ENDIF structures The IF statement and related ELSE and ENDIF statements are used to conditionally control program flow. Syntax: IF <expression> <relational operator> <expression> <Statements> ELSE <Statements> ENDIF Valid relational operators are: Operator Function...
  • Page 35: Goto

    ELSE LET A = 3 PRINT A ENDIF This program prints 3; the reason for this is that A is initially set to 1, which is not more than 3; therefore the ELSE part of the structure is executed; this sets A to 3 and then prints it. Note that when you are typing in the program, the indentation does not matter.
  • Page 36: End

    GOSUB causes program execution to jump the subroutine at the specified line number. When the computer encounters the RETURN statement, it jumps back to the line following the one in was called from. Line numbers are not necessary in QDOS BASIC. However if you want it to be possible to call a subroutine located at a particular line of code, then you must use a (unique) line number on that line, so that the GOTO statement can find it.
  • Page 37: Run Statement

    4.8.6 RUN statement Runs a specified program, then returns control to the calling program. Variables and other system states are not reset, when control returns to the calling program. Syntax: RUN <program name string> Example: RUN “GPS” Runs a program called “GPS”. If the specified program file does not exist, or if the program is not compiled, a run-time error is generated.
  • Page 38: Delay Statement

    Results in the following text on the terminal: The PRINT statement can also be used directly in the Command line application, as well as in a BASIC program. 4.9.2 DELAY statement Waits a specified number of milliseconds before continuing program execution. Syntax: DELAY <milliseconds expression>...
  • Page 39: Gps Statement

    4.9.4 GPS statement The GPS statement switches on the GPS receiver module. It waits for a satellite lock to be obtained, then sets the computer’s real time clock, and other parameters such as the altitude, latitude, longitude etc. The GPS statement also calibrates the oscillation value of the 8MHz system clock oscillator and PLL reference frequency.
  • Page 40: Transmit Statements: Cw, Hell, Jt9, Jt65, Wspr, Tele

    4.9.5 Transmit statements: CW, HELL, JT9, JT65, WSPR, TELE The family of transmit statements causes the U4B to transmit on radio frequencies. The statements requires a number of parameters, which specify the transmission mode, sub-mode, frequency, and parameters specific to that transmission mode. The following sections explain each transmission mode and the relevant parameters.
  • Page 41 HELL statement Transmits the Hellshreiber family of sub-modes. The format of the HELL statement is HELL <sub mode> <frequency> <speed> <FSK> <message> The <sub mode> parameter expects values as follows: Sub mode Explanation Slow-speed MFSK Hell (narrowband mode) Standard full-speed Hellschreiber Standard full-speed “DX”...
  • Page 42 tag substitutions have taken place. Furthermore, substituted characters must follow the rules of the JT9 protocol, concerning which characters are permissible in messages. Example: JT9 1 10145000 “AB2CD” Transmits JT9-1 on 10.145MHz with message “AB2CD”. Note that a JT9 transmission command will automatically wait for the appropriate time to start transmitting, according to the JT9 protocol.
  • Page 43 The advantage of using TELE for data transfer, compared to other transmission modes, is that it automatically displays a live map of the balloon path on the QRP labs website, and your additional telemetry is also automatically collected and available for download.
  • Page 44: Out Statement

    TELE <first optional data> <second optional data> The basic usage is simply TELE, which transmits two WSPR messages, 1 and 2 in the table above. These are automatically collected and plotted on a live tracking map on the QRP Labs website.
  • Page 45: I2Cw, I2Cw16 Statements

    There are 19 GPIO pins numbered 0 to 18. Additionally there is an special purpose IO pin 19, which is connected to the onboard LED on the U4B. If you specify a pin number higher than 19, the OUT command has no effect. Example: OUT 5, 1 Sets the value of GPIO pin 5, to 1 (high, means 3.3V).
  • Page 46: File Handling Statements: File, Filewr, Filerd, Filedel

    I2CW16 I2CR16 164 43846 28 Writes value 28 to register 43846 of device 164. You should in general not be tempted to write to the onboard I2C peripherals, particularly not the EEPROM which can corrupt the file system. The companion functions used in expressions, are I2CR and I2CR16 for reading from I2C devices, described earlier.
  • Page 47: Filewr Statement

    FILEWR statement Writes to a file. Syntax: FILEWR <file number expression> <data expression>, <data expression>, … One or more data expressions can be written (appended) to the file and are comma separated. A data expression can be a string or a numeric expression. There is no comma after the <file number expression>...
  • Page 48: Filedel Statement

    When the file DATA3 was created as per the FILEWR example in the previous section, this example will open file “DATA3” for reading, and read its comma delimited contents into variables D, E and F. The print statement will print these values to the terminal, appearing as: 1 2 3 Note that if your program needs to read all the data lines from a file in a loop, you can detect the end of the file using the FILEEOF function described in a previous section.
  • Page 49 deletes a file named “TEST” from the file system. If the file named “TEST” does not exist, the command has no effect. U4B operating manual Rev 1.00...
  • Page 50: Qrp Labs Tracking

    You can use the U4B tracker however you like. But the easiest way to use it for tracking a balloon flight, is using the TELE statement to transmit the QRP Labs telemetry format, and using the QRP Labs web site to view the live tracking map and download your data. To do this, you need to have registered a customer account on the QRP Labs shop http://shop.qrp-labs.com.
  • Page 51 Now if you click that link (“Modify your balloon flights”) you will see a listing of all the Balloon flights that you have registered: There are three buttons, towards the right. “New Flight”: Click this button to register a new flight “Edit”: Click this button, on the flight row of interest, to amend the flight details “Delete”:...
  • Page 52 Description: Anything you like, to describe your flight; this information will be shown on your own individual flight page. When you have entered the information for your flight, click the “Continue” button to save it. Now go to the QRP Labs website page http://www.qrp-labs.com/tracking – here you will see a list of active flights, the callsign and Channel.
  • Page 53 The page that you will now see contains the flight name, callsign, channel, the description you entered on the flight registration page in the QRP Labs shop account section, and a live tracking map showing the latest telemetry. This page will be further enhanced in the near future, to allow downloading your entire flight data for analysis in Excel etc.
  • Page 54 U4B operating manual Rev 1.00...
  • Page 55: Resources

    6. Resources For updates and tips relating to this kit please visit the QRP Labs QDX kit page http://qrp-  labs.com/ u4b For any questions regarding the assembly and operation of this kit please join the QRP  Labs group, see http://qrp-labs.com/group...

Table of Contents