EfiO2Meter Android Software

From efiHacks Wiki
Jump to: navigation, search


Android based GUI Application Description

The Android App is finally more or less reality and we use it already for testing the hardware and firmware.
We have a really nice control-framework (client server) and the screens (android activities) are pretty simple to build.
The App has been tested on 4.7" HTC One, 7" Nexus 2012, 10.1" Samsung Galaxy 2012 Android Devices. It should also work fine on higher screen resolutions on newer devices as long as the screen sizes are similar to our 3 test devices. The App requires Android 4.1 and above which covers more than 50 % of the current Android distribution.

The following link is frequently updated to reflect the design progress of our Android App,as long as we do not write a new post.

efiO2Meter Android App Test Download :... for limited testing only :)

Menu Selections

The displayed Menu choices might change on some pages, however some of the same will be present on most pages.

  • CMD x : displays the numbers of currently issued commands. This is useful as an indication of successful command completion.

Some commands will not produce errors if the data is outside its limit, rather setting it to the limit itself. It is therefore advisable to verify the set data upon the data display update within a 10 sec max delay time.
Any error condition will be indicated with "CMD n, ERR".
Pushing the CMD button will clear errors and reset the cmd count to 0.

  • ENABLE, DISABLE : Is being used to estabish the data-package communication with the device. All Android page data updates are based upon this data-package communication. So the 1st thing to do is to press the Enable button to allow the Android App to communicate with the device.
  • START, STOP : will start and stop the heating of the enabled Sensors and Lambda measurements can proceed.
  • LOG-ON, LOG-OFF : indicate the data logging run condition.
  • Menu : provides the display of different pages within the menu hierarchy.

Menu Hierarchy

All pages (screens, Android Activities) act upon certain preset rules

  • Scan Page : is the 1st page showing upon opening the application, providing the selection of a Bluetooth based efiO2Meter device.

Bypassing the Scan Page can be accomplished by using the menu to explore all available pages. However NO ACTION can be performed without a proper 1st selecting a bluetooth device upon opening the App and proceeding this way to the Main Page.

  • Main Page : is, as the name says, the main page all other pages will return to upon pressing the return icon.
  • Other Pages : can be selected via the menu icon in the top left corner. One by one without going back to the main page. However pressing the return icon will bring you back to the main page.
  • Console Page : can be called from any other page to monitor the messages sent by the device, or to issue command line commands. It acts as a Modal page and pressing the back icon will get you back to where the Console Page was issued from.

The start of rolling out our production will take a lot of our resources and the Data Logging and Real-Time Graph will follow soon.
The functionality available at this time should be sufficient for most applications and the Real-Time graph will follow next, followed by desktop application support for data log analysis.
All this is a pure software effort since the firmware provides already all necessary data. So please be patient for the next Application software updates, as always down-loadable free of charge.

Application Data Management

Our Application uses Android-External-Storage, as of External SD card or whatever your device manufacturer considered to be the External-Storage area within the devices directory structure. The graph-config and graph-data are stored in the, to the app, local external directory. All App config and data files are of binary nature and not user readable.
The graph-config and graph-data files represent serialized objects and can only used with the matching App release.

There is one detail to observe when updating our Android Application. In case of loading a new release the previous App Config and Data files need to be deleted in the Android App Manager, otherwise the newly loaded app will not start properly

efiO2Meter Bluetooth Scan Page

This is the page upon opening the efiO2Meter Application. it shows all currently available bluetooth devices and selecting the efiO2Meter will bring up the Main App page.

EfiO2Meter app scan.png

efiO2Meter Main Page

This is the main page, displaying all important measurement data as well as some runtime data and status, mode and error information.

The screen is organized in 3 columns, with the 1st one providing the names for the data following it.
The next 2 columns provide the data for Sensor A and Sensor B.

Any labels in black are not changeable, while labels in blue are configurable.
Labels in Burgundy represent actual Meter Data and Meter Configuration Values.

The 1st row displays the sensor values in the selected Units, while, the next row carries the sensor values in native Lambda Units.
Bargraphs are also provided for an easier visualization of the current values.

The 3rd row holds 3 data values per sensor. The 1st being the Ion Pump Current measured across the 61.9 Ohm measurement resistor, followed by the Sensor Inner Resistance Delta from a reference value (unit-less data). And finally the Heater Power with a max value of 999 being 100 % PWM On Time. Normal closed loop values on an LSU 4.9 type sensor will hardly exceed a 60 % value of 600.

While the measured Ion Pump current is of a more theoretical value, the Delta Ri represents how close the Heater PID Control is tracking the measured Ri compared to the reference Ri value. Any major deviation from the target value will result in a Lambda measurement data error (most likely small in nature).
The Heater Power is an indication on how much the hot exhaust is heating the sensor versus the electric Heater. It's only important on the hotter running gas engines under near or full load. This situation might heat the sensor over the normal operating temperature and a Lambda measurement error will be the result (most likely also small in nature, unless the sensor is mounted right at the exhaust port and / or on a compressor based engine or similar in nature) .

The Error Flags are explained in details at the Error Flags Documentation. The button next to the erros can be used to clear the warning type errors (Pos / Neg Loss of Heater Control Lock, typically at start condition or sensor overheating caused by full load exhaust).

There are 5 Sensor Modes :

  • nop : no operation, sensor standby.
  • off : sensor heating control is being turned off.
  • warm : sensor warm up time period.
  • heat : sensor heat up at a ramp rate of 0.4 V / sec until PID lock or timeout.
  • loop : sensor heater PID lock.

The following data values come from the RPM pulse detection circuit, the TPS analog input and EXTernal analog input. The ACCeleration value will be calculated from the Delta RPM pulse time and requires a steady stream of RPM pulses.
More details at the Config Section.

At the bottom of the screen is the analog graph section. It contains up to 8 channels (traces), whereas each one provides a signal source selection along with trace display min / max limits and a trace time delay shift option.

Double Clicking will start and stop the trace recording. The trace can be swiped back and forth it's time axis in stopped mode.

EfiO2Meter app main.png

the recording shown in the graph is right after turn-on and heater temp control PID lock and is not completely settled in (needs more PID parameter tuning).

the green trace is the lambda signal along with a short fast push on the gas-pedal ... note the fast sensor, instrument response time at positive lambda slope at a range of 0.82 to 1.12 within 50 msec (set graph range limits 0.70 to 1.20)

the blue trace represents the sensor delta Ri and the red trace the slower sampled (steps) PWM heater power.

no valid RPM, TPS and Ext-Input display, since we did not have the crank-shaft sensor or the TPS and Ext sensor hooked up.

efiO2Meter Run-Time Diagnostic Page

The Diagnostic Page provides all device information necessary to follow the exact operation of the device as well as the environment conditions the sensor is operating in.

So let's start ... Dual Sensor support. Lambda Data ... Sensor Ion Pump Current on 61.9 Ohm measurement resistor ... Heater Power 0 to 999 ... Sensor Ri Delta Value to reference Ri and PID error data (both values represent the same data but at different sections in the firmware) ... PID proportional control gain value ... PID integral control gain value.

The next line contains the CJ125 Sensor Frontend Signal Pre-Processor data.
The Mode Control States are : nop, off, warm, heat and loop as described above.

  • v-urc : volt UR-cali value.
  • v-ur : volt UR-data value.
  • v-uac 8,17 : volt UA-cali value for gain 8 and 17.
  • v-ua : volt UA-data value.
  • errors : as explained earlier, with clear button.

And very important ... the console message receive scroll portion below, to see what happened if interested (this can help diagnosing any kind of malfunctioning, device, sensor or environment dependent).

EfiO2Meter app diag.png

efiO2Meter Transfer Functions Config Page

This page is used to setup all the analog output and input transfer function parameters.

While this page bares a certain complexity, we made any effort to keep it as easy to understand as possible.
There are basically 2 different setup portions combined within this page, one being the PWM based analog output config of the analog out signal and the nbO2 simulation analog output. The other being the config of the analog inputs, TPS and EXTernal in.

The Transfer Function signal flow is always from the bottom horizontal input controls to the left vertical output controls.
Two reference points need to be set and a line between defines the transfer calculations. In some cases these reference points also serve as the output limits (nbSim volt out, TPS % output)

Button labes in blue indicate the current selection.

PWM Analog Outputs

Source button Sensor A and Sensor B provide the Sensor selection while destination button Analog Out and nbSim Out select the signal output.
All numbers in red represents absolute limits, while the green numbers are the currently set values.
Pressing the appropriate Set button will send the config data and the green set values should update within 10 secs.

The 2 reference points in Lambda or other units can be selected at the horizontal bottom edit fields. The Set-Data button will issue the command to transfer the input config data.
These controls are only available in the Custom Range selection, otherwise the displayed values are preset by the Range selection.

The output voltage for these reference points can be selected in the left vertically arranged 2 edit fields. The Set-Volt button issues the set output config set values command.

The 2 left bottom blue strings indicate the current Fuel Units and Range selection

Analog Input Configuration

Source button Inputs selects the Analog Input Mode while destination button TPS Input and Ext Input select the signal selection.

The 2 reference points for the input voltage can be selected at the horizontal bottom edit fields. The Set-Volt button will issue the command to transfer the input voltage config data.

The Set-0 and Set-1 buttons can be used to set the currently measured input voltages for the 0 and 1 reference voltage points.

The numerical output data for these reference points can be selected in the left vertically arranged 2 edit fields. The Set-Data button issues the set data config set values command.

EfiO2Meter app xfunc.png

efiO2Meter Global Config Page

The following screen shows most of the device configuration options, which is divided into 5 sections.

  • the top left section provides the enable disable configuration for the sensor control and the Sensor type selection.

Note : the sensor enable section is basically used to support a Sensor-B daughter board if present and sensors connected to the available Cj125 based sensor control modules.

Note : changing Sensor types also require to have the Matching Jumper Selection in place. Do NOT mismatch Sensor and Jumper Selection, since Sensor heat damage to the sensor can result and any sensor readings are meaningless.

  • the top left section provides the selection of fuel types and measurement units.

As for most configuration choices, pressing the Change or Set Button issues the specific command and the change in selection should be displayed within 10 secs.

  • the 3rd section provides the ability to change the PID Heater Control parameters. It is not advisable to change the factory setting unless the user has an in-depth knowledge of PID control along with a reason for change.
  • section number 4 provides the selection of some less important config commands along with the available command arguments. Upon changing the command selection any available arguments will be preset with its argument type, which needs to be replace with the desired argument data.
  • section 5 is the console message reception area.

EfiO2Meter app conf.png

efiO2Meter Console Communication Page

The following screen shows the Console displaying any device messages as well as command input if desired.

EfiO2Meter app cons.png

efiO2Meter Graph Config Page

This screen can be used to configures up to 8 traces on the Real-Rime Graph. This is part of the Application Graph Config and does not affect any efiO2Meter config settings.

EfiO2Meter app graph.png

Note : All published design documentation is Copyright efiLabs.com and its use is without exception FOR NON COMMERCIAL PURPOSE ONLY. For commercial licenses contact efilabs.com ... try us, we're reasonable :)

Personal tools