A'PEXi Power FC Interface for Raspberry Pi
Digital Gauge Display for A'PEXi Power FC which runs on Raspberry Pi. Raspexi is capable of communicating with the Power FC to retrieve diagnostic information and display the information in the form of aesthetic guages and dashboards. Raspexi has been tested for Mazda Power FC's and is currently in beta testing for Nissan, Subaru and Toyota Power FC's.
The Gauges and Dashboards used in this software are adapted from MegaTunix by David J. Andruczyk
The A'PEXi Serial interface is adapted from FCLogger by Hitoshi Kashima
Rasberry Pi with Raspbian OS. Tested versions:
* 2013-05-25-wheezy-raspbian
* 2013-09-25-wheezy-raspbian
* 2014-01-07-wheezy-raspbian
Extract the archive raspexi-yyyymmdd.tar.gz
to /home/pi
:
$ cd /home/pi
$ tar xvzf raspexi-yyyymmdd.tar.gz
There are a few configurable settings in raspexi.cfg
:
[default]
port = /dev/ttyUSB0
baud = 57600,8,n,1
interval = 35
model = Mazda
dash1 = Analogue_Dash_1280_720.xml
dash2 = Commander_1280_720.xml
dash3 = Digital_Dash_1280_720.xml
dash4 = Race_1280_720.xml
analog_eq1 = 1.4 * (AUX1 - AUX2) + 9.0
analog_eq2 = 0.5*AUX3+2.5
csvfile = /home/pi/raspexi/log/raspexi.csv
port ==> Serial port device name
baud ==> Serial port baud rate
interval ==> Data refresh interval
model ==> Mazda, Nissan, Subaru, Toyota
dash1, dash2, dash3, dash4 ==> Dashboard XML file
analog_eq1, analog_eq2, analog_eq3, analog_eq4 ==> Analog equations for auxiliary input relations. (See section 'Analog Auxiliary Input Relationship Equations' for more details)
csvfile ==> CSV log output file
Note: If the 'csvfile' location is set to the /tmp
directory then it will be removed by
the system on (re)start
Note: The 'model' setting is in testing and has only been confirmed for Mazda (March/2015)
You can run this release with the following command:
$ cd /home/pi/raspexi
$ ./run.sh
The following Descriptions are for information which the Power FC will return for a given model. The Datasource Name can be used in the dashboard XML files to define what information a particular gauge will display:
Note: The current version is in testing for support for vehicles other than Mazda (March/2015)
Description | Datasource Name | Mazda | Nissan | Subaru | Toyota |
---|---|---|---|---|---|
Engine Speed (rpm) | RPM |
✓ | ✓ | ✓* | ✓* |
Absolute Intake Pressure (Kg/cm2) | Intakepress |
✓ | ✓* | ||
Pressure Sensor Voltage (mv) | PressureV |
✓ | ✓* | ||
Engine Load (N) | EngLoad |
✓* | ✓* | ||
Mass Flow Sensor #1 (mv) | MAF1V |
✓* | ✓* | ||
Mass Flow Sensor #2 (mv) | MAF2V |
✓* | ✓* | ||
Throttle Sensor Voltage (mv) | ThrottleV |
✓ | ✓* | ✓* | ✓* |
Throttle Sensor #2 Voltage(mv) | ThrottleV_2 |
✓* | |||
Primary Injector Pulse Width (mSec) | Primaryinp |
✓ | ✓* | ✓* | ✓* |
Fuel correction | Fuelc |
✓ | ✓* | ✓* | ✓* |
Leading Ignition Angle (deg) | Leadingign |
✓ | ✓* | ✓* | ✓* |
Trailing Ignition Angle (deg) | Trailingign |
✓ | ✓* | ✓* | ✓* |
Fuel Temperature (deg.C) | Fueltemp |
✓ | |||
Metering Oil Pump Duty (%) | Moilp |
✓ | |||
Boost Duty (TP.%) | Boosttp |
✓ | |||
Boost Duty (Wg,%) | Boostwg |
✓ | |||
Boost Pressure (PSI) | BoostPres |
✓* | ✓* | ✓* | |
Boost Duty (%) | BoostDuty |
✓* | ✓* | ✓* | |
Water Temperature (deg. C) | Watertemp |
✓ | ✓* | ✓* | ✓* |
Intake Air Temperature (deg C) | Intaketemp |
✓ | ✓* | ✓* | ✓* |
Knocking Level | Knock |
✓ | ✓* | ✓* | ✓* |
Battery Voltage (V) | BatteryV |
✓ | ✓* | ✓* | ✓* |
Vehicle Speed (Km/h) | Speed |
✓ | ✓* | ✓* | ✓* |
ISCV duty (%) | Iscvduty |
✓ | ✓* | ||
Mass Air Flow sensor activity ratio (%) | MAFactivity |
✓* | ✓* | ||
O2 Sensor Voltage (mv) | O2volt |
✓ | ✓* | ✓* | ✓* |
O2 Sensor #2 Voltage (mV) | O2volt_2 |
✓* | ✓* | ||
Secondary Injector Pulse Width (mSec) | Secinjpulse |
✓ | |||
Suction In Air Temperature (mV) | SuctionAirTemp |
✓* | |||
Analog Auxiliary Input #1 | AUX1 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #2 | AUX2 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #3 | AUX3 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #4 | AUX4 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #5 | AUX5 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #6 | AUX6 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #7 | AUX7 |
✓ | ✓ | ✓ | ✓ |
Analog Auxiliary Input #8 | AUX8 |
✓ | ✓ | ✓ | ✓ |
Result of Analog Equation #1 | Analog1 |
✓ | ✓ | ✓ | ✓ |
Result of Analog Equation #2 | Analog2 |
✓ | ✓ | ✓ | ✓ |
Result of Analog Equation #3 | Analog3 |
✓ | ✓ | ✓ | ✓ |
Result of Analog Equation #4 | Analog4 |
✓ | ✓ | ✓ | ✓ |
Coming soon ... | |||||
Instantaneous vehicle power (kW) | Power |
||||
Vehicle Acceleration (100km/h/s) | Accel |
||||
Force exerted in Newtons (N) | ForceN |
||||
Force exerted in G-force (G) | ForceG |
||||
* Implemented but untested |
It may not be convenient to view AUX1
, AUX2
, etc, in a gauge as is. Therefore we have implemented a simple linear equation parser for the raspexi.cfg
file. The linear equations can be represented in the form 'y=m*x+b'. Here, the result 'y' is stored in either Analog1
, Analog2
, Analog3
or Analog4
depending on the definition in raspexi.cfg
, 'm' is a multiplier, 'x' is an auxiliary input (AUX1
, AUX2
, etc) and 'b' is an adder.
Two examples are as follows:
For 'y' = Analog1
, 'm' = 1.4
, 'x' = AUX1 - AUX2
and 'b' = 9.0
. The resulting line in raspexi.cfg
could be analog_eq1 = 1.4 * (AUX1 - AUX2) + 9.0
.
For 'y' = Analog2
, 'm' = 0.5
, 'x' = AUX3
and 'b' = 2.5
. The resulting line in raspexi.cfg
could be analog_eq2 = 0.5*AUX3+2.5
.
Note: The multiplication, subtraction and addition cannot be changed and spaces in the equation are ignored.
You can create your very own custom gauges and dashboards using MegaTunix which you can download compiled here or the source here.
To create your own Gauges you can use the MtxGaugeDesigner
.
To create your own Dashboards (which can include custom gauges) you can use the MtxDashDesigner
.
Once you have saved the custom Gauges and Dashboards in the XML file format you will need to make sure that the XML field element <datasource>
contains the appropriate 'Datasource Name' from the table above for each <gauge>
in the dashboard XML file.
$ git clone https://github.com/djandruczyk/MegaTunix
Set up all dependencies and build MegaTunix
(See README.md
in MegaTunix for more detail)
Download or clone Raspexi source code from :-
$ cd MegaTunix
$ git clone https://github.com/MarkusIppy/raspexi-viewer-linux raspexi
raspexi/Makefile
to MegaTunix AutoConf configuration file (configure.ac
)diff --git a/configure.ac b/configure.ac
index e868b1b..9bec24f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -311,6 +311,7 @@ MegaTunix32_dbg.iss
MegaTunix64_dbg.iss
Doxyfile
WIN_NOTES.txt
+raspexi/Makefile
])
AC_OUTPUT
autogen.sh
to generate build configuration.$ ./autogen.sh CPPFLAGS="-UDATA_DIR -DDATA_DIR=\\\"./\\\""
Command line option CPPFLAGS="-UDATA_DIR -DDATA_DIR=\\\"./\\\""
is need to override data directory (ex. /Dashboards
, /Gauges
, ...)
of MegaTunix to working directory.
$ cd raspexi
$ ./compile.sh
$ ./package.sh
raspexi-yyyymmdd.tar.gz
will then be created.Revision | Date (d/m/y) | Notes |
---|---|---|
R6 | 15/03/2015 |
|
R5 | 07/07/2014 |
|
R4 | 07/05/2014 |
|
R3 | 18/04/2014 |
|
R2 | 05/04/2014 |
|
R1 | 31/03/2014 |
|