of 36/36
Flight Computer Instruction Manual Manual rev 0.6 To suit – Hardware rev 1.1 & Firmware rev 1.35, Hardware rev 2.0 & Firmware rev 1.35 Author : Craig Strudwicke Date : 5/2/2011

Flight Computer Instruction Manual - iPrimus

  • View
    0

  • Download
    0

Embed Size (px)

Text of Flight Computer Instruction Manual - iPrimus

Filght Computer Instruction Manual rev 0.6Hardware rev 2.0 & Firmware rev 1.35
Author : Craig Strudwicke
3.1 Version 1.0 (50 x 50mm format) ............................................................................................. 6
3.2 Hardware version 2 ............................................................................................................... 15
4 Command Interface ...................................................................................................................... 20
4.1 Command list ........................................................................................................................ 20
5.1 Flight Mode ........................................................................................................................... 25
5.2 Ground Mode ........................................................................................................................ 26
5.4 Free Running Logger Mode ................................................................................................... 26
5.5 Streaming Mode ................................................................................................................... 26
6 Parameters .................................................................................................................................... 28
7.2 Free running logger data format (opmode 4) ....................................................................... 31
7.3 Accessing logged data ........................................................................................................... 31
7.4 Converting, plotting & analysing the logged data ................................................................ 31
7.5 Examples of logged data ....................................................................................................... 32
8 Updating Firmware ....................................................................................................................... 33
List of Figures
Figure 4 Expansion Header ..................................................................................................................... 9
Figure 5 Output terminals ..................................................................................................................... 10
Figure 6 Hardware V1.1 bottom side .................................................................................................... 11
Figure 7 HW V1 Minimalist Configuration ............................................................................................ 12
Figure 8 HW V1 Intermediate configuration ......................................................................................... 12
Figure 9 HW V1 Booster configuration ................................................................................................. 13
Figure 10 HW V1 Wireless control configuration ................................................................................. 13
Figure 11 Hardware V2 topside ............................................................................................................ 15
Figure 12 Hardware V2 bottom side ..................................................................................................... 16
Figure 13 Serial port connector J3 HW V2 ............................................................................................ 18
Figure 14 Example configurations for HW V2 ....................................................................................... 18
Figure 15 Serial parameter setup ......................................................................................................... 24
Figure 16 Example terminal session ..................................................................................................... 24
Figure 17 Mode 0 State Transition Diagram ......................................................................................... 25
Figure 18 - Example chart from logged data ........................................................................................ 32
List of Tables
Table 2 – Processor and comms specifications ....................................................................................... 4
Table 3 – Sensor specifications ............................................................................................................... 5
Table 4 - Components on topside of Hw V1.1 ........................................................................................ 7
Table 5 - Input terminal block Hw V1.1 .................................................................................................. 7
Table 6 - Output terminal description Hw V1 ....................................................................................... 10
Table 7 - Components on Bottom of Hw V1.1 ...................................................................................... 11
Table 8 - Topside components Hw V2 .................................................................................................. 16
Table 9 - Bottom side components Hw V2 ........................................................................................... 17
Table 10 - Power & Output terminal block Hw V2 ................................................................................ 17
Table 11 - Topside components Hw V2 ................................................................................................ 17
Table 12 - Configuration Parameters .................................................................................................... 28
Table 13 - Logged data formatting ........................................................................................................ 30
Table 14 – Logged parameters formatting ........................................................................................... 31
1 Introduction This “Flight Computer” is designed predominately for the purpose of providing recovery functions
for model, HPR and Amateur rockets with some additional functionality. The additional functions
include high speed logging of all parameters and variables to onboard non-volatile memory, staging
output, remote override commands amongst a number of other useful features.
In ‘ground mode’ it can be used for other purposes (such as testing, special purpose logging) if a
serial link is implemented such as a radio modem or similar.
2 Specifications
2.1 Electrical
Hardware V1
Supply current 27 27 mA Not driving loads
Output current
Digital Inputs 2 2 Non –isolated or
protected
Additional Digital
2.2 Processing & Comms
2.3 Sensor performance
Acceleration 0.109 ±0.25% +350 to -350 ms -2
Altitude (derived) 1 ** -1000 to 100000 ft (ASL)
Velocity (derived
from pressure)
3 Hardware Description & Layout
3.1.1 Topside
1 2 3
4 5 6
3 Pushbutton
13 Buzzer Table 4 - Components on topside of Hw V1.1
3.1.2 LED
The LED is used to indicate the cycling of the main loop hence the status of the controller. It is
toggled on each scan of the state machine, hence flashes at half the execution rate.
3.1.3 Input Terminal Block
The input terminal block is used to connect power to the FC and provides access to additional inputs.
Figure 2 Input terminal block
Terminal # Description
3 GND common
4 Input #3
5 GND Common
1
3.1.4 Pushbutton
This is utilised by the user to interact with the controller for simple tasks such as arming and
triggering data download. This signal is also broken out through the expansion header so that an
external or other switch can be connected.
3.1.5 Serial Interface Connector
Serial communication with the FC is the only way to perform some of the crucial setup functions
AND is the only way to extract data.
The signal level at this connector is 3.6V hence a level shifter is required to interface to a device such
as a PC or laptop.
3.1.6 Flash Memory
There is 4Mbytes of onboard flash memory
within this flash memory. It is available for download after a flight or on power up or by command.
3.1.7 Pressure Transducer
The pressure transducer is an absolute type with a range of 101kPa to 0kPa. This range allows the
FC to measure altitudes from sea level to 100,000ft.
3.1.8 Expansion Header
The expansion header is used to breakout additional signals and make
signals available at another location.
nteract with the controller for simple tasks such as arming and
This signal is also broken out through the expansion header so that an
external or other switch can be connected.
Serial Interface Connector
the FC is the only way to perform some of the crucial setup functions
AND is the only way to extract data.
The signal level at this connector is 3.6V hence a level shifter is required to interface to a device such
Figure 3 Serial comms connector
onboard flash memory. All data logged during flights or otherwise is stored
within this flash memory. It is available for download after a flight or on power up or by command.
The pressure transducer is an absolute type with a range of 101kPa to 0kPa. This range allows the
FC to measure altitudes from sea level to 100,000ft.
The expansion header is used to breakout additional signals and make some of the already available
signals available at another location.
GND Rx Tx
nteract with the controller for simple tasks such as arming and
This signal is also broken out through the expansion header so that an
the FC is the only way to perform some of the crucial setup functions
The signal level at this connector is 3.6V hence a level shifter is required to interface to a device such
. All data logged during flights or otherwise is stored
within this flash memory. It is available for download after a flight or on power up or by command.
The pressure transducer is an absolute type with a range of 101kPa to 0kPa. This range allows the
some of the already available
Figure 4 Expansion Header
3.1.9 Instrumentation Amplifier
The pressure transducer has a strain gauge output which requires amplification. This amplifier is
used to convert the low level signals to a usable range which makes the best use of the ADC.
The gain resistor value of 911 ohms sets the amplifier gain to 244v/v.
3.1.10 Accelerometer
The accelerometer has a range of ±35G and an effective resolution of 0.0111 G.
3.1.11 Microcontroller
A Microchip PIC18F25K20 microcontroller is used to perform all of the control functions. It is
configured to operate at 64MHz, giving an instruction execution rate of 16MHz.
3.1.12 In Circuit Serial Programming header
This header is used in the event that there is a problem with the bootloader programming process. It
may also be used for internal debugging. It is not included by default.
GND
GND
AN3
RA7
RB0
GND
Tx
3.6V
AN2
RA4
AN4
RA6
IN0
Rx
1
14
Table 6 - Output terminal description Hw V1
The outputs are connected to N-Channel FET’s which pull to ground. This means that the VSupp
terminals are connected directly to the battery positive supply whilst the Out n terminal(s) are
pulled to ground when turned on. It is important to note this when connecting up charges or similar
since if one wire is connected to VSupp, connecting the other to Gnd accidentally will cause current
to flow.
Item Description
1
2
3
4
5
6
3.1.15 Example Configurations
An example of a minimalist configuration is shown below. There is no switch shown between the
battery and the FC and this is not essential since until armed by pressing PB1 onboard the FC is
unarmed and safe.
The next example shows an intermediate configuration with additional sensors connected to the
expansion I/O , an external/additional pushbutton/switch connected for arming and a power switch
in series with the battery. This is a good option if at all possible.
Figure 8 HW V1 Intermediate configuration
Next is a configuration used within a booster stage. Note that ‘apogee’ charge can be determined by
timer or baro apogee.
Figure 9 HW V1 Booster configuration
Finally a configuration utilising a Radio modem or wireless serial port.
Figure 10 HW V1 Wireless control configuration
Arming pushbutton/switch is not required, additional ‘aux’ outputs can be added as backups or for
other functionality and driven remotely.
Significant functionality is gained by having the wireless interface.
• Remote deployment/backup
• Remote arming/disarming
• Remote control parameter checking and editing
• Battery voltage monitoring prior to launch (if connected though expansion I/O)
3.2 Hardware version 2
Hardware version 2.0 was created to suit smaller diameter airframes and hence is smaller in width.
The same components are installed in this version except for the fact it only has 3 output channels
and no expansion header. The terminal blocks are at the top and bottom of the board in an effort to
simplify the wiring for minimum diameter installations.
3.2.1 Topside
9
7
8
6
10
11
12
5
3 Buzzer
7 Single axis Accelerometer
3.2.2 Backside
4
3
2
1
5
6
3.2.3 Power & Output terminal block
Terminal # Description
1 GND
Table 10 - Power & Output terminal block Hw V2
Note that the same Nch FETS are used in this version of the hardware.
3.2.4 Input terminal block
2 GND
4 GND
firmware)
8 GND
Table 11 - Topside components Hw V2
Note to drive an input on, it must be connected to GND and not connected to 3.6v.
1
1
3.2.5 Serial Connector J3
The serial port is an important interface for this board. It is named J3 and is shown below.
Figure 13 Serial port connector J3 HW V2
The signal levels at the Tx pin are 3.6V hence a level shifter or converter is required to interface to
either a PC serial port or USB port.
3.2.6 Example configurations
Three examples are shown here to provide some idea of how the FC HWV2 can be utilised.
Figure 14 Example configurations for HW V2
Tx
Rx
GND
1. Basic
This configuration is the minimum required to operate the FC in dual deployment mode.
Of course if only operating in apogee deployment mode, only the single initiator is required
on terminals 3 & 4.
A power switch is preferred but not mandatory since the FC is safe until armed.
If it is difficult to access the arming pushbutton, the auto arm parameter may be used.
2. Booster config
This example shows the option of having and external pushbutton for an arming input.
Also added is an ignitor for a sustainer motor.
The most likely location for such a configuration would be in a booster stage where the FC
will be used as both the recovery device and the ignition controller for the sustainer motor.
3. Wireless config
Having the wireless serial connection allows all of the serial commands to be utilised
remotely, hence opening up a large number of options.
• Remote deployment/backup
• Remote arming/disarming
• Remote control parameter checking and editing
• Battery voltage monitoring prior to launch
Not shown in these examples is the alternative launch detection method of a break wire. This will be
implemented in subsequent firmware revisions. When implemented, it will be a wire between
.
4 Command Interface The FC has a built in command interface which can be used to
- set & read parameters stored in EEPROM
- Trigger download from Flash memory
- Trigger events
4.1 Command list
A list of commands may be viewed at any time by sending the ‘?’ character to the FC.
The following table will be returned :
Cmd list arm - arm A - return ADCs bh, bl, bp, bx -> high, low, prog, xtreme baud rate s d - Dump Flash D - Dump Flash (pages, ascii) e - EEProm Dump E - Erase flash fa - Fire con arm fd - Fire con disarm f# - Fire channel # m - Set Mode r** - Reset Main SM R - Read EEPRom param s - Get states S - Set EEPROM Param V - Get FW & Flash size w - Last flight results z# - Zero offset ch# *** - micro reset
4.1.1 Cmd ‘arm’
This is the equivalent of pressing the arming push button. The main state machine will transition
from ‘initial’ to the state determined by the opmode selected.
4.1.2 Cmd ‘A’
The raw conversion result for ADC0 to ADC4 will be returned
Format: “A<CR>”
4.1.3 Cmd ‘b#’
bp – change to prog baud rate : 57600
bx – change to baud rate : 921600
4.1.4 Cmd ‘d’
The contents of Flash memory will be dumped in ASCII format, equivalent to pressing the
pushbutton to trigger download at the end of a flight.
Format: “d<CR>”
4.1.5 Cmd ‘D’
This triggers the dumping of n ‘pages’ of Flash memory .
Format: “Dn,a<CR>” where ‘n’ is the number of pages (528 bytes) and ‘a’ is the ascii flag.
If the ‘ascii’ parameter is set, the data will be in ASCII form, otherwise it will be binary.
4.1.6 Cmd ‘E’
Erase flash memory. This completely erases all of the flash memory chip.
4.1.7 Cmd ‘f#’
These commands are related to the fire control mechanism. The # may be one of the following :
fa - This arms the asynchronous fire control mechanism. It will stay armed for 10s before
auto disarming.
fd - Disarms the asynchronous fire control mechanism.
fn – n where n is from 1 to 4 is used to turn on output channel n for 1.0s.
4.1.8 Cmd ‘m’
Sets the parameter controlling the mode of operation for the FC.
Format: “mx<CR>” where x is the mode in decimal format.
There are currently 5 modes of operation that are valid :
- 0 : Std Flight mode
- 2 : test stand mode (not implemented)
- 3 : Free Running logger mode
- 4: Streaming mode
These modes of operation are described in section 5.
4.1.9 Cmd ‘r**’
Reset of main state machine. Effectively reboots the state machine, irrespective of current operation
or state.
Allows the reading of an EEPROM memory location.
Format : “Rx<CR>” where x is a value from 0 to 255 expected in decimal form.
4.1.11 Cmd ‘s’
Returns the current value of all state machines. Currently only one state machine exists ie main loop.
Format: “s<CR>”
4.1.12 Cmd ‘S’
Allows the setting of an EEPROM memory location.
Format: “Sx,y<CR>” where ‘x’ is the address (0 to 255) and ‘y’ is the value (0 to 255) expected in
decimal form. This command can only be run successfully from the ground_command state. To get
into this state, change the opmode to 5 and then arm.
4.1.13 Cmd ‘V’
4.1.13.1 Cmd ‘w’
• Max altitude (ft)
Allows the zeroing of sensors.
Format : “zx<CR>” where x is the ADC channel associated with the sensor.
Currently the allocations are :
- 1 : Pressure (baro)
This should not be required unless a sensor is replaced or the EEPROM had been erased or corrupted.
Note that changing the zero of the pressure channel will effectively offset the Sea Level or 1 bar
value.
An alternative method of zeroing the acceleration channel has been added. After orienting the FC
vertically up, the command ‘za<CR>’ is sent starting the positive offset reading. Next a message is
displayed asking for the board to be inverted ie pointing down vertically before pressing the arm
pushbutton to continue. The idea is that it should provide for a more accurate acceleration zero than
trying to hold the board perfectly level whilst running the ‘z0<CR>’ command.
4.1.15 Cmd ‘***’
Causes a low level reset of the micro controller. Not generally required but is used in the
bootloading process.
Serial port settings used :
Figure 15 Serial parameter setup
Figure 16 Example terminal session
5 Modes of operation There are a number of modes of operation for the FC, this being selected by the EEProm Parameter
‘Mode’ at address 0.
5.1 Flight Mode
This section describes the operation of the FC for the normal mode of operation ie Flight Mode,
mode parameter is set to 0.
Figure 17 Mode 0 State Transition Diagram
Power
off
Initialisati
on
Dump
Dump complete
‘d’ cmd
There are a few exceptions not shown on this diagram which are important to know.
5.1.1 Exception - Failure to achieve Flight
If launch is detected but subsequently the vehicle does not achieve >= 200ft AGL AND >= 27m/s then
it is not considered in flight. If after 60s these conditions are still not met, the flight is considered
aborted and the FC will go into ‘Waiting to Dump’ state.
5.1.2 Exception – Serial command(s)
A serial command driving an output channel will over ride what is occurring in the state machine.
This will not however change the behaviour of the state machine directly but there will obviously be
indirect effects.
5.1.3 Exception – Mach Inhibit
If the Mach Inhibit parameter is >0s, the apogee detection logic will be ‘inhibited’ for this time.
Important to note that the backup timer will override this ie if the Backup timer parameter is shorter
than the Mach inhibit time, it will still fire the apogee channel and progress the state machine.
5.2 Ground Mode
Mode parameter set to 1. Currently same behaviour as per Command Interface Mode (sec 5.6)
5.3 Test Stand Mode
Mode parameter set to 2.
This mode is not currently implemented fully and is the same as Command Interface Mode (sec 5.6)
5.4 Free Running Logger Mode
This mode is run when the opmode parameter set to 3.
Relevant parameters are :
- Max pages (528bytes / page)
The logger begins logging when either the arm button is pressed OR the arm digital input is pulled
low OR the ‘arm’ command is given through the serial interface. Logging will continue until the page
limit is reached or power is cut off. Data may be ‘downloaded’ from the FC in the same manner as
per mode 0.
5.5 Streaming Mode
Mode parameter set to 4 to run in streaming mode. In this mode, the raw ADC results are
transmitted out of the serial port continuously at a rate determined by the sample time defined for
mode 3.
The data format of the serial data is as follows :
ADC0<tab>ADC1<tab>ADC2<tab>ADC3<tab>ADC4<CR><LF>
Where each ADCn result is in ASCII format and is a 13bit result between 0 and 8096.
5.6 Command Interface Mode
To operate in this mode, the Mode parameter must be nominally set to 5.
Essentially the main state machine is placed into a dead state and the only functionality available is
through the command interface.
Of course one can change the mode parameter through the command interface and reset the FC to
get out of this mode. For example, to change back to flight mode :
m0<CR>
r**<CR>
6 Parameters There are a number of parameters used to tune the behaviour and performance of the FC.
These can be edited through the command interface using the ‘R’ and ‘S’ commands.
Here is a list of parameters as they exist at this firmware revision :
Parameter Address Related
Accel trigger time 3 0 Not implemented
FAST sample period 4 ALL 5 2 to 10 ms
Sustainer Delay 5 0 0 to 255 0.1s
Sustainer Channel 6 0 Not implemented
Thrust Phases 7 0 Not implemented
Backup Timer 8 0 2->255 S
Main Alt lo byte 9 0 70 30 to 255 10ft
Main Alt hi byte 10 0 0 0 to 255 10ft
Debug Flag 11 ALL 0 0 or any Boolean
Pre-erase Flag 12 ALL 0 0 or any Boolean
Apogee detection filter time 13 0 35 0 to 100 0.01s
Mach Inhibit Time 14 0 0 to 255 0.1s
MODERATE sample period 15 ALL 25 10 to 50 ms
SLOW sample period 16 ALL 100 50 to 255 ms
Altitude Divisor 17 0 1 1 to 255
Barometric Velocity filter time 18 0 3 0 to 255 0.01s
Auto Arm 1 19 0 0 0 to 255 10s incr
Logger Sample Time 50 3 10 2 + ms
Logger Sample Time units 51 3 0 0 or any 0 -> ms, any -> sec
Logger max pages (lo byte) 52 3 1 to 255
Logger max pages (hi byte) 53 3 0 to 31
Table 12 - Configuration Parameters
1 Note that if set to 0, this function is disabled.
7 Logged Data Data is logged and stored in flash memory which can be downloaded at a later time.
This data is stored in a number of formats, dependant on what mode was used to store the data.
The flash memory has 2 x 528 byte RAM buffers which enable continuous writing. This is done by
writing to the RAM buffer(s) whilst the data is being committed to FLASH from the other RAM buffer.
7.1 Flight Data format (opmode 0)
There are two types of data stored from flights, those being parameters and flight data.
Each sample of 22 bytes are separated by a CR & LF, including the parameters that are inserted
between the initial block of data and the main block.
Here is an example of this data :
--------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------
Flash dump latched (response to a ‘d’ command) $BEGIN (label indicating start of d ata block) 00 00 1E 00 05 00 89 04 4D 1D 03 00 D2 00 0E 00 3E 00 00 00 00 00 00 00 1E 00 05 00 A4 04 4C 1D 01 00 40 01 0E 00 3E 00 00 00 00 00 00 00 1E 00 05 00 D6 04 47 1D 03 00 EA 01 0F 00 40 00 14 00 00 00 00 00 1E 00 05 00 03 05 42 1D 06 00 80 02 10 00 43 00 31 00 00 00 00 00 1E 00 05 00 6B 05 3D 1D 0A 00 FC 03 12 00 4C 00 88 00 00 00 00 00 1E 00 05 00 6C 05 3B 1D 0F 00 FC 03 14 00 54 00 D1 00 00 00 00 00 1E 00 05 00 9C 05 3D 1D 15 00 A6 04 15 00 57 00 E4 00 00 00 00 00 1E 00 05 00 A0 05 42 1D 1B 00 C4 04 16 00 5A 00 F6 00 00 00 00 00 1E 00 05 00 94 05 47 1D 21 00 B0 04 16 00 5A 00 E9 00 00 00 00 00 1E 00 05 00 74 05 4B 1D 26 00 06 04 16 00 5A 00 DD 00 00 00 00 00 1E 00 05 00 75 05 4D 1D 2C 00 2E 04 15 00 57 00 B3 00 00 00 00 00 1E 00 05 00 71 05 4A 1D 31 00 24 04 15 00 57 00 AA 00 00 00 00 00 1E 00 05 00 7D 05 4E 1D 36 00 38 04 14 00 54 00 83 00 00 00 00 00 1E 00 05 00 73 05 4E 1D 3C 00 1A 04 14 00 54 00 7C 00 00 00 00 00 1E 00 05 00 76 05 4B 1D 41 00 2E 04 14 00 54 00 75 00 00 00 00 00 1E 00 05 00 80 05 4D 1D 46 00 4C 04 14 00 54 00 6F 00 00 00 00 00 1E 00 05 00 92 05 4B 1D 4C 00 92 04 14 00 54 00 69 00 00 00 00 00 1E 00 05 00 9A 05 46 1D 52 00 B0 04 14 00 54 00 63 00 00 00 00 00 1E 00 05 00 94 05 4C 1D 58 00 A6 04 14 00 54 00 5E 00 00 00 00 00 1E 00 05 00 57 05 4C 1D 5D 00 CA 03 14 00 54 00 59 00 00 00 78 04 57 00 1A 07 5A 00 FE 03 13 00 14 00 00 00 08 00 00 00 00 00 1E 28 00 00 00 28 03 64 FF 01 00 00 00 00 0F 00 40 00 00 00 00 00 00 00 DC 00 32 00 52 04 4E 1D D2 F5 0A 00 0F 00 40 00 00 00 00 00 00 00 DC 00 32 00 50 04 4E 1D D3 F5 14 00 0F 00 40 00 00 00 00 00 00 00 28 00 05 00 57 05 4C 1D 5D 00 CA 03 14 00 54 00 59 00 00 00 00 00 28 00 05 00 46 05 4D 1D 62 00 B6 03 14 00 54 00 54 00 01 00 00 00 28 00 05 00 5C 05 4A 1D 67 00 B6 03 14 00 54 00 4F 00 00 00 00 00 28 00 05 00 53 05 4D 1D 6C 00 A2 03 14 00 54 00 4B 00 00 00 00 00 28 00 05 00 51 05 4E 1D 71 00 D4 03 14 00 54 00 47 00 00 00 00 00 28 00 05 00 38 05 4E 1D 75 00 5C 03 14 00 54 00 43 00 00 00 $END (label indicating END of data block)
7.1.1 Formatting of logged data
The flight data is stored in two blocks, the first is from the samples taken during the liftoff detection
phase, the second is the data logged during the remainder of the flight.
Each of these samples is of the following format :
Byte # Description Type Units/Format
5,6 Sample time unsigned int
7,8 ADC ch2 (13 bit) unsigned int
9,10 ADC ch1 (Baro Sensor, 13
bit)
13,14 Acceleration integer 0.1 m/s/s
15,16 Barometric Pressure integer mbar
17,18 Altitude integer ft/divisor
21,22 Scan time integer ms Table 13 - Logged data formatting
7.1.2 Result & parameter format
The blue data in the example log above contains data in a very different format and contains flight
results and operating parameters.
1,2 Max altitude unsigned int ft
2,3 Time to max altitude unsigned int ms
3,4 Max acceleration unsigned int m/s/s
5,6 Time of max acceleration unsigned int ms
7,8 Max velocity unsigned int m/s
9,10 Time of max velocity unsigned int ms
11,12 Boost time/duration unsigned int ms
13 (EEPROM addr 0) See section 4
14 (EEPROM addr 1)
15 (EEPROM addr 2)
16 (EEPROM addr 3)
17 (EEPROM addr 4)
18 (EEPROM addr 5)
19 (EEPROM addr 6)
20 (EEPROM addr 7)
21 (EEPROM addr 8)
22 (EEPROM addr 9)
23 (EEPROM addr 10)
24 (EEPROM addr 11)
25 (EEPROM addr 12)
26 (EEPROM addr 13)
27 (EEPROM addr 14)
28 (EEPROM addr 15)
29 (EEPROM addr 16)
30 (EEPROM addr 17)
31 (EEPROM addr 18)
7.2 Free running logger data format (opmode 4)
Data format is the same as for flight mode ie opmode 0, however the result and configuration
parameters are not relevant.
7.3 Accessing logged data
A number of modes of operation cause the FC to log data to the external flash memory. The same
mechanism may be used to bring the data down to a PC via the serial/USB port for all these modes.
Downloading the data using a terminal program such as Terraterm :
1. Power up FC
2. Connect serial/USB cable
4. Trigger download using the ‘d’ command
5. The download will continue until all the pages are transmitted
6. Stop the terminal logger and save the file
7.4 Converting, plotting & analysing the logged data
<To be completed once PC application is finalised>
7.5 Examples of logged data
Figure 18 - Example chart from logged data
8 Updating Firmware The firmware may be updated/changed via the serial port on either of the FC hardware versions
2 .
The tool used to perform this process is called Tiny Bootloader & is available for download from
here : http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm
A very small program known as a bootloader resides within the microcontroller program memory.
This program always executes upon startup and looks for the PC bootloader application. If present, it
goes into programming mode, re-writing the main program with the one received through the serial
port.
8.1 Firmware update process
1. Start the application and point it at the new firmware file. Press the browse button top right
and select the firmware file.
2. Power up the FC and then connect the USB cable.
3. Open the Options tab and setup Codes to send first to 13,42,42,42,13 as shown below :
2 It is important to note that if the bootloader is corrupted OR the new version of firmware does not
behave as expected then the FC may become unusable until rectified.
4. Open the Terminal tab and select board rate of 115200
5. Click Open & type the command bp into the terminal window (you must click on the
window first) followed by the enter key. This changes the board rate to that required by the
bootloader. The terminal should look like this :
6. Close the port by pressing the close button.
7. Open the Message tab, then press the Write Flash button. This begins the firmware update
process and you should see the following on the message window (except the 1 hours old
will likely be different) :
8. The FC will restart at this time and you should hear the normal startup beep.
9. To confirm that the firmware version, re-open the Terminal tab and connect at 115200 baud.
Type the command V and it should return the version you have just loaded. For example :
10. Some alternative terminal programs are : Terraterm (used during dev of FC) , Realterm (not
much experience with this one but looks useful)