background image

U4B

U4B – Ultimate4 Balloon tracker

Operating manual

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 

http://qrp-labs.com/u4b

 there are other helpful documents 

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

U4B operating manual Rev 1.00

1

Summary of Contents for U4B Ultimate4

Page 1: ...e 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 tra...

Page 2: ...CR16 functions 32 4 7 8 FILEEOF function 32 4 8 Loops Conditionals and Program Flow 33 4 8 1 FOR NEXT loop structures 33 4 8 2 IF ELSE ENDIF structures 34 4 8 3 GOTO 35 4 8 4 Subroutines GOSUB and RET...

Page 3: ...ce for configuration programming and easy firmware update just copy the new firmware file into the apparent USB Flash drive Simplest possible operation Just connect to U4B with a PC terminal emulator...

Page 4: ...Hayes AT commands dating back to 1981 implemented on Hayes 300 baud modem Yes 40 years ago The Operating System attempting to send AT commands to your QDX will certainly mess everything up Not least b...

Page 5: ...t the connection You will see a blank screen Now press the Enter key and you should see the U4B applications menu For the purposes of this manual to conserve printer ink for those who choose to print...

Page 6: ...0 9 Two or three more characters which must be A Z Select the callsign field and type your callsign in There is no need to add blank spaces at the end you cannot use the arrow keys to fix a mistake ju...

Page 7: ...tituted 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 In the example shown the first standard WSPR transm...

Page 8: ...edit your programs or other files on the disk It is also a full IDE Integrated Development Environment U4B programs are written in a simple type of BASIC programming language which is compiled to che...

Page 9: ...ion Other keystrokes are interpreted as normal text entered into the editor Pressing Ctrl O opens a file selector screen showing the files on disk Here we have a single program TRACKER which is the de...

Page 10: ...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 choo...

Page 11: ...file contents screen occupying the left half of the screen Any lines of text that are longer than half a screen width get truncated in this view There are two additional windows on the right the top...

Page 12: ...uare but it is green in PuTTY with a black background The line containing the cursor is the current program breakpoint unless the cursor is at the top left of the screen in its default position Invers...

Page 13: ...e prompted for the new file name D Create a new directory you will be prompted for the directory name DEL Delete the file or directory If deleting a directory the directory must be empty first Enter M...

Page 14: ...rite chapters of your life history too if the spirit moves you However if a file is created and manipulated from within BASIC the file type will be DATA Size the number of bytes used by the file Block...

Page 15: ...level directory is the first block after the FAT area Yellow The last block of a file EOF End Of File this block does not link onward to any further blocks Press Ctrl Q to close the Disk manager wind...

Page 16: ...tes a sub directory called TEST RENAME Rename a file or directory For example RENAME TEST TEST1 renames the sub directory called TEST to TEST1 COPY Copy a file For example COPY TRACKER TRACKERBAK make...

Page 17: ...m arriving from the GPS module The screen also tests the Si5351A Synthesizer and shows the LM75 temperature in Kelvin and the measured battery voltage The data is updated once per second If there are...

Page 18: ...ixes 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 anyone...

Page 19: ...his virtual Flash stick contains two files 1 the firmware program file of the U4B microcontroller You may read the file from U4B or write a new one just by dragging files in your file manager applicat...

Page 20: ...B 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 You can read and...

Page 21: ...ou 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 As soon as you copy the new file to the U4B QFU flash drive the U4B QF...

Page 22: ...mentation and different flight tracking and data collection scenarios BASIC programs are stored on the 128K disk drive which is implemented on a 128K EEPROM chip for persistent storage when the power...

Page 23: ...effect to warn approaching aircraft Use OUT 19 1 to switch on the LED and OUT 19 0 to switch off the LED P S I m joking about warning approaching aircraft in flight RF output power control U4B can tra...

Page 24: ...LL Reference frequency Hz nominally 25 MHz GL No GPS 3D satellite lock acquired 1 otherwise 0 if not GS No GPS Speed knots GV No GPS Validity bit 1 for A flag 0 for V flag HP Yes Transmitter High Powe...

Page 25: ...read from the onboard temperature sensor By default this will be encoded into the transmission sent by the TELE telemetry command However there may be occasions when you wish to transmit a different t...

Page 26: ...F 1 Digital channel 15 value 0 or 1 DG 0 Digital channel 16 value 0 or 1 DH 1 Digital channel 17 value 0 or 1 DI 0 Digital channel 18 value 0 or 1 DT 030921 Current date UT as DDMMYY FL The first 20 c...

Page 27: ...able Z Furthermore the tag specification can be modified to choose only a selected part of the string The format for this is start character character count hash code Characters start at 1 The dot and...

Page 28: ...the value of variable A to 5 and B to 21 Variable C is set to the GPS altitude in meters Many other functions can also be used in expressions these are described below 4 7 Functions 4 7 1 IN function...

Page 29: ...8 the pin number is interpreted modulus 9 For example if you read pin 12 it is the same as reading pin 3 Syntax INA GPIO pin number expression Example LET A INA 6 Reads the analog value from pin 6 an...

Page 30: ...le A because the conversion continues until the first non numeric character is found the H of HELLO LET A VAL HELLO123 Assigns value 0 to variable A because there are no numeric characters at the begi...

Page 31: ...g is started at character position 10 Start position is an expression and of course you can also use tags in both the string being searched and the string being looked for So LET B INSTR TM VZ looks f...

Page 32: ...cant bit is set to 0 for a Write operation or 1 for a Read operation The device address parameter expected by the I2CR I2CR16 functions is an 8 bit value which is really the Write operation 8 bit addr...

Page 33: ...Statements NEXT For example FOR A 1 TO 5 PRINT A NEXT Running this program simply loops through the statement PRINT statement in this case 5 times and prints the value of the loop variable A to the t...

Page 34: ...n Statements ELSE Statements ENDIF Valid relational operators are Operator Function Equals Less than More than The ELSE section and its statements is optional There must always be an ENDIF statement F...

Page 35: ...e GOTO statement can find it The most common use is to allow a program to run repeatedly for ever For example LET A 1 10 PRINT A LET A A 1 GOTO 10 This program sets variable A to 1 then prints it then...

Page 36: ...alls the subroutine again Finally the END statement stops execution The result printed on the terminal is 5 6 Note that you can also make nested calls to other subroutines from within subroutines But...

Page 37: ...o call out to other programs However there is a nesting depth limit of 4 4 9 Statements 4 9 1 PRINT statement The PRINT statement outputs one or more strings or expressions to the terminal Syntax PRIN...

Page 38: ...r of minutes The first parameter is an interval duration parameter The second parameter specifies how many minutes past the hour to start the interval This is best illustrated by an example SLEEP 10 4...

Page 39: ...culating this parameter When a command string is specified the system waits 2 seconds for a response from the GPS if none is received which is typically the case if an unsupported command was given it...

Page 40: ...r for the other slow speed modes is the number of seconds per dit FSK is the frequency shift specification for FSKCW and DFCW sub modes it is ignored for CW and QRSS sub modes The Message is the text...

Page 41: ...ter in Hz This parameter is ignored for full speed Hell sub modes which use on off keying without any frequency shift message is the text to transmit and may contain tags as explained above The maximu...

Page 42: ...ntain tags as explained above JT65 messages are a maximum of 13 characters Remember that this is the message length AFTER any dynamic tag substitutions have taken place Furthermore substituted charact...

Page 43: ...messages This consists of from 2 to 4 WSPR transmissions It always sends position altitude ground speed battery voltage temperature and GPS status Two optional additional transmissions can carry up t...

Page 44: ...A Z or space Any non conformant characters are sent as spaces any characters in the string after the first 7 are ignored if there are less than 7 characters the string is padded with spaces Examples T...

Page 45: ...th addresses are expressed as decimal values and are expressions The value expression is sent as an 8 bit value 1 byte which is decimal 0 to 255 Larger numbers are sent modulus 256 The U4B has three e...

Page 46: ...ading If the file doesn t exist a runtime error will occur W Open the file for writing If there is an existing file with this name it is erased A Open the file for writing appending to the end of the...

Page 47: ...EXAMPLE FILEWR 1 HELLO opens a file EXAMPLE for writing as file number 1 and writes HELLO to it FILE 2 W DATA3 LET A 1 LET B 2 LET C 3 FILEWR 2 A B C opens a file named DATA3 for writing as file numbe...

Page 48: ...oops through reading data lines from the file and parsing them into variables D E and F which it prints to the screen It also keeps a line counter in variable C While it has not reached the end of the...

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 49...

Page 50: ...standard WSPR transmission time and frequency you have to ensure that your choice of channels does not cause this conflict Otherwise reports from your various different balloon flights cannot be diffe...

Page 51: ...ister a new flight Edit Click this button on the flight row of interest to amend the flight details Delete Click this button on the flight row of interest to delete the flight Note that this is an irr...

Page 52: ...U4B TELE BASIC statement This number must match the channel number that you have selected in the Configuration screen of the U4B tracker Active Select Yes if this is an active flight that you wish to...

Page 53: ...ve 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 Note that the laps of our plan...

Page 54: ...U4B operating manual Rev 1 00 54...

Page 55: ...X 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 for details 7 Document Revision History 1...

Reviews: